diff --git a/packages/challenge-prisma-client/client.d.ts b/packages/challenge-prisma-client/client.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/packages/challenge-prisma-client/client.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/packages/challenge-prisma-client/client.js b/packages/challenge-prisma-client/client.js new file mode 100644 index 0000000..6ac8a81 --- /dev/null +++ b/packages/challenge-prisma-client/client.js @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +module.exports = { ...require('.') } \ No newline at end of file diff --git a/packages/challenge-prisma-client/default.d.ts b/packages/challenge-prisma-client/default.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/packages/challenge-prisma-client/default.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/packages/challenge-prisma-client/default.js b/packages/challenge-prisma-client/default.js new file mode 100644 index 0000000..eb55675 --- /dev/null +++ b/packages/challenge-prisma-client/default.js @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +module.exports = { ...require('#main-entry-point') } \ No newline at end of file diff --git a/packages/challenge-prisma-client/edge.d.ts b/packages/challenge-prisma-client/edge.d.ts new file mode 100644 index 0000000..274b8fa --- /dev/null +++ b/packages/challenge-prisma-client/edge.d.ts @@ -0,0 +1 @@ +export * from "./default" \ No newline at end of file diff --git a/packages/challenge-prisma-client/edge.js b/packages/challenge-prisma-client/edge.js new file mode 100644 index 0000000..333172e --- /dev/null +++ b/packages/challenge-prisma-client/edge.js @@ -0,0 +1,875 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime, + createParam, +} = require('./runtime/edge.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.0 + * Query Engine version: 2ba551f319ab1df4bc874a89965d8b3641056773 + */ +Prisma.prismaVersion = { + client: "6.19.0", + engine: "2ba551f319ab1df4bc874a89965d8b3641056773" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.ChallengeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + projectId: 'projectId', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + overviewTotalPrizes: 'overviewTotalPrizes', + numOfRegistrants: 'numOfRegistrants', + numOfSubmissions: 'numOfSubmissions', + numOfCheckpointSubmissions: 'numOfCheckpointSubmissions', + currentPhaseNames: 'currentPhaseNames', + wiproAllowed: 'wiproAllowed', + tags: 'tags', + groups: 'groups', + taskIsTask: 'taskIsTask', + taskIsAssigned: 'taskIsAssigned', + taskMemberId: 'taskMemberId', + submissionStartDate: 'submissionStartDate', + submissionEndDate: 'submissionEndDate', + registrationStartDate: 'registrationStartDate', + registrationEndDate: 'registrationEndDate', + startDate: 'startDate', + endDate: 'endDate', + legacyId: 'legacyId', + status: 'status', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + isTask: 'isTask', + abbreviation: 'abbreviation', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + abbreviation: 'abbreviation', + legacyId: 'legacyId', + track: 'track', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + isDefault: 'isDefault', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + fileSize: 'fileSize', + url: 'url', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + userId: 'userId', + handle: 'handle', + placement: 'placement', + type: 'type', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingScalarFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + markup: 'markup', + clientBillingRate: 'clientBillingRate', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyScalarFieldEnum = { + id: 'id', + reviewType: 'reviewType', + confidentialityType: 'confidentialityType', + forumId: 'forumId', + directProjectId: 'directProjectId', + screeningScorecardId: 'screeningScorecardId', + reviewScorecardId: 'reviewScorecardId', + isTask: 'isTask', + useSchedulingAPI: 'useSchedulingAPI', + pureV5Task: 'pureV5Task', + pureV5: 'pureV5', + selfService: 'selfService', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + legacySystemId: 'legacySystemId', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + eventId: 'eventId', + name: 'name', + key: 'key', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + type: 'type', + provider: 'provider', + url: 'url', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionScalarFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isOpen: 'isOpen', + duration: 'duration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + isOpen: 'isOpen', + predecessor: 'predecessor', + duration: 'duration', + scheduledStartDate: 'scheduledStartDate', + scheduledEndDate: 'scheduledEndDate', + actualStartDate: 'actualStartDate', + actualEndDate: 'actualEndDate', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintScalarFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + type: 'type', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + type: 'type', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseName: 'phaseName', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + opportunityType: 'opportunityType', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseScalarFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + defaultDuration: 'defaultDuration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessScalarFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.ChallengeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + currentPhaseNames: 'currentPhaseNames', + tags: 'tags', + groups: 'groups', + taskMemberId: 'taskMemberId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + url: 'url', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeOrderByRelevanceFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + handle: 'handle', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingOrderByRelevanceFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyOrderByRelevanceFieldEnum = { + id: 'id', + confidentialityType: 'confidentialityType', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + key: 'key', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + provider: 'provider', + url: 'url', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionOrderByRelevanceFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + phaseName: 'phaseName', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseOrderByRelevanceFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessOrderByRelevanceFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; +exports.ChallengeTrackEnum = exports.$Enums.ChallengeTrackEnum = { + DESIGN: 'DESIGN', + DATA_SCIENCE: 'DATA_SCIENCE', + DEVELOPMENT: 'DEVELOPMENT', + QUALITY_ASSURANCE: 'QUALITY_ASSURANCE' +}; + +exports.ReviewTypeEnum = exports.$Enums.ReviewTypeEnum = { + COMMUNITY: 'COMMUNITY', + INTERNAL: 'INTERNAL', + SYSTEM: 'SYSTEM', + PROVISIONAL: 'PROVISIONAL', + EXAMPLE: 'EXAMPLE' +}; + +exports.DiscussionTypeEnum = exports.$Enums.DiscussionTypeEnum = { + CHALLENGE: 'CHALLENGE' +}; + +exports.ChallengeStatusEnum = exports.$Enums.ChallengeStatusEnum = { + NEW: 'NEW', + DRAFT: 'DRAFT', + APPROVED: 'APPROVED', + ACTIVE: 'ACTIVE', + COMPLETED: 'COMPLETED', + DELETED: 'DELETED', + CANCELLED: 'CANCELLED', + CANCELLED_FAILED_REVIEW: 'CANCELLED_FAILED_REVIEW', + CANCELLED_FAILED_SCREENING: 'CANCELLED_FAILED_SCREENING', + CANCELLED_ZERO_SUBMISSIONS: 'CANCELLED_ZERO_SUBMISSIONS', + CANCELLED_WINNER_UNRESPONSIVE: 'CANCELLED_WINNER_UNRESPONSIVE', + CANCELLED_CLIENT_REQUEST: 'CANCELLED_CLIENT_REQUEST', + CANCELLED_REQUIREMENTS_INFEASIBLE: 'CANCELLED_REQUIREMENTS_INFEASIBLE', + CANCELLED_ZERO_REGISTRATIONS: 'CANCELLED_ZERO_REGISTRATIONS', + CANCELLED_PAYMENT_FAILED: 'CANCELLED_PAYMENT_FAILED' +}; + +exports.PrizeSetTypeEnum = exports.$Enums.PrizeSetTypeEnum = { + PLACEMENT: 'PLACEMENT', + COPILOT: 'COPILOT', + REVIEWER: 'REVIEWER', + CHECKPOINT: 'CHECKPOINT' +}; + +exports.ReviewOpportunityTypeEnum = exports.$Enums.ReviewOpportunityTypeEnum = { + REGULAR_REVIEW: 'REGULAR_REVIEW', + COMPONENT_DEV_REVIEW: 'COMPONENT_DEV_REVIEW', + SPEC_REVIEW: 'SPEC_REVIEW', + ITERATIVE_REVIEW: 'ITERATIVE_REVIEW', + SCENARIOS_REVIEW: 'SCENARIOS_REVIEW' +}; + +exports.Prisma.ModelName = { + Challenge: 'Challenge', + ChallengeType: 'ChallengeType', + ChallengeTrack: 'ChallengeTrack', + ChallengeTimelineTemplate: 'ChallengeTimelineTemplate', + AuditLog: 'AuditLog', + Attachment: 'Attachment', + ChallengeMetadata: 'ChallengeMetadata', + Prize: 'Prize', + ChallengeWinner: 'ChallengeWinner', + ChallengeTerm: 'ChallengeTerm', + ChallengeSkill: 'ChallengeSkill', + ChallengeBilling: 'ChallengeBilling', + ChallengeLegacy: 'ChallengeLegacy', + ChallengeEvent: 'ChallengeEvent', + ChallengeDiscussion: 'ChallengeDiscussion', + ChallengeDiscussionOption: 'ChallengeDiscussionOption', + ChallengeConstraint: 'ChallengeConstraint', + Phase: 'Phase', + ChallengePhase: 'ChallengePhase', + ChallengePhaseConstraint: 'ChallengePhaseConstraint', + ChallengePrizeSet: 'ChallengePrizeSet', + ChallengeReviewer: 'ChallengeReviewer', + DefaultChallengeReviewer: 'DefaultChallengeReviewer', + TimelineTemplate: 'TimelineTemplate', + TimelineTemplatePhase: 'TimelineTemplatePhase', + MemberChallengeAccess: 'MemberChallengeAccess' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "externalClient", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "/home/vasea/work/topcoder/challenge-api-v6/packages/challenge-prisma-client", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x", + "native": true + }, + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x" + } + ], + "previewFeatures": [ + "fullTextSearchPostgres", + "postgresqlExtensions", + "views" + ], + "sourceFilePath": "/home/vasea/work/topcoder/challenge-api-v6/prisma/schema.prisma", + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": null, + "schemaEnvPath": "../../.env" + }, + "relativePath": "../../prisma", + "clientVersion": "6.19.0", + "engineVersion": "2ba551f319ab1df4bc874a89965d8b3641056773", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "datasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n previewFeatures = [\"fullTextSearchPostgres\", \"postgresqlExtensions\", \"views\"]\n}\n\ngenerator externalClient {\n provider = \"prisma-client-js\"\n output = \"../packages/challenge-prisma-client\"\n previewFeatures = [\"fullTextSearchPostgres\", \"postgresqlExtensions\", \"views\"]\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\n// Enum for allowed challenge track values (matches app-constants)\nenum ChallengeTrackEnum {\n DESIGN\n DATA_SCIENCE\n DEVELOPMENT\n QUALITY_ASSURANCE\n}\n\nenum ReviewTypeEnum {\n COMMUNITY\n INTERNAL\n SYSTEM\n PROVISIONAL\n EXAMPLE\n}\n\nenum DiscussionTypeEnum {\n CHALLENGE\n}\n\nenum ChallengeStatusEnum {\n NEW\n DRAFT\n APPROVED\n ACTIVE\n COMPLETED\n DELETED\n CANCELLED\n CANCELLED_FAILED_REVIEW\n CANCELLED_FAILED_SCREENING\n CANCELLED_ZERO_SUBMISSIONS\n CANCELLED_WINNER_UNRESPONSIVE\n CANCELLED_CLIENT_REQUEST\n CANCELLED_REQUIREMENTS_INFEASIBLE\n CANCELLED_ZERO_REGISTRATIONS\n CANCELLED_PAYMENT_FAILED\n}\n\nenum PrizeSetTypeEnum {\n PLACEMENT\n COPILOT\n REVIEWER\n CHECKPOINT\n}\n\n// Enum for review opportunity types on reviewers\nenum ReviewOpportunityTypeEnum {\n REGULAR_REVIEW\n COMPONENT_DEV_REVIEW\n SPEC_REVIEW\n ITERATIVE_REVIEW\n SCENARIOS_REVIEW\n}\n\n//////////////////////////////////////////\n// Main Challenge model\n//////////////////////////////////////////\n\nmodel Challenge {\n id String @id @default(uuid())\n name String\n description String?\n privateDescription String?\n challengeSource String?\n descriptionFormat String?\n projectId Int? // frequently queried field\n typeId String\n trackId String // FK for relation in ChallengeTrack\n timelineTemplateId String? // now used as foreign key to ChallengeTimelineTemplate\n overviewTotalPrizes Float? // stored from overview.totalPrizes\n numOfRegistrants Int @default(0)\n numOfSubmissions Int @default(0)\n numOfCheckpointSubmissions Int @default(0)\n currentPhaseNames String[] // current phase names\n\n wiproAllowed Boolean @default(false)\n\n // simple arrays for tags and groups (PostgreSQL native array type)\n tags String[]\n groups String[]\n\n // Task information (flattened from challenge.task)\n taskIsTask Boolean @default(false)\n taskIsAssigned Boolean @default(false)\n taskMemberId String?\n\n // Dates for challenge lifecycle\n submissionStartDate DateTime?\n submissionEndDate DateTime?\n registrationStartDate DateTime?\n registrationEndDate DateTime?\n startDate DateTime?\n endDate DateTime?\n\n // Normalized billing and legacy information (one-to-one)\n billingRecord ChallengeBilling?\n legacyId Int? // Legacy system ID for searching\n legacyRecord ChallengeLegacy? @relation(\"ChallengeLegacyRelation\")\n\n // Additional fields from createChallenge schema\n status ChallengeStatusEnum @default(NEW) // new challenges default to status \"New\"\n // Normalized top‑level constraints (e.g. allowedRegistrants) for a challenge\n constraintRecord ChallengeConstraint?\n\n // Additional normalized relations from createChallenge\n events ChallengeEvent[]\n discussions ChallengeDiscussion[]\n\n // Existing relations (one-to-many) for challenge metadata, phases, prize sets, winners, attachments,\n // terms and skills\n metadata ChallengeMetadata[]\n phases ChallengePhase[]\n prizeSets ChallengePrizeSet[]\n reviewers ChallengeReviewer[]\n winners ChallengeWinner[]\n attachments Attachment[]\n terms ChallengeTerm[]\n skills ChallengeSkill[]\n auditLogs AuditLog[]\n memberAccesses MemberChallengeAccess[]\n\n // Relation to ChallengeType (FK: typeId)\n type ChallengeType @relation(fields: [typeId], references: [id])\n // Relation to ChallengeTrack (FK: trackId)\n track ChallengeTrack @relation(fields: [trackId], references: [id])\n\n timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id])\n\n // Auditing fields (present in every table)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([projectId])\n @@index([status]) // index added for optimized search by status\n @@index([createdAt])\n @@index([updatedAt])\n @@index([typeId])\n @@index([trackId])\n @@index([groups], type: Gin, map: \"challenge_groups_gin_idx\")\n @@index([submissionStartDate])\n @@index([submissionEndDate])\n @@index([registrationStartDate])\n @@index([registrationEndDate])\n @@index([startDate])\n @@index([endDate])\n @@index([status, startDate])\n @@index([trackId, typeId, status])\n @@index([status, typeId, trackId, createdAt(sort: Desc)], map: \"challenge_status_type_track_created_at_idx\")\n @@index([legacyId])\n @@index([projectId, status])\n}\n\n//////////////////////////////////////////\n// MemberChallengeAccess view – member/challenge pairs from resources schema\n//////////////////////////////////////////\n\nview MemberChallengeAccess {\n challengeId String\n memberId String\n\n challenge Challenge @relation(fields: [challengeId], references: [id])\n\n @@map(\"MemberChallengeAccess\")\n}\n\n//////////////////////////////////////////\n// ChallengeType model\n//////////////////////////////////////////\n\nmodel ChallengeType {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean @default(true)\n isTask Boolean @default(false)\n abbreviation String\n\n challenges Challenge[]\n timelineTemplates ChallengeTimelineTemplate[]\n // Default reviewer configurations associated with this type\n defaultReviewers DefaultChallengeReviewer[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([abbreviation])\n}\n\n//////////////////////////////////////////\n// ChallengeTrack model\n//////////////////////////////////////////\n\nmodel ChallengeTrack {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean\n abbreviation String\n legacyId Int? // numeric legacy system id (if provided)\n track ChallengeTrackEnum? // enum value from ChallengeTrackEnum\n challenges Challenge[]\n // Opposite relation for ChallengeTimelineTemplate\n timelineTemplates ChallengeTimelineTemplate[]\n // Default reviewer configurations associated with this track\n defaultReviewers DefaultChallengeReviewer[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([legacyId])\n}\n\n//////////////////////////////////////////\n// ChallengeTimelineTemplate model\n//////////////////////////////////////////\n\nmodel ChallengeTimelineTemplate {\n id String @id @default(uuid())\n typeId String\n trackId String\n timelineTemplateId String // now required per Swagger spec\n\n // Link to the TimelineTemplate model via timelineTemplateId.\n timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id])\n // Link to the ChallengeTrack model via trackId.\n track ChallengeTrack @relation(fields: [trackId], references: [id])\n // Link to the ChallengeType model via typeId.\n type ChallengeType @relation(fields: [typeId], references: [id])\n\n isDefault Boolean @default(false)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Composite index to support searches/updates by typeId, trackId and timelineTemplateId.\n @@index([typeId, trackId, timelineTemplateId])\n}\n\n//////////////////////////////////////////\n// AuditLog model – tracks field changes\n//////////////////////////////////////////\n\nmodel AuditLog {\n id String @id @default(uuid())\n challengeId String? // optional association with a challenge\n fieldName String\n oldValue String?\n newValue String?\n createdAt DateTime @default(now())\n createdBy String\n memberId String?\n\n // Relation field to connect AuditLog to Challenge.\n challenge Challenge? @relation(fields: [challengeId], references: [id])\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// Attachment model – for challenge attachments\n//////////////////////////////////////////\n\nmodel Attachment {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n name String\n fileSize Int\n url String\n description String?\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeMetadata model – key/value metadata\n//////////////////////////////////////////\n\nmodel ChallengeMetadata {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n name String // name of the metadata\n value String // value stored as string for flexibility\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// Prize model – individual prize in a prize set\n//////////////////////////////////////////\n\nmodel Prize {\n id String @id @default(uuid())\n description String?\n prizeSet ChallengePrizeSet @relation(fields: [prizeSetId], references: [id], onDelete: Cascade)\n prizeSetId String\n type String // e.g. \"USD\", \"POINT\" (could also be converted to enum later)\n value Float\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeWinner model – record winners for a challenge\n//////////////////////////////////////////\n\nmodel ChallengeWinner {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n userId Int\n handle String\n placement Int\n type PrizeSetTypeEnum\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, type, placement])\n}\n\n//////////////////////////////////////////\n// ChallengeTerm model – association of challenge and terms\n//////////////////////////////////////////\n\nmodel ChallengeTerm {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n termId String // Terms API id\n roleId String // UUID for the associated role\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeSkill model – linking challenges with skills\n//////////////////////////////////////////\n\nmodel ChallengeSkill {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n skillId String // Request provided skillId\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeBilling model – normalized billing info\n//////////////////////////////////////////\n\nmodel ChallengeBilling {\n id String @id @default(uuid())\n billingAccountId String?\n markup Float? // in range [0, 100]\n clientBillingRate Float? // in range [0, 100]. Supporting range on postgres is an open issue with prisma https://github.com/prisma/prisma/issues/3287.\n challengeId String @unique\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeLegacy model – normalized legacy info\n//////////////////////////////////////////\n\nmodel ChallengeLegacy {\n id String @id @default(uuid())\n reviewType ReviewTypeEnum @default(INTERNAL)\n confidentialityType String @default(\"public\")\n forumId Int?\n directProjectId Int?\n screeningScorecardId Int?\n reviewScorecardId Int?\n isTask Boolean @default(false)\n useSchedulingAPI Boolean @default(false)\n pureV5Task Boolean @default(false)\n pureV5 Boolean @default(false)\n selfService Boolean @default(false)\n selfServiceCopilot String?\n track String? // as provided in the legacy object\n subTrack String? // as provided in the legacy object\n legacySystemId Int? // represents the external \"legacyId\"\n challengeId String @unique\n challenge Challenge @relation(\"ChallengeLegacyRelation\", fields: [challengeId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeEvent model – normalized challenge events\n//////////////////////////////////////////\n\nmodel ChallengeEvent {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n eventId Int\n name String?\n key String?\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// ChallengeDiscussion and associated options – normalized discussion channels\n//////////////////////////////////////////\n\nmodel ChallengeDiscussion {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n discussionId String?\n name String\n type DiscussionTypeEnum // updated to use enum\n provider String\n url String?\n options ChallengeDiscussionOption[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\nmodel ChallengeDiscussionOption {\n id String @id @default(uuid())\n discussion ChallengeDiscussion @relation(fields: [discussionId], references: [id], onDelete: Cascade)\n discussionId String\n optionKey String\n optionValue String\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeConstraint model – top-level challenge constraints (e.g. allowed registrants)\n//////////////////////////////////////////\n\nmodel ChallengeConstraint {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String @unique\n allowedRegistrants String[] @default([])\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePhase – to capture per-phase info from create/update challenge operations\n// Each phase is linked with a challenge and holds a duration and any custom constraints.\n//////////////////////////////////////////\n\nmodel Phase {\n id String @id @default(uuid())\n name String\n description String?\n isOpen Boolean\n duration Int\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Inverse relation for associated challenge phases\n challengePhases ChallengePhase[]\n ChallengeReviewer ChallengeReviewer[]\n DefaultChallengeReviewer DefaultChallengeReviewer[]\n\n @@unique([name])\n}\n\nmodel ChallengePhase {\n id String @id @default(uuid())\n challengeId String\n phaseId String // foreign key to Phase\n\n name String // phase name\n description String? // description\n isOpen Boolean? @default(false) // if this phase is open\n predecessor String? // predecessor of this phase\n duration Int? // duration in seconds\n scheduledStartDate DateTime? // when the phase is scheduled to start\n scheduledEndDate DateTime?\n actualStartDate DateTime?\n actualEndDate DateTime? // when the phase actually ended\n constraints ChallengePhaseConstraint[]\n\n // Relation fields\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n phase Phase @relation(fields: [phaseId], references: [id])\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, isOpen])\n @@index([challengeId, name])\n @@index([challengeId, isOpen, scheduledEndDate, actualEndDate], map: \"challenge_phase_challenge_open_end_idx\")\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePhaseConstraint – to capture custom constraints for each phase\n//////////////////////////////////////////\n\nmodel ChallengePhaseConstraint {\n id String @id @default(uuid())\n challengePhaseId String\n name String // the name/key of the constraint\n value Int // numeric value of the constraint (can be changed to Float if needed)\n\n // Relation to the phase\n challengePhase ChallengePhase @relation(fields: [challengePhaseId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengePhaseId])\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePrizeSet – to group prizes for a challenge\n//////////////////////////////////////////\n\nmodel ChallengePrizeSet {\n id String @id @default(uuid())\n challengeId String\n type PrizeSetTypeEnum // using enum instead of string\n description String?\n prizes Prize[]\n\n // Relation to the challenge\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, type])\n}\n\n//////////////////////////////////////////\n// ChallengeReviewer model – reviewers for a challenge, both AI and member\n//////////////////////////////////////////\n\nmodel ChallengeReviewer {\n id String @id @default(uuid())\n challengeId String\n\n // Reviewer configuration\n scorecardId String\n isMemberReview Boolean\n memberReviewerCount Int?\n phaseId String\n fixedAmount Float? @default(0)\n baseCoefficient Float?\n incrementalCoefficient Float?\n type ReviewOpportunityTypeEnum?\n aiWorkflowId String? @db.VarChar(14)\n shouldOpenOpportunity Boolean @default(true)\n\n // Relation to the challenge\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n // Relation to the phase\n phase Phase @relation(fields: [phaseId], references: [id])\n\n // Auditing fields\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([phaseId])\n @@index([challengeId, phaseId])\n}\n\n//////////////////////////////////////////\n// DefaultChallengeReviewer model – default reviewers by type and track\n//////////////////////////////////////////\n\nmodel DefaultChallengeReviewer {\n id String @id @default(uuid())\n typeId String\n trackId String\n timelineTemplateId String?\n // Reviewer configuration (mirrors ChallengeReviewer)\n scorecardId String?\n isMemberReview Boolean\n memberReviewerCount Int?\n phaseName String\n // Optional explicit link to Phase for better fidelity\n phaseId String?\n fixedAmount Float? @default(0)\n baseCoefficient Float?\n incrementalCoefficient Float?\n opportunityType ReviewOpportunityTypeEnum?\n aiWorkflowId String? @db.VarChar(14)\n shouldOpenOpportunity Boolean @default(true)\n\n // Relations\n challengeType ChallengeType @relation(fields: [typeId], references: [id])\n challengeTrack ChallengeTrack @relation(fields: [trackId], references: [id])\n timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id])\n // Relation to Phase (optional for backward compatibility with phaseName)\n phase Phase? @relation(fields: [phaseId], references: [id])\n\n // Auditing fields\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([typeId, trackId])\n @@index([typeId, trackId, timelineTemplateId])\n @@index([phaseId])\n}\n\n//////////////////////////////////////////\n// TimelineTemplate model – defines timeline templates\n//////////////////////////////////////////\nmodel TimelineTemplate {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean @default(true)\n phases TimelineTemplatePhase[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Opposite relation field, linking back to ChallengeTimelineTemplate.\n challengeTimelineTemplates ChallengeTimelineTemplate[]\n\n // Opposite relation field for Challenge.\n challenges Challenge[]\n DefaultChallengeReviewer DefaultChallengeReviewer[]\n\n @@unique([name])\n}\n\n//////////////////////////////////////////\n// TimelineTemplatePhase model – phases associated with a timeline template\n//////////////////////////////////////////\nmodel TimelineTemplatePhase {\n id String @id @default(uuid())\n timelineTemplateId String\n phaseId String // identifier for the phase\n predecessor String? // optional predecessor phase id\n defaultDuration Int // duration (in minutes, hours, etc.) as per business rules\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id], onDelete: Cascade)\n\n @@index([timelineTemplateId])\n @@index([timelineTemplateId, phaseId])\n}\n", + "inlineSchemaHash": "17c28fcc4b007a9aff216a8e4ea828c947e6b6f77bcddf8feade92f99a3a060b", + "copyEngine": true +} +config.dirname = '/' + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Challenge\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"privateDescription\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeSource\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"descriptionFormat\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"projectId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"typeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"overviewTotalPrizes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"numOfRegistrants\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"numOfSubmissions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"numOfCheckpointSubmissions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentPhaseNames\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wiproAllowed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tags\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"groups\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"taskIsTask\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"taskIsAssigned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"taskMemberId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"submissionStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"submissionEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"registrationStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"registrationEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"startDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"billingRecord\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeBilling\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeBilling\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacyId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacyRecord\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeLegacy\",\"nativeType\":null,\"relationName\":\"ChallengeLegacyRelation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ChallengeStatusEnum\",\"nativeType\":null,\"default\":\"NEW\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"constraintRecord\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeConstraint\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeConstraint\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeEvent\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeDiscussion\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeDiscussion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeMetadata\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeMetadata\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phases\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhase\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeSets\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePrizeSet\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePrizeSet\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reviewers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeReviewer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winners\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeWinner\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeWinner\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attachments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Attachment\",\"nativeType\":null,\"relationName\":\"AttachmentToChallenge\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"terms\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTerm\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTerm\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"skills\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeSkill\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeSkill\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"auditLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AuditLog\",\"nativeType\":null,\"relationName\":\"AuditLogToChallenge\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberAccesses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemberChallengeAccess\",\"nativeType\":null,\"relationName\":\"ChallengeToMemberChallengeAccess\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeType\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeType\",\"relationFromFields\":[\"typeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrack\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTrack\",\"relationFromFields\":[\"trackId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeToTimelineTemplate\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeType\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isTask\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultReviewers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeTypeToDefaultChallengeReviewer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeTrack\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacyId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrackEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTrack\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeTrack\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultReviewers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeTrackToDefaultChallengeReviewer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeTimelineTemplate\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"typeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToTimelineTemplate\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrack\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeTrack\",\"relationFromFields\":[\"trackId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeType\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeType\",\"relationFromFields\":[\"typeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AuditLog\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fieldName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oldValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"newValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"AuditLogToChallenge\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Attachment\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"AttachmentToChallenge\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeMetadata\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeMetadata\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Prize\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeSet\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePrizeSet\",\"nativeType\":null,\"relationName\":\"ChallengePrizeSetToPrize\",\"relationFromFields\":[\"prizeSetId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeSetId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeWinner\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeWinner\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"handle\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"placement\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PrizeSetTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeTerm\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTerm\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"termId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeSkill\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeSkill\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"skillId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeBilling\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"billingAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"markup\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"clientBillingRate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeBilling\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeLegacy\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reviewType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ReviewTypeEnum\",\"nativeType\":null,\"default\":\"INTERNAL\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confidentialityType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"public\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"forumId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"directProjectId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"screeningScorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reviewScorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isTask\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"useSchedulingAPI\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pureV5Task\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pureV5\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"selfService\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"selfServiceCopilot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subTrack\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacySystemId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeLegacyRelation\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeEvent\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeEvent\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eventId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeDiscussion\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeDiscussion\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DiscussionTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"options\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeDiscussionOption\",\"nativeType\":null,\"relationName\":\"ChallengeDiscussionToChallengeDiscussionOption\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeDiscussionOption\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussion\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeDiscussion\",\"nativeType\":null,\"relationName\":\"ChallengeDiscussionToChallengeDiscussionOption\",\"relationFromFields\":[\"discussionId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"optionKey\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"optionValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeConstraint\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeConstraint\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allowedRegistrants\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Phase\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isOpen\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"duration\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengePhases\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhase\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToPhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ChallengeReviewer\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeReviewerToPhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"DefaultChallengeReviewer\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToPhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"name\"]}],\"isGenerated\":false},\"ChallengePhase\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isOpen\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"predecessor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"duration\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scheduledStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scheduledEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actualStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actualEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"constraints\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhaseConstraint\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToChallengePhaseConstraint\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePhase\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Phase\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToPhase\",\"relationFromFields\":[\"phaseId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengePhaseConstraint\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengePhaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengePhase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhase\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToChallengePhaseConstraint\",\"relationFromFields\":[\"challengePhaseId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengePrizeSet\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PrizeSetTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"nativeType\":null,\"relationName\":\"ChallengePrizeSetToPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePrizeSet\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeReviewer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMemberReview\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberReviewerCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fixedAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"baseCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"incrementalCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ReviewOpportunityTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiWorkflowId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"14\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shouldOpenOpportunity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeReviewer\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Phase\",\"nativeType\":null,\"relationName\":\"ChallengeReviewerToPhase\",\"relationFromFields\":[\"phaseId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DefaultChallengeReviewer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"typeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMemberReview\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberReviewerCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fixedAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"baseCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"incrementalCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opportunityType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ReviewOpportunityTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiWorkflowId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"14\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shouldOpenOpportunity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeType\",\"nativeType\":null,\"relationName\":\"ChallengeTypeToDefaultChallengeReviewer\",\"relationFromFields\":[\"typeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeTrack\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrack\",\"nativeType\":null,\"relationName\":\"ChallengeTrackToDefaultChallengeReviewer\",\"relationFromFields\":[\"trackId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToTimelineTemplate\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Phase\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToPhase\",\"relationFromFields\":[\"phaseId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TimelineTemplate\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phases\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplatePhase\",\"nativeType\":null,\"relationName\":\"TimelineTemplateToTimelineTemplatePhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeTimelineTemplates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToTimelineTemplate\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToTimelineTemplate\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"DefaultChallengeReviewer\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToTimelineTemplate\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"name\"]}],\"isGenerated\":false,\"documentation\":\"///////////////////////////////////////\\\\n///////////////////////////////////////\"},\"TimelineTemplatePhase\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"predecessor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultDuration\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"TimelineTemplateToTimelineTemplatePhase\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"///////////////////////////////////////\\\\n///////////////////////////////////////\"},\"MemberChallengeAccess\":{\"dbName\":\"MemberChallengeAccess\",\"schema\":null,\"fields\":[{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToMemberChallengeAccess\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"ChallengeTrackEnum\":{\"values\":[{\"name\":\"DESIGN\",\"dbName\":null},{\"name\":\"DATA_SCIENCE\",\"dbName\":null},{\"name\":\"DEVELOPMENT\",\"dbName\":null},{\"name\":\"QUALITY_ASSURANCE\",\"dbName\":null}],\"dbName\":null},\"ReviewTypeEnum\":{\"values\":[{\"name\":\"COMMUNITY\",\"dbName\":null},{\"name\":\"INTERNAL\",\"dbName\":null},{\"name\":\"SYSTEM\",\"dbName\":null},{\"name\":\"PROVISIONAL\",\"dbName\":null},{\"name\":\"EXAMPLE\",\"dbName\":null}],\"dbName\":null},\"DiscussionTypeEnum\":{\"values\":[{\"name\":\"CHALLENGE\",\"dbName\":null}],\"dbName\":null},\"ChallengeStatusEnum\":{\"values\":[{\"name\":\"NEW\",\"dbName\":null},{\"name\":\"DRAFT\",\"dbName\":null},{\"name\":\"APPROVED\",\"dbName\":null},{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null},{\"name\":\"DELETED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"CANCELLED_FAILED_REVIEW\",\"dbName\":null},{\"name\":\"CANCELLED_FAILED_SCREENING\",\"dbName\":null},{\"name\":\"CANCELLED_ZERO_SUBMISSIONS\",\"dbName\":null},{\"name\":\"CANCELLED_WINNER_UNRESPONSIVE\",\"dbName\":null},{\"name\":\"CANCELLED_CLIENT_REQUEST\",\"dbName\":null},{\"name\":\"CANCELLED_REQUIREMENTS_INFEASIBLE\",\"dbName\":null},{\"name\":\"CANCELLED_ZERO_REGISTRATIONS\",\"dbName\":null},{\"name\":\"CANCELLED_PAYMENT_FAILED\",\"dbName\":null}],\"dbName\":null},\"PrizeSetTypeEnum\":{\"values\":[{\"name\":\"PLACEMENT\",\"dbName\":null},{\"name\":\"COPILOT\",\"dbName\":null},{\"name\":\"REVIEWER\",\"dbName\":null},{\"name\":\"CHECKPOINT\",\"dbName\":null}],\"dbName\":null},\"ReviewOpportunityTypeEnum\":{\"values\":[{\"name\":\"REGULAR_REVIEW\",\"dbName\":null},{\"name\":\"COMPONENT_DEV_REVIEW\",\"dbName\":null},{\"name\":\"SPEC_REVIEW\",\"dbName\":null},{\"name\":\"ITERATIVE_REVIEW\",\"dbName\":null},{\"name\":\"SCENARIOS_REVIEW\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined +config.compilerWasm = undefined + +config.injectableEdgeEnv = () => ({ + parsed: { + DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined + } +}) + +if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { + Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) +} + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + diff --git a/packages/challenge-prisma-client/index-browser.js b/packages/challenge-prisma-client/index-browser.js new file mode 100644 index 0000000..14f3a17 --- /dev/null +++ b/packages/challenge-prisma-client/index-browser.js @@ -0,0 +1,853 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('./runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.0 + * Query Engine version: 2ba551f319ab1df4bc874a89965d8b3641056773 + */ +Prisma.prismaVersion = { + client: "6.19.0", + engine: "2ba551f319ab1df4bc874a89965d8b3641056773" +} + +Prisma.PrismaClientKnownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)}; +Prisma.PrismaClientUnknownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientRustPanicError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientInitializationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientValidationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.empty = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.join = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.raw = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.defineExtension = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + +/** + * Enums + */ + +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.ChallengeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + projectId: 'projectId', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + overviewTotalPrizes: 'overviewTotalPrizes', + numOfRegistrants: 'numOfRegistrants', + numOfSubmissions: 'numOfSubmissions', + numOfCheckpointSubmissions: 'numOfCheckpointSubmissions', + currentPhaseNames: 'currentPhaseNames', + wiproAllowed: 'wiproAllowed', + tags: 'tags', + groups: 'groups', + taskIsTask: 'taskIsTask', + taskIsAssigned: 'taskIsAssigned', + taskMemberId: 'taskMemberId', + submissionStartDate: 'submissionStartDate', + submissionEndDate: 'submissionEndDate', + registrationStartDate: 'registrationStartDate', + registrationEndDate: 'registrationEndDate', + startDate: 'startDate', + endDate: 'endDate', + legacyId: 'legacyId', + status: 'status', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + isTask: 'isTask', + abbreviation: 'abbreviation', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + abbreviation: 'abbreviation', + legacyId: 'legacyId', + track: 'track', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + isDefault: 'isDefault', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + fileSize: 'fileSize', + url: 'url', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + userId: 'userId', + handle: 'handle', + placement: 'placement', + type: 'type', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingScalarFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + markup: 'markup', + clientBillingRate: 'clientBillingRate', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyScalarFieldEnum = { + id: 'id', + reviewType: 'reviewType', + confidentialityType: 'confidentialityType', + forumId: 'forumId', + directProjectId: 'directProjectId', + screeningScorecardId: 'screeningScorecardId', + reviewScorecardId: 'reviewScorecardId', + isTask: 'isTask', + useSchedulingAPI: 'useSchedulingAPI', + pureV5Task: 'pureV5Task', + pureV5: 'pureV5', + selfService: 'selfService', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + legacySystemId: 'legacySystemId', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + eventId: 'eventId', + name: 'name', + key: 'key', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + type: 'type', + provider: 'provider', + url: 'url', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionScalarFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isOpen: 'isOpen', + duration: 'duration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + isOpen: 'isOpen', + predecessor: 'predecessor', + duration: 'duration', + scheduledStartDate: 'scheduledStartDate', + scheduledEndDate: 'scheduledEndDate', + actualStartDate: 'actualStartDate', + actualEndDate: 'actualEndDate', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintScalarFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + type: 'type', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + type: 'type', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseName: 'phaseName', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + opportunityType: 'opportunityType', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseScalarFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + defaultDuration: 'defaultDuration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessScalarFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.ChallengeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + currentPhaseNames: 'currentPhaseNames', + tags: 'tags', + groups: 'groups', + taskMemberId: 'taskMemberId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + url: 'url', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeOrderByRelevanceFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + handle: 'handle', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingOrderByRelevanceFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyOrderByRelevanceFieldEnum = { + id: 'id', + confidentialityType: 'confidentialityType', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + key: 'key', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + provider: 'provider', + url: 'url', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionOrderByRelevanceFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + phaseName: 'phaseName', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseOrderByRelevanceFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessOrderByRelevanceFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; +exports.ChallengeStatusEnum = exports.$Enums.ChallengeStatusEnum = { + NEW: 'NEW', + DRAFT: 'DRAFT', + APPROVED: 'APPROVED', + ACTIVE: 'ACTIVE', + COMPLETED: 'COMPLETED', + DELETED: 'DELETED', + CANCELLED: 'CANCELLED', + CANCELLED_FAILED_REVIEW: 'CANCELLED_FAILED_REVIEW', + CANCELLED_FAILED_SCREENING: 'CANCELLED_FAILED_SCREENING', + CANCELLED_ZERO_SUBMISSIONS: 'CANCELLED_ZERO_SUBMISSIONS', + CANCELLED_WINNER_UNRESPONSIVE: 'CANCELLED_WINNER_UNRESPONSIVE', + CANCELLED_CLIENT_REQUEST: 'CANCELLED_CLIENT_REQUEST', + CANCELLED_REQUIREMENTS_INFEASIBLE: 'CANCELLED_REQUIREMENTS_INFEASIBLE', + CANCELLED_ZERO_REGISTRATIONS: 'CANCELLED_ZERO_REGISTRATIONS', + CANCELLED_PAYMENT_FAILED: 'CANCELLED_PAYMENT_FAILED' +}; + +exports.ChallengeTrackEnum = exports.$Enums.ChallengeTrackEnum = { + DESIGN: 'DESIGN', + DATA_SCIENCE: 'DATA_SCIENCE', + DEVELOPMENT: 'DEVELOPMENT', + QUALITY_ASSURANCE: 'QUALITY_ASSURANCE' +}; + +exports.PrizeSetTypeEnum = exports.$Enums.PrizeSetTypeEnum = { + PLACEMENT: 'PLACEMENT', + COPILOT: 'COPILOT', + REVIEWER: 'REVIEWER', + CHECKPOINT: 'CHECKPOINT' +}; + +exports.ReviewTypeEnum = exports.$Enums.ReviewTypeEnum = { + COMMUNITY: 'COMMUNITY', + INTERNAL: 'INTERNAL', + SYSTEM: 'SYSTEM', + PROVISIONAL: 'PROVISIONAL', + EXAMPLE: 'EXAMPLE' +}; + +exports.DiscussionTypeEnum = exports.$Enums.DiscussionTypeEnum = { + CHALLENGE: 'CHALLENGE' +}; + +exports.ReviewOpportunityTypeEnum = exports.$Enums.ReviewOpportunityTypeEnum = { + REGULAR_REVIEW: 'REGULAR_REVIEW', + COMPONENT_DEV_REVIEW: 'COMPONENT_DEV_REVIEW', + SPEC_REVIEW: 'SPEC_REVIEW', + ITERATIVE_REVIEW: 'ITERATIVE_REVIEW', + SCENARIOS_REVIEW: 'SCENARIOS_REVIEW' +}; + +exports.Prisma.ModelName = { + Challenge: 'Challenge', + ChallengeType: 'ChallengeType', + ChallengeTrack: 'ChallengeTrack', + ChallengeTimelineTemplate: 'ChallengeTimelineTemplate', + AuditLog: 'AuditLog', + Attachment: 'Attachment', + ChallengeMetadata: 'ChallengeMetadata', + Prize: 'Prize', + ChallengeWinner: 'ChallengeWinner', + ChallengeTerm: 'ChallengeTerm', + ChallengeSkill: 'ChallengeSkill', + ChallengeBilling: 'ChallengeBilling', + ChallengeLegacy: 'ChallengeLegacy', + ChallengeEvent: 'ChallengeEvent', + ChallengeDiscussion: 'ChallengeDiscussion', + ChallengeDiscussionOption: 'ChallengeDiscussionOption', + ChallengeConstraint: 'ChallengeConstraint', + Phase: 'Phase', + ChallengePhase: 'ChallengePhase', + ChallengePhaseConstraint: 'ChallengePhaseConstraint', + ChallengePrizeSet: 'ChallengePrizeSet', + ChallengeReviewer: 'ChallengeReviewer', + DefaultChallengeReviewer: 'DefaultChallengeReviewer', + TimelineTemplate: 'TimelineTemplate', + TimelineTemplatePhase: 'TimelineTemplatePhase', + MemberChallengeAccess: 'MemberChallengeAccess' +}; + +/** + * This is a stub Prisma Client that will error at runtime if called. + */ +class PrismaClient { + constructor() { + return new Proxy(this, { + get(target, prop) { + let message + const runtime = getRuntime() + if (runtime.isEdge) { + message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters +`; + } else { + message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' + } + + message += ` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` + + throw new Error(message) + } + }) + } +} + +exports.PrismaClient = PrismaClient + +Object.assign(exports, Prisma) diff --git a/packages/challenge-prisma-client/index.d.ts b/packages/challenge-prisma-client/index.d.ts new file mode 100644 index 0000000..182fab4 --- /dev/null +++ b/packages/challenge-prisma-client/index.d.ts @@ -0,0 +1,52487 @@ + +/** + * Client +**/ + +import * as runtime from './runtime/library.js'; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions +import $Result = runtime.Types.Result + +export type PrismaPromise = $Public.PrismaPromise + + +/** + * Model Challenge + * + */ +export type Challenge = $Result.DefaultSelection +/** + * Model ChallengeType + * + */ +export type ChallengeType = $Result.DefaultSelection +/** + * Model ChallengeTrack + * + */ +export type ChallengeTrack = $Result.DefaultSelection +/** + * Model ChallengeTimelineTemplate + * + */ +export type ChallengeTimelineTemplate = $Result.DefaultSelection +/** + * Model AuditLog + * + */ +export type AuditLog = $Result.DefaultSelection +/** + * Model Attachment + * + */ +export type Attachment = $Result.DefaultSelection +/** + * Model ChallengeMetadata + * + */ +export type ChallengeMetadata = $Result.DefaultSelection +/** + * Model Prize + * + */ +export type Prize = $Result.DefaultSelection +/** + * Model ChallengeWinner + * + */ +export type ChallengeWinner = $Result.DefaultSelection +/** + * Model ChallengeTerm + * + */ +export type ChallengeTerm = $Result.DefaultSelection +/** + * Model ChallengeSkill + * + */ +export type ChallengeSkill = $Result.DefaultSelection +/** + * Model ChallengeBilling + * + */ +export type ChallengeBilling = $Result.DefaultSelection +/** + * Model ChallengeLegacy + * + */ +export type ChallengeLegacy = $Result.DefaultSelection +/** + * Model ChallengeEvent + * + */ +export type ChallengeEvent = $Result.DefaultSelection +/** + * Model ChallengeDiscussion + * + */ +export type ChallengeDiscussion = $Result.DefaultSelection +/** + * Model ChallengeDiscussionOption + * + */ +export type ChallengeDiscussionOption = $Result.DefaultSelection +/** + * Model ChallengeConstraint + * + */ +export type ChallengeConstraint = $Result.DefaultSelection +/** + * Model Phase + * + */ +export type Phase = $Result.DefaultSelection +/** + * Model ChallengePhase + * + */ +export type ChallengePhase = $Result.DefaultSelection +/** + * Model ChallengePhaseConstraint + * + */ +export type ChallengePhaseConstraint = $Result.DefaultSelection +/** + * Model ChallengePrizeSet + * + */ +export type ChallengePrizeSet = $Result.DefaultSelection +/** + * Model ChallengeReviewer + * + */ +export type ChallengeReviewer = $Result.DefaultSelection +/** + * Model DefaultChallengeReviewer + * + */ +export type DefaultChallengeReviewer = $Result.DefaultSelection +/** + * Model TimelineTemplate + * /////////////////////////////////////// + * /////////////////////////////////////// + */ +export type TimelineTemplate = $Result.DefaultSelection +/** + * Model TimelineTemplatePhase + * /////////////////////////////////////// + * /////////////////////////////////////// + */ +export type TimelineTemplatePhase = $Result.DefaultSelection +/** + * Model MemberChallengeAccess + * + */ +export type MemberChallengeAccess = $Result.DefaultSelection + +/** + * Enums + */ +export namespace $Enums { + export const ChallengeTrackEnum: { + DESIGN: 'DESIGN', + DATA_SCIENCE: 'DATA_SCIENCE', + DEVELOPMENT: 'DEVELOPMENT', + QUALITY_ASSURANCE: 'QUALITY_ASSURANCE' +}; + +export type ChallengeTrackEnum = (typeof ChallengeTrackEnum)[keyof typeof ChallengeTrackEnum] + + +export const ReviewTypeEnum: { + COMMUNITY: 'COMMUNITY', + INTERNAL: 'INTERNAL', + SYSTEM: 'SYSTEM', + PROVISIONAL: 'PROVISIONAL', + EXAMPLE: 'EXAMPLE' +}; + +export type ReviewTypeEnum = (typeof ReviewTypeEnum)[keyof typeof ReviewTypeEnum] + + +export const DiscussionTypeEnum: { + CHALLENGE: 'CHALLENGE' +}; + +export type DiscussionTypeEnum = (typeof DiscussionTypeEnum)[keyof typeof DiscussionTypeEnum] + + +export const ChallengeStatusEnum: { + NEW: 'NEW', + DRAFT: 'DRAFT', + APPROVED: 'APPROVED', + ACTIVE: 'ACTIVE', + COMPLETED: 'COMPLETED', + DELETED: 'DELETED', + CANCELLED: 'CANCELLED', + CANCELLED_FAILED_REVIEW: 'CANCELLED_FAILED_REVIEW', + CANCELLED_FAILED_SCREENING: 'CANCELLED_FAILED_SCREENING', + CANCELLED_ZERO_SUBMISSIONS: 'CANCELLED_ZERO_SUBMISSIONS', + CANCELLED_WINNER_UNRESPONSIVE: 'CANCELLED_WINNER_UNRESPONSIVE', + CANCELLED_CLIENT_REQUEST: 'CANCELLED_CLIENT_REQUEST', + CANCELLED_REQUIREMENTS_INFEASIBLE: 'CANCELLED_REQUIREMENTS_INFEASIBLE', + CANCELLED_ZERO_REGISTRATIONS: 'CANCELLED_ZERO_REGISTRATIONS', + CANCELLED_PAYMENT_FAILED: 'CANCELLED_PAYMENT_FAILED' +}; + +export type ChallengeStatusEnum = (typeof ChallengeStatusEnum)[keyof typeof ChallengeStatusEnum] + + +export const PrizeSetTypeEnum: { + PLACEMENT: 'PLACEMENT', + COPILOT: 'COPILOT', + REVIEWER: 'REVIEWER', + CHECKPOINT: 'CHECKPOINT' +}; + +export type PrizeSetTypeEnum = (typeof PrizeSetTypeEnum)[keyof typeof PrizeSetTypeEnum] + + +export const ReviewOpportunityTypeEnum: { + REGULAR_REVIEW: 'REGULAR_REVIEW', + COMPONENT_DEV_REVIEW: 'COMPONENT_DEV_REVIEW', + SPEC_REVIEW: 'SPEC_REVIEW', + ITERATIVE_REVIEW: 'ITERATIVE_REVIEW', + SCENARIOS_REVIEW: 'SCENARIOS_REVIEW' +}; + +export type ReviewOpportunityTypeEnum = (typeof ReviewOpportunityTypeEnum)[keyof typeof ReviewOpportunityTypeEnum] + +} + +export type ChallengeTrackEnum = $Enums.ChallengeTrackEnum + +export const ChallengeTrackEnum: typeof $Enums.ChallengeTrackEnum + +export type ReviewTypeEnum = $Enums.ReviewTypeEnum + +export const ReviewTypeEnum: typeof $Enums.ReviewTypeEnum + +export type DiscussionTypeEnum = $Enums.DiscussionTypeEnum + +export const DiscussionTypeEnum: typeof $Enums.DiscussionTypeEnum + +export type ChallengeStatusEnum = $Enums.ChallengeStatusEnum + +export const ChallengeStatusEnum: typeof $Enums.ChallengeStatusEnum + +export type PrizeSetTypeEnum = $Enums.PrizeSetTypeEnum + +export const PrizeSetTypeEnum: typeof $Enums.PrizeSetTypeEnum + +export type ReviewOpportunityTypeEnum = $Enums.ReviewOpportunityTypeEnum + +export const ReviewOpportunityTypeEnum: typeof $Enums.ReviewOpportunityTypeEnum + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Challenges + * const challenges = await prisma.challenge.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ +export class PrismaClient< + ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + const U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, + ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + /** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Challenges + * const challenges = await prisma.challenge.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + + constructor(optionsArg ?: Prisma.Subset); + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): $Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): $Utils.JsPromise; + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise + + + $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, $Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.challenge`: Exposes CRUD operations for the **Challenge** model. + * Example usage: + * ```ts + * // Fetch zero or more Challenges + * const challenges = await prisma.challenge.findMany() + * ``` + */ + get challenge(): Prisma.ChallengeDelegate; + + /** + * `prisma.challengeType`: Exposes CRUD operations for the **ChallengeType** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeTypes + * const challengeTypes = await prisma.challengeType.findMany() + * ``` + */ + get challengeType(): Prisma.ChallengeTypeDelegate; + + /** + * `prisma.challengeTrack`: Exposes CRUD operations for the **ChallengeTrack** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeTracks + * const challengeTracks = await prisma.challengeTrack.findMany() + * ``` + */ + get challengeTrack(): Prisma.ChallengeTrackDelegate; + + /** + * `prisma.challengeTimelineTemplate`: Exposes CRUD operations for the **ChallengeTimelineTemplate** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeTimelineTemplates + * const challengeTimelineTemplates = await prisma.challengeTimelineTemplate.findMany() + * ``` + */ + get challengeTimelineTemplate(): Prisma.ChallengeTimelineTemplateDelegate; + + /** + * `prisma.auditLog`: Exposes CRUD operations for the **AuditLog** model. + * Example usage: + * ```ts + * // Fetch zero or more AuditLogs + * const auditLogs = await prisma.auditLog.findMany() + * ``` + */ + get auditLog(): Prisma.AuditLogDelegate; + + /** + * `prisma.attachment`: Exposes CRUD operations for the **Attachment** model. + * Example usage: + * ```ts + * // Fetch zero or more Attachments + * const attachments = await prisma.attachment.findMany() + * ``` + */ + get attachment(): Prisma.AttachmentDelegate; + + /** + * `prisma.challengeMetadata`: Exposes CRUD operations for the **ChallengeMetadata** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.findMany() + * ``` + */ + get challengeMetadata(): Prisma.ChallengeMetadataDelegate; + + /** + * `prisma.prize`: Exposes CRUD operations for the **Prize** model. + * Example usage: + * ```ts + * // Fetch zero or more Prizes + * const prizes = await prisma.prize.findMany() + * ``` + */ + get prize(): Prisma.PrizeDelegate; + + /** + * `prisma.challengeWinner`: Exposes CRUD operations for the **ChallengeWinner** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeWinners + * const challengeWinners = await prisma.challengeWinner.findMany() + * ``` + */ + get challengeWinner(): Prisma.ChallengeWinnerDelegate; + + /** + * `prisma.challengeTerm`: Exposes CRUD operations for the **ChallengeTerm** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeTerms + * const challengeTerms = await prisma.challengeTerm.findMany() + * ``` + */ + get challengeTerm(): Prisma.ChallengeTermDelegate; + + /** + * `prisma.challengeSkill`: Exposes CRUD operations for the **ChallengeSkill** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeSkills + * const challengeSkills = await prisma.challengeSkill.findMany() + * ``` + */ + get challengeSkill(): Prisma.ChallengeSkillDelegate; + + /** + * `prisma.challengeBilling`: Exposes CRUD operations for the **ChallengeBilling** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeBillings + * const challengeBillings = await prisma.challengeBilling.findMany() + * ``` + */ + get challengeBilling(): Prisma.ChallengeBillingDelegate; + + /** + * `prisma.challengeLegacy`: Exposes CRUD operations for the **ChallengeLegacy** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeLegacies + * const challengeLegacies = await prisma.challengeLegacy.findMany() + * ``` + */ + get challengeLegacy(): Prisma.ChallengeLegacyDelegate; + + /** + * `prisma.challengeEvent`: Exposes CRUD operations for the **ChallengeEvent** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeEvents + * const challengeEvents = await prisma.challengeEvent.findMany() + * ``` + */ + get challengeEvent(): Prisma.ChallengeEventDelegate; + + /** + * `prisma.challengeDiscussion`: Exposes CRUD operations for the **ChallengeDiscussion** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeDiscussions + * const challengeDiscussions = await prisma.challengeDiscussion.findMany() + * ``` + */ + get challengeDiscussion(): Prisma.ChallengeDiscussionDelegate; + + /** + * `prisma.challengeDiscussionOption`: Exposes CRUD operations for the **ChallengeDiscussionOption** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeDiscussionOptions + * const challengeDiscussionOptions = await prisma.challengeDiscussionOption.findMany() + * ``` + */ + get challengeDiscussionOption(): Prisma.ChallengeDiscussionOptionDelegate; + + /** + * `prisma.challengeConstraint`: Exposes CRUD operations for the **ChallengeConstraint** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeConstraints + * const challengeConstraints = await prisma.challengeConstraint.findMany() + * ``` + */ + get challengeConstraint(): Prisma.ChallengeConstraintDelegate; + + /** + * `prisma.phase`: Exposes CRUD operations for the **Phase** model. + * Example usage: + * ```ts + * // Fetch zero or more Phases + * const phases = await prisma.phase.findMany() + * ``` + */ + get phase(): Prisma.PhaseDelegate; + + /** + * `prisma.challengePhase`: Exposes CRUD operations for the **ChallengePhase** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengePhases + * const challengePhases = await prisma.challengePhase.findMany() + * ``` + */ + get challengePhase(): Prisma.ChallengePhaseDelegate; + + /** + * `prisma.challengePhaseConstraint`: Exposes CRUD operations for the **ChallengePhaseConstraint** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengePhaseConstraints + * const challengePhaseConstraints = await prisma.challengePhaseConstraint.findMany() + * ``` + */ + get challengePhaseConstraint(): Prisma.ChallengePhaseConstraintDelegate; + + /** + * `prisma.challengePrizeSet`: Exposes CRUD operations for the **ChallengePrizeSet** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengePrizeSets + * const challengePrizeSets = await prisma.challengePrizeSet.findMany() + * ``` + */ + get challengePrizeSet(): Prisma.ChallengePrizeSetDelegate; + + /** + * `prisma.challengeReviewer`: Exposes CRUD operations for the **ChallengeReviewer** model. + * Example usage: + * ```ts + * // Fetch zero or more ChallengeReviewers + * const challengeReviewers = await prisma.challengeReviewer.findMany() + * ``` + */ + get challengeReviewer(): Prisma.ChallengeReviewerDelegate; + + /** + * `prisma.defaultChallengeReviewer`: Exposes CRUD operations for the **DefaultChallengeReviewer** model. + * Example usage: + * ```ts + * // Fetch zero or more DefaultChallengeReviewers + * const defaultChallengeReviewers = await prisma.defaultChallengeReviewer.findMany() + * ``` + */ + get defaultChallengeReviewer(): Prisma.DefaultChallengeReviewerDelegate; + + /** + * `prisma.timelineTemplate`: Exposes CRUD operations for the **TimelineTemplate** model. + * Example usage: + * ```ts + * // Fetch zero or more TimelineTemplates + * const timelineTemplates = await prisma.timelineTemplate.findMany() + * ``` + */ + get timelineTemplate(): Prisma.TimelineTemplateDelegate; + + /** + * `prisma.timelineTemplatePhase`: Exposes CRUD operations for the **TimelineTemplatePhase** model. + * Example usage: + * ```ts + * // Fetch zero or more TimelineTemplatePhases + * const timelineTemplatePhases = await prisma.timelineTemplatePhase.findMany() + * ``` + */ + get timelineTemplatePhase(): Prisma.TimelineTemplatePhaseDelegate; + + /** + * `prisma.memberChallengeAccess`: Exposes CRUD operations for the **MemberChallengeAccess** model. + * Example usage: + * ```ts + * // Fetch zero or more MemberChallengeAccesses + * const memberChallengeAccesses = await prisma.memberChallengeAccess.findMany() + * ``` + */ + get memberChallengeAccess(): Prisma.MemberChallengeAccessDelegate; +} + +export namespace Prisma { + export import DMMF = runtime.DMMF + + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator + + /** + * Prisma Errors + */ + export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + export import PrismaClientInitializationError = runtime.PrismaClientInitializationError + export import PrismaClientValidationError = runtime.PrismaClientValidationError + + /** + * Re-export of sql-template-tag + */ + export import sql = runtime.sqltag + export import empty = runtime.empty + export import join = runtime.join + export import raw = runtime.raw + export import Sql = runtime.Sql + + + + /** + * Decimal.js + */ + export import Decimal = runtime.Decimal + + export type DecimalJsLike = runtime.DecimalJsLike + + /** + * Metrics + */ + export type Metrics = runtime.Metrics + export type Metric = runtime.Metric + export type MetricHistogram = runtime.MetricHistogram + export type MetricHistogramBucket = runtime.MetricHistogramBucket + + /** + * Extensions + */ + export import Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export import Args = $Public.Args + export import Payload = $Public.Payload + export import Result = $Public.Result + export import Exact = $Public.Exact + + /** + * Prisma Client JS version: 6.19.0 + * Query Engine version: 2ba551f319ab1df4bc874a89965d8b3641056773 + */ + export type PrismaVersion = { + client: string + } + + export const prismaVersion: PrismaVersion + + /** + * Utility Types + */ + + + export import Bytes = runtime.Bytes + export import JsonObject = runtime.JsonObject + export import JsonArray = runtime.JsonArray + export import JsonValue = runtime.JsonValue + export import InputJsonObject = runtime.InputJsonObject + export import InputJsonArray = runtime.InputJsonArray + export import InputJsonValue = runtime.InputJsonValue + + /** + * Types of the values used to represent different kinds of `null` values when working with JSON fields. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + namespace NullTypes { + /** + * Type of `Prisma.DbNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class DbNull { + private DbNull: never + private constructor() + } + + /** + * Type of `Prisma.JsonNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class JsonNull { + private JsonNull: never + private constructor() + } + + /** + * Type of `Prisma.AnyNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class AnyNull { + private AnyNull: never + private constructor() + } + } + + /** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const DbNull: NullTypes.DbNull + + /** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const JsonNull: NullTypes.JsonNull + + /** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const AnyNull: NullTypes.AnyNull + + type SelectAndInclude = { + select: any + include: any + } + + type SelectAndOmit = { + select: any + omit: any + } + + /** + * Get the type of the value, that the Promise holds. + */ + export type PromiseType> = T extends PromiseLike ? U : T; + + /** + * Get the return type of a function which returns a Promise. + */ + export type PromiseReturnType $Utils.JsPromise> = PromiseType> + + /** + * From T, pick a set of properties whose keys are in the union K + */ + type Prisma__Pick = { + [P in K]: T[P]; + }; + + + export type Enumerable = T | Array; + + export type RequiredKeys = { + [K in keyof T]-?: {} extends Prisma__Pick ? never : K + }[keyof T] + + export type TruthyKeys = keyof { + [K in keyof T as T[K] extends false | undefined | null ? never : K]: K + } + + export type TrueKeys = TruthyKeys>> + + /** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ + export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; + }; + + /** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ + export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + + /** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ + export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + K + + type Without = { [P in Exclude]?: never }; + + /** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ + type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + + /** + * Is T a Record? + */ + type IsObject = T extends Array + ? False + : T extends Date + ? False + : T extends Uint8Array + ? False + : T extends BigInt + ? False + : T extends object + ? True + : False + + + /** + * If it's T[], return T + */ + export type UnEnumerate = T extends Array ? U : T + + /** + * From ts-toolbelt + */ + + type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + + type EitherStrict = Strict<__Either> + + type EitherLoose = ComputeRaw<__Either> + + type _Either< + O extends object, + K extends Key, + strict extends Boolean + > = { + 1: EitherStrict + 0: EitherLoose + }[strict] + + type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 + > = O extends unknown ? _Either : never + + export type Union = any + + type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] + } & {} + + /** Helper Types for "Merge" **/ + export type IntersectOf = ( + U extends unknown ? (k: U) => void : never + ) extends (k: infer I) => void + ? I + : never + + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; + + type _Merge = IntersectOf; + }>>; + + type Key = string | number | symbol; + type AtBasic = K extends keyof O ? O[K] : never; + type AtStrict = O[K & keyof O]; + type AtLoose = O extends unknown ? AtStrict : never; + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; + + export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; + + export type OptionalFlat = { + [K in keyof O]?: O[K]; + } & {}; + + type _Record = { + [P in K]: T; + }; + + // cause typescript not to expand types and preserve names + type NoExpand = T extends unknown ? T : never; + + // this type assumes the passed object is entirely optional + type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O + : never>; + + type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + + export type Strict = ComputeRaw<_Strict>; + /** End Helper Types for "Merge" **/ + + export type Merge = ComputeRaw<_Merge>>; + + /** + A [[Boolean]] + */ + export type Boolean = True | False + + // /** + // 1 + // */ + export type True = 1 + + /** + 0 + */ + export type False = 0 + + export type Not = { + 0: 1 + 1: 0 + }[B] + + export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + + export type Has = Not< + Extends, U1> + > + + export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } + }[B1][B2] + + export type Keys = U extends unknown ? keyof U : never + + type Cast = A extends B ? A : B; + + export const type: unique symbol; + + + + /** + * Used by group by + */ + + export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never + } : never + + type FieldPaths< + T, + U = Omit + > = IsObject extends True ? U : T + + type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K + }[keyof T] + + /** + * Convert tuple to union + */ + type _TupleToUnion = T extends (infer E)[] ? E : never + type TupleToUnion = _TupleToUnion + type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + + /** + * Like `Pick`, but additionally can also accept an array of keys + */ + type PickEnumerable | keyof T> = Prisma__Pick> + + /** + * Exclude all keys with underscores + */ + type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + + export type FieldRef = runtime.FieldRef + + type FieldRefInputType = Model extends never ? never : FieldRef + + + export const ModelName: { + Challenge: 'Challenge', + ChallengeType: 'ChallengeType', + ChallengeTrack: 'ChallengeTrack', + ChallengeTimelineTemplate: 'ChallengeTimelineTemplate', + AuditLog: 'AuditLog', + Attachment: 'Attachment', + ChallengeMetadata: 'ChallengeMetadata', + Prize: 'Prize', + ChallengeWinner: 'ChallengeWinner', + ChallengeTerm: 'ChallengeTerm', + ChallengeSkill: 'ChallengeSkill', + ChallengeBilling: 'ChallengeBilling', + ChallengeLegacy: 'ChallengeLegacy', + ChallengeEvent: 'ChallengeEvent', + ChallengeDiscussion: 'ChallengeDiscussion', + ChallengeDiscussionOption: 'ChallengeDiscussionOption', + ChallengeConstraint: 'ChallengeConstraint', + Phase: 'Phase', + ChallengePhase: 'ChallengePhase', + ChallengePhaseConstraint: 'ChallengePhaseConstraint', + ChallengePrizeSet: 'ChallengePrizeSet', + ChallengeReviewer: 'ChallengeReviewer', + DefaultChallengeReviewer: 'DefaultChallengeReviewer', + TimelineTemplate: 'TimelineTemplate', + TimelineTemplatePhase: 'TimelineTemplatePhase', + MemberChallengeAccess: 'MemberChallengeAccess' + }; + + export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + export type Datasources = { + db?: Datasource + } + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "challenge" | "challengeType" | "challengeTrack" | "challengeTimelineTemplate" | "auditLog" | "attachment" | "challengeMetadata" | "prize" | "challengeWinner" | "challengeTerm" | "challengeSkill" | "challengeBilling" | "challengeLegacy" | "challengeEvent" | "challengeDiscussion" | "challengeDiscussionOption" | "challengeConstraint" | "phase" | "challengePhase" | "challengePhaseConstraint" | "challengePrizeSet" | "challengeReviewer" | "defaultChallengeReviewer" | "timelineTemplate" | "timelineTemplatePhase" | "memberChallengeAccess" + txIsolationLevel: Prisma.TransactionIsolationLevel + } + model: { + Challenge: { + payload: Prisma.$ChallengePayload + fields: Prisma.ChallengeFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeType: { + payload: Prisma.$ChallengeTypePayload + fields: Prisma.ChallengeTypeFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeTypeFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeTypeFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeTypeFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeTypeFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeTypeFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeTypeCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeTypeCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeTypeCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeTypeDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeTypeUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeTypeDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeTypeUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeTypeUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeTypeUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeTypeAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeTypeGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeTypeCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeTrack: { + payload: Prisma.$ChallengeTrackPayload + fields: Prisma.ChallengeTrackFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeTrackFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeTrackFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeTrackFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeTrackFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeTrackFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeTrackCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeTrackCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeTrackCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeTrackDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeTrackUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeTrackDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeTrackUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeTrackUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeTrackUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeTrackAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeTrackGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeTrackCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeTimelineTemplate: { + payload: Prisma.$ChallengeTimelineTemplatePayload + fields: Prisma.ChallengeTimelineTemplateFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeTimelineTemplateFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeTimelineTemplateFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeTimelineTemplateFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeTimelineTemplateFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeTimelineTemplateFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeTimelineTemplateCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeTimelineTemplateCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeTimelineTemplateCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeTimelineTemplateDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeTimelineTemplateUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeTimelineTemplateDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeTimelineTemplateUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeTimelineTemplateUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeTimelineTemplateUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeTimelineTemplateAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeTimelineTemplateGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeTimelineTemplateCountArgs + result: $Utils.Optional | number + } + } + } + AuditLog: { + payload: Prisma.$AuditLogPayload + fields: Prisma.AuditLogFieldRefs + operations: { + findUnique: { + args: Prisma.AuditLogFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AuditLogFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AuditLogFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AuditLogFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AuditLogFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AuditLogCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AuditLogCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AuditLogCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AuditLogDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AuditLogUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AuditLogDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AuditLogUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AuditLogUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AuditLogUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AuditLogAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AuditLogGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AuditLogCountArgs + result: $Utils.Optional | number + } + } + } + Attachment: { + payload: Prisma.$AttachmentPayload + fields: Prisma.AttachmentFieldRefs + operations: { + findUnique: { + args: Prisma.AttachmentFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AttachmentFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AttachmentFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AttachmentFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AttachmentFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AttachmentCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AttachmentCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AttachmentCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AttachmentDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AttachmentUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AttachmentDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AttachmentUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AttachmentUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AttachmentUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AttachmentAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AttachmentGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AttachmentCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeMetadata: { + payload: Prisma.$ChallengeMetadataPayload + fields: Prisma.ChallengeMetadataFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeMetadataFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeMetadataFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeMetadataFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeMetadataFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeMetadataFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeMetadataCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeMetadataCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeMetadataCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeMetadataDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeMetadataUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeMetadataDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeMetadataUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeMetadataUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeMetadataUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeMetadataAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeMetadataGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeMetadataCountArgs + result: $Utils.Optional | number + } + } + } + Prize: { + payload: Prisma.$PrizePayload + fields: Prisma.PrizeFieldRefs + operations: { + findUnique: { + args: Prisma.PrizeFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PrizeFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PrizeFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PrizeFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PrizeFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PrizeCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PrizeCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PrizeCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PrizeDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PrizeUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PrizeDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PrizeUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PrizeUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PrizeUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PrizeAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PrizeGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PrizeCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeWinner: { + payload: Prisma.$ChallengeWinnerPayload + fields: Prisma.ChallengeWinnerFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeWinnerFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeWinnerFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeWinnerFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeWinnerFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeWinnerFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeWinnerCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeWinnerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeWinnerCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeWinnerDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeWinnerUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeWinnerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeWinnerUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeWinnerUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeWinnerUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeWinnerAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeWinnerGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeWinnerCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeTerm: { + payload: Prisma.$ChallengeTermPayload + fields: Prisma.ChallengeTermFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeTermFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeTermFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeTermFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeTermFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeTermFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeTermCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeTermCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeTermCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeTermDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeTermUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeTermDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeTermUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeTermUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeTermUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeTermAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeTermGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeTermCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeSkill: { + payload: Prisma.$ChallengeSkillPayload + fields: Prisma.ChallengeSkillFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeSkillFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeSkillFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeSkillFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeSkillFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeSkillFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeSkillCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeSkillCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeSkillCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeSkillDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeSkillUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeSkillDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeSkillUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeSkillUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeSkillUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeSkillAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeSkillGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeSkillCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeBilling: { + payload: Prisma.$ChallengeBillingPayload + fields: Prisma.ChallengeBillingFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeBillingFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeBillingFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeBillingFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeBillingFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeBillingFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeBillingCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeBillingCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeBillingCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeBillingDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeBillingUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeBillingDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeBillingUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeBillingUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeBillingUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeBillingAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeBillingGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeBillingCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeLegacy: { + payload: Prisma.$ChallengeLegacyPayload + fields: Prisma.ChallengeLegacyFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeLegacyFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeLegacyFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeLegacyFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeLegacyFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeLegacyFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeLegacyCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeLegacyCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeLegacyCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeLegacyDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeLegacyUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeLegacyDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeLegacyUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeLegacyUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeLegacyUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeLegacyAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeLegacyGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeLegacyCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeEvent: { + payload: Prisma.$ChallengeEventPayload + fields: Prisma.ChallengeEventFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeEventFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeEventFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeEventFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeEventFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeEventFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeEventCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeEventCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeEventCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeEventDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeEventUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeEventDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeEventUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeEventUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeEventUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeEventAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeEventGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeEventCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeDiscussion: { + payload: Prisma.$ChallengeDiscussionPayload + fields: Prisma.ChallengeDiscussionFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeDiscussionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeDiscussionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeDiscussionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeDiscussionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeDiscussionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeDiscussionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeDiscussionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeDiscussionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeDiscussionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeDiscussionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeDiscussionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeDiscussionUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeDiscussionUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeDiscussionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeDiscussionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeDiscussionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeDiscussionCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeDiscussionOption: { + payload: Prisma.$ChallengeDiscussionOptionPayload + fields: Prisma.ChallengeDiscussionOptionFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeDiscussionOptionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeDiscussionOptionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeDiscussionOptionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeDiscussionOptionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeDiscussionOptionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeDiscussionOptionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeDiscussionOptionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeDiscussionOptionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeDiscussionOptionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeDiscussionOptionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeDiscussionOptionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeDiscussionOptionUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeDiscussionOptionUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeDiscussionOptionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeDiscussionOptionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeDiscussionOptionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeDiscussionOptionCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeConstraint: { + payload: Prisma.$ChallengeConstraintPayload + fields: Prisma.ChallengeConstraintFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeConstraintFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeConstraintFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeConstraintFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeConstraintFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeConstraintFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeConstraintCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeConstraintCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeConstraintCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeConstraintDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeConstraintUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeConstraintDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeConstraintUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeConstraintUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeConstraintUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeConstraintAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeConstraintGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeConstraintCountArgs + result: $Utils.Optional | number + } + } + } + Phase: { + payload: Prisma.$PhasePayload + fields: Prisma.PhaseFieldRefs + operations: { + findUnique: { + args: Prisma.PhaseFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PhaseFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PhaseFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PhaseFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PhaseFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PhaseCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PhaseCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PhaseCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PhaseDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PhaseUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PhaseDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PhaseUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PhaseUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PhaseUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PhaseAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PhaseGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PhaseCountArgs + result: $Utils.Optional | number + } + } + } + ChallengePhase: { + payload: Prisma.$ChallengePhasePayload + fields: Prisma.ChallengePhaseFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengePhaseFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengePhaseFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengePhaseFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengePhaseFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengePhaseFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengePhaseCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengePhaseCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengePhaseCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengePhaseDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengePhaseUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengePhaseDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengePhaseUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengePhaseUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengePhaseUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengePhaseAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengePhaseGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengePhaseCountArgs + result: $Utils.Optional | number + } + } + } + ChallengePhaseConstraint: { + payload: Prisma.$ChallengePhaseConstraintPayload + fields: Prisma.ChallengePhaseConstraintFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengePhaseConstraintFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengePhaseConstraintFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengePhaseConstraintFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengePhaseConstraintFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengePhaseConstraintFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengePhaseConstraintCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengePhaseConstraintCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengePhaseConstraintCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengePhaseConstraintDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengePhaseConstraintUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengePhaseConstraintDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengePhaseConstraintUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengePhaseConstraintUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengePhaseConstraintUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengePhaseConstraintAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengePhaseConstraintGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengePhaseConstraintCountArgs + result: $Utils.Optional | number + } + } + } + ChallengePrizeSet: { + payload: Prisma.$ChallengePrizeSetPayload + fields: Prisma.ChallengePrizeSetFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengePrizeSetFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengePrizeSetFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengePrizeSetFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengePrizeSetFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengePrizeSetFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengePrizeSetCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengePrizeSetCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengePrizeSetCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengePrizeSetDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengePrizeSetUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengePrizeSetDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengePrizeSetUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengePrizeSetUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengePrizeSetUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengePrizeSetAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengePrizeSetGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengePrizeSetCountArgs + result: $Utils.Optional | number + } + } + } + ChallengeReviewer: { + payload: Prisma.$ChallengeReviewerPayload + fields: Prisma.ChallengeReviewerFieldRefs + operations: { + findUnique: { + args: Prisma.ChallengeReviewerFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChallengeReviewerFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChallengeReviewerFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChallengeReviewerFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChallengeReviewerFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChallengeReviewerCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChallengeReviewerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChallengeReviewerCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChallengeReviewerDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChallengeReviewerUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChallengeReviewerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChallengeReviewerUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ChallengeReviewerUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ChallengeReviewerUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChallengeReviewerAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChallengeReviewerGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChallengeReviewerCountArgs + result: $Utils.Optional | number + } + } + } + DefaultChallengeReviewer: { + payload: Prisma.$DefaultChallengeReviewerPayload + fields: Prisma.DefaultChallengeReviewerFieldRefs + operations: { + findUnique: { + args: Prisma.DefaultChallengeReviewerFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.DefaultChallengeReviewerFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.DefaultChallengeReviewerFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.DefaultChallengeReviewerFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.DefaultChallengeReviewerFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.DefaultChallengeReviewerCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.DefaultChallengeReviewerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.DefaultChallengeReviewerCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.DefaultChallengeReviewerDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.DefaultChallengeReviewerUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.DefaultChallengeReviewerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.DefaultChallengeReviewerUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.DefaultChallengeReviewerUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.DefaultChallengeReviewerUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.DefaultChallengeReviewerAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.DefaultChallengeReviewerGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.DefaultChallengeReviewerCountArgs + result: $Utils.Optional | number + } + } + } + TimelineTemplate: { + payload: Prisma.$TimelineTemplatePayload + fields: Prisma.TimelineTemplateFieldRefs + operations: { + findUnique: { + args: Prisma.TimelineTemplateFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.TimelineTemplateFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.TimelineTemplateFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.TimelineTemplateFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.TimelineTemplateFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.TimelineTemplateCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.TimelineTemplateCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.TimelineTemplateCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.TimelineTemplateDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.TimelineTemplateUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.TimelineTemplateDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.TimelineTemplateUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.TimelineTemplateUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.TimelineTemplateUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.TimelineTemplateAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.TimelineTemplateGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.TimelineTemplateCountArgs + result: $Utils.Optional | number + } + } + } + TimelineTemplatePhase: { + payload: Prisma.$TimelineTemplatePhasePayload + fields: Prisma.TimelineTemplatePhaseFieldRefs + operations: { + findUnique: { + args: Prisma.TimelineTemplatePhaseFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.TimelineTemplatePhaseFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.TimelineTemplatePhaseFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.TimelineTemplatePhaseFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.TimelineTemplatePhaseFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.TimelineTemplatePhaseCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.TimelineTemplatePhaseCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.TimelineTemplatePhaseCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.TimelineTemplatePhaseDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.TimelineTemplatePhaseUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.TimelineTemplatePhaseDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.TimelineTemplatePhaseUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.TimelineTemplatePhaseUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.TimelineTemplatePhaseUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.TimelineTemplatePhaseAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.TimelineTemplatePhaseGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.TimelineTemplatePhaseCountArgs + result: $Utils.Optional | number + } + } + } + MemberChallengeAccess: { + payload: Prisma.$MemberChallengeAccessPayload + fields: Prisma.MemberChallengeAccessFieldRefs + operations: { + findFirst: { + args: Prisma.MemberChallengeAccessFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.MemberChallengeAccessFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.MemberChallengeAccessFindManyArgs + result: $Utils.PayloadToResult[] + } + aggregate: { + args: Prisma.MemberChallengeAccessAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.MemberChallengeAccessGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.MemberChallengeAccessCountArgs + result: $Utils.Optional | number + } + } + } + } + } & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } + } + export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> + export type DefaultPrismaClient = PrismaClient + export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' + export interface PrismaClientOptions { + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasourceUrl?: string + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: Prisma.TransactionIsolationLevel + } + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale` + */ + adapter?: runtime.SqlDriverAdapterFactory | null + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: Prisma.GlobalOmitConfig + } + export type GlobalOmitConfig = { + challenge?: ChallengeOmit + challengeType?: ChallengeTypeOmit + challengeTrack?: ChallengeTrackOmit + challengeTimelineTemplate?: ChallengeTimelineTemplateOmit + auditLog?: AuditLogOmit + attachment?: AttachmentOmit + challengeMetadata?: ChallengeMetadataOmit + prize?: PrizeOmit + challengeWinner?: ChallengeWinnerOmit + challengeTerm?: ChallengeTermOmit + challengeSkill?: ChallengeSkillOmit + challengeBilling?: ChallengeBillingOmit + challengeLegacy?: ChallengeLegacyOmit + challengeEvent?: ChallengeEventOmit + challengeDiscussion?: ChallengeDiscussionOmit + challengeDiscussionOption?: ChallengeDiscussionOptionOmit + challengeConstraint?: ChallengeConstraintOmit + phase?: PhaseOmit + challengePhase?: ChallengePhaseOmit + challengePhaseConstraint?: ChallengePhaseConstraintOmit + challengePrizeSet?: ChallengePrizeSetOmit + challengeReviewer?: ChallengeReviewerOmit + defaultChallengeReviewer?: DefaultChallengeReviewerOmit + timelineTemplate?: TimelineTemplateOmit + timelineTemplatePhase?: TimelineTemplatePhaseOmit + memberChallengeAccess?: MemberChallengeAccessOmit + } + + /* Types for Logging */ + export type LogLevel = 'info' | 'query' | 'warn' | 'error' + export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' + } + + export type CheckIsLogLevel = T extends LogLevel ? T : never; + + export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T + >; + + export type GetEvents = T extends Array + ? GetLogType + : never; + + export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string + } + + export type LogEvent = { + timestamp: Date + message: string + target: string + } + /* End Types for Logging */ + + + export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + + // tested in getLogLevel.test.ts + export function getLogLevel(log: Array): LogLevel | undefined; + + /** + * `PrismaClient` proxy available in interactive transactions. + */ + export type TransactionClient = Omit + + export type Datasource = { + url?: string + } + + /** + * Count Types + */ + + + /** + * Count Type ChallengeCountOutputType + */ + + export type ChallengeCountOutputType = { + events: number + discussions: number + metadata: number + phases: number + prizeSets: number + reviewers: number + winners: number + attachments: number + terms: number + skills: number + auditLogs: number + memberAccesses: number + } + + export type ChallengeCountOutputTypeSelect = { + events?: boolean | ChallengeCountOutputTypeCountEventsArgs + discussions?: boolean | ChallengeCountOutputTypeCountDiscussionsArgs + metadata?: boolean | ChallengeCountOutputTypeCountMetadataArgs + phases?: boolean | ChallengeCountOutputTypeCountPhasesArgs + prizeSets?: boolean | ChallengeCountOutputTypeCountPrizeSetsArgs + reviewers?: boolean | ChallengeCountOutputTypeCountReviewersArgs + winners?: boolean | ChallengeCountOutputTypeCountWinnersArgs + attachments?: boolean | ChallengeCountOutputTypeCountAttachmentsArgs + terms?: boolean | ChallengeCountOutputTypeCountTermsArgs + skills?: boolean | ChallengeCountOutputTypeCountSkillsArgs + auditLogs?: boolean | ChallengeCountOutputTypeCountAuditLogsArgs + memberAccesses?: boolean | ChallengeCountOutputTypeCountMemberAccessesArgs + } + + // Custom InputTypes + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeCountOutputType + */ + select?: ChallengeCountOutputTypeSelect | null + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountEventsArgs = { + where?: ChallengeEventWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountDiscussionsArgs = { + where?: ChallengeDiscussionWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountMetadataArgs = { + where?: ChallengeMetadataWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountPhasesArgs = { + where?: ChallengePhaseWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountPrizeSetsArgs = { + where?: ChallengePrizeSetWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountReviewersArgs = { + where?: ChallengeReviewerWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountWinnersArgs = { + where?: ChallengeWinnerWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountAttachmentsArgs = { + where?: AttachmentWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountTermsArgs = { + where?: ChallengeTermWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountSkillsArgs = { + where?: ChallengeSkillWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountAuditLogsArgs = { + where?: AuditLogWhereInput + } + + /** + * ChallengeCountOutputType without action + */ + export type ChallengeCountOutputTypeCountMemberAccessesArgs = { + where?: MemberChallengeAccessWhereInput + } + + + /** + * Count Type ChallengeTypeCountOutputType + */ + + export type ChallengeTypeCountOutputType = { + challenges: number + timelineTemplates: number + defaultReviewers: number + } + + export type ChallengeTypeCountOutputTypeSelect = { + challenges?: boolean | ChallengeTypeCountOutputTypeCountChallengesArgs + timelineTemplates?: boolean | ChallengeTypeCountOutputTypeCountTimelineTemplatesArgs + defaultReviewers?: boolean | ChallengeTypeCountOutputTypeCountDefaultReviewersArgs + } + + // Custom InputTypes + /** + * ChallengeTypeCountOutputType without action + */ + export type ChallengeTypeCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeTypeCountOutputType + */ + select?: ChallengeTypeCountOutputTypeSelect | null + } + + /** + * ChallengeTypeCountOutputType without action + */ + export type ChallengeTypeCountOutputTypeCountChallengesArgs = { + where?: ChallengeWhereInput + } + + /** + * ChallengeTypeCountOutputType without action + */ + export type ChallengeTypeCountOutputTypeCountTimelineTemplatesArgs = { + where?: ChallengeTimelineTemplateWhereInput + } + + /** + * ChallengeTypeCountOutputType without action + */ + export type ChallengeTypeCountOutputTypeCountDefaultReviewersArgs = { + where?: DefaultChallengeReviewerWhereInput + } + + + /** + * Count Type ChallengeTrackCountOutputType + */ + + export type ChallengeTrackCountOutputType = { + challenges: number + timelineTemplates: number + defaultReviewers: number + } + + export type ChallengeTrackCountOutputTypeSelect = { + challenges?: boolean | ChallengeTrackCountOutputTypeCountChallengesArgs + timelineTemplates?: boolean | ChallengeTrackCountOutputTypeCountTimelineTemplatesArgs + defaultReviewers?: boolean | ChallengeTrackCountOutputTypeCountDefaultReviewersArgs + } + + // Custom InputTypes + /** + * ChallengeTrackCountOutputType without action + */ + export type ChallengeTrackCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeTrackCountOutputType + */ + select?: ChallengeTrackCountOutputTypeSelect | null + } + + /** + * ChallengeTrackCountOutputType without action + */ + export type ChallengeTrackCountOutputTypeCountChallengesArgs = { + where?: ChallengeWhereInput + } + + /** + * ChallengeTrackCountOutputType without action + */ + export type ChallengeTrackCountOutputTypeCountTimelineTemplatesArgs = { + where?: ChallengeTimelineTemplateWhereInput + } + + /** + * ChallengeTrackCountOutputType without action + */ + export type ChallengeTrackCountOutputTypeCountDefaultReviewersArgs = { + where?: DefaultChallengeReviewerWhereInput + } + + + /** + * Count Type ChallengeDiscussionCountOutputType + */ + + export type ChallengeDiscussionCountOutputType = { + options: number + } + + export type ChallengeDiscussionCountOutputTypeSelect = { + options?: boolean | ChallengeDiscussionCountOutputTypeCountOptionsArgs + } + + // Custom InputTypes + /** + * ChallengeDiscussionCountOutputType without action + */ + export type ChallengeDiscussionCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionCountOutputType + */ + select?: ChallengeDiscussionCountOutputTypeSelect | null + } + + /** + * ChallengeDiscussionCountOutputType without action + */ + export type ChallengeDiscussionCountOutputTypeCountOptionsArgs = { + where?: ChallengeDiscussionOptionWhereInput + } + + + /** + * Count Type PhaseCountOutputType + */ + + export type PhaseCountOutputType = { + challengePhases: number + ChallengeReviewer: number + DefaultChallengeReviewer: number + } + + export type PhaseCountOutputTypeSelect = { + challengePhases?: boolean | PhaseCountOutputTypeCountChallengePhasesArgs + ChallengeReviewer?: boolean | PhaseCountOutputTypeCountChallengeReviewerArgs + DefaultChallengeReviewer?: boolean | PhaseCountOutputTypeCountDefaultChallengeReviewerArgs + } + + // Custom InputTypes + /** + * PhaseCountOutputType without action + */ + export type PhaseCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PhaseCountOutputType + */ + select?: PhaseCountOutputTypeSelect | null + } + + /** + * PhaseCountOutputType without action + */ + export type PhaseCountOutputTypeCountChallengePhasesArgs = { + where?: ChallengePhaseWhereInput + } + + /** + * PhaseCountOutputType without action + */ + export type PhaseCountOutputTypeCountChallengeReviewerArgs = { + where?: ChallengeReviewerWhereInput + } + + /** + * PhaseCountOutputType without action + */ + export type PhaseCountOutputTypeCountDefaultChallengeReviewerArgs = { + where?: DefaultChallengeReviewerWhereInput + } + + + /** + * Count Type ChallengePhaseCountOutputType + */ + + export type ChallengePhaseCountOutputType = { + constraints: number + } + + export type ChallengePhaseCountOutputTypeSelect = { + constraints?: boolean | ChallengePhaseCountOutputTypeCountConstraintsArgs + } + + // Custom InputTypes + /** + * ChallengePhaseCountOutputType without action + */ + export type ChallengePhaseCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseCountOutputType + */ + select?: ChallengePhaseCountOutputTypeSelect | null + } + + /** + * ChallengePhaseCountOutputType without action + */ + export type ChallengePhaseCountOutputTypeCountConstraintsArgs = { + where?: ChallengePhaseConstraintWhereInput + } + + + /** + * Count Type ChallengePrizeSetCountOutputType + */ + + export type ChallengePrizeSetCountOutputType = { + prizes: number + } + + export type ChallengePrizeSetCountOutputTypeSelect = { + prizes?: boolean | ChallengePrizeSetCountOutputTypeCountPrizesArgs + } + + // Custom InputTypes + /** + * ChallengePrizeSetCountOutputType without action + */ + export type ChallengePrizeSetCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSetCountOutputType + */ + select?: ChallengePrizeSetCountOutputTypeSelect | null + } + + /** + * ChallengePrizeSetCountOutputType without action + */ + export type ChallengePrizeSetCountOutputTypeCountPrizesArgs = { + where?: PrizeWhereInput + } + + + /** + * Count Type TimelineTemplateCountOutputType + */ + + export type TimelineTemplateCountOutputType = { + phases: number + challengeTimelineTemplates: number + challenges: number + DefaultChallengeReviewer: number + } + + export type TimelineTemplateCountOutputTypeSelect = { + phases?: boolean | TimelineTemplateCountOutputTypeCountPhasesArgs + challengeTimelineTemplates?: boolean | TimelineTemplateCountOutputTypeCountChallengeTimelineTemplatesArgs + challenges?: boolean | TimelineTemplateCountOutputTypeCountChallengesArgs + DefaultChallengeReviewer?: boolean | TimelineTemplateCountOutputTypeCountDefaultChallengeReviewerArgs + } + + // Custom InputTypes + /** + * TimelineTemplateCountOutputType without action + */ + export type TimelineTemplateCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the TimelineTemplateCountOutputType + */ + select?: TimelineTemplateCountOutputTypeSelect | null + } + + /** + * TimelineTemplateCountOutputType without action + */ + export type TimelineTemplateCountOutputTypeCountPhasesArgs = { + where?: TimelineTemplatePhaseWhereInput + } + + /** + * TimelineTemplateCountOutputType without action + */ + export type TimelineTemplateCountOutputTypeCountChallengeTimelineTemplatesArgs = { + where?: ChallengeTimelineTemplateWhereInput + } + + /** + * TimelineTemplateCountOutputType without action + */ + export type TimelineTemplateCountOutputTypeCountChallengesArgs = { + where?: ChallengeWhereInput + } + + /** + * TimelineTemplateCountOutputType without action + */ + export type TimelineTemplateCountOutputTypeCountDefaultChallengeReviewerArgs = { + where?: DefaultChallengeReviewerWhereInput + } + + + /** + * Models + */ + + /** + * Model Challenge + */ + + export type AggregateChallenge = { + _count: ChallengeCountAggregateOutputType | null + _avg: ChallengeAvgAggregateOutputType | null + _sum: ChallengeSumAggregateOutputType | null + _min: ChallengeMinAggregateOutputType | null + _max: ChallengeMaxAggregateOutputType | null + } + + export type ChallengeAvgAggregateOutputType = { + projectId: number | null + overviewTotalPrizes: number | null + numOfRegistrants: number | null + numOfSubmissions: number | null + numOfCheckpointSubmissions: number | null + legacyId: number | null + } + + export type ChallengeSumAggregateOutputType = { + projectId: number | null + overviewTotalPrizes: number | null + numOfRegistrants: number | null + numOfSubmissions: number | null + numOfCheckpointSubmissions: number | null + legacyId: number | null + } + + export type ChallengeMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + privateDescription: string | null + challengeSource: string | null + descriptionFormat: string | null + projectId: number | null + typeId: string | null + trackId: string | null + timelineTemplateId: string | null + overviewTotalPrizes: number | null + numOfRegistrants: number | null + numOfSubmissions: number | null + numOfCheckpointSubmissions: number | null + wiproAllowed: boolean | null + taskIsTask: boolean | null + taskIsAssigned: boolean | null + taskMemberId: string | null + submissionStartDate: Date | null + submissionEndDate: Date | null + registrationStartDate: Date | null + registrationEndDate: Date | null + startDate: Date | null + endDate: Date | null + legacyId: number | null + status: $Enums.ChallengeStatusEnum | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + privateDescription: string | null + challengeSource: string | null + descriptionFormat: string | null + projectId: number | null + typeId: string | null + trackId: string | null + timelineTemplateId: string | null + overviewTotalPrizes: number | null + numOfRegistrants: number | null + numOfSubmissions: number | null + numOfCheckpointSubmissions: number | null + wiproAllowed: boolean | null + taskIsTask: boolean | null + taskIsAssigned: boolean | null + taskMemberId: string | null + submissionStartDate: Date | null + submissionEndDate: Date | null + registrationStartDate: Date | null + registrationEndDate: Date | null + startDate: Date | null + endDate: Date | null + legacyId: number | null + status: $Enums.ChallengeStatusEnum | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeCountAggregateOutputType = { + id: number + name: number + description: number + privateDescription: number + challengeSource: number + descriptionFormat: number + projectId: number + typeId: number + trackId: number + timelineTemplateId: number + overviewTotalPrizes: number + numOfRegistrants: number + numOfSubmissions: number + numOfCheckpointSubmissions: number + currentPhaseNames: number + wiproAllowed: number + tags: number + groups: number + taskIsTask: number + taskIsAssigned: number + taskMemberId: number + submissionStartDate: number + submissionEndDate: number + registrationStartDate: number + registrationEndDate: number + startDate: number + endDate: number + legacyId: number + status: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeAvgAggregateInputType = { + projectId?: true + overviewTotalPrizes?: true + numOfRegistrants?: true + numOfSubmissions?: true + numOfCheckpointSubmissions?: true + legacyId?: true + } + + export type ChallengeSumAggregateInputType = { + projectId?: true + overviewTotalPrizes?: true + numOfRegistrants?: true + numOfSubmissions?: true + numOfCheckpointSubmissions?: true + legacyId?: true + } + + export type ChallengeMinAggregateInputType = { + id?: true + name?: true + description?: true + privateDescription?: true + challengeSource?: true + descriptionFormat?: true + projectId?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + overviewTotalPrizes?: true + numOfRegistrants?: true + numOfSubmissions?: true + numOfCheckpointSubmissions?: true + wiproAllowed?: true + taskIsTask?: true + taskIsAssigned?: true + taskMemberId?: true + submissionStartDate?: true + submissionEndDate?: true + registrationStartDate?: true + registrationEndDate?: true + startDate?: true + endDate?: true + legacyId?: true + status?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeMaxAggregateInputType = { + id?: true + name?: true + description?: true + privateDescription?: true + challengeSource?: true + descriptionFormat?: true + projectId?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + overviewTotalPrizes?: true + numOfRegistrants?: true + numOfSubmissions?: true + numOfCheckpointSubmissions?: true + wiproAllowed?: true + taskIsTask?: true + taskIsAssigned?: true + taskMemberId?: true + submissionStartDate?: true + submissionEndDate?: true + registrationStartDate?: true + registrationEndDate?: true + startDate?: true + endDate?: true + legacyId?: true + status?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeCountAggregateInputType = { + id?: true + name?: true + description?: true + privateDescription?: true + challengeSource?: true + descriptionFormat?: true + projectId?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + overviewTotalPrizes?: true + numOfRegistrants?: true + numOfSubmissions?: true + numOfCheckpointSubmissions?: true + currentPhaseNames?: true + wiproAllowed?: true + tags?: true + groups?: true + taskIsTask?: true + taskIsAssigned?: true + taskMemberId?: true + submissionStartDate?: true + submissionEndDate?: true + registrationStartDate?: true + registrationEndDate?: true + startDate?: true + endDate?: true + legacyId?: true + status?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeAggregateArgs = { + /** + * Filter which Challenge to aggregate. + */ + where?: ChallengeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Challenges to fetch. + */ + orderBy?: ChallengeOrderByWithRelationInput | ChallengeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Challenges from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Challenges. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Challenges + **/ + _count?: true | ChallengeCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengeAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengeSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeMaxAggregateInputType + } + + export type GetChallengeAggregateType = { + [P in keyof T & keyof AggregateChallenge]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeGroupByArgs = { + where?: ChallengeWhereInput + orderBy?: ChallengeOrderByWithAggregationInput | ChallengeOrderByWithAggregationInput[] + by: ChallengeScalarFieldEnum[] | ChallengeScalarFieldEnum + having?: ChallengeScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeCountAggregateInputType | true + _avg?: ChallengeAvgAggregateInputType + _sum?: ChallengeSumAggregateInputType + _min?: ChallengeMinAggregateInputType + _max?: ChallengeMaxAggregateInputType + } + + export type ChallengeGroupByOutputType = { + id: string + name: string + description: string | null + privateDescription: string | null + challengeSource: string | null + descriptionFormat: string | null + projectId: number | null + typeId: string + trackId: string + timelineTemplateId: string | null + overviewTotalPrizes: number | null + numOfRegistrants: number + numOfSubmissions: number + numOfCheckpointSubmissions: number + currentPhaseNames: string[] + wiproAllowed: boolean + tags: string[] + groups: string[] + taskIsTask: boolean + taskIsAssigned: boolean + taskMemberId: string | null + submissionStartDate: Date | null + submissionEndDate: Date | null + registrationStartDate: Date | null + registrationEndDate: Date | null + startDate: Date | null + endDate: Date | null + legacyId: number | null + status: $Enums.ChallengeStatusEnum + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeCountAggregateOutputType | null + _avg: ChallengeAvgAggregateOutputType | null + _sum: ChallengeSumAggregateOutputType | null + _min: ChallengeMinAggregateOutputType | null + _max: ChallengeMaxAggregateOutputType | null + } + + type GetChallengeGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + privateDescription?: boolean + challengeSource?: boolean + descriptionFormat?: boolean + projectId?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + overviewTotalPrizes?: boolean + numOfRegistrants?: boolean + numOfSubmissions?: boolean + numOfCheckpointSubmissions?: boolean + currentPhaseNames?: boolean + wiproAllowed?: boolean + tags?: boolean + groups?: boolean + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: boolean + submissionStartDate?: boolean + submissionEndDate?: boolean + registrationStartDate?: boolean + registrationEndDate?: boolean + startDate?: boolean + endDate?: boolean + legacyId?: boolean + status?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + billingRecord?: boolean | Challenge$billingRecordArgs + legacyRecord?: boolean | Challenge$legacyRecordArgs + constraintRecord?: boolean | Challenge$constraintRecordArgs + events?: boolean | Challenge$eventsArgs + discussions?: boolean | Challenge$discussionsArgs + metadata?: boolean | Challenge$metadataArgs + phases?: boolean | Challenge$phasesArgs + prizeSets?: boolean | Challenge$prizeSetsArgs + reviewers?: boolean | Challenge$reviewersArgs + winners?: boolean | Challenge$winnersArgs + attachments?: boolean | Challenge$attachmentsArgs + terms?: boolean | Challenge$termsArgs + skills?: boolean | Challenge$skillsArgs + auditLogs?: boolean | Challenge$auditLogsArgs + memberAccesses?: boolean | Challenge$memberAccessesArgs + type?: boolean | ChallengeTypeDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | Challenge$timelineTemplateArgs + _count?: boolean | ChallengeCountOutputTypeDefaultArgs + }, ExtArgs["result"]["challenge"]> + + export type ChallengeSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + privateDescription?: boolean + challengeSource?: boolean + descriptionFormat?: boolean + projectId?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + overviewTotalPrizes?: boolean + numOfRegistrants?: boolean + numOfSubmissions?: boolean + numOfCheckpointSubmissions?: boolean + currentPhaseNames?: boolean + wiproAllowed?: boolean + tags?: boolean + groups?: boolean + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: boolean + submissionStartDate?: boolean + submissionEndDate?: boolean + registrationStartDate?: boolean + registrationEndDate?: boolean + startDate?: boolean + endDate?: boolean + legacyId?: boolean + status?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + type?: boolean | ChallengeTypeDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | Challenge$timelineTemplateArgs + }, ExtArgs["result"]["challenge"]> + + export type ChallengeSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + privateDescription?: boolean + challengeSource?: boolean + descriptionFormat?: boolean + projectId?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + overviewTotalPrizes?: boolean + numOfRegistrants?: boolean + numOfSubmissions?: boolean + numOfCheckpointSubmissions?: boolean + currentPhaseNames?: boolean + wiproAllowed?: boolean + tags?: boolean + groups?: boolean + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: boolean + submissionStartDate?: boolean + submissionEndDate?: boolean + registrationStartDate?: boolean + registrationEndDate?: boolean + startDate?: boolean + endDate?: boolean + legacyId?: boolean + status?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + type?: boolean | ChallengeTypeDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | Challenge$timelineTemplateArgs + }, ExtArgs["result"]["challenge"]> + + export type ChallengeSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + privateDescription?: boolean + challengeSource?: boolean + descriptionFormat?: boolean + projectId?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + overviewTotalPrizes?: boolean + numOfRegistrants?: boolean + numOfSubmissions?: boolean + numOfCheckpointSubmissions?: boolean + currentPhaseNames?: boolean + wiproAllowed?: boolean + tags?: boolean + groups?: boolean + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: boolean + submissionStartDate?: boolean + submissionEndDate?: boolean + registrationStartDate?: boolean + registrationEndDate?: boolean + startDate?: boolean + endDate?: boolean + legacyId?: boolean + status?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeOmit = $Extensions.GetOmit<"id" | "name" | "description" | "privateDescription" | "challengeSource" | "descriptionFormat" | "projectId" | "typeId" | "trackId" | "timelineTemplateId" | "overviewTotalPrizes" | "numOfRegistrants" | "numOfSubmissions" | "numOfCheckpointSubmissions" | "currentPhaseNames" | "wiproAllowed" | "tags" | "groups" | "taskIsTask" | "taskIsAssigned" | "taskMemberId" | "submissionStartDate" | "submissionEndDate" | "registrationStartDate" | "registrationEndDate" | "startDate" | "endDate" | "legacyId" | "status" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challenge"]> + export type ChallengeInclude = { + billingRecord?: boolean | Challenge$billingRecordArgs + legacyRecord?: boolean | Challenge$legacyRecordArgs + constraintRecord?: boolean | Challenge$constraintRecordArgs + events?: boolean | Challenge$eventsArgs + discussions?: boolean | Challenge$discussionsArgs + metadata?: boolean | Challenge$metadataArgs + phases?: boolean | Challenge$phasesArgs + prizeSets?: boolean | Challenge$prizeSetsArgs + reviewers?: boolean | Challenge$reviewersArgs + winners?: boolean | Challenge$winnersArgs + attachments?: boolean | Challenge$attachmentsArgs + terms?: boolean | Challenge$termsArgs + skills?: boolean | Challenge$skillsArgs + auditLogs?: boolean | Challenge$auditLogsArgs + memberAccesses?: boolean | Challenge$memberAccessesArgs + type?: boolean | ChallengeTypeDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | Challenge$timelineTemplateArgs + _count?: boolean | ChallengeCountOutputTypeDefaultArgs + } + export type ChallengeIncludeCreateManyAndReturn = { + type?: boolean | ChallengeTypeDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | Challenge$timelineTemplateArgs + } + export type ChallengeIncludeUpdateManyAndReturn = { + type?: boolean | ChallengeTypeDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | Challenge$timelineTemplateArgs + } + + export type $ChallengePayload = { + name: "Challenge" + objects: { + billingRecord: Prisma.$ChallengeBillingPayload | null + legacyRecord: Prisma.$ChallengeLegacyPayload | null + constraintRecord: Prisma.$ChallengeConstraintPayload | null + events: Prisma.$ChallengeEventPayload[] + discussions: Prisma.$ChallengeDiscussionPayload[] + metadata: Prisma.$ChallengeMetadataPayload[] + phases: Prisma.$ChallengePhasePayload[] + prizeSets: Prisma.$ChallengePrizeSetPayload[] + reviewers: Prisma.$ChallengeReviewerPayload[] + winners: Prisma.$ChallengeWinnerPayload[] + attachments: Prisma.$AttachmentPayload[] + terms: Prisma.$ChallengeTermPayload[] + skills: Prisma.$ChallengeSkillPayload[] + auditLogs: Prisma.$AuditLogPayload[] + memberAccesses: Prisma.$MemberChallengeAccessPayload[] + type: Prisma.$ChallengeTypePayload + track: Prisma.$ChallengeTrackPayload + timelineTemplate: Prisma.$TimelineTemplatePayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + description: string | null + privateDescription: string | null + challengeSource: string | null + descriptionFormat: string | null + projectId: number | null + typeId: string + trackId: string + timelineTemplateId: string | null + overviewTotalPrizes: number | null + numOfRegistrants: number + numOfSubmissions: number + numOfCheckpointSubmissions: number + currentPhaseNames: string[] + wiproAllowed: boolean + tags: string[] + groups: string[] + taskIsTask: boolean + taskIsAssigned: boolean + taskMemberId: string | null + submissionStartDate: Date | null + submissionEndDate: Date | null + registrationStartDate: Date | null + registrationEndDate: Date | null + startDate: Date | null + endDate: Date | null + legacyId: number | null + status: $Enums.ChallengeStatusEnum + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challenge"]> + composites: {} + } + + type ChallengeGetPayload = $Result.GetResult + + type ChallengeCountArgs = + Omit & { + select?: ChallengeCountAggregateInputType | true + } + + export interface ChallengeDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Challenge'], meta: { name: 'Challenge' } } + /** + * Find zero or one Challenge that matches the filter. + * @param {ChallengeFindUniqueArgs} args - Arguments to find a Challenge + * @example + * // Get one Challenge + * const challenge = await prisma.challenge.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Challenge that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeFindUniqueOrThrowArgs} args - Arguments to find a Challenge + * @example + * // Get one Challenge + * const challenge = await prisma.challenge.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Challenge that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeFindFirstArgs} args - Arguments to find a Challenge + * @example + * // Get one Challenge + * const challenge = await prisma.challenge.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Challenge that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeFindFirstOrThrowArgs} args - Arguments to find a Challenge + * @example + * // Get one Challenge + * const challenge = await prisma.challenge.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Challenges that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Challenges + * const challenges = await prisma.challenge.findMany() + * + * // Get first 10 Challenges + * const challenges = await prisma.challenge.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeWithIdOnly = await prisma.challenge.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Challenge. + * @param {ChallengeCreateArgs} args - Arguments to create a Challenge. + * @example + * // Create one Challenge + * const Challenge = await prisma.challenge.create({ + * data: { + * // ... data to create a Challenge + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Challenges. + * @param {ChallengeCreateManyArgs} args - Arguments to create many Challenges. + * @example + * // Create many Challenges + * const challenge = await prisma.challenge.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Challenges and returns the data saved in the database. + * @param {ChallengeCreateManyAndReturnArgs} args - Arguments to create many Challenges. + * @example + * // Create many Challenges + * const challenge = await prisma.challenge.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Challenges and only return the `id` + * const challengeWithIdOnly = await prisma.challenge.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Challenge. + * @param {ChallengeDeleteArgs} args - Arguments to delete one Challenge. + * @example + * // Delete one Challenge + * const Challenge = await prisma.challenge.delete({ + * where: { + * // ... filter to delete one Challenge + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Challenge. + * @param {ChallengeUpdateArgs} args - Arguments to update one Challenge. + * @example + * // Update one Challenge + * const challenge = await prisma.challenge.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Challenges. + * @param {ChallengeDeleteManyArgs} args - Arguments to filter Challenges to delete. + * @example + * // Delete a few Challenges + * const { count } = await prisma.challenge.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Challenges. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Challenges + * const challenge = await prisma.challenge.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Challenges and returns the data updated in the database. + * @param {ChallengeUpdateManyAndReturnArgs} args - Arguments to update many Challenges. + * @example + * // Update many Challenges + * const challenge = await prisma.challenge.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Challenges and only return the `id` + * const challengeWithIdOnly = await prisma.challenge.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Challenge. + * @param {ChallengeUpsertArgs} args - Arguments to update or create a Challenge. + * @example + * // Update or create a Challenge + * const challenge = await prisma.challenge.upsert({ + * create: { + * // ... data to create a Challenge + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Challenge we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Challenges. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeCountArgs} args - Arguments to filter Challenges to count. + * @example + * // Count the number of Challenges + * const count = await prisma.challenge.count({ + * where: { + * // ... the filter for the Challenges we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Challenge. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Challenge. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeGroupByArgs['orderBy'] } + : { orderBy?: ChallengeGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Challenge model + */ + readonly fields: ChallengeFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Challenge. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + billingRecord = {}>(args?: Subset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + legacyRecord = {}>(args?: Subset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + constraintRecord = {}>(args?: Subset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + events = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + discussions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + metadata = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + phases = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + prizeSets = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + reviewers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + winners = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + attachments = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + terms = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + skills = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + auditLogs = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + memberAccesses = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + type = {}>(args?: Subset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + track = {}>(args?: Subset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + timelineTemplate = {}>(args?: Subset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Challenge model + */ + interface ChallengeFieldRefs { + readonly id: FieldRef<"Challenge", 'String'> + readonly name: FieldRef<"Challenge", 'String'> + readonly description: FieldRef<"Challenge", 'String'> + readonly privateDescription: FieldRef<"Challenge", 'String'> + readonly challengeSource: FieldRef<"Challenge", 'String'> + readonly descriptionFormat: FieldRef<"Challenge", 'String'> + readonly projectId: FieldRef<"Challenge", 'Int'> + readonly typeId: FieldRef<"Challenge", 'String'> + readonly trackId: FieldRef<"Challenge", 'String'> + readonly timelineTemplateId: FieldRef<"Challenge", 'String'> + readonly overviewTotalPrizes: FieldRef<"Challenge", 'Float'> + readonly numOfRegistrants: FieldRef<"Challenge", 'Int'> + readonly numOfSubmissions: FieldRef<"Challenge", 'Int'> + readonly numOfCheckpointSubmissions: FieldRef<"Challenge", 'Int'> + readonly currentPhaseNames: FieldRef<"Challenge", 'String[]'> + readonly wiproAllowed: FieldRef<"Challenge", 'Boolean'> + readonly tags: FieldRef<"Challenge", 'String[]'> + readonly groups: FieldRef<"Challenge", 'String[]'> + readonly taskIsTask: FieldRef<"Challenge", 'Boolean'> + readonly taskIsAssigned: FieldRef<"Challenge", 'Boolean'> + readonly taskMemberId: FieldRef<"Challenge", 'String'> + readonly submissionStartDate: FieldRef<"Challenge", 'DateTime'> + readonly submissionEndDate: FieldRef<"Challenge", 'DateTime'> + readonly registrationStartDate: FieldRef<"Challenge", 'DateTime'> + readonly registrationEndDate: FieldRef<"Challenge", 'DateTime'> + readonly startDate: FieldRef<"Challenge", 'DateTime'> + readonly endDate: FieldRef<"Challenge", 'DateTime'> + readonly legacyId: FieldRef<"Challenge", 'Int'> + readonly status: FieldRef<"Challenge", 'ChallengeStatusEnum'> + readonly createdAt: FieldRef<"Challenge", 'DateTime'> + readonly createdBy: FieldRef<"Challenge", 'String'> + readonly updatedAt: FieldRef<"Challenge", 'DateTime'> + readonly updatedBy: FieldRef<"Challenge", 'String'> + } + + + // Custom InputTypes + /** + * Challenge findUnique + */ + export type ChallengeFindUniqueArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * Filter, which Challenge to fetch. + */ + where: ChallengeWhereUniqueInput + } + + /** + * Challenge findUniqueOrThrow + */ + export type ChallengeFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * Filter, which Challenge to fetch. + */ + where: ChallengeWhereUniqueInput + } + + /** + * Challenge findFirst + */ + export type ChallengeFindFirstArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * Filter, which Challenge to fetch. + */ + where?: ChallengeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Challenges to fetch. + */ + orderBy?: ChallengeOrderByWithRelationInput | ChallengeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Challenges. + */ + cursor?: ChallengeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Challenges from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Challenges. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Challenges. + */ + distinct?: ChallengeScalarFieldEnum | ChallengeScalarFieldEnum[] + } + + /** + * Challenge findFirstOrThrow + */ + export type ChallengeFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * Filter, which Challenge to fetch. + */ + where?: ChallengeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Challenges to fetch. + */ + orderBy?: ChallengeOrderByWithRelationInput | ChallengeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Challenges. + */ + cursor?: ChallengeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Challenges from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Challenges. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Challenges. + */ + distinct?: ChallengeScalarFieldEnum | ChallengeScalarFieldEnum[] + } + + /** + * Challenge findMany + */ + export type ChallengeFindManyArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * Filter, which Challenges to fetch. + */ + where?: ChallengeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Challenges to fetch. + */ + orderBy?: ChallengeOrderByWithRelationInput | ChallengeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Challenges. + */ + cursor?: ChallengeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Challenges from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Challenges. + */ + skip?: number + distinct?: ChallengeScalarFieldEnum | ChallengeScalarFieldEnum[] + } + + /** + * Challenge create + */ + export type ChallengeCreateArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * The data needed to create a Challenge. + */ + data: XOR + } + + /** + * Challenge createMany + */ + export type ChallengeCreateManyArgs = { + /** + * The data used to create many Challenges. + */ + data: ChallengeCreateManyInput | ChallengeCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Challenge createManyAndReturn + */ + export type ChallengeCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * The data used to create many Challenges. + */ + data: ChallengeCreateManyInput | ChallengeCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeIncludeCreateManyAndReturn | null + } + + /** + * Challenge update + */ + export type ChallengeUpdateArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * The data needed to update a Challenge. + */ + data: XOR + /** + * Choose, which Challenge to update. + */ + where: ChallengeWhereUniqueInput + } + + /** + * Challenge updateMany + */ + export type ChallengeUpdateManyArgs = { + /** + * The data used to update Challenges. + */ + data: XOR + /** + * Filter which Challenges to update + */ + where?: ChallengeWhereInput + /** + * Limit how many Challenges to update. + */ + limit?: number + } + + /** + * Challenge updateManyAndReturn + */ + export type ChallengeUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * The data used to update Challenges. + */ + data: XOR + /** + * Filter which Challenges to update + */ + where?: ChallengeWhereInput + /** + * Limit how many Challenges to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeIncludeUpdateManyAndReturn | null + } + + /** + * Challenge upsert + */ + export type ChallengeUpsertArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * The filter to search for the Challenge to update in case it exists. + */ + where: ChallengeWhereUniqueInput + /** + * In case the Challenge found by the `where` argument doesn't exist, create a new Challenge with this data. + */ + create: XOR + /** + * In case the Challenge was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Challenge delete + */ + export type ChallengeDeleteArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + /** + * Filter which Challenge to delete. + */ + where: ChallengeWhereUniqueInput + } + + /** + * Challenge deleteMany + */ + export type ChallengeDeleteManyArgs = { + /** + * Filter which Challenges to delete + */ + where?: ChallengeWhereInput + /** + * Limit how many Challenges to delete. + */ + limit?: number + } + + /** + * Challenge.billingRecord + */ + export type Challenge$billingRecordArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + where?: ChallengeBillingWhereInput + } + + /** + * Challenge.legacyRecord + */ + export type Challenge$legacyRecordArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + where?: ChallengeLegacyWhereInput + } + + /** + * Challenge.constraintRecord + */ + export type Challenge$constraintRecordArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + where?: ChallengeConstraintWhereInput + } + + /** + * Challenge.events + */ + export type Challenge$eventsArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + where?: ChallengeEventWhereInput + orderBy?: ChallengeEventOrderByWithRelationInput | ChallengeEventOrderByWithRelationInput[] + cursor?: ChallengeEventWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeEventScalarFieldEnum | ChallengeEventScalarFieldEnum[] + } + + /** + * Challenge.discussions + */ + export type Challenge$discussionsArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + where?: ChallengeDiscussionWhereInput + orderBy?: ChallengeDiscussionOrderByWithRelationInput | ChallengeDiscussionOrderByWithRelationInput[] + cursor?: ChallengeDiscussionWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeDiscussionScalarFieldEnum | ChallengeDiscussionScalarFieldEnum[] + } + + /** + * Challenge.metadata + */ + export type Challenge$metadataArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + where?: ChallengeMetadataWhereInput + orderBy?: ChallengeMetadataOrderByWithRelationInput | ChallengeMetadataOrderByWithRelationInput[] + cursor?: ChallengeMetadataWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeMetadataScalarFieldEnum | ChallengeMetadataScalarFieldEnum[] + } + + /** + * Challenge.phases + */ + export type Challenge$phasesArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + where?: ChallengePhaseWhereInput + orderBy?: ChallengePhaseOrderByWithRelationInput | ChallengePhaseOrderByWithRelationInput[] + cursor?: ChallengePhaseWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengePhaseScalarFieldEnum | ChallengePhaseScalarFieldEnum[] + } + + /** + * Challenge.prizeSets + */ + export type Challenge$prizeSetsArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + where?: ChallengePrizeSetWhereInput + orderBy?: ChallengePrizeSetOrderByWithRelationInput | ChallengePrizeSetOrderByWithRelationInput[] + cursor?: ChallengePrizeSetWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengePrizeSetScalarFieldEnum | ChallengePrizeSetScalarFieldEnum[] + } + + /** + * Challenge.reviewers + */ + export type Challenge$reviewersArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + where?: ChallengeReviewerWhereInput + orderBy?: ChallengeReviewerOrderByWithRelationInput | ChallengeReviewerOrderByWithRelationInput[] + cursor?: ChallengeReviewerWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeReviewerScalarFieldEnum | ChallengeReviewerScalarFieldEnum[] + } + + /** + * Challenge.winners + */ + export type Challenge$winnersArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + where?: ChallengeWinnerWhereInput + orderBy?: ChallengeWinnerOrderByWithRelationInput | ChallengeWinnerOrderByWithRelationInput[] + cursor?: ChallengeWinnerWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeWinnerScalarFieldEnum | ChallengeWinnerScalarFieldEnum[] + } + + /** + * Challenge.attachments + */ + export type Challenge$attachmentsArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + where?: AttachmentWhereInput + orderBy?: AttachmentOrderByWithRelationInput | AttachmentOrderByWithRelationInput[] + cursor?: AttachmentWhereUniqueInput + take?: number + skip?: number + distinct?: AttachmentScalarFieldEnum | AttachmentScalarFieldEnum[] + } + + /** + * Challenge.terms + */ + export type Challenge$termsArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + where?: ChallengeTermWhereInput + orderBy?: ChallengeTermOrderByWithRelationInput | ChallengeTermOrderByWithRelationInput[] + cursor?: ChallengeTermWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeTermScalarFieldEnum | ChallengeTermScalarFieldEnum[] + } + + /** + * Challenge.skills + */ + export type Challenge$skillsArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + where?: ChallengeSkillWhereInput + orderBy?: ChallengeSkillOrderByWithRelationInput | ChallengeSkillOrderByWithRelationInput[] + cursor?: ChallengeSkillWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeSkillScalarFieldEnum | ChallengeSkillScalarFieldEnum[] + } + + /** + * Challenge.auditLogs + */ + export type Challenge$auditLogsArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + where?: AuditLogWhereInput + orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[] + cursor?: AuditLogWhereUniqueInput + take?: number + skip?: number + distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[] + } + + /** + * Challenge.memberAccesses + */ + export type Challenge$memberAccessesArgs = { + /** + * Select specific fields to fetch from the MemberChallengeAccess + */ + select?: MemberChallengeAccessSelect | null + /** + * Omit specific fields from the MemberChallengeAccess + */ + omit?: MemberChallengeAccessOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemberChallengeAccessInclude | null + where?: MemberChallengeAccessWhereInput + orderBy?: MemberChallengeAccessOrderByWithRelationInput | MemberChallengeAccessOrderByWithRelationInput[] + take?: number + skip?: number + distinct?: MemberChallengeAccessScalarFieldEnum | MemberChallengeAccessScalarFieldEnum[] + } + + /** + * Challenge.timelineTemplate + */ + export type Challenge$timelineTemplateArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + where?: TimelineTemplateWhereInput + } + + /** + * Challenge without action + */ + export type ChallengeDefaultArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + } + + + /** + * Model ChallengeType + */ + + export type AggregateChallengeType = { + _count: ChallengeTypeCountAggregateOutputType | null + _min: ChallengeTypeMinAggregateOutputType | null + _max: ChallengeTypeMaxAggregateOutputType | null + } + + export type ChallengeTypeMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isActive: boolean | null + isTask: boolean | null + abbreviation: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTypeMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isActive: boolean | null + isTask: boolean | null + abbreviation: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTypeCountAggregateOutputType = { + id: number + name: number + description: number + isActive: number + isTask: number + abbreviation: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeTypeMinAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + isTask?: true + abbreviation?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTypeMaxAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + isTask?: true + abbreviation?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTypeCountAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + isTask?: true + abbreviation?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeTypeAggregateArgs = { + /** + * Filter which ChallengeType to aggregate. + */ + where?: ChallengeTypeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTypes to fetch. + */ + orderBy?: ChallengeTypeOrderByWithRelationInput | ChallengeTypeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeTypeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTypes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTypes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeTypes + **/ + _count?: true | ChallengeTypeCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeTypeMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeTypeMaxAggregateInputType + } + + export type GetChallengeTypeAggregateType = { + [P in keyof T & keyof AggregateChallengeType]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeTypeGroupByArgs = { + where?: ChallengeTypeWhereInput + orderBy?: ChallengeTypeOrderByWithAggregationInput | ChallengeTypeOrderByWithAggregationInput[] + by: ChallengeTypeScalarFieldEnum[] | ChallengeTypeScalarFieldEnum + having?: ChallengeTypeScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeTypeCountAggregateInputType | true + _min?: ChallengeTypeMinAggregateInputType + _max?: ChallengeTypeMaxAggregateInputType + } + + export type ChallengeTypeGroupByOutputType = { + id: string + name: string + description: string | null + isActive: boolean + isTask: boolean + abbreviation: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeTypeCountAggregateOutputType | null + _min: ChallengeTypeMinAggregateOutputType | null + _max: ChallengeTypeMaxAggregateOutputType | null + } + + type GetChallengeTypeGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeTypeGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeTypeSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + isTask?: boolean + abbreviation?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenges?: boolean | ChallengeType$challengesArgs + timelineTemplates?: boolean | ChallengeType$timelineTemplatesArgs + defaultReviewers?: boolean | ChallengeType$defaultReviewersArgs + _count?: boolean | ChallengeTypeCountOutputTypeDefaultArgs + }, ExtArgs["result"]["challengeType"]> + + export type ChallengeTypeSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + isTask?: boolean + abbreviation?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["challengeType"]> + + export type ChallengeTypeSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + isTask?: boolean + abbreviation?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["challengeType"]> + + export type ChallengeTypeSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + isTask?: boolean + abbreviation?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeTypeOmit = $Extensions.GetOmit<"id" | "name" | "description" | "isActive" | "isTask" | "abbreviation" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeType"]> + export type ChallengeTypeInclude = { + challenges?: boolean | ChallengeType$challengesArgs + timelineTemplates?: boolean | ChallengeType$timelineTemplatesArgs + defaultReviewers?: boolean | ChallengeType$defaultReviewersArgs + _count?: boolean | ChallengeTypeCountOutputTypeDefaultArgs + } + export type ChallengeTypeIncludeCreateManyAndReturn = {} + export type ChallengeTypeIncludeUpdateManyAndReturn = {} + + export type $ChallengeTypePayload = { + name: "ChallengeType" + objects: { + challenges: Prisma.$ChallengePayload[] + timelineTemplates: Prisma.$ChallengeTimelineTemplatePayload[] + defaultReviewers: Prisma.$DefaultChallengeReviewerPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + description: string | null + isActive: boolean + isTask: boolean + abbreviation: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeType"]> + composites: {} + } + + type ChallengeTypeGetPayload = $Result.GetResult + + type ChallengeTypeCountArgs = + Omit & { + select?: ChallengeTypeCountAggregateInputType | true + } + + export interface ChallengeTypeDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeType'], meta: { name: 'ChallengeType' } } + /** + * Find zero or one ChallengeType that matches the filter. + * @param {ChallengeTypeFindUniqueArgs} args - Arguments to find a ChallengeType + * @example + * // Get one ChallengeType + * const challengeType = await prisma.challengeType.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeType that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeTypeFindUniqueOrThrowArgs} args - Arguments to find a ChallengeType + * @example + * // Get one ChallengeType + * const challengeType = await prisma.challengeType.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeType that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTypeFindFirstArgs} args - Arguments to find a ChallengeType + * @example + * // Get one ChallengeType + * const challengeType = await prisma.challengeType.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeType that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTypeFindFirstOrThrowArgs} args - Arguments to find a ChallengeType + * @example + * // Get one ChallengeType + * const challengeType = await prisma.challengeType.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeTypes that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTypeFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeTypes + * const challengeTypes = await prisma.challengeType.findMany() + * + * // Get first 10 ChallengeTypes + * const challengeTypes = await prisma.challengeType.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeTypeWithIdOnly = await prisma.challengeType.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeType. + * @param {ChallengeTypeCreateArgs} args - Arguments to create a ChallengeType. + * @example + * // Create one ChallengeType + * const ChallengeType = await prisma.challengeType.create({ + * data: { + * // ... data to create a ChallengeType + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeTypes. + * @param {ChallengeTypeCreateManyArgs} args - Arguments to create many ChallengeTypes. + * @example + * // Create many ChallengeTypes + * const challengeType = await prisma.challengeType.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeTypes and returns the data saved in the database. + * @param {ChallengeTypeCreateManyAndReturnArgs} args - Arguments to create many ChallengeTypes. + * @example + * // Create many ChallengeTypes + * const challengeType = await prisma.challengeType.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeTypes and only return the `id` + * const challengeTypeWithIdOnly = await prisma.challengeType.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeType. + * @param {ChallengeTypeDeleteArgs} args - Arguments to delete one ChallengeType. + * @example + * // Delete one ChallengeType + * const ChallengeType = await prisma.challengeType.delete({ + * where: { + * // ... filter to delete one ChallengeType + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeType. + * @param {ChallengeTypeUpdateArgs} args - Arguments to update one ChallengeType. + * @example + * // Update one ChallengeType + * const challengeType = await prisma.challengeType.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeTypes. + * @param {ChallengeTypeDeleteManyArgs} args - Arguments to filter ChallengeTypes to delete. + * @example + * // Delete a few ChallengeTypes + * const { count } = await prisma.challengeType.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTypes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTypeUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeTypes + * const challengeType = await prisma.challengeType.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTypes and returns the data updated in the database. + * @param {ChallengeTypeUpdateManyAndReturnArgs} args - Arguments to update many ChallengeTypes. + * @example + * // Update many ChallengeTypes + * const challengeType = await prisma.challengeType.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeTypes and only return the `id` + * const challengeTypeWithIdOnly = await prisma.challengeType.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeType. + * @param {ChallengeTypeUpsertArgs} args - Arguments to update or create a ChallengeType. + * @example + * // Update or create a ChallengeType + * const challengeType = await prisma.challengeType.upsert({ + * create: { + * // ... data to create a ChallengeType + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeType we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeTypes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTypeCountArgs} args - Arguments to filter ChallengeTypes to count. + * @example + * // Count the number of ChallengeTypes + * const count = await prisma.challengeType.count({ + * where: { + * // ... the filter for the ChallengeTypes we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeType. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTypeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeType. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTypeGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeTypeGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeTypeGroupByArgs['orderBy'] } + : { orderBy?: ChallengeTypeGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeTypeGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeType model + */ + readonly fields: ChallengeTypeFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeType. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeTypeClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenges = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + timelineTemplates = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + defaultReviewers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeType model + */ + interface ChallengeTypeFieldRefs { + readonly id: FieldRef<"ChallengeType", 'String'> + readonly name: FieldRef<"ChallengeType", 'String'> + readonly description: FieldRef<"ChallengeType", 'String'> + readonly isActive: FieldRef<"ChallengeType", 'Boolean'> + readonly isTask: FieldRef<"ChallengeType", 'Boolean'> + readonly abbreviation: FieldRef<"ChallengeType", 'String'> + readonly createdAt: FieldRef<"ChallengeType", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeType", 'String'> + readonly updatedAt: FieldRef<"ChallengeType", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeType", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeType findUnique + */ + export type ChallengeTypeFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * Filter, which ChallengeType to fetch. + */ + where: ChallengeTypeWhereUniqueInput + } + + /** + * ChallengeType findUniqueOrThrow + */ + export type ChallengeTypeFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * Filter, which ChallengeType to fetch. + */ + where: ChallengeTypeWhereUniqueInput + } + + /** + * ChallengeType findFirst + */ + export type ChallengeTypeFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * Filter, which ChallengeType to fetch. + */ + where?: ChallengeTypeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTypes to fetch. + */ + orderBy?: ChallengeTypeOrderByWithRelationInput | ChallengeTypeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTypes. + */ + cursor?: ChallengeTypeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTypes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTypes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTypes. + */ + distinct?: ChallengeTypeScalarFieldEnum | ChallengeTypeScalarFieldEnum[] + } + + /** + * ChallengeType findFirstOrThrow + */ + export type ChallengeTypeFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * Filter, which ChallengeType to fetch. + */ + where?: ChallengeTypeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTypes to fetch. + */ + orderBy?: ChallengeTypeOrderByWithRelationInput | ChallengeTypeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTypes. + */ + cursor?: ChallengeTypeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTypes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTypes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTypes. + */ + distinct?: ChallengeTypeScalarFieldEnum | ChallengeTypeScalarFieldEnum[] + } + + /** + * ChallengeType findMany + */ + export type ChallengeTypeFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * Filter, which ChallengeTypes to fetch. + */ + where?: ChallengeTypeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTypes to fetch. + */ + orderBy?: ChallengeTypeOrderByWithRelationInput | ChallengeTypeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeTypes. + */ + cursor?: ChallengeTypeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTypes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTypes. + */ + skip?: number + distinct?: ChallengeTypeScalarFieldEnum | ChallengeTypeScalarFieldEnum[] + } + + /** + * ChallengeType create + */ + export type ChallengeTypeCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * The data needed to create a ChallengeType. + */ + data: XOR + } + + /** + * ChallengeType createMany + */ + export type ChallengeTypeCreateManyArgs = { + /** + * The data used to create many ChallengeTypes. + */ + data: ChallengeTypeCreateManyInput | ChallengeTypeCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeType createManyAndReturn + */ + export type ChallengeTypeCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * The data used to create many ChallengeTypes. + */ + data: ChallengeTypeCreateManyInput | ChallengeTypeCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeType update + */ + export type ChallengeTypeUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * The data needed to update a ChallengeType. + */ + data: XOR + /** + * Choose, which ChallengeType to update. + */ + where: ChallengeTypeWhereUniqueInput + } + + /** + * ChallengeType updateMany + */ + export type ChallengeTypeUpdateManyArgs = { + /** + * The data used to update ChallengeTypes. + */ + data: XOR + /** + * Filter which ChallengeTypes to update + */ + where?: ChallengeTypeWhereInput + /** + * Limit how many ChallengeTypes to update. + */ + limit?: number + } + + /** + * ChallengeType updateManyAndReturn + */ + export type ChallengeTypeUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * The data used to update ChallengeTypes. + */ + data: XOR + /** + * Filter which ChallengeTypes to update + */ + where?: ChallengeTypeWhereInput + /** + * Limit how many ChallengeTypes to update. + */ + limit?: number + } + + /** + * ChallengeType upsert + */ + export type ChallengeTypeUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * The filter to search for the ChallengeType to update in case it exists. + */ + where: ChallengeTypeWhereUniqueInput + /** + * In case the ChallengeType found by the `where` argument doesn't exist, create a new ChallengeType with this data. + */ + create: XOR + /** + * In case the ChallengeType was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeType delete + */ + export type ChallengeTypeDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + /** + * Filter which ChallengeType to delete. + */ + where: ChallengeTypeWhereUniqueInput + } + + /** + * ChallengeType deleteMany + */ + export type ChallengeTypeDeleteManyArgs = { + /** + * Filter which ChallengeTypes to delete + */ + where?: ChallengeTypeWhereInput + /** + * Limit how many ChallengeTypes to delete. + */ + limit?: number + } + + /** + * ChallengeType.challenges + */ + export type ChallengeType$challengesArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + where?: ChallengeWhereInput + orderBy?: ChallengeOrderByWithRelationInput | ChallengeOrderByWithRelationInput[] + cursor?: ChallengeWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeScalarFieldEnum | ChallengeScalarFieldEnum[] + } + + /** + * ChallengeType.timelineTemplates + */ + export type ChallengeType$timelineTemplatesArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + where?: ChallengeTimelineTemplateWhereInput + orderBy?: ChallengeTimelineTemplateOrderByWithRelationInput | ChallengeTimelineTemplateOrderByWithRelationInput[] + cursor?: ChallengeTimelineTemplateWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeTimelineTemplateScalarFieldEnum | ChallengeTimelineTemplateScalarFieldEnum[] + } + + /** + * ChallengeType.defaultReviewers + */ + export type ChallengeType$defaultReviewersArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + where?: DefaultChallengeReviewerWhereInput + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + cursor?: DefaultChallengeReviewerWhereUniqueInput + take?: number + skip?: number + distinct?: DefaultChallengeReviewerScalarFieldEnum | DefaultChallengeReviewerScalarFieldEnum[] + } + + /** + * ChallengeType without action + */ + export type ChallengeTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeType + */ + select?: ChallengeTypeSelect | null + /** + * Omit specific fields from the ChallengeType + */ + omit?: ChallengeTypeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTypeInclude | null + } + + + /** + * Model ChallengeTrack + */ + + export type AggregateChallengeTrack = { + _count: ChallengeTrackCountAggregateOutputType | null + _avg: ChallengeTrackAvgAggregateOutputType | null + _sum: ChallengeTrackSumAggregateOutputType | null + _min: ChallengeTrackMinAggregateOutputType | null + _max: ChallengeTrackMaxAggregateOutputType | null + } + + export type ChallengeTrackAvgAggregateOutputType = { + legacyId: number | null + } + + export type ChallengeTrackSumAggregateOutputType = { + legacyId: number | null + } + + export type ChallengeTrackMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isActive: boolean | null + abbreviation: string | null + legacyId: number | null + track: $Enums.ChallengeTrackEnum | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTrackMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isActive: boolean | null + abbreviation: string | null + legacyId: number | null + track: $Enums.ChallengeTrackEnum | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTrackCountAggregateOutputType = { + id: number + name: number + description: number + isActive: number + abbreviation: number + legacyId: number + track: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeTrackAvgAggregateInputType = { + legacyId?: true + } + + export type ChallengeTrackSumAggregateInputType = { + legacyId?: true + } + + export type ChallengeTrackMinAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + abbreviation?: true + legacyId?: true + track?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTrackMaxAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + abbreviation?: true + legacyId?: true + track?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTrackCountAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + abbreviation?: true + legacyId?: true + track?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeTrackAggregateArgs = { + /** + * Filter which ChallengeTrack to aggregate. + */ + where?: ChallengeTrackWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTracks to fetch. + */ + orderBy?: ChallengeTrackOrderByWithRelationInput | ChallengeTrackOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeTrackWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTracks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTracks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeTracks + **/ + _count?: true | ChallengeTrackCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengeTrackAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengeTrackSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeTrackMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeTrackMaxAggregateInputType + } + + export type GetChallengeTrackAggregateType = { + [P in keyof T & keyof AggregateChallengeTrack]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeTrackGroupByArgs = { + where?: ChallengeTrackWhereInput + orderBy?: ChallengeTrackOrderByWithAggregationInput | ChallengeTrackOrderByWithAggregationInput[] + by: ChallengeTrackScalarFieldEnum[] | ChallengeTrackScalarFieldEnum + having?: ChallengeTrackScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeTrackCountAggregateInputType | true + _avg?: ChallengeTrackAvgAggregateInputType + _sum?: ChallengeTrackSumAggregateInputType + _min?: ChallengeTrackMinAggregateInputType + _max?: ChallengeTrackMaxAggregateInputType + } + + export type ChallengeTrackGroupByOutputType = { + id: string + name: string + description: string | null + isActive: boolean + abbreviation: string + legacyId: number | null + track: $Enums.ChallengeTrackEnum | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeTrackCountAggregateOutputType | null + _avg: ChallengeTrackAvgAggregateOutputType | null + _sum: ChallengeTrackSumAggregateOutputType | null + _min: ChallengeTrackMinAggregateOutputType | null + _max: ChallengeTrackMaxAggregateOutputType | null + } + + type GetChallengeTrackGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeTrackGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeTrackSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + abbreviation?: boolean + legacyId?: boolean + track?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenges?: boolean | ChallengeTrack$challengesArgs + timelineTemplates?: boolean | ChallengeTrack$timelineTemplatesArgs + defaultReviewers?: boolean | ChallengeTrack$defaultReviewersArgs + _count?: boolean | ChallengeTrackCountOutputTypeDefaultArgs + }, ExtArgs["result"]["challengeTrack"]> + + export type ChallengeTrackSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + abbreviation?: boolean + legacyId?: boolean + track?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["challengeTrack"]> + + export type ChallengeTrackSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + abbreviation?: boolean + legacyId?: boolean + track?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["challengeTrack"]> + + export type ChallengeTrackSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + abbreviation?: boolean + legacyId?: boolean + track?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeTrackOmit = $Extensions.GetOmit<"id" | "name" | "description" | "isActive" | "abbreviation" | "legacyId" | "track" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeTrack"]> + export type ChallengeTrackInclude = { + challenges?: boolean | ChallengeTrack$challengesArgs + timelineTemplates?: boolean | ChallengeTrack$timelineTemplatesArgs + defaultReviewers?: boolean | ChallengeTrack$defaultReviewersArgs + _count?: boolean | ChallengeTrackCountOutputTypeDefaultArgs + } + export type ChallengeTrackIncludeCreateManyAndReturn = {} + export type ChallengeTrackIncludeUpdateManyAndReturn = {} + + export type $ChallengeTrackPayload = { + name: "ChallengeTrack" + objects: { + challenges: Prisma.$ChallengePayload[] + timelineTemplates: Prisma.$ChallengeTimelineTemplatePayload[] + defaultReviewers: Prisma.$DefaultChallengeReviewerPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + description: string | null + isActive: boolean + abbreviation: string + legacyId: number | null + track: $Enums.ChallengeTrackEnum | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeTrack"]> + composites: {} + } + + type ChallengeTrackGetPayload = $Result.GetResult + + type ChallengeTrackCountArgs = + Omit & { + select?: ChallengeTrackCountAggregateInputType | true + } + + export interface ChallengeTrackDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeTrack'], meta: { name: 'ChallengeTrack' } } + /** + * Find zero or one ChallengeTrack that matches the filter. + * @param {ChallengeTrackFindUniqueArgs} args - Arguments to find a ChallengeTrack + * @example + * // Get one ChallengeTrack + * const challengeTrack = await prisma.challengeTrack.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeTrack that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeTrackFindUniqueOrThrowArgs} args - Arguments to find a ChallengeTrack + * @example + * // Get one ChallengeTrack + * const challengeTrack = await prisma.challengeTrack.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeTrack that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTrackFindFirstArgs} args - Arguments to find a ChallengeTrack + * @example + * // Get one ChallengeTrack + * const challengeTrack = await prisma.challengeTrack.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeTrack that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTrackFindFirstOrThrowArgs} args - Arguments to find a ChallengeTrack + * @example + * // Get one ChallengeTrack + * const challengeTrack = await prisma.challengeTrack.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeTracks that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTrackFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeTracks + * const challengeTracks = await prisma.challengeTrack.findMany() + * + * // Get first 10 ChallengeTracks + * const challengeTracks = await prisma.challengeTrack.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeTrackWithIdOnly = await prisma.challengeTrack.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeTrack. + * @param {ChallengeTrackCreateArgs} args - Arguments to create a ChallengeTrack. + * @example + * // Create one ChallengeTrack + * const ChallengeTrack = await prisma.challengeTrack.create({ + * data: { + * // ... data to create a ChallengeTrack + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeTracks. + * @param {ChallengeTrackCreateManyArgs} args - Arguments to create many ChallengeTracks. + * @example + * // Create many ChallengeTracks + * const challengeTrack = await prisma.challengeTrack.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeTracks and returns the data saved in the database. + * @param {ChallengeTrackCreateManyAndReturnArgs} args - Arguments to create many ChallengeTracks. + * @example + * // Create many ChallengeTracks + * const challengeTrack = await prisma.challengeTrack.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeTracks and only return the `id` + * const challengeTrackWithIdOnly = await prisma.challengeTrack.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeTrack. + * @param {ChallengeTrackDeleteArgs} args - Arguments to delete one ChallengeTrack. + * @example + * // Delete one ChallengeTrack + * const ChallengeTrack = await prisma.challengeTrack.delete({ + * where: { + * // ... filter to delete one ChallengeTrack + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeTrack. + * @param {ChallengeTrackUpdateArgs} args - Arguments to update one ChallengeTrack. + * @example + * // Update one ChallengeTrack + * const challengeTrack = await prisma.challengeTrack.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeTracks. + * @param {ChallengeTrackDeleteManyArgs} args - Arguments to filter ChallengeTracks to delete. + * @example + * // Delete a few ChallengeTracks + * const { count } = await prisma.challengeTrack.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTracks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTrackUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeTracks + * const challengeTrack = await prisma.challengeTrack.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTracks and returns the data updated in the database. + * @param {ChallengeTrackUpdateManyAndReturnArgs} args - Arguments to update many ChallengeTracks. + * @example + * // Update many ChallengeTracks + * const challengeTrack = await prisma.challengeTrack.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeTracks and only return the `id` + * const challengeTrackWithIdOnly = await prisma.challengeTrack.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeTrack. + * @param {ChallengeTrackUpsertArgs} args - Arguments to update or create a ChallengeTrack. + * @example + * // Update or create a ChallengeTrack + * const challengeTrack = await prisma.challengeTrack.upsert({ + * create: { + * // ... data to create a ChallengeTrack + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeTrack we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeTracks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTrackCountArgs} args - Arguments to filter ChallengeTracks to count. + * @example + * // Count the number of ChallengeTracks + * const count = await prisma.challengeTrack.count({ + * where: { + * // ... the filter for the ChallengeTracks we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeTrack. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTrackAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeTrack. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTrackGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeTrackGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeTrackGroupByArgs['orderBy'] } + : { orderBy?: ChallengeTrackGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeTrackGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeTrack model + */ + readonly fields: ChallengeTrackFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeTrack. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeTrackClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenges = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + timelineTemplates = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + defaultReviewers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeTrack model + */ + interface ChallengeTrackFieldRefs { + readonly id: FieldRef<"ChallengeTrack", 'String'> + readonly name: FieldRef<"ChallengeTrack", 'String'> + readonly description: FieldRef<"ChallengeTrack", 'String'> + readonly isActive: FieldRef<"ChallengeTrack", 'Boolean'> + readonly abbreviation: FieldRef<"ChallengeTrack", 'String'> + readonly legacyId: FieldRef<"ChallengeTrack", 'Int'> + readonly track: FieldRef<"ChallengeTrack", 'ChallengeTrackEnum'> + readonly createdAt: FieldRef<"ChallengeTrack", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeTrack", 'String'> + readonly updatedAt: FieldRef<"ChallengeTrack", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeTrack", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeTrack findUnique + */ + export type ChallengeTrackFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * Filter, which ChallengeTrack to fetch. + */ + where: ChallengeTrackWhereUniqueInput + } + + /** + * ChallengeTrack findUniqueOrThrow + */ + export type ChallengeTrackFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * Filter, which ChallengeTrack to fetch. + */ + where: ChallengeTrackWhereUniqueInput + } + + /** + * ChallengeTrack findFirst + */ + export type ChallengeTrackFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * Filter, which ChallengeTrack to fetch. + */ + where?: ChallengeTrackWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTracks to fetch. + */ + orderBy?: ChallengeTrackOrderByWithRelationInput | ChallengeTrackOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTracks. + */ + cursor?: ChallengeTrackWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTracks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTracks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTracks. + */ + distinct?: ChallengeTrackScalarFieldEnum | ChallengeTrackScalarFieldEnum[] + } + + /** + * ChallengeTrack findFirstOrThrow + */ + export type ChallengeTrackFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * Filter, which ChallengeTrack to fetch. + */ + where?: ChallengeTrackWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTracks to fetch. + */ + orderBy?: ChallengeTrackOrderByWithRelationInput | ChallengeTrackOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTracks. + */ + cursor?: ChallengeTrackWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTracks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTracks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTracks. + */ + distinct?: ChallengeTrackScalarFieldEnum | ChallengeTrackScalarFieldEnum[] + } + + /** + * ChallengeTrack findMany + */ + export type ChallengeTrackFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * Filter, which ChallengeTracks to fetch. + */ + where?: ChallengeTrackWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTracks to fetch. + */ + orderBy?: ChallengeTrackOrderByWithRelationInput | ChallengeTrackOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeTracks. + */ + cursor?: ChallengeTrackWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTracks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTracks. + */ + skip?: number + distinct?: ChallengeTrackScalarFieldEnum | ChallengeTrackScalarFieldEnum[] + } + + /** + * ChallengeTrack create + */ + export type ChallengeTrackCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * The data needed to create a ChallengeTrack. + */ + data: XOR + } + + /** + * ChallengeTrack createMany + */ + export type ChallengeTrackCreateManyArgs = { + /** + * The data used to create many ChallengeTracks. + */ + data: ChallengeTrackCreateManyInput | ChallengeTrackCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeTrack createManyAndReturn + */ + export type ChallengeTrackCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * The data used to create many ChallengeTracks. + */ + data: ChallengeTrackCreateManyInput | ChallengeTrackCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeTrack update + */ + export type ChallengeTrackUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * The data needed to update a ChallengeTrack. + */ + data: XOR + /** + * Choose, which ChallengeTrack to update. + */ + where: ChallengeTrackWhereUniqueInput + } + + /** + * ChallengeTrack updateMany + */ + export type ChallengeTrackUpdateManyArgs = { + /** + * The data used to update ChallengeTracks. + */ + data: XOR + /** + * Filter which ChallengeTracks to update + */ + where?: ChallengeTrackWhereInput + /** + * Limit how many ChallengeTracks to update. + */ + limit?: number + } + + /** + * ChallengeTrack updateManyAndReturn + */ + export type ChallengeTrackUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * The data used to update ChallengeTracks. + */ + data: XOR + /** + * Filter which ChallengeTracks to update + */ + where?: ChallengeTrackWhereInput + /** + * Limit how many ChallengeTracks to update. + */ + limit?: number + } + + /** + * ChallengeTrack upsert + */ + export type ChallengeTrackUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * The filter to search for the ChallengeTrack to update in case it exists. + */ + where: ChallengeTrackWhereUniqueInput + /** + * In case the ChallengeTrack found by the `where` argument doesn't exist, create a new ChallengeTrack with this data. + */ + create: XOR + /** + * In case the ChallengeTrack was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeTrack delete + */ + export type ChallengeTrackDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + /** + * Filter which ChallengeTrack to delete. + */ + where: ChallengeTrackWhereUniqueInput + } + + /** + * ChallengeTrack deleteMany + */ + export type ChallengeTrackDeleteManyArgs = { + /** + * Filter which ChallengeTracks to delete + */ + where?: ChallengeTrackWhereInput + /** + * Limit how many ChallengeTracks to delete. + */ + limit?: number + } + + /** + * ChallengeTrack.challenges + */ + export type ChallengeTrack$challengesArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + where?: ChallengeWhereInput + orderBy?: ChallengeOrderByWithRelationInput | ChallengeOrderByWithRelationInput[] + cursor?: ChallengeWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeScalarFieldEnum | ChallengeScalarFieldEnum[] + } + + /** + * ChallengeTrack.timelineTemplates + */ + export type ChallengeTrack$timelineTemplatesArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + where?: ChallengeTimelineTemplateWhereInput + orderBy?: ChallengeTimelineTemplateOrderByWithRelationInput | ChallengeTimelineTemplateOrderByWithRelationInput[] + cursor?: ChallengeTimelineTemplateWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeTimelineTemplateScalarFieldEnum | ChallengeTimelineTemplateScalarFieldEnum[] + } + + /** + * ChallengeTrack.defaultReviewers + */ + export type ChallengeTrack$defaultReviewersArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + where?: DefaultChallengeReviewerWhereInput + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + cursor?: DefaultChallengeReviewerWhereUniqueInput + take?: number + skip?: number + distinct?: DefaultChallengeReviewerScalarFieldEnum | DefaultChallengeReviewerScalarFieldEnum[] + } + + /** + * ChallengeTrack without action + */ + export type ChallengeTrackDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeTrack + */ + select?: ChallengeTrackSelect | null + /** + * Omit specific fields from the ChallengeTrack + */ + omit?: ChallengeTrackOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTrackInclude | null + } + + + /** + * Model ChallengeTimelineTemplate + */ + + export type AggregateChallengeTimelineTemplate = { + _count: ChallengeTimelineTemplateCountAggregateOutputType | null + _min: ChallengeTimelineTemplateMinAggregateOutputType | null + _max: ChallengeTimelineTemplateMaxAggregateOutputType | null + } + + export type ChallengeTimelineTemplateMinAggregateOutputType = { + id: string | null + typeId: string | null + trackId: string | null + timelineTemplateId: string | null + isDefault: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTimelineTemplateMaxAggregateOutputType = { + id: string | null + typeId: string | null + trackId: string | null + timelineTemplateId: string | null + isDefault: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTimelineTemplateCountAggregateOutputType = { + id: number + typeId: number + trackId: number + timelineTemplateId: number + isDefault: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeTimelineTemplateMinAggregateInputType = { + id?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + isDefault?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTimelineTemplateMaxAggregateInputType = { + id?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + isDefault?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTimelineTemplateCountAggregateInputType = { + id?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + isDefault?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeTimelineTemplateAggregateArgs = { + /** + * Filter which ChallengeTimelineTemplate to aggregate. + */ + where?: ChallengeTimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTimelineTemplates to fetch. + */ + orderBy?: ChallengeTimelineTemplateOrderByWithRelationInput | ChallengeTimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeTimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTimelineTemplates. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeTimelineTemplates + **/ + _count?: true | ChallengeTimelineTemplateCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeTimelineTemplateMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeTimelineTemplateMaxAggregateInputType + } + + export type GetChallengeTimelineTemplateAggregateType = { + [P in keyof T & keyof AggregateChallengeTimelineTemplate]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeTimelineTemplateGroupByArgs = { + where?: ChallengeTimelineTemplateWhereInput + orderBy?: ChallengeTimelineTemplateOrderByWithAggregationInput | ChallengeTimelineTemplateOrderByWithAggregationInput[] + by: ChallengeTimelineTemplateScalarFieldEnum[] | ChallengeTimelineTemplateScalarFieldEnum + having?: ChallengeTimelineTemplateScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeTimelineTemplateCountAggregateInputType | true + _min?: ChallengeTimelineTemplateMinAggregateInputType + _max?: ChallengeTimelineTemplateMaxAggregateInputType + } + + export type ChallengeTimelineTemplateGroupByOutputType = { + id: string + typeId: string + trackId: string + timelineTemplateId: string + isDefault: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeTimelineTemplateCountAggregateOutputType | null + _min: ChallengeTimelineTemplateMinAggregateOutputType | null + _max: ChallengeTimelineTemplateMaxAggregateOutputType | null + } + + type GetChallengeTimelineTemplateGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeTimelineTemplateGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeTimelineTemplateSelect = $Extensions.GetSelect<{ + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + isDefault?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + type?: boolean | ChallengeTypeDefaultArgs + }, ExtArgs["result"]["challengeTimelineTemplate"]> + + export type ChallengeTimelineTemplateSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + isDefault?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + type?: boolean | ChallengeTypeDefaultArgs + }, ExtArgs["result"]["challengeTimelineTemplate"]> + + export type ChallengeTimelineTemplateSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + isDefault?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + type?: boolean | ChallengeTypeDefaultArgs + }, ExtArgs["result"]["challengeTimelineTemplate"]> + + export type ChallengeTimelineTemplateSelectScalar = { + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + isDefault?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeTimelineTemplateOmit = $Extensions.GetOmit<"id" | "typeId" | "trackId" | "timelineTemplateId" | "isDefault" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeTimelineTemplate"]> + export type ChallengeTimelineTemplateInclude = { + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + type?: boolean | ChallengeTypeDefaultArgs + } + export type ChallengeTimelineTemplateIncludeCreateManyAndReturn = { + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + type?: boolean | ChallengeTypeDefaultArgs + } + export type ChallengeTimelineTemplateIncludeUpdateManyAndReturn = { + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + track?: boolean | ChallengeTrackDefaultArgs + type?: boolean | ChallengeTypeDefaultArgs + } + + export type $ChallengeTimelineTemplatePayload = { + name: "ChallengeTimelineTemplate" + objects: { + timelineTemplate: Prisma.$TimelineTemplatePayload + track: Prisma.$ChallengeTrackPayload + type: Prisma.$ChallengeTypePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + typeId: string + trackId: string + timelineTemplateId: string + isDefault: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeTimelineTemplate"]> + composites: {} + } + + type ChallengeTimelineTemplateGetPayload = $Result.GetResult + + type ChallengeTimelineTemplateCountArgs = + Omit & { + select?: ChallengeTimelineTemplateCountAggregateInputType | true + } + + export interface ChallengeTimelineTemplateDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeTimelineTemplate'], meta: { name: 'ChallengeTimelineTemplate' } } + /** + * Find zero or one ChallengeTimelineTemplate that matches the filter. + * @param {ChallengeTimelineTemplateFindUniqueArgs} args - Arguments to find a ChallengeTimelineTemplate + * @example + * // Get one ChallengeTimelineTemplate + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeTimelineTemplate that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeTimelineTemplateFindUniqueOrThrowArgs} args - Arguments to find a ChallengeTimelineTemplate + * @example + * // Get one ChallengeTimelineTemplate + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeTimelineTemplate that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTimelineTemplateFindFirstArgs} args - Arguments to find a ChallengeTimelineTemplate + * @example + * // Get one ChallengeTimelineTemplate + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeTimelineTemplate that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTimelineTemplateFindFirstOrThrowArgs} args - Arguments to find a ChallengeTimelineTemplate + * @example + * // Get one ChallengeTimelineTemplate + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeTimelineTemplates that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTimelineTemplateFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeTimelineTemplates + * const challengeTimelineTemplates = await prisma.challengeTimelineTemplate.findMany() + * + * // Get first 10 ChallengeTimelineTemplates + * const challengeTimelineTemplates = await prisma.challengeTimelineTemplate.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeTimelineTemplateWithIdOnly = await prisma.challengeTimelineTemplate.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeTimelineTemplate. + * @param {ChallengeTimelineTemplateCreateArgs} args - Arguments to create a ChallengeTimelineTemplate. + * @example + * // Create one ChallengeTimelineTemplate + * const ChallengeTimelineTemplate = await prisma.challengeTimelineTemplate.create({ + * data: { + * // ... data to create a ChallengeTimelineTemplate + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeTimelineTemplates. + * @param {ChallengeTimelineTemplateCreateManyArgs} args - Arguments to create many ChallengeTimelineTemplates. + * @example + * // Create many ChallengeTimelineTemplates + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeTimelineTemplates and returns the data saved in the database. + * @param {ChallengeTimelineTemplateCreateManyAndReturnArgs} args - Arguments to create many ChallengeTimelineTemplates. + * @example + * // Create many ChallengeTimelineTemplates + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeTimelineTemplates and only return the `id` + * const challengeTimelineTemplateWithIdOnly = await prisma.challengeTimelineTemplate.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeTimelineTemplate. + * @param {ChallengeTimelineTemplateDeleteArgs} args - Arguments to delete one ChallengeTimelineTemplate. + * @example + * // Delete one ChallengeTimelineTemplate + * const ChallengeTimelineTemplate = await prisma.challengeTimelineTemplate.delete({ + * where: { + * // ... filter to delete one ChallengeTimelineTemplate + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeTimelineTemplate. + * @param {ChallengeTimelineTemplateUpdateArgs} args - Arguments to update one ChallengeTimelineTemplate. + * @example + * // Update one ChallengeTimelineTemplate + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeTimelineTemplates. + * @param {ChallengeTimelineTemplateDeleteManyArgs} args - Arguments to filter ChallengeTimelineTemplates to delete. + * @example + * // Delete a few ChallengeTimelineTemplates + * const { count } = await prisma.challengeTimelineTemplate.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTimelineTemplates. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTimelineTemplateUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeTimelineTemplates + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTimelineTemplates and returns the data updated in the database. + * @param {ChallengeTimelineTemplateUpdateManyAndReturnArgs} args - Arguments to update many ChallengeTimelineTemplates. + * @example + * // Update many ChallengeTimelineTemplates + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeTimelineTemplates and only return the `id` + * const challengeTimelineTemplateWithIdOnly = await prisma.challengeTimelineTemplate.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeTimelineTemplate. + * @param {ChallengeTimelineTemplateUpsertArgs} args - Arguments to update or create a ChallengeTimelineTemplate. + * @example + * // Update or create a ChallengeTimelineTemplate + * const challengeTimelineTemplate = await prisma.challengeTimelineTemplate.upsert({ + * create: { + * // ... data to create a ChallengeTimelineTemplate + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeTimelineTemplate we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeTimelineTemplateClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeTimelineTemplates. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTimelineTemplateCountArgs} args - Arguments to filter ChallengeTimelineTemplates to count. + * @example + * // Count the number of ChallengeTimelineTemplates + * const count = await prisma.challengeTimelineTemplate.count({ + * where: { + * // ... the filter for the ChallengeTimelineTemplates we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeTimelineTemplate. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTimelineTemplateAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeTimelineTemplate. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTimelineTemplateGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeTimelineTemplateGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeTimelineTemplateGroupByArgs['orderBy'] } + : { orderBy?: ChallengeTimelineTemplateGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeTimelineTemplateGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeTimelineTemplate model + */ + readonly fields: ChallengeTimelineTemplateFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeTimelineTemplate. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeTimelineTemplateClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + timelineTemplate = {}>(args?: Subset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + track = {}>(args?: Subset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + type = {}>(args?: Subset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeTimelineTemplate model + */ + interface ChallengeTimelineTemplateFieldRefs { + readonly id: FieldRef<"ChallengeTimelineTemplate", 'String'> + readonly typeId: FieldRef<"ChallengeTimelineTemplate", 'String'> + readonly trackId: FieldRef<"ChallengeTimelineTemplate", 'String'> + readonly timelineTemplateId: FieldRef<"ChallengeTimelineTemplate", 'String'> + readonly isDefault: FieldRef<"ChallengeTimelineTemplate", 'Boolean'> + readonly createdAt: FieldRef<"ChallengeTimelineTemplate", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeTimelineTemplate", 'String'> + readonly updatedAt: FieldRef<"ChallengeTimelineTemplate", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeTimelineTemplate", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeTimelineTemplate findUnique + */ + export type ChallengeTimelineTemplateFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * Filter, which ChallengeTimelineTemplate to fetch. + */ + where: ChallengeTimelineTemplateWhereUniqueInput + } + + /** + * ChallengeTimelineTemplate findUniqueOrThrow + */ + export type ChallengeTimelineTemplateFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * Filter, which ChallengeTimelineTemplate to fetch. + */ + where: ChallengeTimelineTemplateWhereUniqueInput + } + + /** + * ChallengeTimelineTemplate findFirst + */ + export type ChallengeTimelineTemplateFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * Filter, which ChallengeTimelineTemplate to fetch. + */ + where?: ChallengeTimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTimelineTemplates to fetch. + */ + orderBy?: ChallengeTimelineTemplateOrderByWithRelationInput | ChallengeTimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTimelineTemplates. + */ + cursor?: ChallengeTimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTimelineTemplates. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTimelineTemplates. + */ + distinct?: ChallengeTimelineTemplateScalarFieldEnum | ChallengeTimelineTemplateScalarFieldEnum[] + } + + /** + * ChallengeTimelineTemplate findFirstOrThrow + */ + export type ChallengeTimelineTemplateFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * Filter, which ChallengeTimelineTemplate to fetch. + */ + where?: ChallengeTimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTimelineTemplates to fetch. + */ + orderBy?: ChallengeTimelineTemplateOrderByWithRelationInput | ChallengeTimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTimelineTemplates. + */ + cursor?: ChallengeTimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTimelineTemplates. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTimelineTemplates. + */ + distinct?: ChallengeTimelineTemplateScalarFieldEnum | ChallengeTimelineTemplateScalarFieldEnum[] + } + + /** + * ChallengeTimelineTemplate findMany + */ + export type ChallengeTimelineTemplateFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * Filter, which ChallengeTimelineTemplates to fetch. + */ + where?: ChallengeTimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTimelineTemplates to fetch. + */ + orderBy?: ChallengeTimelineTemplateOrderByWithRelationInput | ChallengeTimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeTimelineTemplates. + */ + cursor?: ChallengeTimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTimelineTemplates. + */ + skip?: number + distinct?: ChallengeTimelineTemplateScalarFieldEnum | ChallengeTimelineTemplateScalarFieldEnum[] + } + + /** + * ChallengeTimelineTemplate create + */ + export type ChallengeTimelineTemplateCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * The data needed to create a ChallengeTimelineTemplate. + */ + data: XOR + } + + /** + * ChallengeTimelineTemplate createMany + */ + export type ChallengeTimelineTemplateCreateManyArgs = { + /** + * The data used to create many ChallengeTimelineTemplates. + */ + data: ChallengeTimelineTemplateCreateManyInput | ChallengeTimelineTemplateCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeTimelineTemplate createManyAndReturn + */ + export type ChallengeTimelineTemplateCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * The data used to create many ChallengeTimelineTemplates. + */ + data: ChallengeTimelineTemplateCreateManyInput | ChallengeTimelineTemplateCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateIncludeCreateManyAndReturn | null + } + + /** + * ChallengeTimelineTemplate update + */ + export type ChallengeTimelineTemplateUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * The data needed to update a ChallengeTimelineTemplate. + */ + data: XOR + /** + * Choose, which ChallengeTimelineTemplate to update. + */ + where: ChallengeTimelineTemplateWhereUniqueInput + } + + /** + * ChallengeTimelineTemplate updateMany + */ + export type ChallengeTimelineTemplateUpdateManyArgs = { + /** + * The data used to update ChallengeTimelineTemplates. + */ + data: XOR + /** + * Filter which ChallengeTimelineTemplates to update + */ + where?: ChallengeTimelineTemplateWhereInput + /** + * Limit how many ChallengeTimelineTemplates to update. + */ + limit?: number + } + + /** + * ChallengeTimelineTemplate updateManyAndReturn + */ + export type ChallengeTimelineTemplateUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * The data used to update ChallengeTimelineTemplates. + */ + data: XOR + /** + * Filter which ChallengeTimelineTemplates to update + */ + where?: ChallengeTimelineTemplateWhereInput + /** + * Limit how many ChallengeTimelineTemplates to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeTimelineTemplate upsert + */ + export type ChallengeTimelineTemplateUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * The filter to search for the ChallengeTimelineTemplate to update in case it exists. + */ + where: ChallengeTimelineTemplateWhereUniqueInput + /** + * In case the ChallengeTimelineTemplate found by the `where` argument doesn't exist, create a new ChallengeTimelineTemplate with this data. + */ + create: XOR + /** + * In case the ChallengeTimelineTemplate was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeTimelineTemplate delete + */ + export type ChallengeTimelineTemplateDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + /** + * Filter which ChallengeTimelineTemplate to delete. + */ + where: ChallengeTimelineTemplateWhereUniqueInput + } + + /** + * ChallengeTimelineTemplate deleteMany + */ + export type ChallengeTimelineTemplateDeleteManyArgs = { + /** + * Filter which ChallengeTimelineTemplates to delete + */ + where?: ChallengeTimelineTemplateWhereInput + /** + * Limit how many ChallengeTimelineTemplates to delete. + */ + limit?: number + } + + /** + * ChallengeTimelineTemplate without action + */ + export type ChallengeTimelineTemplateDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + } + + + /** + * Model AuditLog + */ + + export type AggregateAuditLog = { + _count: AuditLogCountAggregateOutputType | null + _min: AuditLogMinAggregateOutputType | null + _max: AuditLogMaxAggregateOutputType | null + } + + export type AuditLogMinAggregateOutputType = { + id: string | null + challengeId: string | null + fieldName: string | null + oldValue: string | null + newValue: string | null + createdAt: Date | null + createdBy: string | null + memberId: string | null + } + + export type AuditLogMaxAggregateOutputType = { + id: string | null + challengeId: string | null + fieldName: string | null + oldValue: string | null + newValue: string | null + createdAt: Date | null + createdBy: string | null + memberId: string | null + } + + export type AuditLogCountAggregateOutputType = { + id: number + challengeId: number + fieldName: number + oldValue: number + newValue: number + createdAt: number + createdBy: number + memberId: number + _all: number + } + + + export type AuditLogMinAggregateInputType = { + id?: true + challengeId?: true + fieldName?: true + oldValue?: true + newValue?: true + createdAt?: true + createdBy?: true + memberId?: true + } + + export type AuditLogMaxAggregateInputType = { + id?: true + challengeId?: true + fieldName?: true + oldValue?: true + newValue?: true + createdAt?: true + createdBy?: true + memberId?: true + } + + export type AuditLogCountAggregateInputType = { + id?: true + challengeId?: true + fieldName?: true + oldValue?: true + newValue?: true + createdAt?: true + createdBy?: true + memberId?: true + _all?: true + } + + export type AuditLogAggregateArgs = { + /** + * Filter which AuditLog to aggregate. + */ + where?: AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AuditLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AuditLogs + **/ + _count?: true | AuditLogCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AuditLogMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AuditLogMaxAggregateInputType + } + + export type GetAuditLogAggregateType = { + [P in keyof T & keyof AggregateAuditLog]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AuditLogGroupByArgs = { + where?: AuditLogWhereInput + orderBy?: AuditLogOrderByWithAggregationInput | AuditLogOrderByWithAggregationInput[] + by: AuditLogScalarFieldEnum[] | AuditLogScalarFieldEnum + having?: AuditLogScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AuditLogCountAggregateInputType | true + _min?: AuditLogMinAggregateInputType + _max?: AuditLogMaxAggregateInputType + } + + export type AuditLogGroupByOutputType = { + id: string + challengeId: string | null + fieldName: string + oldValue: string | null + newValue: string | null + createdAt: Date + createdBy: string + memberId: string | null + _count: AuditLogCountAggregateOutputType | null + _min: AuditLogMinAggregateOutputType | null + _max: AuditLogMaxAggregateOutputType | null + } + + type GetAuditLogGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AuditLogGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AuditLogSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + fieldName?: boolean + oldValue?: boolean + newValue?: boolean + createdAt?: boolean + createdBy?: boolean + memberId?: boolean + challenge?: boolean | AuditLog$challengeArgs + }, ExtArgs["result"]["auditLog"]> + + export type AuditLogSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + fieldName?: boolean + oldValue?: boolean + newValue?: boolean + createdAt?: boolean + createdBy?: boolean + memberId?: boolean + challenge?: boolean | AuditLog$challengeArgs + }, ExtArgs["result"]["auditLog"]> + + export type AuditLogSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + fieldName?: boolean + oldValue?: boolean + newValue?: boolean + createdAt?: boolean + createdBy?: boolean + memberId?: boolean + challenge?: boolean | AuditLog$challengeArgs + }, ExtArgs["result"]["auditLog"]> + + export type AuditLogSelectScalar = { + id?: boolean + challengeId?: boolean + fieldName?: boolean + oldValue?: boolean + newValue?: boolean + createdAt?: boolean + createdBy?: boolean + memberId?: boolean + } + + export type AuditLogOmit = $Extensions.GetOmit<"id" | "challengeId" | "fieldName" | "oldValue" | "newValue" | "createdAt" | "createdBy" | "memberId", ExtArgs["result"]["auditLog"]> + export type AuditLogInclude = { + challenge?: boolean | AuditLog$challengeArgs + } + export type AuditLogIncludeCreateManyAndReturn = { + challenge?: boolean | AuditLog$challengeArgs + } + export type AuditLogIncludeUpdateManyAndReturn = { + challenge?: boolean | AuditLog$challengeArgs + } + + export type $AuditLogPayload = { + name: "AuditLog" + objects: { + challenge: Prisma.$ChallengePayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string | null + fieldName: string + oldValue: string | null + newValue: string | null + createdAt: Date + createdBy: string + memberId: string | null + }, ExtArgs["result"]["auditLog"]> + composites: {} + } + + type AuditLogGetPayload = $Result.GetResult + + type AuditLogCountArgs = + Omit & { + select?: AuditLogCountAggregateInputType | true + } + + export interface AuditLogDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AuditLog'], meta: { name: 'AuditLog' } } + /** + * Find zero or one AuditLog that matches the filter. + * @param {AuditLogFindUniqueArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one AuditLog that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AuditLogFindUniqueOrThrowArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AuditLog that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogFindFirstArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AuditLog that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogFindFirstOrThrowArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more AuditLogs that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AuditLogs + * const auditLogs = await prisma.auditLog.findMany() + * + * // Get first 10 AuditLogs + * const auditLogs = await prisma.auditLog.findMany({ take: 10 }) + * + * // Only select the `id` + * const auditLogWithIdOnly = await prisma.auditLog.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a AuditLog. + * @param {AuditLogCreateArgs} args - Arguments to create a AuditLog. + * @example + * // Create one AuditLog + * const AuditLog = await prisma.auditLog.create({ + * data: { + * // ... data to create a AuditLog + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many AuditLogs. + * @param {AuditLogCreateManyArgs} args - Arguments to create many AuditLogs. + * @example + * // Create many AuditLogs + * const auditLog = await prisma.auditLog.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AuditLogs and returns the data saved in the database. + * @param {AuditLogCreateManyAndReturnArgs} args - Arguments to create many AuditLogs. + * @example + * // Create many AuditLogs + * const auditLog = await prisma.auditLog.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AuditLogs and only return the `id` + * const auditLogWithIdOnly = await prisma.auditLog.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a AuditLog. + * @param {AuditLogDeleteArgs} args - Arguments to delete one AuditLog. + * @example + * // Delete one AuditLog + * const AuditLog = await prisma.auditLog.delete({ + * where: { + * // ... filter to delete one AuditLog + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one AuditLog. + * @param {AuditLogUpdateArgs} args - Arguments to update one AuditLog. + * @example + * // Update one AuditLog + * const auditLog = await prisma.auditLog.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more AuditLogs. + * @param {AuditLogDeleteManyArgs} args - Arguments to filter AuditLogs to delete. + * @example + * // Delete a few AuditLogs + * const { count } = await prisma.auditLog.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AuditLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AuditLogs + * const auditLog = await prisma.auditLog.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AuditLogs and returns the data updated in the database. + * @param {AuditLogUpdateManyAndReturnArgs} args - Arguments to update many AuditLogs. + * @example + * // Update many AuditLogs + * const auditLog = await prisma.auditLog.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more AuditLogs and only return the `id` + * const auditLogWithIdOnly = await prisma.auditLog.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one AuditLog. + * @param {AuditLogUpsertArgs} args - Arguments to update or create a AuditLog. + * @example + * // Update or create a AuditLog + * const auditLog = await prisma.auditLog.upsert({ + * create: { + * // ... data to create a AuditLog + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AuditLog we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AuditLogClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of AuditLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogCountArgs} args - Arguments to filter AuditLogs to count. + * @example + * // Count the number of AuditLogs + * const count = await prisma.auditLog.count({ + * where: { + * // ... the filter for the AuditLogs we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AuditLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AuditLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AuditLogGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AuditLogGroupByArgs['orderBy'] } + : { orderBy?: AuditLogGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAuditLogGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AuditLog model + */ + readonly fields: AuditLogFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AuditLog. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AuditLogClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AuditLog model + */ + interface AuditLogFieldRefs { + readonly id: FieldRef<"AuditLog", 'String'> + readonly challengeId: FieldRef<"AuditLog", 'String'> + readonly fieldName: FieldRef<"AuditLog", 'String'> + readonly oldValue: FieldRef<"AuditLog", 'String'> + readonly newValue: FieldRef<"AuditLog", 'String'> + readonly createdAt: FieldRef<"AuditLog", 'DateTime'> + readonly createdBy: FieldRef<"AuditLog", 'String'> + readonly memberId: FieldRef<"AuditLog", 'String'> + } + + + // Custom InputTypes + /** + * AuditLog findUnique + */ + export type AuditLogFindUniqueArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where: AuditLogWhereUniqueInput + } + + /** + * AuditLog findUniqueOrThrow + */ + export type AuditLogFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where: AuditLogWhereUniqueInput + } + + /** + * AuditLog findFirst + */ + export type AuditLogFindFirstArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where?: AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AuditLogs. + */ + cursor?: AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AuditLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AuditLogs. + */ + distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[] + } + + /** + * AuditLog findFirstOrThrow + */ + export type AuditLogFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where?: AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AuditLogs. + */ + cursor?: AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AuditLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AuditLogs. + */ + distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[] + } + + /** + * AuditLog findMany + */ + export type AuditLogFindManyArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * Filter, which AuditLogs to fetch. + */ + where?: AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AuditLogs. + */ + cursor?: AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AuditLogs. + */ + skip?: number + distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[] + } + + /** + * AuditLog create + */ + export type AuditLogCreateArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * The data needed to create a AuditLog. + */ + data: XOR + } + + /** + * AuditLog createMany + */ + export type AuditLogCreateManyArgs = { + /** + * The data used to create many AuditLogs. + */ + data: AuditLogCreateManyInput | AuditLogCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AuditLog createManyAndReturn + */ + export type AuditLogCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelectCreateManyAndReturn | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * The data used to create many AuditLogs. + */ + data: AuditLogCreateManyInput | AuditLogCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogIncludeCreateManyAndReturn | null + } + + /** + * AuditLog update + */ + export type AuditLogUpdateArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * The data needed to update a AuditLog. + */ + data: XOR + /** + * Choose, which AuditLog to update. + */ + where: AuditLogWhereUniqueInput + } + + /** + * AuditLog updateMany + */ + export type AuditLogUpdateManyArgs = { + /** + * The data used to update AuditLogs. + */ + data: XOR + /** + * Filter which AuditLogs to update + */ + where?: AuditLogWhereInput + /** + * Limit how many AuditLogs to update. + */ + limit?: number + } + + /** + * AuditLog updateManyAndReturn + */ + export type AuditLogUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * The data used to update AuditLogs. + */ + data: XOR + /** + * Filter which AuditLogs to update + */ + where?: AuditLogWhereInput + /** + * Limit how many AuditLogs to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogIncludeUpdateManyAndReturn | null + } + + /** + * AuditLog upsert + */ + export type AuditLogUpsertArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * The filter to search for the AuditLog to update in case it exists. + */ + where: AuditLogWhereUniqueInput + /** + * In case the AuditLog found by the `where` argument doesn't exist, create a new AuditLog with this data. + */ + create: XOR + /** + * In case the AuditLog was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AuditLog delete + */ + export type AuditLogDeleteArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + /** + * Filter which AuditLog to delete. + */ + where: AuditLogWhereUniqueInput + } + + /** + * AuditLog deleteMany + */ + export type AuditLogDeleteManyArgs = { + /** + * Filter which AuditLogs to delete + */ + where?: AuditLogWhereInput + /** + * Limit how many AuditLogs to delete. + */ + limit?: number + } + + /** + * AuditLog.challenge + */ + export type AuditLog$challengeArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + where?: ChallengeWhereInput + } + + /** + * AuditLog without action + */ + export type AuditLogDefaultArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AuditLogInclude | null + } + + + /** + * Model Attachment + */ + + export type AggregateAttachment = { + _count: AttachmentCountAggregateOutputType | null + _avg: AttachmentAvgAggregateOutputType | null + _sum: AttachmentSumAggregateOutputType | null + _min: AttachmentMinAggregateOutputType | null + _max: AttachmentMaxAggregateOutputType | null + } + + export type AttachmentAvgAggregateOutputType = { + fileSize: number | null + } + + export type AttachmentSumAggregateOutputType = { + fileSize: number | null + } + + export type AttachmentMinAggregateOutputType = { + id: string | null + challengeId: string | null + name: string | null + fileSize: number | null + url: string | null + description: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type AttachmentMaxAggregateOutputType = { + id: string | null + challengeId: string | null + name: string | null + fileSize: number | null + url: string | null + description: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type AttachmentCountAggregateOutputType = { + id: number + challengeId: number + name: number + fileSize: number + url: number + description: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type AttachmentAvgAggregateInputType = { + fileSize?: true + } + + export type AttachmentSumAggregateInputType = { + fileSize?: true + } + + export type AttachmentMinAggregateInputType = { + id?: true + challengeId?: true + name?: true + fileSize?: true + url?: true + description?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type AttachmentMaxAggregateInputType = { + id?: true + challengeId?: true + name?: true + fileSize?: true + url?: true + description?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type AttachmentCountAggregateInputType = { + id?: true + challengeId?: true + name?: true + fileSize?: true + url?: true + description?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type AttachmentAggregateArgs = { + /** + * Filter which Attachment to aggregate. + */ + where?: AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: AttachmentOrderByWithRelationInput | AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Attachments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Attachments + **/ + _count?: true | AttachmentCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AttachmentAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AttachmentSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AttachmentMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AttachmentMaxAggregateInputType + } + + export type GetAttachmentAggregateType = { + [P in keyof T & keyof AggregateAttachment]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AttachmentGroupByArgs = { + where?: AttachmentWhereInput + orderBy?: AttachmentOrderByWithAggregationInput | AttachmentOrderByWithAggregationInput[] + by: AttachmentScalarFieldEnum[] | AttachmentScalarFieldEnum + having?: AttachmentScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AttachmentCountAggregateInputType | true + _avg?: AttachmentAvgAggregateInputType + _sum?: AttachmentSumAggregateInputType + _min?: AttachmentMinAggregateInputType + _max?: AttachmentMaxAggregateInputType + } + + export type AttachmentGroupByOutputType = { + id: string + challengeId: string + name: string + fileSize: number + url: string + description: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: AttachmentCountAggregateOutputType | null + _avg: AttachmentAvgAggregateOutputType | null + _sum: AttachmentSumAggregateOutputType | null + _min: AttachmentMinAggregateOutputType | null + _max: AttachmentMaxAggregateOutputType | null + } + + type GetAttachmentGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AttachmentGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AttachmentSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + name?: boolean + fileSize?: boolean + url?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["attachment"]> + + export type AttachmentSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + name?: boolean + fileSize?: boolean + url?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["attachment"]> + + export type AttachmentSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + name?: boolean + fileSize?: boolean + url?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["attachment"]> + + export type AttachmentSelectScalar = { + id?: boolean + challengeId?: boolean + name?: boolean + fileSize?: boolean + url?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type AttachmentOmit = $Extensions.GetOmit<"id" | "challengeId" | "name" | "fileSize" | "url" | "description" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["attachment"]> + export type AttachmentInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type AttachmentIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type AttachmentIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $AttachmentPayload = { + name: "Attachment" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + name: string + fileSize: number + url: string + description: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["attachment"]> + composites: {} + } + + type AttachmentGetPayload = $Result.GetResult + + type AttachmentCountArgs = + Omit & { + select?: AttachmentCountAggregateInputType | true + } + + export interface AttachmentDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Attachment'], meta: { name: 'Attachment' } } + /** + * Find zero or one Attachment that matches the filter. + * @param {AttachmentFindUniqueArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Attachment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AttachmentFindUniqueOrThrowArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Attachment that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentFindFirstArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Attachment that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentFindFirstOrThrowArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Attachments that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Attachments + * const attachments = await prisma.attachment.findMany() + * + * // Get first 10 Attachments + * const attachments = await prisma.attachment.findMany({ take: 10 }) + * + * // Only select the `id` + * const attachmentWithIdOnly = await prisma.attachment.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Attachment. + * @param {AttachmentCreateArgs} args - Arguments to create a Attachment. + * @example + * // Create one Attachment + * const Attachment = await prisma.attachment.create({ + * data: { + * // ... data to create a Attachment + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Attachments. + * @param {AttachmentCreateManyArgs} args - Arguments to create many Attachments. + * @example + * // Create many Attachments + * const attachment = await prisma.attachment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Attachments and returns the data saved in the database. + * @param {AttachmentCreateManyAndReturnArgs} args - Arguments to create many Attachments. + * @example + * // Create many Attachments + * const attachment = await prisma.attachment.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Attachments and only return the `id` + * const attachmentWithIdOnly = await prisma.attachment.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Attachment. + * @param {AttachmentDeleteArgs} args - Arguments to delete one Attachment. + * @example + * // Delete one Attachment + * const Attachment = await prisma.attachment.delete({ + * where: { + * // ... filter to delete one Attachment + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Attachment. + * @param {AttachmentUpdateArgs} args - Arguments to update one Attachment. + * @example + * // Update one Attachment + * const attachment = await prisma.attachment.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Attachments. + * @param {AttachmentDeleteManyArgs} args - Arguments to filter Attachments to delete. + * @example + * // Delete a few Attachments + * const { count } = await prisma.attachment.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Attachments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Attachments + * const attachment = await prisma.attachment.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Attachments and returns the data updated in the database. + * @param {AttachmentUpdateManyAndReturnArgs} args - Arguments to update many Attachments. + * @example + * // Update many Attachments + * const attachment = await prisma.attachment.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Attachments and only return the `id` + * const attachmentWithIdOnly = await prisma.attachment.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Attachment. + * @param {AttachmentUpsertArgs} args - Arguments to update or create a Attachment. + * @example + * // Update or create a Attachment + * const attachment = await prisma.attachment.upsert({ + * create: { + * // ... data to create a Attachment + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Attachment we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AttachmentClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Attachments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentCountArgs} args - Arguments to filter Attachments to count. + * @example + * // Count the number of Attachments + * const count = await prisma.attachment.count({ + * where: { + * // ... the filter for the Attachments we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Attachment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Attachment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AttachmentGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AttachmentGroupByArgs['orderBy'] } + : { orderBy?: AttachmentGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAttachmentGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Attachment model + */ + readonly fields: AttachmentFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Attachment. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AttachmentClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Attachment model + */ + interface AttachmentFieldRefs { + readonly id: FieldRef<"Attachment", 'String'> + readonly challengeId: FieldRef<"Attachment", 'String'> + readonly name: FieldRef<"Attachment", 'String'> + readonly fileSize: FieldRef<"Attachment", 'Int'> + readonly url: FieldRef<"Attachment", 'String'> + readonly description: FieldRef<"Attachment", 'String'> + readonly createdAt: FieldRef<"Attachment", 'DateTime'> + readonly createdBy: FieldRef<"Attachment", 'String'> + readonly updatedAt: FieldRef<"Attachment", 'DateTime'> + readonly updatedBy: FieldRef<"Attachment", 'String'> + } + + + // Custom InputTypes + /** + * Attachment findUnique + */ + export type AttachmentFindUniqueArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where: AttachmentWhereUniqueInput + } + + /** + * Attachment findUniqueOrThrow + */ + export type AttachmentFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where: AttachmentWhereUniqueInput + } + + /** + * Attachment findFirst + */ + export type AttachmentFindFirstArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where?: AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: AttachmentOrderByWithRelationInput | AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Attachments. + */ + cursor?: AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Attachments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Attachments. + */ + distinct?: AttachmentScalarFieldEnum | AttachmentScalarFieldEnum[] + } + + /** + * Attachment findFirstOrThrow + */ + export type AttachmentFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where?: AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: AttachmentOrderByWithRelationInput | AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Attachments. + */ + cursor?: AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Attachments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Attachments. + */ + distinct?: AttachmentScalarFieldEnum | AttachmentScalarFieldEnum[] + } + + /** + * Attachment findMany + */ + export type AttachmentFindManyArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * Filter, which Attachments to fetch. + */ + where?: AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: AttachmentOrderByWithRelationInput | AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Attachments. + */ + cursor?: AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Attachments. + */ + skip?: number + distinct?: AttachmentScalarFieldEnum | AttachmentScalarFieldEnum[] + } + + /** + * Attachment create + */ + export type AttachmentCreateArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * The data needed to create a Attachment. + */ + data: XOR + } + + /** + * Attachment createMany + */ + export type AttachmentCreateManyArgs = { + /** + * The data used to create many Attachments. + */ + data: AttachmentCreateManyInput | AttachmentCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Attachment createManyAndReturn + */ + export type AttachmentCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * The data used to create many Attachments. + */ + data: AttachmentCreateManyInput | AttachmentCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentIncludeCreateManyAndReturn | null + } + + /** + * Attachment update + */ + export type AttachmentUpdateArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * The data needed to update a Attachment. + */ + data: XOR + /** + * Choose, which Attachment to update. + */ + where: AttachmentWhereUniqueInput + } + + /** + * Attachment updateMany + */ + export type AttachmentUpdateManyArgs = { + /** + * The data used to update Attachments. + */ + data: XOR + /** + * Filter which Attachments to update + */ + where?: AttachmentWhereInput + /** + * Limit how many Attachments to update. + */ + limit?: number + } + + /** + * Attachment updateManyAndReturn + */ + export type AttachmentUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * The data used to update Attachments. + */ + data: XOR + /** + * Filter which Attachments to update + */ + where?: AttachmentWhereInput + /** + * Limit how many Attachments to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentIncludeUpdateManyAndReturn | null + } + + /** + * Attachment upsert + */ + export type AttachmentUpsertArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * The filter to search for the Attachment to update in case it exists. + */ + where: AttachmentWhereUniqueInput + /** + * In case the Attachment found by the `where` argument doesn't exist, create a new Attachment with this data. + */ + create: XOR + /** + * In case the Attachment was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Attachment delete + */ + export type AttachmentDeleteArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + /** + * Filter which Attachment to delete. + */ + where: AttachmentWhereUniqueInput + } + + /** + * Attachment deleteMany + */ + export type AttachmentDeleteManyArgs = { + /** + * Filter which Attachments to delete + */ + where?: AttachmentWhereInput + /** + * Limit how many Attachments to delete. + */ + limit?: number + } + + /** + * Attachment without action + */ + export type AttachmentDefaultArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AttachmentInclude | null + } + + + /** + * Model ChallengeMetadata + */ + + export type AggregateChallengeMetadata = { + _count: ChallengeMetadataCountAggregateOutputType | null + _min: ChallengeMetadataMinAggregateOutputType | null + _max: ChallengeMetadataMaxAggregateOutputType | null + } + + export type ChallengeMetadataMinAggregateOutputType = { + id: string | null + challengeId: string | null + name: string | null + value: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeMetadataMaxAggregateOutputType = { + id: string | null + challengeId: string | null + name: string | null + value: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeMetadataCountAggregateOutputType = { + id: number + challengeId: number + name: number + value: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeMetadataMinAggregateInputType = { + id?: true + challengeId?: true + name?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeMetadataMaxAggregateInputType = { + id?: true + challengeId?: true + name?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeMetadataCountAggregateInputType = { + id?: true + challengeId?: true + name?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeMetadataAggregateArgs = { + /** + * Filter which ChallengeMetadata to aggregate. + */ + where?: ChallengeMetadataWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeMetadata to fetch. + */ + orderBy?: ChallengeMetadataOrderByWithRelationInput | ChallengeMetadataOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeMetadataWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeMetadata from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeMetadata. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeMetadata + **/ + _count?: true | ChallengeMetadataCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeMetadataMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeMetadataMaxAggregateInputType + } + + export type GetChallengeMetadataAggregateType = { + [P in keyof T & keyof AggregateChallengeMetadata]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeMetadataGroupByArgs = { + where?: ChallengeMetadataWhereInput + orderBy?: ChallengeMetadataOrderByWithAggregationInput | ChallengeMetadataOrderByWithAggregationInput[] + by: ChallengeMetadataScalarFieldEnum[] | ChallengeMetadataScalarFieldEnum + having?: ChallengeMetadataScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeMetadataCountAggregateInputType | true + _min?: ChallengeMetadataMinAggregateInputType + _max?: ChallengeMetadataMaxAggregateInputType + } + + export type ChallengeMetadataGroupByOutputType = { + id: string + challengeId: string + name: string + value: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeMetadataCountAggregateOutputType | null + _min: ChallengeMetadataMinAggregateOutputType | null + _max: ChallengeMetadataMaxAggregateOutputType | null + } + + type GetChallengeMetadataGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeMetadataGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeMetadataSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeMetadata"]> + + export type ChallengeMetadataSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeMetadata"]> + + export type ChallengeMetadataSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeMetadata"]> + + export type ChallengeMetadataSelectScalar = { + id?: boolean + challengeId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeMetadataOmit = $Extensions.GetOmit<"id" | "challengeId" | "name" | "value" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeMetadata"]> + export type ChallengeMetadataInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeMetadataIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeMetadataIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeMetadataPayload = { + name: "ChallengeMetadata" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + name: string + value: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeMetadata"]> + composites: {} + } + + type ChallengeMetadataGetPayload = $Result.GetResult + + type ChallengeMetadataCountArgs = + Omit & { + select?: ChallengeMetadataCountAggregateInputType | true + } + + export interface ChallengeMetadataDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeMetadata'], meta: { name: 'ChallengeMetadata' } } + /** + * Find zero or one ChallengeMetadata that matches the filter. + * @param {ChallengeMetadataFindUniqueArgs} args - Arguments to find a ChallengeMetadata + * @example + * // Get one ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeMetadata that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeMetadataFindUniqueOrThrowArgs} args - Arguments to find a ChallengeMetadata + * @example + * // Get one ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeMetadata that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeMetadataFindFirstArgs} args - Arguments to find a ChallengeMetadata + * @example + * // Get one ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeMetadata that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeMetadataFindFirstOrThrowArgs} args - Arguments to find a ChallengeMetadata + * @example + * // Get one ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeMetadata that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeMetadataFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.findMany() + * + * // Get first 10 ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeMetadataWithIdOnly = await prisma.challengeMetadata.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeMetadata. + * @param {ChallengeMetadataCreateArgs} args - Arguments to create a ChallengeMetadata. + * @example + * // Create one ChallengeMetadata + * const ChallengeMetadata = await prisma.challengeMetadata.create({ + * data: { + * // ... data to create a ChallengeMetadata + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeMetadata. + * @param {ChallengeMetadataCreateManyArgs} args - Arguments to create many ChallengeMetadata. + * @example + * // Create many ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeMetadata and returns the data saved in the database. + * @param {ChallengeMetadataCreateManyAndReturnArgs} args - Arguments to create many ChallengeMetadata. + * @example + * // Create many ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeMetadata and only return the `id` + * const challengeMetadataWithIdOnly = await prisma.challengeMetadata.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeMetadata. + * @param {ChallengeMetadataDeleteArgs} args - Arguments to delete one ChallengeMetadata. + * @example + * // Delete one ChallengeMetadata + * const ChallengeMetadata = await prisma.challengeMetadata.delete({ + * where: { + * // ... filter to delete one ChallengeMetadata + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeMetadata. + * @param {ChallengeMetadataUpdateArgs} args - Arguments to update one ChallengeMetadata. + * @example + * // Update one ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeMetadata. + * @param {ChallengeMetadataDeleteManyArgs} args - Arguments to filter ChallengeMetadata to delete. + * @example + * // Delete a few ChallengeMetadata + * const { count } = await prisma.challengeMetadata.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeMetadata. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeMetadataUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeMetadata and returns the data updated in the database. + * @param {ChallengeMetadataUpdateManyAndReturnArgs} args - Arguments to update many ChallengeMetadata. + * @example + * // Update many ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeMetadata and only return the `id` + * const challengeMetadataWithIdOnly = await prisma.challengeMetadata.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeMetadata. + * @param {ChallengeMetadataUpsertArgs} args - Arguments to update or create a ChallengeMetadata. + * @example + * // Update or create a ChallengeMetadata + * const challengeMetadata = await prisma.challengeMetadata.upsert({ + * create: { + * // ... data to create a ChallengeMetadata + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeMetadata we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeMetadataClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeMetadata. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeMetadataCountArgs} args - Arguments to filter ChallengeMetadata to count. + * @example + * // Count the number of ChallengeMetadata + * const count = await prisma.challengeMetadata.count({ + * where: { + * // ... the filter for the ChallengeMetadata we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeMetadata. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeMetadataAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeMetadata. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeMetadataGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeMetadataGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeMetadataGroupByArgs['orderBy'] } + : { orderBy?: ChallengeMetadataGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeMetadataGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeMetadata model + */ + readonly fields: ChallengeMetadataFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeMetadata. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeMetadataClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeMetadata model + */ + interface ChallengeMetadataFieldRefs { + readonly id: FieldRef<"ChallengeMetadata", 'String'> + readonly challengeId: FieldRef<"ChallengeMetadata", 'String'> + readonly name: FieldRef<"ChallengeMetadata", 'String'> + readonly value: FieldRef<"ChallengeMetadata", 'String'> + readonly createdAt: FieldRef<"ChallengeMetadata", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeMetadata", 'String'> + readonly updatedAt: FieldRef<"ChallengeMetadata", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeMetadata", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeMetadata findUnique + */ + export type ChallengeMetadataFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * Filter, which ChallengeMetadata to fetch. + */ + where: ChallengeMetadataWhereUniqueInput + } + + /** + * ChallengeMetadata findUniqueOrThrow + */ + export type ChallengeMetadataFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * Filter, which ChallengeMetadata to fetch. + */ + where: ChallengeMetadataWhereUniqueInput + } + + /** + * ChallengeMetadata findFirst + */ + export type ChallengeMetadataFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * Filter, which ChallengeMetadata to fetch. + */ + where?: ChallengeMetadataWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeMetadata to fetch. + */ + orderBy?: ChallengeMetadataOrderByWithRelationInput | ChallengeMetadataOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeMetadata. + */ + cursor?: ChallengeMetadataWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeMetadata from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeMetadata. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeMetadata. + */ + distinct?: ChallengeMetadataScalarFieldEnum | ChallengeMetadataScalarFieldEnum[] + } + + /** + * ChallengeMetadata findFirstOrThrow + */ + export type ChallengeMetadataFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * Filter, which ChallengeMetadata to fetch. + */ + where?: ChallengeMetadataWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeMetadata to fetch. + */ + orderBy?: ChallengeMetadataOrderByWithRelationInput | ChallengeMetadataOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeMetadata. + */ + cursor?: ChallengeMetadataWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeMetadata from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeMetadata. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeMetadata. + */ + distinct?: ChallengeMetadataScalarFieldEnum | ChallengeMetadataScalarFieldEnum[] + } + + /** + * ChallengeMetadata findMany + */ + export type ChallengeMetadataFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * Filter, which ChallengeMetadata to fetch. + */ + where?: ChallengeMetadataWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeMetadata to fetch. + */ + orderBy?: ChallengeMetadataOrderByWithRelationInput | ChallengeMetadataOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeMetadata. + */ + cursor?: ChallengeMetadataWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeMetadata from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeMetadata. + */ + skip?: number + distinct?: ChallengeMetadataScalarFieldEnum | ChallengeMetadataScalarFieldEnum[] + } + + /** + * ChallengeMetadata create + */ + export type ChallengeMetadataCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * The data needed to create a ChallengeMetadata. + */ + data: XOR + } + + /** + * ChallengeMetadata createMany + */ + export type ChallengeMetadataCreateManyArgs = { + /** + * The data used to create many ChallengeMetadata. + */ + data: ChallengeMetadataCreateManyInput | ChallengeMetadataCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeMetadata createManyAndReturn + */ + export type ChallengeMetadataCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * The data used to create many ChallengeMetadata. + */ + data: ChallengeMetadataCreateManyInput | ChallengeMetadataCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataIncludeCreateManyAndReturn | null + } + + /** + * ChallengeMetadata update + */ + export type ChallengeMetadataUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * The data needed to update a ChallengeMetadata. + */ + data: XOR + /** + * Choose, which ChallengeMetadata to update. + */ + where: ChallengeMetadataWhereUniqueInput + } + + /** + * ChallengeMetadata updateMany + */ + export type ChallengeMetadataUpdateManyArgs = { + /** + * The data used to update ChallengeMetadata. + */ + data: XOR + /** + * Filter which ChallengeMetadata to update + */ + where?: ChallengeMetadataWhereInput + /** + * Limit how many ChallengeMetadata to update. + */ + limit?: number + } + + /** + * ChallengeMetadata updateManyAndReturn + */ + export type ChallengeMetadataUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * The data used to update ChallengeMetadata. + */ + data: XOR + /** + * Filter which ChallengeMetadata to update + */ + where?: ChallengeMetadataWhereInput + /** + * Limit how many ChallengeMetadata to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeMetadata upsert + */ + export type ChallengeMetadataUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * The filter to search for the ChallengeMetadata to update in case it exists. + */ + where: ChallengeMetadataWhereUniqueInput + /** + * In case the ChallengeMetadata found by the `where` argument doesn't exist, create a new ChallengeMetadata with this data. + */ + create: XOR + /** + * In case the ChallengeMetadata was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeMetadata delete + */ + export type ChallengeMetadataDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + /** + * Filter which ChallengeMetadata to delete. + */ + where: ChallengeMetadataWhereUniqueInput + } + + /** + * ChallengeMetadata deleteMany + */ + export type ChallengeMetadataDeleteManyArgs = { + /** + * Filter which ChallengeMetadata to delete + */ + where?: ChallengeMetadataWhereInput + /** + * Limit how many ChallengeMetadata to delete. + */ + limit?: number + } + + /** + * ChallengeMetadata without action + */ + export type ChallengeMetadataDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeMetadata + */ + select?: ChallengeMetadataSelect | null + /** + * Omit specific fields from the ChallengeMetadata + */ + omit?: ChallengeMetadataOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeMetadataInclude | null + } + + + /** + * Model Prize + */ + + export type AggregatePrize = { + _count: PrizeCountAggregateOutputType | null + _avg: PrizeAvgAggregateOutputType | null + _sum: PrizeSumAggregateOutputType | null + _min: PrizeMinAggregateOutputType | null + _max: PrizeMaxAggregateOutputType | null + } + + export type PrizeAvgAggregateOutputType = { + value: number | null + } + + export type PrizeSumAggregateOutputType = { + value: number | null + } + + export type PrizeMinAggregateOutputType = { + id: string | null + description: string | null + prizeSetId: string | null + type: string | null + value: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type PrizeMaxAggregateOutputType = { + id: string | null + description: string | null + prizeSetId: string | null + type: string | null + value: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type PrizeCountAggregateOutputType = { + id: number + description: number + prizeSetId: number + type: number + value: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type PrizeAvgAggregateInputType = { + value?: true + } + + export type PrizeSumAggregateInputType = { + value?: true + } + + export type PrizeMinAggregateInputType = { + id?: true + description?: true + prizeSetId?: true + type?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type PrizeMaxAggregateInputType = { + id?: true + description?: true + prizeSetId?: true + type?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type PrizeCountAggregateInputType = { + id?: true + description?: true + prizeSetId?: true + type?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type PrizeAggregateArgs = { + /** + * Filter which Prize to aggregate. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Prizes + **/ + _count?: true | PrizeCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PrizeAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PrizeSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PrizeMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PrizeMaxAggregateInputType + } + + export type GetPrizeAggregateType = { + [P in keyof T & keyof AggregatePrize]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PrizeGroupByArgs = { + where?: PrizeWhereInput + orderBy?: PrizeOrderByWithAggregationInput | PrizeOrderByWithAggregationInput[] + by: PrizeScalarFieldEnum[] | PrizeScalarFieldEnum + having?: PrizeScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PrizeCountAggregateInputType | true + _avg?: PrizeAvgAggregateInputType + _sum?: PrizeSumAggregateInputType + _min?: PrizeMinAggregateInputType + _max?: PrizeMaxAggregateInputType + } + + export type PrizeGroupByOutputType = { + id: string + description: string | null + prizeSetId: string + type: string + value: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: PrizeCountAggregateOutputType | null + _avg: PrizeAvgAggregateOutputType | null + _sum: PrizeSumAggregateOutputType | null + _min: PrizeMinAggregateOutputType | null + _max: PrizeMaxAggregateOutputType | null + } + + type GetPrizeGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PrizeGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PrizeSelect = $Extensions.GetSelect<{ + id?: boolean + description?: boolean + prizeSetId?: boolean + type?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + prizeSet?: boolean | ChallengePrizeSetDefaultArgs + }, ExtArgs["result"]["prize"]> + + export type PrizeSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + description?: boolean + prizeSetId?: boolean + type?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + prizeSet?: boolean | ChallengePrizeSetDefaultArgs + }, ExtArgs["result"]["prize"]> + + export type PrizeSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + description?: boolean + prizeSetId?: boolean + type?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + prizeSet?: boolean | ChallengePrizeSetDefaultArgs + }, ExtArgs["result"]["prize"]> + + export type PrizeSelectScalar = { + id?: boolean + description?: boolean + prizeSetId?: boolean + type?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type PrizeOmit = $Extensions.GetOmit<"id" | "description" | "prizeSetId" | "type" | "value" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["prize"]> + export type PrizeInclude = { + prizeSet?: boolean | ChallengePrizeSetDefaultArgs + } + export type PrizeIncludeCreateManyAndReturn = { + prizeSet?: boolean | ChallengePrizeSetDefaultArgs + } + export type PrizeIncludeUpdateManyAndReturn = { + prizeSet?: boolean | ChallengePrizeSetDefaultArgs + } + + export type $PrizePayload = { + name: "Prize" + objects: { + prizeSet: Prisma.$ChallengePrizeSetPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + description: string | null + prizeSetId: string + type: string + value: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["prize"]> + composites: {} + } + + type PrizeGetPayload = $Result.GetResult + + type PrizeCountArgs = + Omit & { + select?: PrizeCountAggregateInputType | true + } + + export interface PrizeDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Prize'], meta: { name: 'Prize' } } + /** + * Find zero or one Prize that matches the filter. + * @param {PrizeFindUniqueArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Prize that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PrizeFindUniqueOrThrowArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Prize that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeFindFirstArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Prize that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeFindFirstOrThrowArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Prizes that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Prizes + * const prizes = await prisma.prize.findMany() + * + * // Get first 10 Prizes + * const prizes = await prisma.prize.findMany({ take: 10 }) + * + * // Only select the `id` + * const prizeWithIdOnly = await prisma.prize.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Prize. + * @param {PrizeCreateArgs} args - Arguments to create a Prize. + * @example + * // Create one Prize + * const Prize = await prisma.prize.create({ + * data: { + * // ... data to create a Prize + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Prizes. + * @param {PrizeCreateManyArgs} args - Arguments to create many Prizes. + * @example + * // Create many Prizes + * const prize = await prisma.prize.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Prizes and returns the data saved in the database. + * @param {PrizeCreateManyAndReturnArgs} args - Arguments to create many Prizes. + * @example + * // Create many Prizes + * const prize = await prisma.prize.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Prizes and only return the `id` + * const prizeWithIdOnly = await prisma.prize.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Prize. + * @param {PrizeDeleteArgs} args - Arguments to delete one Prize. + * @example + * // Delete one Prize + * const Prize = await prisma.prize.delete({ + * where: { + * // ... filter to delete one Prize + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Prize. + * @param {PrizeUpdateArgs} args - Arguments to update one Prize. + * @example + * // Update one Prize + * const prize = await prisma.prize.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Prizes. + * @param {PrizeDeleteManyArgs} args - Arguments to filter Prizes to delete. + * @example + * // Delete a few Prizes + * const { count } = await prisma.prize.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Prizes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Prizes + * const prize = await prisma.prize.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Prizes and returns the data updated in the database. + * @param {PrizeUpdateManyAndReturnArgs} args - Arguments to update many Prizes. + * @example + * // Update many Prizes + * const prize = await prisma.prize.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Prizes and only return the `id` + * const prizeWithIdOnly = await prisma.prize.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Prize. + * @param {PrizeUpsertArgs} args - Arguments to update or create a Prize. + * @example + * // Update or create a Prize + * const prize = await prisma.prize.upsert({ + * create: { + * // ... data to create a Prize + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Prize we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Prizes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeCountArgs} args - Arguments to filter Prizes to count. + * @example + * // Count the number of Prizes + * const count = await prisma.prize.count({ + * where: { + * // ... the filter for the Prizes we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Prize. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Prize. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends PrizeGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PrizeGroupByArgs['orderBy'] } + : { orderBy?: PrizeGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPrizeGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Prize model + */ + readonly fields: PrizeFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Prize. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PrizeClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + prizeSet = {}>(args?: Subset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Prize model + */ + interface PrizeFieldRefs { + readonly id: FieldRef<"Prize", 'String'> + readonly description: FieldRef<"Prize", 'String'> + readonly prizeSetId: FieldRef<"Prize", 'String'> + readonly type: FieldRef<"Prize", 'String'> + readonly value: FieldRef<"Prize", 'Float'> + readonly createdAt: FieldRef<"Prize", 'DateTime'> + readonly createdBy: FieldRef<"Prize", 'String'> + readonly updatedAt: FieldRef<"Prize", 'DateTime'> + readonly updatedBy: FieldRef<"Prize", 'String'> + } + + + // Custom InputTypes + /** + * Prize findUnique + */ + export type PrizeFindUniqueArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize findUniqueOrThrow + */ + export type PrizeFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize findFirst + */ + export type PrizeFindFirstArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Prizes. + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Prizes. + */ + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * Prize findFirstOrThrow + */ + export type PrizeFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Prizes. + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Prizes. + */ + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * Prize findMany + */ + export type PrizeFindManyArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prizes to fetch. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Prizes. + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * Prize create + */ + export type PrizeCreateArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * The data needed to create a Prize. + */ + data: XOR + } + + /** + * Prize createMany + */ + export type PrizeCreateManyArgs = { + /** + * The data used to create many Prizes. + */ + data: PrizeCreateManyInput | PrizeCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Prize createManyAndReturn + */ + export type PrizeCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * The data used to create many Prizes. + */ + data: PrizeCreateManyInput | PrizeCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeIncludeCreateManyAndReturn | null + } + + /** + * Prize update + */ + export type PrizeUpdateArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * The data needed to update a Prize. + */ + data: XOR + /** + * Choose, which Prize to update. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize updateMany + */ + export type PrizeUpdateManyArgs = { + /** + * The data used to update Prizes. + */ + data: XOR + /** + * Filter which Prizes to update + */ + where?: PrizeWhereInput + /** + * Limit how many Prizes to update. + */ + limit?: number + } + + /** + * Prize updateManyAndReturn + */ + export type PrizeUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * The data used to update Prizes. + */ + data: XOR + /** + * Filter which Prizes to update + */ + where?: PrizeWhereInput + /** + * Limit how many Prizes to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeIncludeUpdateManyAndReturn | null + } + + /** + * Prize upsert + */ + export type PrizeUpsertArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * The filter to search for the Prize to update in case it exists. + */ + where: PrizeWhereUniqueInput + /** + * In case the Prize found by the `where` argument doesn't exist, create a new Prize with this data. + */ + create: XOR + /** + * In case the Prize was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Prize delete + */ + export type PrizeDeleteArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter which Prize to delete. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize deleteMany + */ + export type PrizeDeleteManyArgs = { + /** + * Filter which Prizes to delete + */ + where?: PrizeWhereInput + /** + * Limit how many Prizes to delete. + */ + limit?: number + } + + /** + * Prize without action + */ + export type PrizeDefaultArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + } + + + /** + * Model ChallengeWinner + */ + + export type AggregateChallengeWinner = { + _count: ChallengeWinnerCountAggregateOutputType | null + _avg: ChallengeWinnerAvgAggregateOutputType | null + _sum: ChallengeWinnerSumAggregateOutputType | null + _min: ChallengeWinnerMinAggregateOutputType | null + _max: ChallengeWinnerMaxAggregateOutputType | null + } + + export type ChallengeWinnerAvgAggregateOutputType = { + userId: number | null + placement: number | null + } + + export type ChallengeWinnerSumAggregateOutputType = { + userId: number | null + placement: number | null + } + + export type ChallengeWinnerMinAggregateOutputType = { + id: string | null + challengeId: string | null + userId: number | null + handle: string | null + placement: number | null + type: $Enums.PrizeSetTypeEnum | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeWinnerMaxAggregateOutputType = { + id: string | null + challengeId: string | null + userId: number | null + handle: string | null + placement: number | null + type: $Enums.PrizeSetTypeEnum | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeWinnerCountAggregateOutputType = { + id: number + challengeId: number + userId: number + handle: number + placement: number + type: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeWinnerAvgAggregateInputType = { + userId?: true + placement?: true + } + + export type ChallengeWinnerSumAggregateInputType = { + userId?: true + placement?: true + } + + export type ChallengeWinnerMinAggregateInputType = { + id?: true + challengeId?: true + userId?: true + handle?: true + placement?: true + type?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeWinnerMaxAggregateInputType = { + id?: true + challengeId?: true + userId?: true + handle?: true + placement?: true + type?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeWinnerCountAggregateInputType = { + id?: true + challengeId?: true + userId?: true + handle?: true + placement?: true + type?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeWinnerAggregateArgs = { + /** + * Filter which ChallengeWinner to aggregate. + */ + where?: ChallengeWinnerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeWinners to fetch. + */ + orderBy?: ChallengeWinnerOrderByWithRelationInput | ChallengeWinnerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeWinnerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeWinners from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeWinners. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeWinners + **/ + _count?: true | ChallengeWinnerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengeWinnerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengeWinnerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeWinnerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeWinnerMaxAggregateInputType + } + + export type GetChallengeWinnerAggregateType = { + [P in keyof T & keyof AggregateChallengeWinner]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeWinnerGroupByArgs = { + where?: ChallengeWinnerWhereInput + orderBy?: ChallengeWinnerOrderByWithAggregationInput | ChallengeWinnerOrderByWithAggregationInput[] + by: ChallengeWinnerScalarFieldEnum[] | ChallengeWinnerScalarFieldEnum + having?: ChallengeWinnerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeWinnerCountAggregateInputType | true + _avg?: ChallengeWinnerAvgAggregateInputType + _sum?: ChallengeWinnerSumAggregateInputType + _min?: ChallengeWinnerMinAggregateInputType + _max?: ChallengeWinnerMaxAggregateInputType + } + + export type ChallengeWinnerGroupByOutputType = { + id: string + challengeId: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeWinnerCountAggregateOutputType | null + _avg: ChallengeWinnerAvgAggregateOutputType | null + _sum: ChallengeWinnerSumAggregateOutputType | null + _min: ChallengeWinnerMinAggregateOutputType | null + _max: ChallengeWinnerMaxAggregateOutputType | null + } + + type GetChallengeWinnerGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeWinnerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeWinnerSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + userId?: boolean + handle?: boolean + placement?: boolean + type?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeWinner"]> + + export type ChallengeWinnerSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + userId?: boolean + handle?: boolean + placement?: boolean + type?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeWinner"]> + + export type ChallengeWinnerSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + userId?: boolean + handle?: boolean + placement?: boolean + type?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeWinner"]> + + export type ChallengeWinnerSelectScalar = { + id?: boolean + challengeId?: boolean + userId?: boolean + handle?: boolean + placement?: boolean + type?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeWinnerOmit = $Extensions.GetOmit<"id" | "challengeId" | "userId" | "handle" | "placement" | "type" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeWinner"]> + export type ChallengeWinnerInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeWinnerIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeWinnerIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeWinnerPayload = { + name: "ChallengeWinner" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeWinner"]> + composites: {} + } + + type ChallengeWinnerGetPayload = $Result.GetResult + + type ChallengeWinnerCountArgs = + Omit & { + select?: ChallengeWinnerCountAggregateInputType | true + } + + export interface ChallengeWinnerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeWinner'], meta: { name: 'ChallengeWinner' } } + /** + * Find zero or one ChallengeWinner that matches the filter. + * @param {ChallengeWinnerFindUniqueArgs} args - Arguments to find a ChallengeWinner + * @example + * // Get one ChallengeWinner + * const challengeWinner = await prisma.challengeWinner.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeWinner that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeWinnerFindUniqueOrThrowArgs} args - Arguments to find a ChallengeWinner + * @example + * // Get one ChallengeWinner + * const challengeWinner = await prisma.challengeWinner.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeWinner that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeWinnerFindFirstArgs} args - Arguments to find a ChallengeWinner + * @example + * // Get one ChallengeWinner + * const challengeWinner = await prisma.challengeWinner.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeWinner that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeWinnerFindFirstOrThrowArgs} args - Arguments to find a ChallengeWinner + * @example + * // Get one ChallengeWinner + * const challengeWinner = await prisma.challengeWinner.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeWinners that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeWinnerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeWinners + * const challengeWinners = await prisma.challengeWinner.findMany() + * + * // Get first 10 ChallengeWinners + * const challengeWinners = await prisma.challengeWinner.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeWinnerWithIdOnly = await prisma.challengeWinner.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeWinner. + * @param {ChallengeWinnerCreateArgs} args - Arguments to create a ChallengeWinner. + * @example + * // Create one ChallengeWinner + * const ChallengeWinner = await prisma.challengeWinner.create({ + * data: { + * // ... data to create a ChallengeWinner + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeWinners. + * @param {ChallengeWinnerCreateManyArgs} args - Arguments to create many ChallengeWinners. + * @example + * // Create many ChallengeWinners + * const challengeWinner = await prisma.challengeWinner.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeWinners and returns the data saved in the database. + * @param {ChallengeWinnerCreateManyAndReturnArgs} args - Arguments to create many ChallengeWinners. + * @example + * // Create many ChallengeWinners + * const challengeWinner = await prisma.challengeWinner.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeWinners and only return the `id` + * const challengeWinnerWithIdOnly = await prisma.challengeWinner.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeWinner. + * @param {ChallengeWinnerDeleteArgs} args - Arguments to delete one ChallengeWinner. + * @example + * // Delete one ChallengeWinner + * const ChallengeWinner = await prisma.challengeWinner.delete({ + * where: { + * // ... filter to delete one ChallengeWinner + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeWinner. + * @param {ChallengeWinnerUpdateArgs} args - Arguments to update one ChallengeWinner. + * @example + * // Update one ChallengeWinner + * const challengeWinner = await prisma.challengeWinner.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeWinners. + * @param {ChallengeWinnerDeleteManyArgs} args - Arguments to filter ChallengeWinners to delete. + * @example + * // Delete a few ChallengeWinners + * const { count } = await prisma.challengeWinner.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeWinners. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeWinnerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeWinners + * const challengeWinner = await prisma.challengeWinner.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeWinners and returns the data updated in the database. + * @param {ChallengeWinnerUpdateManyAndReturnArgs} args - Arguments to update many ChallengeWinners. + * @example + * // Update many ChallengeWinners + * const challengeWinner = await prisma.challengeWinner.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeWinners and only return the `id` + * const challengeWinnerWithIdOnly = await prisma.challengeWinner.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeWinner. + * @param {ChallengeWinnerUpsertArgs} args - Arguments to update or create a ChallengeWinner. + * @example + * // Update or create a ChallengeWinner + * const challengeWinner = await prisma.challengeWinner.upsert({ + * create: { + * // ... data to create a ChallengeWinner + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeWinner we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeWinnerClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeWinners. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeWinnerCountArgs} args - Arguments to filter ChallengeWinners to count. + * @example + * // Count the number of ChallengeWinners + * const count = await prisma.challengeWinner.count({ + * where: { + * // ... the filter for the ChallengeWinners we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeWinner. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeWinnerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeWinner. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeWinnerGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeWinnerGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeWinnerGroupByArgs['orderBy'] } + : { orderBy?: ChallengeWinnerGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeWinnerGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeWinner model + */ + readonly fields: ChallengeWinnerFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeWinner. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeWinnerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeWinner model + */ + interface ChallengeWinnerFieldRefs { + readonly id: FieldRef<"ChallengeWinner", 'String'> + readonly challengeId: FieldRef<"ChallengeWinner", 'String'> + readonly userId: FieldRef<"ChallengeWinner", 'Int'> + readonly handle: FieldRef<"ChallengeWinner", 'String'> + readonly placement: FieldRef<"ChallengeWinner", 'Int'> + readonly type: FieldRef<"ChallengeWinner", 'PrizeSetTypeEnum'> + readonly createdAt: FieldRef<"ChallengeWinner", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeWinner", 'String'> + readonly updatedAt: FieldRef<"ChallengeWinner", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeWinner", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeWinner findUnique + */ + export type ChallengeWinnerFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * Filter, which ChallengeWinner to fetch. + */ + where: ChallengeWinnerWhereUniqueInput + } + + /** + * ChallengeWinner findUniqueOrThrow + */ + export type ChallengeWinnerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * Filter, which ChallengeWinner to fetch. + */ + where: ChallengeWinnerWhereUniqueInput + } + + /** + * ChallengeWinner findFirst + */ + export type ChallengeWinnerFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * Filter, which ChallengeWinner to fetch. + */ + where?: ChallengeWinnerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeWinners to fetch. + */ + orderBy?: ChallengeWinnerOrderByWithRelationInput | ChallengeWinnerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeWinners. + */ + cursor?: ChallengeWinnerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeWinners from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeWinners. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeWinners. + */ + distinct?: ChallengeWinnerScalarFieldEnum | ChallengeWinnerScalarFieldEnum[] + } + + /** + * ChallengeWinner findFirstOrThrow + */ + export type ChallengeWinnerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * Filter, which ChallengeWinner to fetch. + */ + where?: ChallengeWinnerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeWinners to fetch. + */ + orderBy?: ChallengeWinnerOrderByWithRelationInput | ChallengeWinnerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeWinners. + */ + cursor?: ChallengeWinnerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeWinners from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeWinners. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeWinners. + */ + distinct?: ChallengeWinnerScalarFieldEnum | ChallengeWinnerScalarFieldEnum[] + } + + /** + * ChallengeWinner findMany + */ + export type ChallengeWinnerFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * Filter, which ChallengeWinners to fetch. + */ + where?: ChallengeWinnerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeWinners to fetch. + */ + orderBy?: ChallengeWinnerOrderByWithRelationInput | ChallengeWinnerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeWinners. + */ + cursor?: ChallengeWinnerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeWinners from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeWinners. + */ + skip?: number + distinct?: ChallengeWinnerScalarFieldEnum | ChallengeWinnerScalarFieldEnum[] + } + + /** + * ChallengeWinner create + */ + export type ChallengeWinnerCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * The data needed to create a ChallengeWinner. + */ + data: XOR + } + + /** + * ChallengeWinner createMany + */ + export type ChallengeWinnerCreateManyArgs = { + /** + * The data used to create many ChallengeWinners. + */ + data: ChallengeWinnerCreateManyInput | ChallengeWinnerCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeWinner createManyAndReturn + */ + export type ChallengeWinnerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * The data used to create many ChallengeWinners. + */ + data: ChallengeWinnerCreateManyInput | ChallengeWinnerCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerIncludeCreateManyAndReturn | null + } + + /** + * ChallengeWinner update + */ + export type ChallengeWinnerUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * The data needed to update a ChallengeWinner. + */ + data: XOR + /** + * Choose, which ChallengeWinner to update. + */ + where: ChallengeWinnerWhereUniqueInput + } + + /** + * ChallengeWinner updateMany + */ + export type ChallengeWinnerUpdateManyArgs = { + /** + * The data used to update ChallengeWinners. + */ + data: XOR + /** + * Filter which ChallengeWinners to update + */ + where?: ChallengeWinnerWhereInput + /** + * Limit how many ChallengeWinners to update. + */ + limit?: number + } + + /** + * ChallengeWinner updateManyAndReturn + */ + export type ChallengeWinnerUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * The data used to update ChallengeWinners. + */ + data: XOR + /** + * Filter which ChallengeWinners to update + */ + where?: ChallengeWinnerWhereInput + /** + * Limit how many ChallengeWinners to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeWinner upsert + */ + export type ChallengeWinnerUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * The filter to search for the ChallengeWinner to update in case it exists. + */ + where: ChallengeWinnerWhereUniqueInput + /** + * In case the ChallengeWinner found by the `where` argument doesn't exist, create a new ChallengeWinner with this data. + */ + create: XOR + /** + * In case the ChallengeWinner was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeWinner delete + */ + export type ChallengeWinnerDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + /** + * Filter which ChallengeWinner to delete. + */ + where: ChallengeWinnerWhereUniqueInput + } + + /** + * ChallengeWinner deleteMany + */ + export type ChallengeWinnerDeleteManyArgs = { + /** + * Filter which ChallengeWinners to delete + */ + where?: ChallengeWinnerWhereInput + /** + * Limit how many ChallengeWinners to delete. + */ + limit?: number + } + + /** + * ChallengeWinner without action + */ + export type ChallengeWinnerDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeWinner + */ + select?: ChallengeWinnerSelect | null + /** + * Omit specific fields from the ChallengeWinner + */ + omit?: ChallengeWinnerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeWinnerInclude | null + } + + + /** + * Model ChallengeTerm + */ + + export type AggregateChallengeTerm = { + _count: ChallengeTermCountAggregateOutputType | null + _min: ChallengeTermMinAggregateOutputType | null + _max: ChallengeTermMaxAggregateOutputType | null + } + + export type ChallengeTermMinAggregateOutputType = { + id: string | null + challengeId: string | null + termId: string | null + roleId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTermMaxAggregateOutputType = { + id: string | null + challengeId: string | null + termId: string | null + roleId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeTermCountAggregateOutputType = { + id: number + challengeId: number + termId: number + roleId: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeTermMinAggregateInputType = { + id?: true + challengeId?: true + termId?: true + roleId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTermMaxAggregateInputType = { + id?: true + challengeId?: true + termId?: true + roleId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeTermCountAggregateInputType = { + id?: true + challengeId?: true + termId?: true + roleId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeTermAggregateArgs = { + /** + * Filter which ChallengeTerm to aggregate. + */ + where?: ChallengeTermWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTerms to fetch. + */ + orderBy?: ChallengeTermOrderByWithRelationInput | ChallengeTermOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeTermWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTerms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTerms. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeTerms + **/ + _count?: true | ChallengeTermCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeTermMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeTermMaxAggregateInputType + } + + export type GetChallengeTermAggregateType = { + [P in keyof T & keyof AggregateChallengeTerm]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeTermGroupByArgs = { + where?: ChallengeTermWhereInput + orderBy?: ChallengeTermOrderByWithAggregationInput | ChallengeTermOrderByWithAggregationInput[] + by: ChallengeTermScalarFieldEnum[] | ChallengeTermScalarFieldEnum + having?: ChallengeTermScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeTermCountAggregateInputType | true + _min?: ChallengeTermMinAggregateInputType + _max?: ChallengeTermMaxAggregateInputType + } + + export type ChallengeTermGroupByOutputType = { + id: string + challengeId: string + termId: string + roleId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeTermCountAggregateOutputType | null + _min: ChallengeTermMinAggregateOutputType | null + _max: ChallengeTermMaxAggregateOutputType | null + } + + type GetChallengeTermGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeTermGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeTermSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + termId?: boolean + roleId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeTerm"]> + + export type ChallengeTermSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + termId?: boolean + roleId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeTerm"]> + + export type ChallengeTermSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + termId?: boolean + roleId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeTerm"]> + + export type ChallengeTermSelectScalar = { + id?: boolean + challengeId?: boolean + termId?: boolean + roleId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeTermOmit = $Extensions.GetOmit<"id" | "challengeId" | "termId" | "roleId" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeTerm"]> + export type ChallengeTermInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeTermIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeTermIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeTermPayload = { + name: "ChallengeTerm" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + termId: string + roleId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeTerm"]> + composites: {} + } + + type ChallengeTermGetPayload = $Result.GetResult + + type ChallengeTermCountArgs = + Omit & { + select?: ChallengeTermCountAggregateInputType | true + } + + export interface ChallengeTermDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeTerm'], meta: { name: 'ChallengeTerm' } } + /** + * Find zero or one ChallengeTerm that matches the filter. + * @param {ChallengeTermFindUniqueArgs} args - Arguments to find a ChallengeTerm + * @example + * // Get one ChallengeTerm + * const challengeTerm = await prisma.challengeTerm.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeTerm that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeTermFindUniqueOrThrowArgs} args - Arguments to find a ChallengeTerm + * @example + * // Get one ChallengeTerm + * const challengeTerm = await prisma.challengeTerm.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeTerm that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTermFindFirstArgs} args - Arguments to find a ChallengeTerm + * @example + * // Get one ChallengeTerm + * const challengeTerm = await prisma.challengeTerm.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeTerm that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTermFindFirstOrThrowArgs} args - Arguments to find a ChallengeTerm + * @example + * // Get one ChallengeTerm + * const challengeTerm = await prisma.challengeTerm.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeTerms that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTermFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeTerms + * const challengeTerms = await prisma.challengeTerm.findMany() + * + * // Get first 10 ChallengeTerms + * const challengeTerms = await prisma.challengeTerm.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeTermWithIdOnly = await prisma.challengeTerm.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeTerm. + * @param {ChallengeTermCreateArgs} args - Arguments to create a ChallengeTerm. + * @example + * // Create one ChallengeTerm + * const ChallengeTerm = await prisma.challengeTerm.create({ + * data: { + * // ... data to create a ChallengeTerm + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeTerms. + * @param {ChallengeTermCreateManyArgs} args - Arguments to create many ChallengeTerms. + * @example + * // Create many ChallengeTerms + * const challengeTerm = await prisma.challengeTerm.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeTerms and returns the data saved in the database. + * @param {ChallengeTermCreateManyAndReturnArgs} args - Arguments to create many ChallengeTerms. + * @example + * // Create many ChallengeTerms + * const challengeTerm = await prisma.challengeTerm.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeTerms and only return the `id` + * const challengeTermWithIdOnly = await prisma.challengeTerm.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeTerm. + * @param {ChallengeTermDeleteArgs} args - Arguments to delete one ChallengeTerm. + * @example + * // Delete one ChallengeTerm + * const ChallengeTerm = await prisma.challengeTerm.delete({ + * where: { + * // ... filter to delete one ChallengeTerm + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeTerm. + * @param {ChallengeTermUpdateArgs} args - Arguments to update one ChallengeTerm. + * @example + * // Update one ChallengeTerm + * const challengeTerm = await prisma.challengeTerm.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeTerms. + * @param {ChallengeTermDeleteManyArgs} args - Arguments to filter ChallengeTerms to delete. + * @example + * // Delete a few ChallengeTerms + * const { count } = await prisma.challengeTerm.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTerms. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTermUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeTerms + * const challengeTerm = await prisma.challengeTerm.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeTerms and returns the data updated in the database. + * @param {ChallengeTermUpdateManyAndReturnArgs} args - Arguments to update many ChallengeTerms. + * @example + * // Update many ChallengeTerms + * const challengeTerm = await prisma.challengeTerm.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeTerms and only return the `id` + * const challengeTermWithIdOnly = await prisma.challengeTerm.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeTerm. + * @param {ChallengeTermUpsertArgs} args - Arguments to update or create a ChallengeTerm. + * @example + * // Update or create a ChallengeTerm + * const challengeTerm = await prisma.challengeTerm.upsert({ + * create: { + * // ... data to create a ChallengeTerm + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeTerm we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeTermClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeTerms. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTermCountArgs} args - Arguments to filter ChallengeTerms to count. + * @example + * // Count the number of ChallengeTerms + * const count = await prisma.challengeTerm.count({ + * where: { + * // ... the filter for the ChallengeTerms we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeTerm. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTermAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeTerm. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeTermGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeTermGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeTermGroupByArgs['orderBy'] } + : { orderBy?: ChallengeTermGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeTermGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeTerm model + */ + readonly fields: ChallengeTermFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeTerm. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeTermClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeTerm model + */ + interface ChallengeTermFieldRefs { + readonly id: FieldRef<"ChallengeTerm", 'String'> + readonly challengeId: FieldRef<"ChallengeTerm", 'String'> + readonly termId: FieldRef<"ChallengeTerm", 'String'> + readonly roleId: FieldRef<"ChallengeTerm", 'String'> + readonly createdAt: FieldRef<"ChallengeTerm", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeTerm", 'String'> + readonly updatedAt: FieldRef<"ChallengeTerm", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeTerm", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeTerm findUnique + */ + export type ChallengeTermFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * Filter, which ChallengeTerm to fetch. + */ + where: ChallengeTermWhereUniqueInput + } + + /** + * ChallengeTerm findUniqueOrThrow + */ + export type ChallengeTermFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * Filter, which ChallengeTerm to fetch. + */ + where: ChallengeTermWhereUniqueInput + } + + /** + * ChallengeTerm findFirst + */ + export type ChallengeTermFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * Filter, which ChallengeTerm to fetch. + */ + where?: ChallengeTermWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTerms to fetch. + */ + orderBy?: ChallengeTermOrderByWithRelationInput | ChallengeTermOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTerms. + */ + cursor?: ChallengeTermWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTerms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTerms. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTerms. + */ + distinct?: ChallengeTermScalarFieldEnum | ChallengeTermScalarFieldEnum[] + } + + /** + * ChallengeTerm findFirstOrThrow + */ + export type ChallengeTermFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * Filter, which ChallengeTerm to fetch. + */ + where?: ChallengeTermWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTerms to fetch. + */ + orderBy?: ChallengeTermOrderByWithRelationInput | ChallengeTermOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeTerms. + */ + cursor?: ChallengeTermWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTerms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTerms. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeTerms. + */ + distinct?: ChallengeTermScalarFieldEnum | ChallengeTermScalarFieldEnum[] + } + + /** + * ChallengeTerm findMany + */ + export type ChallengeTermFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * Filter, which ChallengeTerms to fetch. + */ + where?: ChallengeTermWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeTerms to fetch. + */ + orderBy?: ChallengeTermOrderByWithRelationInput | ChallengeTermOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeTerms. + */ + cursor?: ChallengeTermWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeTerms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeTerms. + */ + skip?: number + distinct?: ChallengeTermScalarFieldEnum | ChallengeTermScalarFieldEnum[] + } + + /** + * ChallengeTerm create + */ + export type ChallengeTermCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * The data needed to create a ChallengeTerm. + */ + data: XOR + } + + /** + * ChallengeTerm createMany + */ + export type ChallengeTermCreateManyArgs = { + /** + * The data used to create many ChallengeTerms. + */ + data: ChallengeTermCreateManyInput | ChallengeTermCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeTerm createManyAndReturn + */ + export type ChallengeTermCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * The data used to create many ChallengeTerms. + */ + data: ChallengeTermCreateManyInput | ChallengeTermCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermIncludeCreateManyAndReturn | null + } + + /** + * ChallengeTerm update + */ + export type ChallengeTermUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * The data needed to update a ChallengeTerm. + */ + data: XOR + /** + * Choose, which ChallengeTerm to update. + */ + where: ChallengeTermWhereUniqueInput + } + + /** + * ChallengeTerm updateMany + */ + export type ChallengeTermUpdateManyArgs = { + /** + * The data used to update ChallengeTerms. + */ + data: XOR + /** + * Filter which ChallengeTerms to update + */ + where?: ChallengeTermWhereInput + /** + * Limit how many ChallengeTerms to update. + */ + limit?: number + } + + /** + * ChallengeTerm updateManyAndReturn + */ + export type ChallengeTermUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * The data used to update ChallengeTerms. + */ + data: XOR + /** + * Filter which ChallengeTerms to update + */ + where?: ChallengeTermWhereInput + /** + * Limit how many ChallengeTerms to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeTerm upsert + */ + export type ChallengeTermUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * The filter to search for the ChallengeTerm to update in case it exists. + */ + where: ChallengeTermWhereUniqueInput + /** + * In case the ChallengeTerm found by the `where` argument doesn't exist, create a new ChallengeTerm with this data. + */ + create: XOR + /** + * In case the ChallengeTerm was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeTerm delete + */ + export type ChallengeTermDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + /** + * Filter which ChallengeTerm to delete. + */ + where: ChallengeTermWhereUniqueInput + } + + /** + * ChallengeTerm deleteMany + */ + export type ChallengeTermDeleteManyArgs = { + /** + * Filter which ChallengeTerms to delete + */ + where?: ChallengeTermWhereInput + /** + * Limit how many ChallengeTerms to delete. + */ + limit?: number + } + + /** + * ChallengeTerm without action + */ + export type ChallengeTermDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeTerm + */ + select?: ChallengeTermSelect | null + /** + * Omit specific fields from the ChallengeTerm + */ + omit?: ChallengeTermOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTermInclude | null + } + + + /** + * Model ChallengeSkill + */ + + export type AggregateChallengeSkill = { + _count: ChallengeSkillCountAggregateOutputType | null + _min: ChallengeSkillMinAggregateOutputType | null + _max: ChallengeSkillMaxAggregateOutputType | null + } + + export type ChallengeSkillMinAggregateOutputType = { + id: string | null + challengeId: string | null + skillId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeSkillMaxAggregateOutputType = { + id: string | null + challengeId: string | null + skillId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeSkillCountAggregateOutputType = { + id: number + challengeId: number + skillId: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeSkillMinAggregateInputType = { + id?: true + challengeId?: true + skillId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeSkillMaxAggregateInputType = { + id?: true + challengeId?: true + skillId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeSkillCountAggregateInputType = { + id?: true + challengeId?: true + skillId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeSkillAggregateArgs = { + /** + * Filter which ChallengeSkill to aggregate. + */ + where?: ChallengeSkillWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeSkills to fetch. + */ + orderBy?: ChallengeSkillOrderByWithRelationInput | ChallengeSkillOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeSkillWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeSkills from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeSkills. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeSkills + **/ + _count?: true | ChallengeSkillCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeSkillMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeSkillMaxAggregateInputType + } + + export type GetChallengeSkillAggregateType = { + [P in keyof T & keyof AggregateChallengeSkill]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeSkillGroupByArgs = { + where?: ChallengeSkillWhereInput + orderBy?: ChallengeSkillOrderByWithAggregationInput | ChallengeSkillOrderByWithAggregationInput[] + by: ChallengeSkillScalarFieldEnum[] | ChallengeSkillScalarFieldEnum + having?: ChallengeSkillScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeSkillCountAggregateInputType | true + _min?: ChallengeSkillMinAggregateInputType + _max?: ChallengeSkillMaxAggregateInputType + } + + export type ChallengeSkillGroupByOutputType = { + id: string + challengeId: string + skillId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeSkillCountAggregateOutputType | null + _min: ChallengeSkillMinAggregateOutputType | null + _max: ChallengeSkillMaxAggregateOutputType | null + } + + type GetChallengeSkillGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeSkillGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeSkillSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + skillId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeSkill"]> + + export type ChallengeSkillSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + skillId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeSkill"]> + + export type ChallengeSkillSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + skillId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeSkill"]> + + export type ChallengeSkillSelectScalar = { + id?: boolean + challengeId?: boolean + skillId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeSkillOmit = $Extensions.GetOmit<"id" | "challengeId" | "skillId" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeSkill"]> + export type ChallengeSkillInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeSkillIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeSkillIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeSkillPayload = { + name: "ChallengeSkill" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + skillId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeSkill"]> + composites: {} + } + + type ChallengeSkillGetPayload = $Result.GetResult + + type ChallengeSkillCountArgs = + Omit & { + select?: ChallengeSkillCountAggregateInputType | true + } + + export interface ChallengeSkillDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeSkill'], meta: { name: 'ChallengeSkill' } } + /** + * Find zero or one ChallengeSkill that matches the filter. + * @param {ChallengeSkillFindUniqueArgs} args - Arguments to find a ChallengeSkill + * @example + * // Get one ChallengeSkill + * const challengeSkill = await prisma.challengeSkill.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeSkill that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeSkillFindUniqueOrThrowArgs} args - Arguments to find a ChallengeSkill + * @example + * // Get one ChallengeSkill + * const challengeSkill = await prisma.challengeSkill.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeSkill that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeSkillFindFirstArgs} args - Arguments to find a ChallengeSkill + * @example + * // Get one ChallengeSkill + * const challengeSkill = await prisma.challengeSkill.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeSkill that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeSkillFindFirstOrThrowArgs} args - Arguments to find a ChallengeSkill + * @example + * // Get one ChallengeSkill + * const challengeSkill = await prisma.challengeSkill.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeSkills that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeSkillFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeSkills + * const challengeSkills = await prisma.challengeSkill.findMany() + * + * // Get first 10 ChallengeSkills + * const challengeSkills = await prisma.challengeSkill.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeSkillWithIdOnly = await prisma.challengeSkill.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeSkill. + * @param {ChallengeSkillCreateArgs} args - Arguments to create a ChallengeSkill. + * @example + * // Create one ChallengeSkill + * const ChallengeSkill = await prisma.challengeSkill.create({ + * data: { + * // ... data to create a ChallengeSkill + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeSkills. + * @param {ChallengeSkillCreateManyArgs} args - Arguments to create many ChallengeSkills. + * @example + * // Create many ChallengeSkills + * const challengeSkill = await prisma.challengeSkill.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeSkills and returns the data saved in the database. + * @param {ChallengeSkillCreateManyAndReturnArgs} args - Arguments to create many ChallengeSkills. + * @example + * // Create many ChallengeSkills + * const challengeSkill = await prisma.challengeSkill.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeSkills and only return the `id` + * const challengeSkillWithIdOnly = await prisma.challengeSkill.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeSkill. + * @param {ChallengeSkillDeleteArgs} args - Arguments to delete one ChallengeSkill. + * @example + * // Delete one ChallengeSkill + * const ChallengeSkill = await prisma.challengeSkill.delete({ + * where: { + * // ... filter to delete one ChallengeSkill + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeSkill. + * @param {ChallengeSkillUpdateArgs} args - Arguments to update one ChallengeSkill. + * @example + * // Update one ChallengeSkill + * const challengeSkill = await prisma.challengeSkill.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeSkills. + * @param {ChallengeSkillDeleteManyArgs} args - Arguments to filter ChallengeSkills to delete. + * @example + * // Delete a few ChallengeSkills + * const { count } = await prisma.challengeSkill.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeSkills. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeSkillUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeSkills + * const challengeSkill = await prisma.challengeSkill.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeSkills and returns the data updated in the database. + * @param {ChallengeSkillUpdateManyAndReturnArgs} args - Arguments to update many ChallengeSkills. + * @example + * // Update many ChallengeSkills + * const challengeSkill = await prisma.challengeSkill.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeSkills and only return the `id` + * const challengeSkillWithIdOnly = await prisma.challengeSkill.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeSkill. + * @param {ChallengeSkillUpsertArgs} args - Arguments to update or create a ChallengeSkill. + * @example + * // Update or create a ChallengeSkill + * const challengeSkill = await prisma.challengeSkill.upsert({ + * create: { + * // ... data to create a ChallengeSkill + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeSkill we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeSkillClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeSkills. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeSkillCountArgs} args - Arguments to filter ChallengeSkills to count. + * @example + * // Count the number of ChallengeSkills + * const count = await prisma.challengeSkill.count({ + * where: { + * // ... the filter for the ChallengeSkills we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeSkill. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeSkillAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeSkill. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeSkillGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeSkillGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeSkillGroupByArgs['orderBy'] } + : { orderBy?: ChallengeSkillGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeSkillGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeSkill model + */ + readonly fields: ChallengeSkillFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeSkill. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeSkillClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeSkill model + */ + interface ChallengeSkillFieldRefs { + readonly id: FieldRef<"ChallengeSkill", 'String'> + readonly challengeId: FieldRef<"ChallengeSkill", 'String'> + readonly skillId: FieldRef<"ChallengeSkill", 'String'> + readonly createdAt: FieldRef<"ChallengeSkill", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeSkill", 'String'> + readonly updatedAt: FieldRef<"ChallengeSkill", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeSkill", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeSkill findUnique + */ + export type ChallengeSkillFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * Filter, which ChallengeSkill to fetch. + */ + where: ChallengeSkillWhereUniqueInput + } + + /** + * ChallengeSkill findUniqueOrThrow + */ + export type ChallengeSkillFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * Filter, which ChallengeSkill to fetch. + */ + where: ChallengeSkillWhereUniqueInput + } + + /** + * ChallengeSkill findFirst + */ + export type ChallengeSkillFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * Filter, which ChallengeSkill to fetch. + */ + where?: ChallengeSkillWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeSkills to fetch. + */ + orderBy?: ChallengeSkillOrderByWithRelationInput | ChallengeSkillOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeSkills. + */ + cursor?: ChallengeSkillWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeSkills from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeSkills. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeSkills. + */ + distinct?: ChallengeSkillScalarFieldEnum | ChallengeSkillScalarFieldEnum[] + } + + /** + * ChallengeSkill findFirstOrThrow + */ + export type ChallengeSkillFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * Filter, which ChallengeSkill to fetch. + */ + where?: ChallengeSkillWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeSkills to fetch. + */ + orderBy?: ChallengeSkillOrderByWithRelationInput | ChallengeSkillOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeSkills. + */ + cursor?: ChallengeSkillWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeSkills from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeSkills. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeSkills. + */ + distinct?: ChallengeSkillScalarFieldEnum | ChallengeSkillScalarFieldEnum[] + } + + /** + * ChallengeSkill findMany + */ + export type ChallengeSkillFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * Filter, which ChallengeSkills to fetch. + */ + where?: ChallengeSkillWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeSkills to fetch. + */ + orderBy?: ChallengeSkillOrderByWithRelationInput | ChallengeSkillOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeSkills. + */ + cursor?: ChallengeSkillWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeSkills from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeSkills. + */ + skip?: number + distinct?: ChallengeSkillScalarFieldEnum | ChallengeSkillScalarFieldEnum[] + } + + /** + * ChallengeSkill create + */ + export type ChallengeSkillCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * The data needed to create a ChallengeSkill. + */ + data: XOR + } + + /** + * ChallengeSkill createMany + */ + export type ChallengeSkillCreateManyArgs = { + /** + * The data used to create many ChallengeSkills. + */ + data: ChallengeSkillCreateManyInput | ChallengeSkillCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeSkill createManyAndReturn + */ + export type ChallengeSkillCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * The data used to create many ChallengeSkills. + */ + data: ChallengeSkillCreateManyInput | ChallengeSkillCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillIncludeCreateManyAndReturn | null + } + + /** + * ChallengeSkill update + */ + export type ChallengeSkillUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * The data needed to update a ChallengeSkill. + */ + data: XOR + /** + * Choose, which ChallengeSkill to update. + */ + where: ChallengeSkillWhereUniqueInput + } + + /** + * ChallengeSkill updateMany + */ + export type ChallengeSkillUpdateManyArgs = { + /** + * The data used to update ChallengeSkills. + */ + data: XOR + /** + * Filter which ChallengeSkills to update + */ + where?: ChallengeSkillWhereInput + /** + * Limit how many ChallengeSkills to update. + */ + limit?: number + } + + /** + * ChallengeSkill updateManyAndReturn + */ + export type ChallengeSkillUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * The data used to update ChallengeSkills. + */ + data: XOR + /** + * Filter which ChallengeSkills to update + */ + where?: ChallengeSkillWhereInput + /** + * Limit how many ChallengeSkills to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeSkill upsert + */ + export type ChallengeSkillUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * The filter to search for the ChallengeSkill to update in case it exists. + */ + where: ChallengeSkillWhereUniqueInput + /** + * In case the ChallengeSkill found by the `where` argument doesn't exist, create a new ChallengeSkill with this data. + */ + create: XOR + /** + * In case the ChallengeSkill was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeSkill delete + */ + export type ChallengeSkillDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + /** + * Filter which ChallengeSkill to delete. + */ + where: ChallengeSkillWhereUniqueInput + } + + /** + * ChallengeSkill deleteMany + */ + export type ChallengeSkillDeleteManyArgs = { + /** + * Filter which ChallengeSkills to delete + */ + where?: ChallengeSkillWhereInput + /** + * Limit how many ChallengeSkills to delete. + */ + limit?: number + } + + /** + * ChallengeSkill without action + */ + export type ChallengeSkillDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeSkill + */ + select?: ChallengeSkillSelect | null + /** + * Omit specific fields from the ChallengeSkill + */ + omit?: ChallengeSkillOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeSkillInclude | null + } + + + /** + * Model ChallengeBilling + */ + + export type AggregateChallengeBilling = { + _count: ChallengeBillingCountAggregateOutputType | null + _avg: ChallengeBillingAvgAggregateOutputType | null + _sum: ChallengeBillingSumAggregateOutputType | null + _min: ChallengeBillingMinAggregateOutputType | null + _max: ChallengeBillingMaxAggregateOutputType | null + } + + export type ChallengeBillingAvgAggregateOutputType = { + markup: number | null + clientBillingRate: number | null + } + + export type ChallengeBillingSumAggregateOutputType = { + markup: number | null + clientBillingRate: number | null + } + + export type ChallengeBillingMinAggregateOutputType = { + id: string | null + billingAccountId: string | null + markup: number | null + clientBillingRate: number | null + challengeId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeBillingMaxAggregateOutputType = { + id: string | null + billingAccountId: string | null + markup: number | null + clientBillingRate: number | null + challengeId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeBillingCountAggregateOutputType = { + id: number + billingAccountId: number + markup: number + clientBillingRate: number + challengeId: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeBillingAvgAggregateInputType = { + markup?: true + clientBillingRate?: true + } + + export type ChallengeBillingSumAggregateInputType = { + markup?: true + clientBillingRate?: true + } + + export type ChallengeBillingMinAggregateInputType = { + id?: true + billingAccountId?: true + markup?: true + clientBillingRate?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeBillingMaxAggregateInputType = { + id?: true + billingAccountId?: true + markup?: true + clientBillingRate?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeBillingCountAggregateInputType = { + id?: true + billingAccountId?: true + markup?: true + clientBillingRate?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeBillingAggregateArgs = { + /** + * Filter which ChallengeBilling to aggregate. + */ + where?: ChallengeBillingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeBillings to fetch. + */ + orderBy?: ChallengeBillingOrderByWithRelationInput | ChallengeBillingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeBillingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeBillings from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeBillings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeBillings + **/ + _count?: true | ChallengeBillingCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengeBillingAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengeBillingSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeBillingMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeBillingMaxAggregateInputType + } + + export type GetChallengeBillingAggregateType = { + [P in keyof T & keyof AggregateChallengeBilling]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeBillingGroupByArgs = { + where?: ChallengeBillingWhereInput + orderBy?: ChallengeBillingOrderByWithAggregationInput | ChallengeBillingOrderByWithAggregationInput[] + by: ChallengeBillingScalarFieldEnum[] | ChallengeBillingScalarFieldEnum + having?: ChallengeBillingScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeBillingCountAggregateInputType | true + _avg?: ChallengeBillingAvgAggregateInputType + _sum?: ChallengeBillingSumAggregateInputType + _min?: ChallengeBillingMinAggregateInputType + _max?: ChallengeBillingMaxAggregateInputType + } + + export type ChallengeBillingGroupByOutputType = { + id: string + billingAccountId: string | null + markup: number | null + clientBillingRate: number | null + challengeId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeBillingCountAggregateOutputType | null + _avg: ChallengeBillingAvgAggregateOutputType | null + _sum: ChallengeBillingSumAggregateOutputType | null + _min: ChallengeBillingMinAggregateOutputType | null + _max: ChallengeBillingMaxAggregateOutputType | null + } + + type GetChallengeBillingGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeBillingGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeBillingSelect = $Extensions.GetSelect<{ + id?: boolean + billingAccountId?: boolean + markup?: boolean + clientBillingRate?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeBilling"]> + + export type ChallengeBillingSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + billingAccountId?: boolean + markup?: boolean + clientBillingRate?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeBilling"]> + + export type ChallengeBillingSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + billingAccountId?: boolean + markup?: boolean + clientBillingRate?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeBilling"]> + + export type ChallengeBillingSelectScalar = { + id?: boolean + billingAccountId?: boolean + markup?: boolean + clientBillingRate?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeBillingOmit = $Extensions.GetOmit<"id" | "billingAccountId" | "markup" | "clientBillingRate" | "challengeId" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeBilling"]> + export type ChallengeBillingInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeBillingIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeBillingIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeBillingPayload = { + name: "ChallengeBilling" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + billingAccountId: string | null + markup: number | null + clientBillingRate: number | null + challengeId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeBilling"]> + composites: {} + } + + type ChallengeBillingGetPayload = $Result.GetResult + + type ChallengeBillingCountArgs = + Omit & { + select?: ChallengeBillingCountAggregateInputType | true + } + + export interface ChallengeBillingDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeBilling'], meta: { name: 'ChallengeBilling' } } + /** + * Find zero or one ChallengeBilling that matches the filter. + * @param {ChallengeBillingFindUniqueArgs} args - Arguments to find a ChallengeBilling + * @example + * // Get one ChallengeBilling + * const challengeBilling = await prisma.challengeBilling.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeBilling that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeBillingFindUniqueOrThrowArgs} args - Arguments to find a ChallengeBilling + * @example + * // Get one ChallengeBilling + * const challengeBilling = await prisma.challengeBilling.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeBilling that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeBillingFindFirstArgs} args - Arguments to find a ChallengeBilling + * @example + * // Get one ChallengeBilling + * const challengeBilling = await prisma.challengeBilling.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeBilling that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeBillingFindFirstOrThrowArgs} args - Arguments to find a ChallengeBilling + * @example + * // Get one ChallengeBilling + * const challengeBilling = await prisma.challengeBilling.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeBillings that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeBillingFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeBillings + * const challengeBillings = await prisma.challengeBilling.findMany() + * + * // Get first 10 ChallengeBillings + * const challengeBillings = await prisma.challengeBilling.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeBillingWithIdOnly = await prisma.challengeBilling.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeBilling. + * @param {ChallengeBillingCreateArgs} args - Arguments to create a ChallengeBilling. + * @example + * // Create one ChallengeBilling + * const ChallengeBilling = await prisma.challengeBilling.create({ + * data: { + * // ... data to create a ChallengeBilling + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeBillings. + * @param {ChallengeBillingCreateManyArgs} args - Arguments to create many ChallengeBillings. + * @example + * // Create many ChallengeBillings + * const challengeBilling = await prisma.challengeBilling.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeBillings and returns the data saved in the database. + * @param {ChallengeBillingCreateManyAndReturnArgs} args - Arguments to create many ChallengeBillings. + * @example + * // Create many ChallengeBillings + * const challengeBilling = await prisma.challengeBilling.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeBillings and only return the `id` + * const challengeBillingWithIdOnly = await prisma.challengeBilling.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeBilling. + * @param {ChallengeBillingDeleteArgs} args - Arguments to delete one ChallengeBilling. + * @example + * // Delete one ChallengeBilling + * const ChallengeBilling = await prisma.challengeBilling.delete({ + * where: { + * // ... filter to delete one ChallengeBilling + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeBilling. + * @param {ChallengeBillingUpdateArgs} args - Arguments to update one ChallengeBilling. + * @example + * // Update one ChallengeBilling + * const challengeBilling = await prisma.challengeBilling.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeBillings. + * @param {ChallengeBillingDeleteManyArgs} args - Arguments to filter ChallengeBillings to delete. + * @example + * // Delete a few ChallengeBillings + * const { count } = await prisma.challengeBilling.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeBillings. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeBillingUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeBillings + * const challengeBilling = await prisma.challengeBilling.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeBillings and returns the data updated in the database. + * @param {ChallengeBillingUpdateManyAndReturnArgs} args - Arguments to update many ChallengeBillings. + * @example + * // Update many ChallengeBillings + * const challengeBilling = await prisma.challengeBilling.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeBillings and only return the `id` + * const challengeBillingWithIdOnly = await prisma.challengeBilling.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeBilling. + * @param {ChallengeBillingUpsertArgs} args - Arguments to update or create a ChallengeBilling. + * @example + * // Update or create a ChallengeBilling + * const challengeBilling = await prisma.challengeBilling.upsert({ + * create: { + * // ... data to create a ChallengeBilling + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeBilling we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeBillingClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeBillings. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeBillingCountArgs} args - Arguments to filter ChallengeBillings to count. + * @example + * // Count the number of ChallengeBillings + * const count = await prisma.challengeBilling.count({ + * where: { + * // ... the filter for the ChallengeBillings we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeBilling. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeBillingAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeBilling. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeBillingGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeBillingGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeBillingGroupByArgs['orderBy'] } + : { orderBy?: ChallengeBillingGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeBillingGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeBilling model + */ + readonly fields: ChallengeBillingFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeBilling. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeBillingClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeBilling model + */ + interface ChallengeBillingFieldRefs { + readonly id: FieldRef<"ChallengeBilling", 'String'> + readonly billingAccountId: FieldRef<"ChallengeBilling", 'String'> + readonly markup: FieldRef<"ChallengeBilling", 'Float'> + readonly clientBillingRate: FieldRef<"ChallengeBilling", 'Float'> + readonly challengeId: FieldRef<"ChallengeBilling", 'String'> + readonly createdAt: FieldRef<"ChallengeBilling", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeBilling", 'String'> + readonly updatedAt: FieldRef<"ChallengeBilling", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeBilling", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeBilling findUnique + */ + export type ChallengeBillingFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * Filter, which ChallengeBilling to fetch. + */ + where: ChallengeBillingWhereUniqueInput + } + + /** + * ChallengeBilling findUniqueOrThrow + */ + export type ChallengeBillingFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * Filter, which ChallengeBilling to fetch. + */ + where: ChallengeBillingWhereUniqueInput + } + + /** + * ChallengeBilling findFirst + */ + export type ChallengeBillingFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * Filter, which ChallengeBilling to fetch. + */ + where?: ChallengeBillingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeBillings to fetch. + */ + orderBy?: ChallengeBillingOrderByWithRelationInput | ChallengeBillingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeBillings. + */ + cursor?: ChallengeBillingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeBillings from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeBillings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeBillings. + */ + distinct?: ChallengeBillingScalarFieldEnum | ChallengeBillingScalarFieldEnum[] + } + + /** + * ChallengeBilling findFirstOrThrow + */ + export type ChallengeBillingFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * Filter, which ChallengeBilling to fetch. + */ + where?: ChallengeBillingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeBillings to fetch. + */ + orderBy?: ChallengeBillingOrderByWithRelationInput | ChallengeBillingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeBillings. + */ + cursor?: ChallengeBillingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeBillings from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeBillings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeBillings. + */ + distinct?: ChallengeBillingScalarFieldEnum | ChallengeBillingScalarFieldEnum[] + } + + /** + * ChallengeBilling findMany + */ + export type ChallengeBillingFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * Filter, which ChallengeBillings to fetch. + */ + where?: ChallengeBillingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeBillings to fetch. + */ + orderBy?: ChallengeBillingOrderByWithRelationInput | ChallengeBillingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeBillings. + */ + cursor?: ChallengeBillingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeBillings from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeBillings. + */ + skip?: number + distinct?: ChallengeBillingScalarFieldEnum | ChallengeBillingScalarFieldEnum[] + } + + /** + * ChallengeBilling create + */ + export type ChallengeBillingCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * The data needed to create a ChallengeBilling. + */ + data: XOR + } + + /** + * ChallengeBilling createMany + */ + export type ChallengeBillingCreateManyArgs = { + /** + * The data used to create many ChallengeBillings. + */ + data: ChallengeBillingCreateManyInput | ChallengeBillingCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeBilling createManyAndReturn + */ + export type ChallengeBillingCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * The data used to create many ChallengeBillings. + */ + data: ChallengeBillingCreateManyInput | ChallengeBillingCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingIncludeCreateManyAndReturn | null + } + + /** + * ChallengeBilling update + */ + export type ChallengeBillingUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * The data needed to update a ChallengeBilling. + */ + data: XOR + /** + * Choose, which ChallengeBilling to update. + */ + where: ChallengeBillingWhereUniqueInput + } + + /** + * ChallengeBilling updateMany + */ + export type ChallengeBillingUpdateManyArgs = { + /** + * The data used to update ChallengeBillings. + */ + data: XOR + /** + * Filter which ChallengeBillings to update + */ + where?: ChallengeBillingWhereInput + /** + * Limit how many ChallengeBillings to update. + */ + limit?: number + } + + /** + * ChallengeBilling updateManyAndReturn + */ + export type ChallengeBillingUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * The data used to update ChallengeBillings. + */ + data: XOR + /** + * Filter which ChallengeBillings to update + */ + where?: ChallengeBillingWhereInput + /** + * Limit how many ChallengeBillings to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeBilling upsert + */ + export type ChallengeBillingUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * The filter to search for the ChallengeBilling to update in case it exists. + */ + where: ChallengeBillingWhereUniqueInput + /** + * In case the ChallengeBilling found by the `where` argument doesn't exist, create a new ChallengeBilling with this data. + */ + create: XOR + /** + * In case the ChallengeBilling was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeBilling delete + */ + export type ChallengeBillingDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + /** + * Filter which ChallengeBilling to delete. + */ + where: ChallengeBillingWhereUniqueInput + } + + /** + * ChallengeBilling deleteMany + */ + export type ChallengeBillingDeleteManyArgs = { + /** + * Filter which ChallengeBillings to delete + */ + where?: ChallengeBillingWhereInput + /** + * Limit how many ChallengeBillings to delete. + */ + limit?: number + } + + /** + * ChallengeBilling without action + */ + export type ChallengeBillingDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeBilling + */ + select?: ChallengeBillingSelect | null + /** + * Omit specific fields from the ChallengeBilling + */ + omit?: ChallengeBillingOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeBillingInclude | null + } + + + /** + * Model ChallengeLegacy + */ + + export type AggregateChallengeLegacy = { + _count: ChallengeLegacyCountAggregateOutputType | null + _avg: ChallengeLegacyAvgAggregateOutputType | null + _sum: ChallengeLegacySumAggregateOutputType | null + _min: ChallengeLegacyMinAggregateOutputType | null + _max: ChallengeLegacyMaxAggregateOutputType | null + } + + export type ChallengeLegacyAvgAggregateOutputType = { + forumId: number | null + directProjectId: number | null + screeningScorecardId: number | null + reviewScorecardId: number | null + legacySystemId: number | null + } + + export type ChallengeLegacySumAggregateOutputType = { + forumId: number | null + directProjectId: number | null + screeningScorecardId: number | null + reviewScorecardId: number | null + legacySystemId: number | null + } + + export type ChallengeLegacyMinAggregateOutputType = { + id: string | null + reviewType: $Enums.ReviewTypeEnum | null + confidentialityType: string | null + forumId: number | null + directProjectId: number | null + screeningScorecardId: number | null + reviewScorecardId: number | null + isTask: boolean | null + useSchedulingAPI: boolean | null + pureV5Task: boolean | null + pureV5: boolean | null + selfService: boolean | null + selfServiceCopilot: string | null + track: string | null + subTrack: string | null + legacySystemId: number | null + challengeId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeLegacyMaxAggregateOutputType = { + id: string | null + reviewType: $Enums.ReviewTypeEnum | null + confidentialityType: string | null + forumId: number | null + directProjectId: number | null + screeningScorecardId: number | null + reviewScorecardId: number | null + isTask: boolean | null + useSchedulingAPI: boolean | null + pureV5Task: boolean | null + pureV5: boolean | null + selfService: boolean | null + selfServiceCopilot: string | null + track: string | null + subTrack: string | null + legacySystemId: number | null + challengeId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeLegacyCountAggregateOutputType = { + id: number + reviewType: number + confidentialityType: number + forumId: number + directProjectId: number + screeningScorecardId: number + reviewScorecardId: number + isTask: number + useSchedulingAPI: number + pureV5Task: number + pureV5: number + selfService: number + selfServiceCopilot: number + track: number + subTrack: number + legacySystemId: number + challengeId: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeLegacyAvgAggregateInputType = { + forumId?: true + directProjectId?: true + screeningScorecardId?: true + reviewScorecardId?: true + legacySystemId?: true + } + + export type ChallengeLegacySumAggregateInputType = { + forumId?: true + directProjectId?: true + screeningScorecardId?: true + reviewScorecardId?: true + legacySystemId?: true + } + + export type ChallengeLegacyMinAggregateInputType = { + id?: true + reviewType?: true + confidentialityType?: true + forumId?: true + directProjectId?: true + screeningScorecardId?: true + reviewScorecardId?: true + isTask?: true + useSchedulingAPI?: true + pureV5Task?: true + pureV5?: true + selfService?: true + selfServiceCopilot?: true + track?: true + subTrack?: true + legacySystemId?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeLegacyMaxAggregateInputType = { + id?: true + reviewType?: true + confidentialityType?: true + forumId?: true + directProjectId?: true + screeningScorecardId?: true + reviewScorecardId?: true + isTask?: true + useSchedulingAPI?: true + pureV5Task?: true + pureV5?: true + selfService?: true + selfServiceCopilot?: true + track?: true + subTrack?: true + legacySystemId?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeLegacyCountAggregateInputType = { + id?: true + reviewType?: true + confidentialityType?: true + forumId?: true + directProjectId?: true + screeningScorecardId?: true + reviewScorecardId?: true + isTask?: true + useSchedulingAPI?: true + pureV5Task?: true + pureV5?: true + selfService?: true + selfServiceCopilot?: true + track?: true + subTrack?: true + legacySystemId?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeLegacyAggregateArgs = { + /** + * Filter which ChallengeLegacy to aggregate. + */ + where?: ChallengeLegacyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeLegacies to fetch. + */ + orderBy?: ChallengeLegacyOrderByWithRelationInput | ChallengeLegacyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeLegacyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeLegacies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeLegacies. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeLegacies + **/ + _count?: true | ChallengeLegacyCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengeLegacyAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengeLegacySumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeLegacyMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeLegacyMaxAggregateInputType + } + + export type GetChallengeLegacyAggregateType = { + [P in keyof T & keyof AggregateChallengeLegacy]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeLegacyGroupByArgs = { + where?: ChallengeLegacyWhereInput + orderBy?: ChallengeLegacyOrderByWithAggregationInput | ChallengeLegacyOrderByWithAggregationInput[] + by: ChallengeLegacyScalarFieldEnum[] | ChallengeLegacyScalarFieldEnum + having?: ChallengeLegacyScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeLegacyCountAggregateInputType | true + _avg?: ChallengeLegacyAvgAggregateInputType + _sum?: ChallengeLegacySumAggregateInputType + _min?: ChallengeLegacyMinAggregateInputType + _max?: ChallengeLegacyMaxAggregateInputType + } + + export type ChallengeLegacyGroupByOutputType = { + id: string + reviewType: $Enums.ReviewTypeEnum + confidentialityType: string + forumId: number | null + directProjectId: number | null + screeningScorecardId: number | null + reviewScorecardId: number | null + isTask: boolean + useSchedulingAPI: boolean + pureV5Task: boolean + pureV5: boolean + selfService: boolean + selfServiceCopilot: string | null + track: string | null + subTrack: string | null + legacySystemId: number | null + challengeId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeLegacyCountAggregateOutputType | null + _avg: ChallengeLegacyAvgAggregateOutputType | null + _sum: ChallengeLegacySumAggregateOutputType | null + _min: ChallengeLegacyMinAggregateOutputType | null + _max: ChallengeLegacyMaxAggregateOutputType | null + } + + type GetChallengeLegacyGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeLegacyGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeLegacySelect = $Extensions.GetSelect<{ + id?: boolean + reviewType?: boolean + confidentialityType?: boolean + forumId?: boolean + directProjectId?: boolean + screeningScorecardId?: boolean + reviewScorecardId?: boolean + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: boolean + track?: boolean + subTrack?: boolean + legacySystemId?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeLegacy"]> + + export type ChallengeLegacySelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + reviewType?: boolean + confidentialityType?: boolean + forumId?: boolean + directProjectId?: boolean + screeningScorecardId?: boolean + reviewScorecardId?: boolean + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: boolean + track?: boolean + subTrack?: boolean + legacySystemId?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeLegacy"]> + + export type ChallengeLegacySelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + reviewType?: boolean + confidentialityType?: boolean + forumId?: boolean + directProjectId?: boolean + screeningScorecardId?: boolean + reviewScorecardId?: boolean + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: boolean + track?: boolean + subTrack?: boolean + legacySystemId?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeLegacy"]> + + export type ChallengeLegacySelectScalar = { + id?: boolean + reviewType?: boolean + confidentialityType?: boolean + forumId?: boolean + directProjectId?: boolean + screeningScorecardId?: boolean + reviewScorecardId?: boolean + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: boolean + track?: boolean + subTrack?: boolean + legacySystemId?: boolean + challengeId?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeLegacyOmit = $Extensions.GetOmit<"id" | "reviewType" | "confidentialityType" | "forumId" | "directProjectId" | "screeningScorecardId" | "reviewScorecardId" | "isTask" | "useSchedulingAPI" | "pureV5Task" | "pureV5" | "selfService" | "selfServiceCopilot" | "track" | "subTrack" | "legacySystemId" | "challengeId" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeLegacy"]> + export type ChallengeLegacyInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeLegacyIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeLegacyIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeLegacyPayload = { + name: "ChallengeLegacy" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + reviewType: $Enums.ReviewTypeEnum + confidentialityType: string + forumId: number | null + directProjectId: number | null + screeningScorecardId: number | null + reviewScorecardId: number | null + isTask: boolean + useSchedulingAPI: boolean + pureV5Task: boolean + pureV5: boolean + selfService: boolean + selfServiceCopilot: string | null + track: string | null + subTrack: string | null + legacySystemId: number | null + challengeId: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeLegacy"]> + composites: {} + } + + type ChallengeLegacyGetPayload = $Result.GetResult + + type ChallengeLegacyCountArgs = + Omit & { + select?: ChallengeLegacyCountAggregateInputType | true + } + + export interface ChallengeLegacyDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeLegacy'], meta: { name: 'ChallengeLegacy' } } + /** + * Find zero or one ChallengeLegacy that matches the filter. + * @param {ChallengeLegacyFindUniqueArgs} args - Arguments to find a ChallengeLegacy + * @example + * // Get one ChallengeLegacy + * const challengeLegacy = await prisma.challengeLegacy.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeLegacy that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeLegacyFindUniqueOrThrowArgs} args - Arguments to find a ChallengeLegacy + * @example + * // Get one ChallengeLegacy + * const challengeLegacy = await prisma.challengeLegacy.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeLegacy that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeLegacyFindFirstArgs} args - Arguments to find a ChallengeLegacy + * @example + * // Get one ChallengeLegacy + * const challengeLegacy = await prisma.challengeLegacy.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeLegacy that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeLegacyFindFirstOrThrowArgs} args - Arguments to find a ChallengeLegacy + * @example + * // Get one ChallengeLegacy + * const challengeLegacy = await prisma.challengeLegacy.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeLegacies that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeLegacyFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeLegacies + * const challengeLegacies = await prisma.challengeLegacy.findMany() + * + * // Get first 10 ChallengeLegacies + * const challengeLegacies = await prisma.challengeLegacy.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeLegacyWithIdOnly = await prisma.challengeLegacy.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeLegacy. + * @param {ChallengeLegacyCreateArgs} args - Arguments to create a ChallengeLegacy. + * @example + * // Create one ChallengeLegacy + * const ChallengeLegacy = await prisma.challengeLegacy.create({ + * data: { + * // ... data to create a ChallengeLegacy + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeLegacies. + * @param {ChallengeLegacyCreateManyArgs} args - Arguments to create many ChallengeLegacies. + * @example + * // Create many ChallengeLegacies + * const challengeLegacy = await prisma.challengeLegacy.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeLegacies and returns the data saved in the database. + * @param {ChallengeLegacyCreateManyAndReturnArgs} args - Arguments to create many ChallengeLegacies. + * @example + * // Create many ChallengeLegacies + * const challengeLegacy = await prisma.challengeLegacy.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeLegacies and only return the `id` + * const challengeLegacyWithIdOnly = await prisma.challengeLegacy.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeLegacy. + * @param {ChallengeLegacyDeleteArgs} args - Arguments to delete one ChallengeLegacy. + * @example + * // Delete one ChallengeLegacy + * const ChallengeLegacy = await prisma.challengeLegacy.delete({ + * where: { + * // ... filter to delete one ChallengeLegacy + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeLegacy. + * @param {ChallengeLegacyUpdateArgs} args - Arguments to update one ChallengeLegacy. + * @example + * // Update one ChallengeLegacy + * const challengeLegacy = await prisma.challengeLegacy.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeLegacies. + * @param {ChallengeLegacyDeleteManyArgs} args - Arguments to filter ChallengeLegacies to delete. + * @example + * // Delete a few ChallengeLegacies + * const { count } = await prisma.challengeLegacy.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeLegacies. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeLegacyUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeLegacies + * const challengeLegacy = await prisma.challengeLegacy.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeLegacies and returns the data updated in the database. + * @param {ChallengeLegacyUpdateManyAndReturnArgs} args - Arguments to update many ChallengeLegacies. + * @example + * // Update many ChallengeLegacies + * const challengeLegacy = await prisma.challengeLegacy.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeLegacies and only return the `id` + * const challengeLegacyWithIdOnly = await prisma.challengeLegacy.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeLegacy. + * @param {ChallengeLegacyUpsertArgs} args - Arguments to update or create a ChallengeLegacy. + * @example + * // Update or create a ChallengeLegacy + * const challengeLegacy = await prisma.challengeLegacy.upsert({ + * create: { + * // ... data to create a ChallengeLegacy + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeLegacy we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeLegacyClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeLegacies. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeLegacyCountArgs} args - Arguments to filter ChallengeLegacies to count. + * @example + * // Count the number of ChallengeLegacies + * const count = await prisma.challengeLegacy.count({ + * where: { + * // ... the filter for the ChallengeLegacies we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeLegacy. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeLegacyAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeLegacy. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeLegacyGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeLegacyGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeLegacyGroupByArgs['orderBy'] } + : { orderBy?: ChallengeLegacyGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeLegacyGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeLegacy model + */ + readonly fields: ChallengeLegacyFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeLegacy. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeLegacyClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeLegacy model + */ + interface ChallengeLegacyFieldRefs { + readonly id: FieldRef<"ChallengeLegacy", 'String'> + readonly reviewType: FieldRef<"ChallengeLegacy", 'ReviewTypeEnum'> + readonly confidentialityType: FieldRef<"ChallengeLegacy", 'String'> + readonly forumId: FieldRef<"ChallengeLegacy", 'Int'> + readonly directProjectId: FieldRef<"ChallengeLegacy", 'Int'> + readonly screeningScorecardId: FieldRef<"ChallengeLegacy", 'Int'> + readonly reviewScorecardId: FieldRef<"ChallengeLegacy", 'Int'> + readonly isTask: FieldRef<"ChallengeLegacy", 'Boolean'> + readonly useSchedulingAPI: FieldRef<"ChallengeLegacy", 'Boolean'> + readonly pureV5Task: FieldRef<"ChallengeLegacy", 'Boolean'> + readonly pureV5: FieldRef<"ChallengeLegacy", 'Boolean'> + readonly selfService: FieldRef<"ChallengeLegacy", 'Boolean'> + readonly selfServiceCopilot: FieldRef<"ChallengeLegacy", 'String'> + readonly track: FieldRef<"ChallengeLegacy", 'String'> + readonly subTrack: FieldRef<"ChallengeLegacy", 'String'> + readonly legacySystemId: FieldRef<"ChallengeLegacy", 'Int'> + readonly challengeId: FieldRef<"ChallengeLegacy", 'String'> + readonly createdAt: FieldRef<"ChallengeLegacy", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeLegacy", 'String'> + readonly updatedAt: FieldRef<"ChallengeLegacy", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeLegacy", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeLegacy findUnique + */ + export type ChallengeLegacyFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * Filter, which ChallengeLegacy to fetch. + */ + where: ChallengeLegacyWhereUniqueInput + } + + /** + * ChallengeLegacy findUniqueOrThrow + */ + export type ChallengeLegacyFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * Filter, which ChallengeLegacy to fetch. + */ + where: ChallengeLegacyWhereUniqueInput + } + + /** + * ChallengeLegacy findFirst + */ + export type ChallengeLegacyFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * Filter, which ChallengeLegacy to fetch. + */ + where?: ChallengeLegacyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeLegacies to fetch. + */ + orderBy?: ChallengeLegacyOrderByWithRelationInput | ChallengeLegacyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeLegacies. + */ + cursor?: ChallengeLegacyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeLegacies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeLegacies. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeLegacies. + */ + distinct?: ChallengeLegacyScalarFieldEnum | ChallengeLegacyScalarFieldEnum[] + } + + /** + * ChallengeLegacy findFirstOrThrow + */ + export type ChallengeLegacyFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * Filter, which ChallengeLegacy to fetch. + */ + where?: ChallengeLegacyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeLegacies to fetch. + */ + orderBy?: ChallengeLegacyOrderByWithRelationInput | ChallengeLegacyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeLegacies. + */ + cursor?: ChallengeLegacyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeLegacies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeLegacies. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeLegacies. + */ + distinct?: ChallengeLegacyScalarFieldEnum | ChallengeLegacyScalarFieldEnum[] + } + + /** + * ChallengeLegacy findMany + */ + export type ChallengeLegacyFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * Filter, which ChallengeLegacies to fetch. + */ + where?: ChallengeLegacyWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeLegacies to fetch. + */ + orderBy?: ChallengeLegacyOrderByWithRelationInput | ChallengeLegacyOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeLegacies. + */ + cursor?: ChallengeLegacyWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeLegacies from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeLegacies. + */ + skip?: number + distinct?: ChallengeLegacyScalarFieldEnum | ChallengeLegacyScalarFieldEnum[] + } + + /** + * ChallengeLegacy create + */ + export type ChallengeLegacyCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * The data needed to create a ChallengeLegacy. + */ + data: XOR + } + + /** + * ChallengeLegacy createMany + */ + export type ChallengeLegacyCreateManyArgs = { + /** + * The data used to create many ChallengeLegacies. + */ + data: ChallengeLegacyCreateManyInput | ChallengeLegacyCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeLegacy createManyAndReturn + */ + export type ChallengeLegacyCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * The data used to create many ChallengeLegacies. + */ + data: ChallengeLegacyCreateManyInput | ChallengeLegacyCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyIncludeCreateManyAndReturn | null + } + + /** + * ChallengeLegacy update + */ + export type ChallengeLegacyUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * The data needed to update a ChallengeLegacy. + */ + data: XOR + /** + * Choose, which ChallengeLegacy to update. + */ + where: ChallengeLegacyWhereUniqueInput + } + + /** + * ChallengeLegacy updateMany + */ + export type ChallengeLegacyUpdateManyArgs = { + /** + * The data used to update ChallengeLegacies. + */ + data: XOR + /** + * Filter which ChallengeLegacies to update + */ + where?: ChallengeLegacyWhereInput + /** + * Limit how many ChallengeLegacies to update. + */ + limit?: number + } + + /** + * ChallengeLegacy updateManyAndReturn + */ + export type ChallengeLegacyUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * The data used to update ChallengeLegacies. + */ + data: XOR + /** + * Filter which ChallengeLegacies to update + */ + where?: ChallengeLegacyWhereInput + /** + * Limit how many ChallengeLegacies to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeLegacy upsert + */ + export type ChallengeLegacyUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * The filter to search for the ChallengeLegacy to update in case it exists. + */ + where: ChallengeLegacyWhereUniqueInput + /** + * In case the ChallengeLegacy found by the `where` argument doesn't exist, create a new ChallengeLegacy with this data. + */ + create: XOR + /** + * In case the ChallengeLegacy was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeLegacy delete + */ + export type ChallengeLegacyDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + /** + * Filter which ChallengeLegacy to delete. + */ + where: ChallengeLegacyWhereUniqueInput + } + + /** + * ChallengeLegacy deleteMany + */ + export type ChallengeLegacyDeleteManyArgs = { + /** + * Filter which ChallengeLegacies to delete + */ + where?: ChallengeLegacyWhereInput + /** + * Limit how many ChallengeLegacies to delete. + */ + limit?: number + } + + /** + * ChallengeLegacy without action + */ + export type ChallengeLegacyDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeLegacy + */ + select?: ChallengeLegacySelect | null + /** + * Omit specific fields from the ChallengeLegacy + */ + omit?: ChallengeLegacyOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeLegacyInclude | null + } + + + /** + * Model ChallengeEvent + */ + + export type AggregateChallengeEvent = { + _count: ChallengeEventCountAggregateOutputType | null + _avg: ChallengeEventAvgAggregateOutputType | null + _sum: ChallengeEventSumAggregateOutputType | null + _min: ChallengeEventMinAggregateOutputType | null + _max: ChallengeEventMaxAggregateOutputType | null + } + + export type ChallengeEventAvgAggregateOutputType = { + eventId: number | null + } + + export type ChallengeEventSumAggregateOutputType = { + eventId: number | null + } + + export type ChallengeEventMinAggregateOutputType = { + id: string | null + challengeId: string | null + eventId: number | null + name: string | null + key: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeEventMaxAggregateOutputType = { + id: string | null + challengeId: string | null + eventId: number | null + name: string | null + key: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeEventCountAggregateOutputType = { + id: number + challengeId: number + eventId: number + name: number + key: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeEventAvgAggregateInputType = { + eventId?: true + } + + export type ChallengeEventSumAggregateInputType = { + eventId?: true + } + + export type ChallengeEventMinAggregateInputType = { + id?: true + challengeId?: true + eventId?: true + name?: true + key?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeEventMaxAggregateInputType = { + id?: true + challengeId?: true + eventId?: true + name?: true + key?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeEventCountAggregateInputType = { + id?: true + challengeId?: true + eventId?: true + name?: true + key?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeEventAggregateArgs = { + /** + * Filter which ChallengeEvent to aggregate. + */ + where?: ChallengeEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeEvents to fetch. + */ + orderBy?: ChallengeEventOrderByWithRelationInput | ChallengeEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeEvents + **/ + _count?: true | ChallengeEventCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengeEventAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengeEventSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeEventMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeEventMaxAggregateInputType + } + + export type GetChallengeEventAggregateType = { + [P in keyof T & keyof AggregateChallengeEvent]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeEventGroupByArgs = { + where?: ChallengeEventWhereInput + orderBy?: ChallengeEventOrderByWithAggregationInput | ChallengeEventOrderByWithAggregationInput[] + by: ChallengeEventScalarFieldEnum[] | ChallengeEventScalarFieldEnum + having?: ChallengeEventScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeEventCountAggregateInputType | true + _avg?: ChallengeEventAvgAggregateInputType + _sum?: ChallengeEventSumAggregateInputType + _min?: ChallengeEventMinAggregateInputType + _max?: ChallengeEventMaxAggregateInputType + } + + export type ChallengeEventGroupByOutputType = { + id: string + challengeId: string + eventId: number + name: string | null + key: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeEventCountAggregateOutputType | null + _avg: ChallengeEventAvgAggregateOutputType | null + _sum: ChallengeEventSumAggregateOutputType | null + _min: ChallengeEventMinAggregateOutputType | null + _max: ChallengeEventMaxAggregateOutputType | null + } + + type GetChallengeEventGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeEventGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeEventSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + eventId?: boolean + name?: boolean + key?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeEvent"]> + + export type ChallengeEventSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + eventId?: boolean + name?: boolean + key?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeEvent"]> + + export type ChallengeEventSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + eventId?: boolean + name?: boolean + key?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeEvent"]> + + export type ChallengeEventSelectScalar = { + id?: boolean + challengeId?: boolean + eventId?: boolean + name?: boolean + key?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeEventOmit = $Extensions.GetOmit<"id" | "challengeId" | "eventId" | "name" | "key" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeEvent"]> + export type ChallengeEventInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeEventIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeEventIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeEventPayload = { + name: "ChallengeEvent" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + eventId: number + name: string | null + key: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeEvent"]> + composites: {} + } + + type ChallengeEventGetPayload = $Result.GetResult + + type ChallengeEventCountArgs = + Omit & { + select?: ChallengeEventCountAggregateInputType | true + } + + export interface ChallengeEventDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeEvent'], meta: { name: 'ChallengeEvent' } } + /** + * Find zero or one ChallengeEvent that matches the filter. + * @param {ChallengeEventFindUniqueArgs} args - Arguments to find a ChallengeEvent + * @example + * // Get one ChallengeEvent + * const challengeEvent = await prisma.challengeEvent.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeEvent that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeEventFindUniqueOrThrowArgs} args - Arguments to find a ChallengeEvent + * @example + * // Get one ChallengeEvent + * const challengeEvent = await prisma.challengeEvent.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeEvent that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeEventFindFirstArgs} args - Arguments to find a ChallengeEvent + * @example + * // Get one ChallengeEvent + * const challengeEvent = await prisma.challengeEvent.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeEvent that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeEventFindFirstOrThrowArgs} args - Arguments to find a ChallengeEvent + * @example + * // Get one ChallengeEvent + * const challengeEvent = await prisma.challengeEvent.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeEvents that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeEventFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeEvents + * const challengeEvents = await prisma.challengeEvent.findMany() + * + * // Get first 10 ChallengeEvents + * const challengeEvents = await prisma.challengeEvent.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeEventWithIdOnly = await prisma.challengeEvent.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeEvent. + * @param {ChallengeEventCreateArgs} args - Arguments to create a ChallengeEvent. + * @example + * // Create one ChallengeEvent + * const ChallengeEvent = await prisma.challengeEvent.create({ + * data: { + * // ... data to create a ChallengeEvent + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeEvents. + * @param {ChallengeEventCreateManyArgs} args - Arguments to create many ChallengeEvents. + * @example + * // Create many ChallengeEvents + * const challengeEvent = await prisma.challengeEvent.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeEvents and returns the data saved in the database. + * @param {ChallengeEventCreateManyAndReturnArgs} args - Arguments to create many ChallengeEvents. + * @example + * // Create many ChallengeEvents + * const challengeEvent = await prisma.challengeEvent.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeEvents and only return the `id` + * const challengeEventWithIdOnly = await prisma.challengeEvent.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeEvent. + * @param {ChallengeEventDeleteArgs} args - Arguments to delete one ChallengeEvent. + * @example + * // Delete one ChallengeEvent + * const ChallengeEvent = await prisma.challengeEvent.delete({ + * where: { + * // ... filter to delete one ChallengeEvent + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeEvent. + * @param {ChallengeEventUpdateArgs} args - Arguments to update one ChallengeEvent. + * @example + * // Update one ChallengeEvent + * const challengeEvent = await prisma.challengeEvent.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeEvents. + * @param {ChallengeEventDeleteManyArgs} args - Arguments to filter ChallengeEvents to delete. + * @example + * // Delete a few ChallengeEvents + * const { count } = await prisma.challengeEvent.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeEventUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeEvents + * const challengeEvent = await prisma.challengeEvent.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeEvents and returns the data updated in the database. + * @param {ChallengeEventUpdateManyAndReturnArgs} args - Arguments to update many ChallengeEvents. + * @example + * // Update many ChallengeEvents + * const challengeEvent = await prisma.challengeEvent.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeEvents and only return the `id` + * const challengeEventWithIdOnly = await prisma.challengeEvent.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeEvent. + * @param {ChallengeEventUpsertArgs} args - Arguments to update or create a ChallengeEvent. + * @example + * // Update or create a ChallengeEvent + * const challengeEvent = await prisma.challengeEvent.upsert({ + * create: { + * // ... data to create a ChallengeEvent + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeEvent we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeEventClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeEventCountArgs} args - Arguments to filter ChallengeEvents to count. + * @example + * // Count the number of ChallengeEvents + * const count = await prisma.challengeEvent.count({ + * where: { + * // ... the filter for the ChallengeEvents we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeEventAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeEventGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeEventGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeEventGroupByArgs['orderBy'] } + : { orderBy?: ChallengeEventGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeEventGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeEvent model + */ + readonly fields: ChallengeEventFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeEvent. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeEventClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeEvent model + */ + interface ChallengeEventFieldRefs { + readonly id: FieldRef<"ChallengeEvent", 'String'> + readonly challengeId: FieldRef<"ChallengeEvent", 'String'> + readonly eventId: FieldRef<"ChallengeEvent", 'Int'> + readonly name: FieldRef<"ChallengeEvent", 'String'> + readonly key: FieldRef<"ChallengeEvent", 'String'> + readonly createdAt: FieldRef<"ChallengeEvent", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeEvent", 'String'> + readonly updatedAt: FieldRef<"ChallengeEvent", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeEvent", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeEvent findUnique + */ + export type ChallengeEventFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * Filter, which ChallengeEvent to fetch. + */ + where: ChallengeEventWhereUniqueInput + } + + /** + * ChallengeEvent findUniqueOrThrow + */ + export type ChallengeEventFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * Filter, which ChallengeEvent to fetch. + */ + where: ChallengeEventWhereUniqueInput + } + + /** + * ChallengeEvent findFirst + */ + export type ChallengeEventFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * Filter, which ChallengeEvent to fetch. + */ + where?: ChallengeEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeEvents to fetch. + */ + orderBy?: ChallengeEventOrderByWithRelationInput | ChallengeEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeEvents. + */ + cursor?: ChallengeEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeEvents. + */ + distinct?: ChallengeEventScalarFieldEnum | ChallengeEventScalarFieldEnum[] + } + + /** + * ChallengeEvent findFirstOrThrow + */ + export type ChallengeEventFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * Filter, which ChallengeEvent to fetch. + */ + where?: ChallengeEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeEvents to fetch. + */ + orderBy?: ChallengeEventOrderByWithRelationInput | ChallengeEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeEvents. + */ + cursor?: ChallengeEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeEvents. + */ + distinct?: ChallengeEventScalarFieldEnum | ChallengeEventScalarFieldEnum[] + } + + /** + * ChallengeEvent findMany + */ + export type ChallengeEventFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * Filter, which ChallengeEvents to fetch. + */ + where?: ChallengeEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeEvents to fetch. + */ + orderBy?: ChallengeEventOrderByWithRelationInput | ChallengeEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeEvents. + */ + cursor?: ChallengeEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeEvents. + */ + skip?: number + distinct?: ChallengeEventScalarFieldEnum | ChallengeEventScalarFieldEnum[] + } + + /** + * ChallengeEvent create + */ + export type ChallengeEventCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * The data needed to create a ChallengeEvent. + */ + data: XOR + } + + /** + * ChallengeEvent createMany + */ + export type ChallengeEventCreateManyArgs = { + /** + * The data used to create many ChallengeEvents. + */ + data: ChallengeEventCreateManyInput | ChallengeEventCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeEvent createManyAndReturn + */ + export type ChallengeEventCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * The data used to create many ChallengeEvents. + */ + data: ChallengeEventCreateManyInput | ChallengeEventCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventIncludeCreateManyAndReturn | null + } + + /** + * ChallengeEvent update + */ + export type ChallengeEventUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * The data needed to update a ChallengeEvent. + */ + data: XOR + /** + * Choose, which ChallengeEvent to update. + */ + where: ChallengeEventWhereUniqueInput + } + + /** + * ChallengeEvent updateMany + */ + export type ChallengeEventUpdateManyArgs = { + /** + * The data used to update ChallengeEvents. + */ + data: XOR + /** + * Filter which ChallengeEvents to update + */ + where?: ChallengeEventWhereInput + /** + * Limit how many ChallengeEvents to update. + */ + limit?: number + } + + /** + * ChallengeEvent updateManyAndReturn + */ + export type ChallengeEventUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * The data used to update ChallengeEvents. + */ + data: XOR + /** + * Filter which ChallengeEvents to update + */ + where?: ChallengeEventWhereInput + /** + * Limit how many ChallengeEvents to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeEvent upsert + */ + export type ChallengeEventUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * The filter to search for the ChallengeEvent to update in case it exists. + */ + where: ChallengeEventWhereUniqueInput + /** + * In case the ChallengeEvent found by the `where` argument doesn't exist, create a new ChallengeEvent with this data. + */ + create: XOR + /** + * In case the ChallengeEvent was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeEvent delete + */ + export type ChallengeEventDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + /** + * Filter which ChallengeEvent to delete. + */ + where: ChallengeEventWhereUniqueInput + } + + /** + * ChallengeEvent deleteMany + */ + export type ChallengeEventDeleteManyArgs = { + /** + * Filter which ChallengeEvents to delete + */ + where?: ChallengeEventWhereInput + /** + * Limit how many ChallengeEvents to delete. + */ + limit?: number + } + + /** + * ChallengeEvent without action + */ + export type ChallengeEventDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeEvent + */ + select?: ChallengeEventSelect | null + /** + * Omit specific fields from the ChallengeEvent + */ + omit?: ChallengeEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeEventInclude | null + } + + + /** + * Model ChallengeDiscussion + */ + + export type AggregateChallengeDiscussion = { + _count: ChallengeDiscussionCountAggregateOutputType | null + _min: ChallengeDiscussionMinAggregateOutputType | null + _max: ChallengeDiscussionMaxAggregateOutputType | null + } + + export type ChallengeDiscussionMinAggregateOutputType = { + id: string | null + challengeId: string | null + discussionId: string | null + name: string | null + type: $Enums.DiscussionTypeEnum | null + provider: string | null + url: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeDiscussionMaxAggregateOutputType = { + id: string | null + challengeId: string | null + discussionId: string | null + name: string | null + type: $Enums.DiscussionTypeEnum | null + provider: string | null + url: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeDiscussionCountAggregateOutputType = { + id: number + challengeId: number + discussionId: number + name: number + type: number + provider: number + url: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeDiscussionMinAggregateInputType = { + id?: true + challengeId?: true + discussionId?: true + name?: true + type?: true + provider?: true + url?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeDiscussionMaxAggregateInputType = { + id?: true + challengeId?: true + discussionId?: true + name?: true + type?: true + provider?: true + url?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeDiscussionCountAggregateInputType = { + id?: true + challengeId?: true + discussionId?: true + name?: true + type?: true + provider?: true + url?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeDiscussionAggregateArgs = { + /** + * Filter which ChallengeDiscussion to aggregate. + */ + where?: ChallengeDiscussionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussions to fetch. + */ + orderBy?: ChallengeDiscussionOrderByWithRelationInput | ChallengeDiscussionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeDiscussionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeDiscussions + **/ + _count?: true | ChallengeDiscussionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeDiscussionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeDiscussionMaxAggregateInputType + } + + export type GetChallengeDiscussionAggregateType = { + [P in keyof T & keyof AggregateChallengeDiscussion]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeDiscussionGroupByArgs = { + where?: ChallengeDiscussionWhereInput + orderBy?: ChallengeDiscussionOrderByWithAggregationInput | ChallengeDiscussionOrderByWithAggregationInput[] + by: ChallengeDiscussionScalarFieldEnum[] | ChallengeDiscussionScalarFieldEnum + having?: ChallengeDiscussionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeDiscussionCountAggregateInputType | true + _min?: ChallengeDiscussionMinAggregateInputType + _max?: ChallengeDiscussionMaxAggregateInputType + } + + export type ChallengeDiscussionGroupByOutputType = { + id: string + challengeId: string + discussionId: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeDiscussionCountAggregateOutputType | null + _min: ChallengeDiscussionMinAggregateOutputType | null + _max: ChallengeDiscussionMaxAggregateOutputType | null + } + + type GetChallengeDiscussionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeDiscussionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeDiscussionSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + discussionId?: boolean + name?: boolean + type?: boolean + provider?: boolean + url?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + options?: boolean | ChallengeDiscussion$optionsArgs + _count?: boolean | ChallengeDiscussionCountOutputTypeDefaultArgs + }, ExtArgs["result"]["challengeDiscussion"]> + + export type ChallengeDiscussionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + discussionId?: boolean + name?: boolean + type?: boolean + provider?: boolean + url?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeDiscussion"]> + + export type ChallengeDiscussionSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + discussionId?: boolean + name?: boolean + type?: boolean + provider?: boolean + url?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeDiscussion"]> + + export type ChallengeDiscussionSelectScalar = { + id?: boolean + challengeId?: boolean + discussionId?: boolean + name?: boolean + type?: boolean + provider?: boolean + url?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeDiscussionOmit = $Extensions.GetOmit<"id" | "challengeId" | "discussionId" | "name" | "type" | "provider" | "url" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeDiscussion"]> + export type ChallengeDiscussionInclude = { + challenge?: boolean | ChallengeDefaultArgs + options?: boolean | ChallengeDiscussion$optionsArgs + _count?: boolean | ChallengeDiscussionCountOutputTypeDefaultArgs + } + export type ChallengeDiscussionIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeDiscussionIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeDiscussionPayload = { + name: "ChallengeDiscussion" + objects: { + challenge: Prisma.$ChallengePayload + options: Prisma.$ChallengeDiscussionOptionPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + discussionId: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeDiscussion"]> + composites: {} + } + + type ChallengeDiscussionGetPayload = $Result.GetResult + + type ChallengeDiscussionCountArgs = + Omit & { + select?: ChallengeDiscussionCountAggregateInputType | true + } + + export interface ChallengeDiscussionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeDiscussion'], meta: { name: 'ChallengeDiscussion' } } + /** + * Find zero or one ChallengeDiscussion that matches the filter. + * @param {ChallengeDiscussionFindUniqueArgs} args - Arguments to find a ChallengeDiscussion + * @example + * // Get one ChallengeDiscussion + * const challengeDiscussion = await prisma.challengeDiscussion.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeDiscussion that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeDiscussionFindUniqueOrThrowArgs} args - Arguments to find a ChallengeDiscussion + * @example + * // Get one ChallengeDiscussion + * const challengeDiscussion = await prisma.challengeDiscussion.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeDiscussion that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionFindFirstArgs} args - Arguments to find a ChallengeDiscussion + * @example + * // Get one ChallengeDiscussion + * const challengeDiscussion = await prisma.challengeDiscussion.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeDiscussion that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionFindFirstOrThrowArgs} args - Arguments to find a ChallengeDiscussion + * @example + * // Get one ChallengeDiscussion + * const challengeDiscussion = await prisma.challengeDiscussion.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeDiscussions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeDiscussions + * const challengeDiscussions = await prisma.challengeDiscussion.findMany() + * + * // Get first 10 ChallengeDiscussions + * const challengeDiscussions = await prisma.challengeDiscussion.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeDiscussionWithIdOnly = await prisma.challengeDiscussion.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeDiscussion. + * @param {ChallengeDiscussionCreateArgs} args - Arguments to create a ChallengeDiscussion. + * @example + * // Create one ChallengeDiscussion + * const ChallengeDiscussion = await prisma.challengeDiscussion.create({ + * data: { + * // ... data to create a ChallengeDiscussion + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeDiscussions. + * @param {ChallengeDiscussionCreateManyArgs} args - Arguments to create many ChallengeDiscussions. + * @example + * // Create many ChallengeDiscussions + * const challengeDiscussion = await prisma.challengeDiscussion.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeDiscussions and returns the data saved in the database. + * @param {ChallengeDiscussionCreateManyAndReturnArgs} args - Arguments to create many ChallengeDiscussions. + * @example + * // Create many ChallengeDiscussions + * const challengeDiscussion = await prisma.challengeDiscussion.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeDiscussions and only return the `id` + * const challengeDiscussionWithIdOnly = await prisma.challengeDiscussion.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeDiscussion. + * @param {ChallengeDiscussionDeleteArgs} args - Arguments to delete one ChallengeDiscussion. + * @example + * // Delete one ChallengeDiscussion + * const ChallengeDiscussion = await prisma.challengeDiscussion.delete({ + * where: { + * // ... filter to delete one ChallengeDiscussion + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeDiscussion. + * @param {ChallengeDiscussionUpdateArgs} args - Arguments to update one ChallengeDiscussion. + * @example + * // Update one ChallengeDiscussion + * const challengeDiscussion = await prisma.challengeDiscussion.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeDiscussions. + * @param {ChallengeDiscussionDeleteManyArgs} args - Arguments to filter ChallengeDiscussions to delete. + * @example + * // Delete a few ChallengeDiscussions + * const { count } = await prisma.challengeDiscussion.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeDiscussions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeDiscussions + * const challengeDiscussion = await prisma.challengeDiscussion.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeDiscussions and returns the data updated in the database. + * @param {ChallengeDiscussionUpdateManyAndReturnArgs} args - Arguments to update many ChallengeDiscussions. + * @example + * // Update many ChallengeDiscussions + * const challengeDiscussion = await prisma.challengeDiscussion.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeDiscussions and only return the `id` + * const challengeDiscussionWithIdOnly = await prisma.challengeDiscussion.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeDiscussion. + * @param {ChallengeDiscussionUpsertArgs} args - Arguments to update or create a ChallengeDiscussion. + * @example + * // Update or create a ChallengeDiscussion + * const challengeDiscussion = await prisma.challengeDiscussion.upsert({ + * create: { + * // ... data to create a ChallengeDiscussion + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeDiscussion we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeDiscussions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionCountArgs} args - Arguments to filter ChallengeDiscussions to count. + * @example + * // Count the number of ChallengeDiscussions + * const count = await prisma.challengeDiscussion.count({ + * where: { + * // ... the filter for the ChallengeDiscussions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeDiscussion. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeDiscussion. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeDiscussionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeDiscussionGroupByArgs['orderBy'] } + : { orderBy?: ChallengeDiscussionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeDiscussionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeDiscussion model + */ + readonly fields: ChallengeDiscussionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeDiscussion. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeDiscussionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + options = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeDiscussion model + */ + interface ChallengeDiscussionFieldRefs { + readonly id: FieldRef<"ChallengeDiscussion", 'String'> + readonly challengeId: FieldRef<"ChallengeDiscussion", 'String'> + readonly discussionId: FieldRef<"ChallengeDiscussion", 'String'> + readonly name: FieldRef<"ChallengeDiscussion", 'String'> + readonly type: FieldRef<"ChallengeDiscussion", 'DiscussionTypeEnum'> + readonly provider: FieldRef<"ChallengeDiscussion", 'String'> + readonly url: FieldRef<"ChallengeDiscussion", 'String'> + readonly createdAt: FieldRef<"ChallengeDiscussion", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeDiscussion", 'String'> + readonly updatedAt: FieldRef<"ChallengeDiscussion", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeDiscussion", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeDiscussion findUnique + */ + export type ChallengeDiscussionFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * Filter, which ChallengeDiscussion to fetch. + */ + where: ChallengeDiscussionWhereUniqueInput + } + + /** + * ChallengeDiscussion findUniqueOrThrow + */ + export type ChallengeDiscussionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * Filter, which ChallengeDiscussion to fetch. + */ + where: ChallengeDiscussionWhereUniqueInput + } + + /** + * ChallengeDiscussion findFirst + */ + export type ChallengeDiscussionFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * Filter, which ChallengeDiscussion to fetch. + */ + where?: ChallengeDiscussionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussions to fetch. + */ + orderBy?: ChallengeDiscussionOrderByWithRelationInput | ChallengeDiscussionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeDiscussions. + */ + cursor?: ChallengeDiscussionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeDiscussions. + */ + distinct?: ChallengeDiscussionScalarFieldEnum | ChallengeDiscussionScalarFieldEnum[] + } + + /** + * ChallengeDiscussion findFirstOrThrow + */ + export type ChallengeDiscussionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * Filter, which ChallengeDiscussion to fetch. + */ + where?: ChallengeDiscussionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussions to fetch. + */ + orderBy?: ChallengeDiscussionOrderByWithRelationInput | ChallengeDiscussionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeDiscussions. + */ + cursor?: ChallengeDiscussionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeDiscussions. + */ + distinct?: ChallengeDiscussionScalarFieldEnum | ChallengeDiscussionScalarFieldEnum[] + } + + /** + * ChallengeDiscussion findMany + */ + export type ChallengeDiscussionFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * Filter, which ChallengeDiscussions to fetch. + */ + where?: ChallengeDiscussionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussions to fetch. + */ + orderBy?: ChallengeDiscussionOrderByWithRelationInput | ChallengeDiscussionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeDiscussions. + */ + cursor?: ChallengeDiscussionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussions. + */ + skip?: number + distinct?: ChallengeDiscussionScalarFieldEnum | ChallengeDiscussionScalarFieldEnum[] + } + + /** + * ChallengeDiscussion create + */ + export type ChallengeDiscussionCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * The data needed to create a ChallengeDiscussion. + */ + data: XOR + } + + /** + * ChallengeDiscussion createMany + */ + export type ChallengeDiscussionCreateManyArgs = { + /** + * The data used to create many ChallengeDiscussions. + */ + data: ChallengeDiscussionCreateManyInput | ChallengeDiscussionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeDiscussion createManyAndReturn + */ + export type ChallengeDiscussionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * The data used to create many ChallengeDiscussions. + */ + data: ChallengeDiscussionCreateManyInput | ChallengeDiscussionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionIncludeCreateManyAndReturn | null + } + + /** + * ChallengeDiscussion update + */ + export type ChallengeDiscussionUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * The data needed to update a ChallengeDiscussion. + */ + data: XOR + /** + * Choose, which ChallengeDiscussion to update. + */ + where: ChallengeDiscussionWhereUniqueInput + } + + /** + * ChallengeDiscussion updateMany + */ + export type ChallengeDiscussionUpdateManyArgs = { + /** + * The data used to update ChallengeDiscussions. + */ + data: XOR + /** + * Filter which ChallengeDiscussions to update + */ + where?: ChallengeDiscussionWhereInput + /** + * Limit how many ChallengeDiscussions to update. + */ + limit?: number + } + + /** + * ChallengeDiscussion updateManyAndReturn + */ + export type ChallengeDiscussionUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * The data used to update ChallengeDiscussions. + */ + data: XOR + /** + * Filter which ChallengeDiscussions to update + */ + where?: ChallengeDiscussionWhereInput + /** + * Limit how many ChallengeDiscussions to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeDiscussion upsert + */ + export type ChallengeDiscussionUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * The filter to search for the ChallengeDiscussion to update in case it exists. + */ + where: ChallengeDiscussionWhereUniqueInput + /** + * In case the ChallengeDiscussion found by the `where` argument doesn't exist, create a new ChallengeDiscussion with this data. + */ + create: XOR + /** + * In case the ChallengeDiscussion was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeDiscussion delete + */ + export type ChallengeDiscussionDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + /** + * Filter which ChallengeDiscussion to delete. + */ + where: ChallengeDiscussionWhereUniqueInput + } + + /** + * ChallengeDiscussion deleteMany + */ + export type ChallengeDiscussionDeleteManyArgs = { + /** + * Filter which ChallengeDiscussions to delete + */ + where?: ChallengeDiscussionWhereInput + /** + * Limit how many ChallengeDiscussions to delete. + */ + limit?: number + } + + /** + * ChallengeDiscussion.options + */ + export type ChallengeDiscussion$optionsArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + where?: ChallengeDiscussionOptionWhereInput + orderBy?: ChallengeDiscussionOptionOrderByWithRelationInput | ChallengeDiscussionOptionOrderByWithRelationInput[] + cursor?: ChallengeDiscussionOptionWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeDiscussionOptionScalarFieldEnum | ChallengeDiscussionOptionScalarFieldEnum[] + } + + /** + * ChallengeDiscussion without action + */ + export type ChallengeDiscussionDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussion + */ + select?: ChallengeDiscussionSelect | null + /** + * Omit specific fields from the ChallengeDiscussion + */ + omit?: ChallengeDiscussionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionInclude | null + } + + + /** + * Model ChallengeDiscussionOption + */ + + export type AggregateChallengeDiscussionOption = { + _count: ChallengeDiscussionOptionCountAggregateOutputType | null + _min: ChallengeDiscussionOptionMinAggregateOutputType | null + _max: ChallengeDiscussionOptionMaxAggregateOutputType | null + } + + export type ChallengeDiscussionOptionMinAggregateOutputType = { + id: string | null + discussionId: string | null + optionKey: string | null + optionValue: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeDiscussionOptionMaxAggregateOutputType = { + id: string | null + discussionId: string | null + optionKey: string | null + optionValue: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeDiscussionOptionCountAggregateOutputType = { + id: number + discussionId: number + optionKey: number + optionValue: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeDiscussionOptionMinAggregateInputType = { + id?: true + discussionId?: true + optionKey?: true + optionValue?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeDiscussionOptionMaxAggregateInputType = { + id?: true + discussionId?: true + optionKey?: true + optionValue?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeDiscussionOptionCountAggregateInputType = { + id?: true + discussionId?: true + optionKey?: true + optionValue?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeDiscussionOptionAggregateArgs = { + /** + * Filter which ChallengeDiscussionOption to aggregate. + */ + where?: ChallengeDiscussionOptionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussionOptions to fetch. + */ + orderBy?: ChallengeDiscussionOptionOrderByWithRelationInput | ChallengeDiscussionOptionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeDiscussionOptionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussionOptions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussionOptions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeDiscussionOptions + **/ + _count?: true | ChallengeDiscussionOptionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeDiscussionOptionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeDiscussionOptionMaxAggregateInputType + } + + export type GetChallengeDiscussionOptionAggregateType = { + [P in keyof T & keyof AggregateChallengeDiscussionOption]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeDiscussionOptionGroupByArgs = { + where?: ChallengeDiscussionOptionWhereInput + orderBy?: ChallengeDiscussionOptionOrderByWithAggregationInput | ChallengeDiscussionOptionOrderByWithAggregationInput[] + by: ChallengeDiscussionOptionScalarFieldEnum[] | ChallengeDiscussionOptionScalarFieldEnum + having?: ChallengeDiscussionOptionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeDiscussionOptionCountAggregateInputType | true + _min?: ChallengeDiscussionOptionMinAggregateInputType + _max?: ChallengeDiscussionOptionMaxAggregateInputType + } + + export type ChallengeDiscussionOptionGroupByOutputType = { + id: string + discussionId: string + optionKey: string + optionValue: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeDiscussionOptionCountAggregateOutputType | null + _min: ChallengeDiscussionOptionMinAggregateOutputType | null + _max: ChallengeDiscussionOptionMaxAggregateOutputType | null + } + + type GetChallengeDiscussionOptionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeDiscussionOptionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeDiscussionOptionSelect = $Extensions.GetSelect<{ + id?: boolean + discussionId?: boolean + optionKey?: boolean + optionValue?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + discussion?: boolean | ChallengeDiscussionDefaultArgs + }, ExtArgs["result"]["challengeDiscussionOption"]> + + export type ChallengeDiscussionOptionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + discussionId?: boolean + optionKey?: boolean + optionValue?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + discussion?: boolean | ChallengeDiscussionDefaultArgs + }, ExtArgs["result"]["challengeDiscussionOption"]> + + export type ChallengeDiscussionOptionSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + discussionId?: boolean + optionKey?: boolean + optionValue?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + discussion?: boolean | ChallengeDiscussionDefaultArgs + }, ExtArgs["result"]["challengeDiscussionOption"]> + + export type ChallengeDiscussionOptionSelectScalar = { + id?: boolean + discussionId?: boolean + optionKey?: boolean + optionValue?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeDiscussionOptionOmit = $Extensions.GetOmit<"id" | "discussionId" | "optionKey" | "optionValue" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeDiscussionOption"]> + export type ChallengeDiscussionOptionInclude = { + discussion?: boolean | ChallengeDiscussionDefaultArgs + } + export type ChallengeDiscussionOptionIncludeCreateManyAndReturn = { + discussion?: boolean | ChallengeDiscussionDefaultArgs + } + export type ChallengeDiscussionOptionIncludeUpdateManyAndReturn = { + discussion?: boolean | ChallengeDiscussionDefaultArgs + } + + export type $ChallengeDiscussionOptionPayload = { + name: "ChallengeDiscussionOption" + objects: { + discussion: Prisma.$ChallengeDiscussionPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + discussionId: string + optionKey: string + optionValue: string + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeDiscussionOption"]> + composites: {} + } + + type ChallengeDiscussionOptionGetPayload = $Result.GetResult + + type ChallengeDiscussionOptionCountArgs = + Omit & { + select?: ChallengeDiscussionOptionCountAggregateInputType | true + } + + export interface ChallengeDiscussionOptionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeDiscussionOption'], meta: { name: 'ChallengeDiscussionOption' } } + /** + * Find zero or one ChallengeDiscussionOption that matches the filter. + * @param {ChallengeDiscussionOptionFindUniqueArgs} args - Arguments to find a ChallengeDiscussionOption + * @example + * // Get one ChallengeDiscussionOption + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeDiscussionOption that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeDiscussionOptionFindUniqueOrThrowArgs} args - Arguments to find a ChallengeDiscussionOption + * @example + * // Get one ChallengeDiscussionOption + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeDiscussionOption that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionOptionFindFirstArgs} args - Arguments to find a ChallengeDiscussionOption + * @example + * // Get one ChallengeDiscussionOption + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeDiscussionOption that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionOptionFindFirstOrThrowArgs} args - Arguments to find a ChallengeDiscussionOption + * @example + * // Get one ChallengeDiscussionOption + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeDiscussionOptions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionOptionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeDiscussionOptions + * const challengeDiscussionOptions = await prisma.challengeDiscussionOption.findMany() + * + * // Get first 10 ChallengeDiscussionOptions + * const challengeDiscussionOptions = await prisma.challengeDiscussionOption.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeDiscussionOptionWithIdOnly = await prisma.challengeDiscussionOption.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeDiscussionOption. + * @param {ChallengeDiscussionOptionCreateArgs} args - Arguments to create a ChallengeDiscussionOption. + * @example + * // Create one ChallengeDiscussionOption + * const ChallengeDiscussionOption = await prisma.challengeDiscussionOption.create({ + * data: { + * // ... data to create a ChallengeDiscussionOption + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeDiscussionOptions. + * @param {ChallengeDiscussionOptionCreateManyArgs} args - Arguments to create many ChallengeDiscussionOptions. + * @example + * // Create many ChallengeDiscussionOptions + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeDiscussionOptions and returns the data saved in the database. + * @param {ChallengeDiscussionOptionCreateManyAndReturnArgs} args - Arguments to create many ChallengeDiscussionOptions. + * @example + * // Create many ChallengeDiscussionOptions + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeDiscussionOptions and only return the `id` + * const challengeDiscussionOptionWithIdOnly = await prisma.challengeDiscussionOption.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeDiscussionOption. + * @param {ChallengeDiscussionOptionDeleteArgs} args - Arguments to delete one ChallengeDiscussionOption. + * @example + * // Delete one ChallengeDiscussionOption + * const ChallengeDiscussionOption = await prisma.challengeDiscussionOption.delete({ + * where: { + * // ... filter to delete one ChallengeDiscussionOption + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeDiscussionOption. + * @param {ChallengeDiscussionOptionUpdateArgs} args - Arguments to update one ChallengeDiscussionOption. + * @example + * // Update one ChallengeDiscussionOption + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeDiscussionOptions. + * @param {ChallengeDiscussionOptionDeleteManyArgs} args - Arguments to filter ChallengeDiscussionOptions to delete. + * @example + * // Delete a few ChallengeDiscussionOptions + * const { count } = await prisma.challengeDiscussionOption.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeDiscussionOptions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionOptionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeDiscussionOptions + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeDiscussionOptions and returns the data updated in the database. + * @param {ChallengeDiscussionOptionUpdateManyAndReturnArgs} args - Arguments to update many ChallengeDiscussionOptions. + * @example + * // Update many ChallengeDiscussionOptions + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeDiscussionOptions and only return the `id` + * const challengeDiscussionOptionWithIdOnly = await prisma.challengeDiscussionOption.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeDiscussionOption. + * @param {ChallengeDiscussionOptionUpsertArgs} args - Arguments to update or create a ChallengeDiscussionOption. + * @example + * // Update or create a ChallengeDiscussionOption + * const challengeDiscussionOption = await prisma.challengeDiscussionOption.upsert({ + * create: { + * // ... data to create a ChallengeDiscussionOption + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeDiscussionOption we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeDiscussionOptionClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeDiscussionOptions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionOptionCountArgs} args - Arguments to filter ChallengeDiscussionOptions to count. + * @example + * // Count the number of ChallengeDiscussionOptions + * const count = await prisma.challengeDiscussionOption.count({ + * where: { + * // ... the filter for the ChallengeDiscussionOptions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeDiscussionOption. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionOptionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeDiscussionOption. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeDiscussionOptionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeDiscussionOptionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeDiscussionOptionGroupByArgs['orderBy'] } + : { orderBy?: ChallengeDiscussionOptionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeDiscussionOptionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeDiscussionOption model + */ + readonly fields: ChallengeDiscussionOptionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeDiscussionOption. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeDiscussionOptionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + discussion = {}>(args?: Subset>): Prisma__ChallengeDiscussionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeDiscussionOption model + */ + interface ChallengeDiscussionOptionFieldRefs { + readonly id: FieldRef<"ChallengeDiscussionOption", 'String'> + readonly discussionId: FieldRef<"ChallengeDiscussionOption", 'String'> + readonly optionKey: FieldRef<"ChallengeDiscussionOption", 'String'> + readonly optionValue: FieldRef<"ChallengeDiscussionOption", 'String'> + readonly createdAt: FieldRef<"ChallengeDiscussionOption", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeDiscussionOption", 'String'> + readonly updatedAt: FieldRef<"ChallengeDiscussionOption", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeDiscussionOption", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeDiscussionOption findUnique + */ + export type ChallengeDiscussionOptionFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * Filter, which ChallengeDiscussionOption to fetch. + */ + where: ChallengeDiscussionOptionWhereUniqueInput + } + + /** + * ChallengeDiscussionOption findUniqueOrThrow + */ + export type ChallengeDiscussionOptionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * Filter, which ChallengeDiscussionOption to fetch. + */ + where: ChallengeDiscussionOptionWhereUniqueInput + } + + /** + * ChallengeDiscussionOption findFirst + */ + export type ChallengeDiscussionOptionFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * Filter, which ChallengeDiscussionOption to fetch. + */ + where?: ChallengeDiscussionOptionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussionOptions to fetch. + */ + orderBy?: ChallengeDiscussionOptionOrderByWithRelationInput | ChallengeDiscussionOptionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeDiscussionOptions. + */ + cursor?: ChallengeDiscussionOptionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussionOptions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussionOptions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeDiscussionOptions. + */ + distinct?: ChallengeDiscussionOptionScalarFieldEnum | ChallengeDiscussionOptionScalarFieldEnum[] + } + + /** + * ChallengeDiscussionOption findFirstOrThrow + */ + export type ChallengeDiscussionOptionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * Filter, which ChallengeDiscussionOption to fetch. + */ + where?: ChallengeDiscussionOptionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussionOptions to fetch. + */ + orderBy?: ChallengeDiscussionOptionOrderByWithRelationInput | ChallengeDiscussionOptionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeDiscussionOptions. + */ + cursor?: ChallengeDiscussionOptionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussionOptions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussionOptions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeDiscussionOptions. + */ + distinct?: ChallengeDiscussionOptionScalarFieldEnum | ChallengeDiscussionOptionScalarFieldEnum[] + } + + /** + * ChallengeDiscussionOption findMany + */ + export type ChallengeDiscussionOptionFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * Filter, which ChallengeDiscussionOptions to fetch. + */ + where?: ChallengeDiscussionOptionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeDiscussionOptions to fetch. + */ + orderBy?: ChallengeDiscussionOptionOrderByWithRelationInput | ChallengeDiscussionOptionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeDiscussionOptions. + */ + cursor?: ChallengeDiscussionOptionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeDiscussionOptions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeDiscussionOptions. + */ + skip?: number + distinct?: ChallengeDiscussionOptionScalarFieldEnum | ChallengeDiscussionOptionScalarFieldEnum[] + } + + /** + * ChallengeDiscussionOption create + */ + export type ChallengeDiscussionOptionCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * The data needed to create a ChallengeDiscussionOption. + */ + data: XOR + } + + /** + * ChallengeDiscussionOption createMany + */ + export type ChallengeDiscussionOptionCreateManyArgs = { + /** + * The data used to create many ChallengeDiscussionOptions. + */ + data: ChallengeDiscussionOptionCreateManyInput | ChallengeDiscussionOptionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeDiscussionOption createManyAndReturn + */ + export type ChallengeDiscussionOptionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * The data used to create many ChallengeDiscussionOptions. + */ + data: ChallengeDiscussionOptionCreateManyInput | ChallengeDiscussionOptionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionIncludeCreateManyAndReturn | null + } + + /** + * ChallengeDiscussionOption update + */ + export type ChallengeDiscussionOptionUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * The data needed to update a ChallengeDiscussionOption. + */ + data: XOR + /** + * Choose, which ChallengeDiscussionOption to update. + */ + where: ChallengeDiscussionOptionWhereUniqueInput + } + + /** + * ChallengeDiscussionOption updateMany + */ + export type ChallengeDiscussionOptionUpdateManyArgs = { + /** + * The data used to update ChallengeDiscussionOptions. + */ + data: XOR + /** + * Filter which ChallengeDiscussionOptions to update + */ + where?: ChallengeDiscussionOptionWhereInput + /** + * Limit how many ChallengeDiscussionOptions to update. + */ + limit?: number + } + + /** + * ChallengeDiscussionOption updateManyAndReturn + */ + export type ChallengeDiscussionOptionUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * The data used to update ChallengeDiscussionOptions. + */ + data: XOR + /** + * Filter which ChallengeDiscussionOptions to update + */ + where?: ChallengeDiscussionOptionWhereInput + /** + * Limit how many ChallengeDiscussionOptions to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeDiscussionOption upsert + */ + export type ChallengeDiscussionOptionUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * The filter to search for the ChallengeDiscussionOption to update in case it exists. + */ + where: ChallengeDiscussionOptionWhereUniqueInput + /** + * In case the ChallengeDiscussionOption found by the `where` argument doesn't exist, create a new ChallengeDiscussionOption with this data. + */ + create: XOR + /** + * In case the ChallengeDiscussionOption was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeDiscussionOption delete + */ + export type ChallengeDiscussionOptionDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + /** + * Filter which ChallengeDiscussionOption to delete. + */ + where: ChallengeDiscussionOptionWhereUniqueInput + } + + /** + * ChallengeDiscussionOption deleteMany + */ + export type ChallengeDiscussionOptionDeleteManyArgs = { + /** + * Filter which ChallengeDiscussionOptions to delete + */ + where?: ChallengeDiscussionOptionWhereInput + /** + * Limit how many ChallengeDiscussionOptions to delete. + */ + limit?: number + } + + /** + * ChallengeDiscussionOption without action + */ + export type ChallengeDiscussionOptionDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeDiscussionOption + */ + select?: ChallengeDiscussionOptionSelect | null + /** + * Omit specific fields from the ChallengeDiscussionOption + */ + omit?: ChallengeDiscussionOptionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeDiscussionOptionInclude | null + } + + + /** + * Model ChallengeConstraint + */ + + export type AggregateChallengeConstraint = { + _count: ChallengeConstraintCountAggregateOutputType | null + _min: ChallengeConstraintMinAggregateOutputType | null + _max: ChallengeConstraintMaxAggregateOutputType | null + } + + export type ChallengeConstraintMinAggregateOutputType = { + id: string | null + challengeId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeConstraintMaxAggregateOutputType = { + id: string | null + challengeId: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeConstraintCountAggregateOutputType = { + id: number + challengeId: number + allowedRegistrants: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeConstraintMinAggregateInputType = { + id?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeConstraintMaxAggregateInputType = { + id?: true + challengeId?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeConstraintCountAggregateInputType = { + id?: true + challengeId?: true + allowedRegistrants?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeConstraintAggregateArgs = { + /** + * Filter which ChallengeConstraint to aggregate. + */ + where?: ChallengeConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeConstraints to fetch. + */ + orderBy?: ChallengeConstraintOrderByWithRelationInput | ChallengeConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeConstraints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeConstraints + **/ + _count?: true | ChallengeConstraintCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeConstraintMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeConstraintMaxAggregateInputType + } + + export type GetChallengeConstraintAggregateType = { + [P in keyof T & keyof AggregateChallengeConstraint]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeConstraintGroupByArgs = { + where?: ChallengeConstraintWhereInput + orderBy?: ChallengeConstraintOrderByWithAggregationInput | ChallengeConstraintOrderByWithAggregationInput[] + by: ChallengeConstraintScalarFieldEnum[] | ChallengeConstraintScalarFieldEnum + having?: ChallengeConstraintScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeConstraintCountAggregateInputType | true + _min?: ChallengeConstraintMinAggregateInputType + _max?: ChallengeConstraintMaxAggregateInputType + } + + export type ChallengeConstraintGroupByOutputType = { + id: string + challengeId: string + allowedRegistrants: string[] + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeConstraintCountAggregateOutputType | null + _min: ChallengeConstraintMinAggregateOutputType | null + _max: ChallengeConstraintMaxAggregateOutputType | null + } + + type GetChallengeConstraintGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeConstraintGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeConstraintSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + allowedRegistrants?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeConstraint"]> + + export type ChallengeConstraintSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + allowedRegistrants?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeConstraint"]> + + export type ChallengeConstraintSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + allowedRegistrants?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengeConstraint"]> + + export type ChallengeConstraintSelectScalar = { + id?: boolean + challengeId?: boolean + allowedRegistrants?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeConstraintOmit = $Extensions.GetOmit<"id" | "challengeId" | "allowedRegistrants" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeConstraint"]> + export type ChallengeConstraintInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeConstraintIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengeConstraintIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengeConstraintPayload = { + name: "ChallengeConstraint" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + allowedRegistrants: string[] + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeConstraint"]> + composites: {} + } + + type ChallengeConstraintGetPayload = $Result.GetResult + + type ChallengeConstraintCountArgs = + Omit & { + select?: ChallengeConstraintCountAggregateInputType | true + } + + export interface ChallengeConstraintDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeConstraint'], meta: { name: 'ChallengeConstraint' } } + /** + * Find zero or one ChallengeConstraint that matches the filter. + * @param {ChallengeConstraintFindUniqueArgs} args - Arguments to find a ChallengeConstraint + * @example + * // Get one ChallengeConstraint + * const challengeConstraint = await prisma.challengeConstraint.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeConstraint that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeConstraintFindUniqueOrThrowArgs} args - Arguments to find a ChallengeConstraint + * @example + * // Get one ChallengeConstraint + * const challengeConstraint = await prisma.challengeConstraint.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeConstraint that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeConstraintFindFirstArgs} args - Arguments to find a ChallengeConstraint + * @example + * // Get one ChallengeConstraint + * const challengeConstraint = await prisma.challengeConstraint.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeConstraint that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeConstraintFindFirstOrThrowArgs} args - Arguments to find a ChallengeConstraint + * @example + * // Get one ChallengeConstraint + * const challengeConstraint = await prisma.challengeConstraint.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeConstraints that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeConstraintFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeConstraints + * const challengeConstraints = await prisma.challengeConstraint.findMany() + * + * // Get first 10 ChallengeConstraints + * const challengeConstraints = await prisma.challengeConstraint.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeConstraintWithIdOnly = await prisma.challengeConstraint.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeConstraint. + * @param {ChallengeConstraintCreateArgs} args - Arguments to create a ChallengeConstraint. + * @example + * // Create one ChallengeConstraint + * const ChallengeConstraint = await prisma.challengeConstraint.create({ + * data: { + * // ... data to create a ChallengeConstraint + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeConstraints. + * @param {ChallengeConstraintCreateManyArgs} args - Arguments to create many ChallengeConstraints. + * @example + * // Create many ChallengeConstraints + * const challengeConstraint = await prisma.challengeConstraint.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeConstraints and returns the data saved in the database. + * @param {ChallengeConstraintCreateManyAndReturnArgs} args - Arguments to create many ChallengeConstraints. + * @example + * // Create many ChallengeConstraints + * const challengeConstraint = await prisma.challengeConstraint.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeConstraints and only return the `id` + * const challengeConstraintWithIdOnly = await prisma.challengeConstraint.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeConstraint. + * @param {ChallengeConstraintDeleteArgs} args - Arguments to delete one ChallengeConstraint. + * @example + * // Delete one ChallengeConstraint + * const ChallengeConstraint = await prisma.challengeConstraint.delete({ + * where: { + * // ... filter to delete one ChallengeConstraint + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeConstraint. + * @param {ChallengeConstraintUpdateArgs} args - Arguments to update one ChallengeConstraint. + * @example + * // Update one ChallengeConstraint + * const challengeConstraint = await prisma.challengeConstraint.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeConstraints. + * @param {ChallengeConstraintDeleteManyArgs} args - Arguments to filter ChallengeConstraints to delete. + * @example + * // Delete a few ChallengeConstraints + * const { count } = await prisma.challengeConstraint.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeConstraints. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeConstraintUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeConstraints + * const challengeConstraint = await prisma.challengeConstraint.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeConstraints and returns the data updated in the database. + * @param {ChallengeConstraintUpdateManyAndReturnArgs} args - Arguments to update many ChallengeConstraints. + * @example + * // Update many ChallengeConstraints + * const challengeConstraint = await prisma.challengeConstraint.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeConstraints and only return the `id` + * const challengeConstraintWithIdOnly = await prisma.challengeConstraint.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeConstraint. + * @param {ChallengeConstraintUpsertArgs} args - Arguments to update or create a ChallengeConstraint. + * @example + * // Update or create a ChallengeConstraint + * const challengeConstraint = await prisma.challengeConstraint.upsert({ + * create: { + * // ... data to create a ChallengeConstraint + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeConstraint we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeConstraintClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeConstraints. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeConstraintCountArgs} args - Arguments to filter ChallengeConstraints to count. + * @example + * // Count the number of ChallengeConstraints + * const count = await prisma.challengeConstraint.count({ + * where: { + * // ... the filter for the ChallengeConstraints we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeConstraint. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeConstraintAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeConstraint. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeConstraintGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeConstraintGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeConstraintGroupByArgs['orderBy'] } + : { orderBy?: ChallengeConstraintGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeConstraintGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeConstraint model + */ + readonly fields: ChallengeConstraintFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeConstraint. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeConstraintClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeConstraint model + */ + interface ChallengeConstraintFieldRefs { + readonly id: FieldRef<"ChallengeConstraint", 'String'> + readonly challengeId: FieldRef<"ChallengeConstraint", 'String'> + readonly allowedRegistrants: FieldRef<"ChallengeConstraint", 'String[]'> + readonly createdAt: FieldRef<"ChallengeConstraint", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeConstraint", 'String'> + readonly updatedAt: FieldRef<"ChallengeConstraint", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeConstraint", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeConstraint findUnique + */ + export type ChallengeConstraintFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * Filter, which ChallengeConstraint to fetch. + */ + where: ChallengeConstraintWhereUniqueInput + } + + /** + * ChallengeConstraint findUniqueOrThrow + */ + export type ChallengeConstraintFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * Filter, which ChallengeConstraint to fetch. + */ + where: ChallengeConstraintWhereUniqueInput + } + + /** + * ChallengeConstraint findFirst + */ + export type ChallengeConstraintFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * Filter, which ChallengeConstraint to fetch. + */ + where?: ChallengeConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeConstraints to fetch. + */ + orderBy?: ChallengeConstraintOrderByWithRelationInput | ChallengeConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeConstraints. + */ + cursor?: ChallengeConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeConstraints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeConstraints. + */ + distinct?: ChallengeConstraintScalarFieldEnum | ChallengeConstraintScalarFieldEnum[] + } + + /** + * ChallengeConstraint findFirstOrThrow + */ + export type ChallengeConstraintFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * Filter, which ChallengeConstraint to fetch. + */ + where?: ChallengeConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeConstraints to fetch. + */ + orderBy?: ChallengeConstraintOrderByWithRelationInput | ChallengeConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeConstraints. + */ + cursor?: ChallengeConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeConstraints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeConstraints. + */ + distinct?: ChallengeConstraintScalarFieldEnum | ChallengeConstraintScalarFieldEnum[] + } + + /** + * ChallengeConstraint findMany + */ + export type ChallengeConstraintFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * Filter, which ChallengeConstraints to fetch. + */ + where?: ChallengeConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeConstraints to fetch. + */ + orderBy?: ChallengeConstraintOrderByWithRelationInput | ChallengeConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeConstraints. + */ + cursor?: ChallengeConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeConstraints. + */ + skip?: number + distinct?: ChallengeConstraintScalarFieldEnum | ChallengeConstraintScalarFieldEnum[] + } + + /** + * ChallengeConstraint create + */ + export type ChallengeConstraintCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * The data needed to create a ChallengeConstraint. + */ + data: XOR + } + + /** + * ChallengeConstraint createMany + */ + export type ChallengeConstraintCreateManyArgs = { + /** + * The data used to create many ChallengeConstraints. + */ + data: ChallengeConstraintCreateManyInput | ChallengeConstraintCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeConstraint createManyAndReturn + */ + export type ChallengeConstraintCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * The data used to create many ChallengeConstraints. + */ + data: ChallengeConstraintCreateManyInput | ChallengeConstraintCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintIncludeCreateManyAndReturn | null + } + + /** + * ChallengeConstraint update + */ + export type ChallengeConstraintUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * The data needed to update a ChallengeConstraint. + */ + data: XOR + /** + * Choose, which ChallengeConstraint to update. + */ + where: ChallengeConstraintWhereUniqueInput + } + + /** + * ChallengeConstraint updateMany + */ + export type ChallengeConstraintUpdateManyArgs = { + /** + * The data used to update ChallengeConstraints. + */ + data: XOR + /** + * Filter which ChallengeConstraints to update + */ + where?: ChallengeConstraintWhereInput + /** + * Limit how many ChallengeConstraints to update. + */ + limit?: number + } + + /** + * ChallengeConstraint updateManyAndReturn + */ + export type ChallengeConstraintUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * The data used to update ChallengeConstraints. + */ + data: XOR + /** + * Filter which ChallengeConstraints to update + */ + where?: ChallengeConstraintWhereInput + /** + * Limit how many ChallengeConstraints to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeConstraint upsert + */ + export type ChallengeConstraintUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * The filter to search for the ChallengeConstraint to update in case it exists. + */ + where: ChallengeConstraintWhereUniqueInput + /** + * In case the ChallengeConstraint found by the `where` argument doesn't exist, create a new ChallengeConstraint with this data. + */ + create: XOR + /** + * In case the ChallengeConstraint was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeConstraint delete + */ + export type ChallengeConstraintDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + /** + * Filter which ChallengeConstraint to delete. + */ + where: ChallengeConstraintWhereUniqueInput + } + + /** + * ChallengeConstraint deleteMany + */ + export type ChallengeConstraintDeleteManyArgs = { + /** + * Filter which ChallengeConstraints to delete + */ + where?: ChallengeConstraintWhereInput + /** + * Limit how many ChallengeConstraints to delete. + */ + limit?: number + } + + /** + * ChallengeConstraint without action + */ + export type ChallengeConstraintDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeConstraint + */ + select?: ChallengeConstraintSelect | null + /** + * Omit specific fields from the ChallengeConstraint + */ + omit?: ChallengeConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeConstraintInclude | null + } + + + /** + * Model Phase + */ + + export type AggregatePhase = { + _count: PhaseCountAggregateOutputType | null + _avg: PhaseAvgAggregateOutputType | null + _sum: PhaseSumAggregateOutputType | null + _min: PhaseMinAggregateOutputType | null + _max: PhaseMaxAggregateOutputType | null + } + + export type PhaseAvgAggregateOutputType = { + duration: number | null + } + + export type PhaseSumAggregateOutputType = { + duration: number | null + } + + export type PhaseMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isOpen: boolean | null + duration: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type PhaseMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isOpen: boolean | null + duration: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type PhaseCountAggregateOutputType = { + id: number + name: number + description: number + isOpen: number + duration: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type PhaseAvgAggregateInputType = { + duration?: true + } + + export type PhaseSumAggregateInputType = { + duration?: true + } + + export type PhaseMinAggregateInputType = { + id?: true + name?: true + description?: true + isOpen?: true + duration?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type PhaseMaxAggregateInputType = { + id?: true + name?: true + description?: true + isOpen?: true + duration?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type PhaseCountAggregateInputType = { + id?: true + name?: true + description?: true + isOpen?: true + duration?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type PhaseAggregateArgs = { + /** + * Filter which Phase to aggregate. + */ + where?: PhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Phases to fetch. + */ + orderBy?: PhaseOrderByWithRelationInput | PhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Phases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Phases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Phases + **/ + _count?: true | PhaseCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PhaseAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PhaseSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PhaseMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PhaseMaxAggregateInputType + } + + export type GetPhaseAggregateType = { + [P in keyof T & keyof AggregatePhase]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PhaseGroupByArgs = { + where?: PhaseWhereInput + orderBy?: PhaseOrderByWithAggregationInput | PhaseOrderByWithAggregationInput[] + by: PhaseScalarFieldEnum[] | PhaseScalarFieldEnum + having?: PhaseScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PhaseCountAggregateInputType | true + _avg?: PhaseAvgAggregateInputType + _sum?: PhaseSumAggregateInputType + _min?: PhaseMinAggregateInputType + _max?: PhaseMaxAggregateInputType + } + + export type PhaseGroupByOutputType = { + id: string + name: string + description: string | null + isOpen: boolean + duration: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: PhaseCountAggregateOutputType | null + _avg: PhaseAvgAggregateOutputType | null + _sum: PhaseSumAggregateOutputType | null + _min: PhaseMinAggregateOutputType | null + _max: PhaseMaxAggregateOutputType | null + } + + type GetPhaseGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PhaseGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PhaseSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + duration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challengePhases?: boolean | Phase$challengePhasesArgs + ChallengeReviewer?: boolean | Phase$ChallengeReviewerArgs + DefaultChallengeReviewer?: boolean | Phase$DefaultChallengeReviewerArgs + _count?: boolean | PhaseCountOutputTypeDefaultArgs + }, ExtArgs["result"]["phase"]> + + export type PhaseSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + duration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["phase"]> + + export type PhaseSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + duration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["phase"]> + + export type PhaseSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + duration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type PhaseOmit = $Extensions.GetOmit<"id" | "name" | "description" | "isOpen" | "duration" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["phase"]> + export type PhaseInclude = { + challengePhases?: boolean | Phase$challengePhasesArgs + ChallengeReviewer?: boolean | Phase$ChallengeReviewerArgs + DefaultChallengeReviewer?: boolean | Phase$DefaultChallengeReviewerArgs + _count?: boolean | PhaseCountOutputTypeDefaultArgs + } + export type PhaseIncludeCreateManyAndReturn = {} + export type PhaseIncludeUpdateManyAndReturn = {} + + export type $PhasePayload = { + name: "Phase" + objects: { + challengePhases: Prisma.$ChallengePhasePayload[] + ChallengeReviewer: Prisma.$ChallengeReviewerPayload[] + DefaultChallengeReviewer: Prisma.$DefaultChallengeReviewerPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + description: string | null + isOpen: boolean + duration: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["phase"]> + composites: {} + } + + type PhaseGetPayload = $Result.GetResult + + type PhaseCountArgs = + Omit & { + select?: PhaseCountAggregateInputType | true + } + + export interface PhaseDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Phase'], meta: { name: 'Phase' } } + /** + * Find zero or one Phase that matches the filter. + * @param {PhaseFindUniqueArgs} args - Arguments to find a Phase + * @example + * // Get one Phase + * const phase = await prisma.phase.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Phase that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PhaseFindUniqueOrThrowArgs} args - Arguments to find a Phase + * @example + * // Get one Phase + * const phase = await prisma.phase.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Phase that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PhaseFindFirstArgs} args - Arguments to find a Phase + * @example + * // Get one Phase + * const phase = await prisma.phase.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Phase that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PhaseFindFirstOrThrowArgs} args - Arguments to find a Phase + * @example + * // Get one Phase + * const phase = await prisma.phase.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Phases that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PhaseFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Phases + * const phases = await prisma.phase.findMany() + * + * // Get first 10 Phases + * const phases = await prisma.phase.findMany({ take: 10 }) + * + * // Only select the `id` + * const phaseWithIdOnly = await prisma.phase.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Phase. + * @param {PhaseCreateArgs} args - Arguments to create a Phase. + * @example + * // Create one Phase + * const Phase = await prisma.phase.create({ + * data: { + * // ... data to create a Phase + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Phases. + * @param {PhaseCreateManyArgs} args - Arguments to create many Phases. + * @example + * // Create many Phases + * const phase = await prisma.phase.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Phases and returns the data saved in the database. + * @param {PhaseCreateManyAndReturnArgs} args - Arguments to create many Phases. + * @example + * // Create many Phases + * const phase = await prisma.phase.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Phases and only return the `id` + * const phaseWithIdOnly = await prisma.phase.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Phase. + * @param {PhaseDeleteArgs} args - Arguments to delete one Phase. + * @example + * // Delete one Phase + * const Phase = await prisma.phase.delete({ + * where: { + * // ... filter to delete one Phase + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Phase. + * @param {PhaseUpdateArgs} args - Arguments to update one Phase. + * @example + * // Update one Phase + * const phase = await prisma.phase.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Phases. + * @param {PhaseDeleteManyArgs} args - Arguments to filter Phases to delete. + * @example + * // Delete a few Phases + * const { count } = await prisma.phase.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Phases. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PhaseUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Phases + * const phase = await prisma.phase.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Phases and returns the data updated in the database. + * @param {PhaseUpdateManyAndReturnArgs} args - Arguments to update many Phases. + * @example + * // Update many Phases + * const phase = await prisma.phase.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Phases and only return the `id` + * const phaseWithIdOnly = await prisma.phase.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Phase. + * @param {PhaseUpsertArgs} args - Arguments to update or create a Phase. + * @example + * // Update or create a Phase + * const phase = await prisma.phase.upsert({ + * create: { + * // ... data to create a Phase + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Phase we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PhaseClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Phases. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PhaseCountArgs} args - Arguments to filter Phases to count. + * @example + * // Count the number of Phases + * const count = await prisma.phase.count({ + * where: { + * // ... the filter for the Phases we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Phase. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PhaseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Phase. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PhaseGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends PhaseGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PhaseGroupByArgs['orderBy'] } + : { orderBy?: PhaseGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPhaseGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Phase model + */ + readonly fields: PhaseFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Phase. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PhaseClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challengePhases = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + ChallengeReviewer = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + DefaultChallengeReviewer = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Phase model + */ + interface PhaseFieldRefs { + readonly id: FieldRef<"Phase", 'String'> + readonly name: FieldRef<"Phase", 'String'> + readonly description: FieldRef<"Phase", 'String'> + readonly isOpen: FieldRef<"Phase", 'Boolean'> + readonly duration: FieldRef<"Phase", 'Int'> + readonly createdAt: FieldRef<"Phase", 'DateTime'> + readonly createdBy: FieldRef<"Phase", 'String'> + readonly updatedAt: FieldRef<"Phase", 'DateTime'> + readonly updatedBy: FieldRef<"Phase", 'String'> + } + + + // Custom InputTypes + /** + * Phase findUnique + */ + export type PhaseFindUniqueArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * Filter, which Phase to fetch. + */ + where: PhaseWhereUniqueInput + } + + /** + * Phase findUniqueOrThrow + */ + export type PhaseFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * Filter, which Phase to fetch. + */ + where: PhaseWhereUniqueInput + } + + /** + * Phase findFirst + */ + export type PhaseFindFirstArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * Filter, which Phase to fetch. + */ + where?: PhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Phases to fetch. + */ + orderBy?: PhaseOrderByWithRelationInput | PhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Phases. + */ + cursor?: PhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Phases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Phases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Phases. + */ + distinct?: PhaseScalarFieldEnum | PhaseScalarFieldEnum[] + } + + /** + * Phase findFirstOrThrow + */ + export type PhaseFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * Filter, which Phase to fetch. + */ + where?: PhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Phases to fetch. + */ + orderBy?: PhaseOrderByWithRelationInput | PhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Phases. + */ + cursor?: PhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Phases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Phases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Phases. + */ + distinct?: PhaseScalarFieldEnum | PhaseScalarFieldEnum[] + } + + /** + * Phase findMany + */ + export type PhaseFindManyArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * Filter, which Phases to fetch. + */ + where?: PhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Phases to fetch. + */ + orderBy?: PhaseOrderByWithRelationInput | PhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Phases. + */ + cursor?: PhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Phases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Phases. + */ + skip?: number + distinct?: PhaseScalarFieldEnum | PhaseScalarFieldEnum[] + } + + /** + * Phase create + */ + export type PhaseCreateArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * The data needed to create a Phase. + */ + data: XOR + } + + /** + * Phase createMany + */ + export type PhaseCreateManyArgs = { + /** + * The data used to create many Phases. + */ + data: PhaseCreateManyInput | PhaseCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Phase createManyAndReturn + */ + export type PhaseCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * The data used to create many Phases. + */ + data: PhaseCreateManyInput | PhaseCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Phase update + */ + export type PhaseUpdateArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * The data needed to update a Phase. + */ + data: XOR + /** + * Choose, which Phase to update. + */ + where: PhaseWhereUniqueInput + } + + /** + * Phase updateMany + */ + export type PhaseUpdateManyArgs = { + /** + * The data used to update Phases. + */ + data: XOR + /** + * Filter which Phases to update + */ + where?: PhaseWhereInput + /** + * Limit how many Phases to update. + */ + limit?: number + } + + /** + * Phase updateManyAndReturn + */ + export type PhaseUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * The data used to update Phases. + */ + data: XOR + /** + * Filter which Phases to update + */ + where?: PhaseWhereInput + /** + * Limit how many Phases to update. + */ + limit?: number + } + + /** + * Phase upsert + */ + export type PhaseUpsertArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * The filter to search for the Phase to update in case it exists. + */ + where: PhaseWhereUniqueInput + /** + * In case the Phase found by the `where` argument doesn't exist, create a new Phase with this data. + */ + create: XOR + /** + * In case the Phase was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Phase delete + */ + export type PhaseDeleteArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + /** + * Filter which Phase to delete. + */ + where: PhaseWhereUniqueInput + } + + /** + * Phase deleteMany + */ + export type PhaseDeleteManyArgs = { + /** + * Filter which Phases to delete + */ + where?: PhaseWhereInput + /** + * Limit how many Phases to delete. + */ + limit?: number + } + + /** + * Phase.challengePhases + */ + export type Phase$challengePhasesArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + where?: ChallengePhaseWhereInput + orderBy?: ChallengePhaseOrderByWithRelationInput | ChallengePhaseOrderByWithRelationInput[] + cursor?: ChallengePhaseWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengePhaseScalarFieldEnum | ChallengePhaseScalarFieldEnum[] + } + + /** + * Phase.ChallengeReviewer + */ + export type Phase$ChallengeReviewerArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + where?: ChallengeReviewerWhereInput + orderBy?: ChallengeReviewerOrderByWithRelationInput | ChallengeReviewerOrderByWithRelationInput[] + cursor?: ChallengeReviewerWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeReviewerScalarFieldEnum | ChallengeReviewerScalarFieldEnum[] + } + + /** + * Phase.DefaultChallengeReviewer + */ + export type Phase$DefaultChallengeReviewerArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + where?: DefaultChallengeReviewerWhereInput + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + cursor?: DefaultChallengeReviewerWhereUniqueInput + take?: number + skip?: number + distinct?: DefaultChallengeReviewerScalarFieldEnum | DefaultChallengeReviewerScalarFieldEnum[] + } + + /** + * Phase without action + */ + export type PhaseDefaultArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + } + + + /** + * Model ChallengePhase + */ + + export type AggregateChallengePhase = { + _count: ChallengePhaseCountAggregateOutputType | null + _avg: ChallengePhaseAvgAggregateOutputType | null + _sum: ChallengePhaseSumAggregateOutputType | null + _min: ChallengePhaseMinAggregateOutputType | null + _max: ChallengePhaseMaxAggregateOutputType | null + } + + export type ChallengePhaseAvgAggregateOutputType = { + duration: number | null + } + + export type ChallengePhaseSumAggregateOutputType = { + duration: number | null + } + + export type ChallengePhaseMinAggregateOutputType = { + id: string | null + challengeId: string | null + phaseId: string | null + name: string | null + description: string | null + isOpen: boolean | null + predecessor: string | null + duration: number | null + scheduledStartDate: Date | null + scheduledEndDate: Date | null + actualStartDate: Date | null + actualEndDate: Date | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengePhaseMaxAggregateOutputType = { + id: string | null + challengeId: string | null + phaseId: string | null + name: string | null + description: string | null + isOpen: boolean | null + predecessor: string | null + duration: number | null + scheduledStartDate: Date | null + scheduledEndDate: Date | null + actualStartDate: Date | null + actualEndDate: Date | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengePhaseCountAggregateOutputType = { + id: number + challengeId: number + phaseId: number + name: number + description: number + isOpen: number + predecessor: number + duration: number + scheduledStartDate: number + scheduledEndDate: number + actualStartDate: number + actualEndDate: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengePhaseAvgAggregateInputType = { + duration?: true + } + + export type ChallengePhaseSumAggregateInputType = { + duration?: true + } + + export type ChallengePhaseMinAggregateInputType = { + id?: true + challengeId?: true + phaseId?: true + name?: true + description?: true + isOpen?: true + predecessor?: true + duration?: true + scheduledStartDate?: true + scheduledEndDate?: true + actualStartDate?: true + actualEndDate?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengePhaseMaxAggregateInputType = { + id?: true + challengeId?: true + phaseId?: true + name?: true + description?: true + isOpen?: true + predecessor?: true + duration?: true + scheduledStartDate?: true + scheduledEndDate?: true + actualStartDate?: true + actualEndDate?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengePhaseCountAggregateInputType = { + id?: true + challengeId?: true + phaseId?: true + name?: true + description?: true + isOpen?: true + predecessor?: true + duration?: true + scheduledStartDate?: true + scheduledEndDate?: true + actualStartDate?: true + actualEndDate?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengePhaseAggregateArgs = { + /** + * Filter which ChallengePhase to aggregate. + */ + where?: ChallengePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhases to fetch. + */ + orderBy?: ChallengePhaseOrderByWithRelationInput | ChallengePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengePhases + **/ + _count?: true | ChallengePhaseCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengePhaseAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengePhaseSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengePhaseMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengePhaseMaxAggregateInputType + } + + export type GetChallengePhaseAggregateType = { + [P in keyof T & keyof AggregateChallengePhase]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengePhaseGroupByArgs = { + where?: ChallengePhaseWhereInput + orderBy?: ChallengePhaseOrderByWithAggregationInput | ChallengePhaseOrderByWithAggregationInput[] + by: ChallengePhaseScalarFieldEnum[] | ChallengePhaseScalarFieldEnum + having?: ChallengePhaseScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengePhaseCountAggregateInputType | true + _avg?: ChallengePhaseAvgAggregateInputType + _sum?: ChallengePhaseSumAggregateInputType + _min?: ChallengePhaseMinAggregateInputType + _max?: ChallengePhaseMaxAggregateInputType + } + + export type ChallengePhaseGroupByOutputType = { + id: string + challengeId: string + phaseId: string + name: string + description: string | null + isOpen: boolean | null + predecessor: string | null + duration: number | null + scheduledStartDate: Date | null + scheduledEndDate: Date | null + actualStartDate: Date | null + actualEndDate: Date | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengePhaseCountAggregateOutputType | null + _avg: ChallengePhaseAvgAggregateOutputType | null + _sum: ChallengePhaseSumAggregateOutputType | null + _min: ChallengePhaseMinAggregateOutputType | null + _max: ChallengePhaseMaxAggregateOutputType | null + } + + type GetChallengePhaseGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengePhaseGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengePhaseSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + phaseId?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + predecessor?: boolean + duration?: boolean + scheduledStartDate?: boolean + scheduledEndDate?: boolean + actualStartDate?: boolean + actualEndDate?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + constraints?: boolean | ChallengePhase$constraintsArgs + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + _count?: boolean | ChallengePhaseCountOutputTypeDefaultArgs + }, ExtArgs["result"]["challengePhase"]> + + export type ChallengePhaseSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + phaseId?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + predecessor?: boolean + duration?: boolean + scheduledStartDate?: boolean + scheduledEndDate?: boolean + actualStartDate?: boolean + actualEndDate?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + }, ExtArgs["result"]["challengePhase"]> + + export type ChallengePhaseSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + phaseId?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + predecessor?: boolean + duration?: boolean + scheduledStartDate?: boolean + scheduledEndDate?: boolean + actualStartDate?: boolean + actualEndDate?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + }, ExtArgs["result"]["challengePhase"]> + + export type ChallengePhaseSelectScalar = { + id?: boolean + challengeId?: boolean + phaseId?: boolean + name?: boolean + description?: boolean + isOpen?: boolean + predecessor?: boolean + duration?: boolean + scheduledStartDate?: boolean + scheduledEndDate?: boolean + actualStartDate?: boolean + actualEndDate?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengePhaseOmit = $Extensions.GetOmit<"id" | "challengeId" | "phaseId" | "name" | "description" | "isOpen" | "predecessor" | "duration" | "scheduledStartDate" | "scheduledEndDate" | "actualStartDate" | "actualEndDate" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengePhase"]> + export type ChallengePhaseInclude = { + constraints?: boolean | ChallengePhase$constraintsArgs + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + _count?: boolean | ChallengePhaseCountOutputTypeDefaultArgs + } + export type ChallengePhaseIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + } + export type ChallengePhaseIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + } + + export type $ChallengePhasePayload = { + name: "ChallengePhase" + objects: { + constraints: Prisma.$ChallengePhaseConstraintPayload[] + challenge: Prisma.$ChallengePayload + phase: Prisma.$PhasePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + phaseId: string + name: string + description: string | null + isOpen: boolean | null + predecessor: string | null + duration: number | null + scheduledStartDate: Date | null + scheduledEndDate: Date | null + actualStartDate: Date | null + actualEndDate: Date | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengePhase"]> + composites: {} + } + + type ChallengePhaseGetPayload = $Result.GetResult + + type ChallengePhaseCountArgs = + Omit & { + select?: ChallengePhaseCountAggregateInputType | true + } + + export interface ChallengePhaseDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengePhase'], meta: { name: 'ChallengePhase' } } + /** + * Find zero or one ChallengePhase that matches the filter. + * @param {ChallengePhaseFindUniqueArgs} args - Arguments to find a ChallengePhase + * @example + * // Get one ChallengePhase + * const challengePhase = await prisma.challengePhase.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengePhase that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengePhaseFindUniqueOrThrowArgs} args - Arguments to find a ChallengePhase + * @example + * // Get one ChallengePhase + * const challengePhase = await prisma.challengePhase.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengePhase that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseFindFirstArgs} args - Arguments to find a ChallengePhase + * @example + * // Get one ChallengePhase + * const challengePhase = await prisma.challengePhase.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengePhase that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseFindFirstOrThrowArgs} args - Arguments to find a ChallengePhase + * @example + * // Get one ChallengePhase + * const challengePhase = await prisma.challengePhase.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengePhases that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengePhases + * const challengePhases = await prisma.challengePhase.findMany() + * + * // Get first 10 ChallengePhases + * const challengePhases = await prisma.challengePhase.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengePhaseWithIdOnly = await prisma.challengePhase.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengePhase. + * @param {ChallengePhaseCreateArgs} args - Arguments to create a ChallengePhase. + * @example + * // Create one ChallengePhase + * const ChallengePhase = await prisma.challengePhase.create({ + * data: { + * // ... data to create a ChallengePhase + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengePhases. + * @param {ChallengePhaseCreateManyArgs} args - Arguments to create many ChallengePhases. + * @example + * // Create many ChallengePhases + * const challengePhase = await prisma.challengePhase.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengePhases and returns the data saved in the database. + * @param {ChallengePhaseCreateManyAndReturnArgs} args - Arguments to create many ChallengePhases. + * @example + * // Create many ChallengePhases + * const challengePhase = await prisma.challengePhase.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengePhases and only return the `id` + * const challengePhaseWithIdOnly = await prisma.challengePhase.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengePhase. + * @param {ChallengePhaseDeleteArgs} args - Arguments to delete one ChallengePhase. + * @example + * // Delete one ChallengePhase + * const ChallengePhase = await prisma.challengePhase.delete({ + * where: { + * // ... filter to delete one ChallengePhase + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengePhase. + * @param {ChallengePhaseUpdateArgs} args - Arguments to update one ChallengePhase. + * @example + * // Update one ChallengePhase + * const challengePhase = await prisma.challengePhase.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengePhases. + * @param {ChallengePhaseDeleteManyArgs} args - Arguments to filter ChallengePhases to delete. + * @example + * // Delete a few ChallengePhases + * const { count } = await prisma.challengePhase.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengePhases. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengePhases + * const challengePhase = await prisma.challengePhase.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengePhases and returns the data updated in the database. + * @param {ChallengePhaseUpdateManyAndReturnArgs} args - Arguments to update many ChallengePhases. + * @example + * // Update many ChallengePhases + * const challengePhase = await prisma.challengePhase.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengePhases and only return the `id` + * const challengePhaseWithIdOnly = await prisma.challengePhase.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengePhase. + * @param {ChallengePhaseUpsertArgs} args - Arguments to update or create a ChallengePhase. + * @example + * // Update or create a ChallengePhase + * const challengePhase = await prisma.challengePhase.upsert({ + * create: { + * // ... data to create a ChallengePhase + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengePhase we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengePhases. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseCountArgs} args - Arguments to filter ChallengePhases to count. + * @example + * // Count the number of ChallengePhases + * const count = await prisma.challengePhase.count({ + * where: { + * // ... the filter for the ChallengePhases we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengePhase. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengePhase. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengePhaseGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengePhaseGroupByArgs['orderBy'] } + : { orderBy?: ChallengePhaseGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengePhaseGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengePhase model + */ + readonly fields: ChallengePhaseFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengePhase. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengePhaseClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + constraints = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + phase = {}>(args?: Subset>): Prisma__PhaseClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengePhase model + */ + interface ChallengePhaseFieldRefs { + readonly id: FieldRef<"ChallengePhase", 'String'> + readonly challengeId: FieldRef<"ChallengePhase", 'String'> + readonly phaseId: FieldRef<"ChallengePhase", 'String'> + readonly name: FieldRef<"ChallengePhase", 'String'> + readonly description: FieldRef<"ChallengePhase", 'String'> + readonly isOpen: FieldRef<"ChallengePhase", 'Boolean'> + readonly predecessor: FieldRef<"ChallengePhase", 'String'> + readonly duration: FieldRef<"ChallengePhase", 'Int'> + readonly scheduledStartDate: FieldRef<"ChallengePhase", 'DateTime'> + readonly scheduledEndDate: FieldRef<"ChallengePhase", 'DateTime'> + readonly actualStartDate: FieldRef<"ChallengePhase", 'DateTime'> + readonly actualEndDate: FieldRef<"ChallengePhase", 'DateTime'> + readonly createdAt: FieldRef<"ChallengePhase", 'DateTime'> + readonly createdBy: FieldRef<"ChallengePhase", 'String'> + readonly updatedAt: FieldRef<"ChallengePhase", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengePhase", 'String'> + } + + + // Custom InputTypes + /** + * ChallengePhase findUnique + */ + export type ChallengePhaseFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * Filter, which ChallengePhase to fetch. + */ + where: ChallengePhaseWhereUniqueInput + } + + /** + * ChallengePhase findUniqueOrThrow + */ + export type ChallengePhaseFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * Filter, which ChallengePhase to fetch. + */ + where: ChallengePhaseWhereUniqueInput + } + + /** + * ChallengePhase findFirst + */ + export type ChallengePhaseFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * Filter, which ChallengePhase to fetch. + */ + where?: ChallengePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhases to fetch. + */ + orderBy?: ChallengePhaseOrderByWithRelationInput | ChallengePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengePhases. + */ + cursor?: ChallengePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengePhases. + */ + distinct?: ChallengePhaseScalarFieldEnum | ChallengePhaseScalarFieldEnum[] + } + + /** + * ChallengePhase findFirstOrThrow + */ + export type ChallengePhaseFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * Filter, which ChallengePhase to fetch. + */ + where?: ChallengePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhases to fetch. + */ + orderBy?: ChallengePhaseOrderByWithRelationInput | ChallengePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengePhases. + */ + cursor?: ChallengePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengePhases. + */ + distinct?: ChallengePhaseScalarFieldEnum | ChallengePhaseScalarFieldEnum[] + } + + /** + * ChallengePhase findMany + */ + export type ChallengePhaseFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * Filter, which ChallengePhases to fetch. + */ + where?: ChallengePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhases to fetch. + */ + orderBy?: ChallengePhaseOrderByWithRelationInput | ChallengePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengePhases. + */ + cursor?: ChallengePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhases. + */ + skip?: number + distinct?: ChallengePhaseScalarFieldEnum | ChallengePhaseScalarFieldEnum[] + } + + /** + * ChallengePhase create + */ + export type ChallengePhaseCreateArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * The data needed to create a ChallengePhase. + */ + data: XOR + } + + /** + * ChallengePhase createMany + */ + export type ChallengePhaseCreateManyArgs = { + /** + * The data used to create many ChallengePhases. + */ + data: ChallengePhaseCreateManyInput | ChallengePhaseCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengePhase createManyAndReturn + */ + export type ChallengePhaseCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * The data used to create many ChallengePhases. + */ + data: ChallengePhaseCreateManyInput | ChallengePhaseCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseIncludeCreateManyAndReturn | null + } + + /** + * ChallengePhase update + */ + export type ChallengePhaseUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * The data needed to update a ChallengePhase. + */ + data: XOR + /** + * Choose, which ChallengePhase to update. + */ + where: ChallengePhaseWhereUniqueInput + } + + /** + * ChallengePhase updateMany + */ + export type ChallengePhaseUpdateManyArgs = { + /** + * The data used to update ChallengePhases. + */ + data: XOR + /** + * Filter which ChallengePhases to update + */ + where?: ChallengePhaseWhereInput + /** + * Limit how many ChallengePhases to update. + */ + limit?: number + } + + /** + * ChallengePhase updateManyAndReturn + */ + export type ChallengePhaseUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * The data used to update ChallengePhases. + */ + data: XOR + /** + * Filter which ChallengePhases to update + */ + where?: ChallengePhaseWhereInput + /** + * Limit how many ChallengePhases to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseIncludeUpdateManyAndReturn | null + } + + /** + * ChallengePhase upsert + */ + export type ChallengePhaseUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * The filter to search for the ChallengePhase to update in case it exists. + */ + where: ChallengePhaseWhereUniqueInput + /** + * In case the ChallengePhase found by the `where` argument doesn't exist, create a new ChallengePhase with this data. + */ + create: XOR + /** + * In case the ChallengePhase was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengePhase delete + */ + export type ChallengePhaseDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + /** + * Filter which ChallengePhase to delete. + */ + where: ChallengePhaseWhereUniqueInput + } + + /** + * ChallengePhase deleteMany + */ + export type ChallengePhaseDeleteManyArgs = { + /** + * Filter which ChallengePhases to delete + */ + where?: ChallengePhaseWhereInput + /** + * Limit how many ChallengePhases to delete. + */ + limit?: number + } + + /** + * ChallengePhase.constraints + */ + export type ChallengePhase$constraintsArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + where?: ChallengePhaseConstraintWhereInput + orderBy?: ChallengePhaseConstraintOrderByWithRelationInput | ChallengePhaseConstraintOrderByWithRelationInput[] + cursor?: ChallengePhaseConstraintWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengePhaseConstraintScalarFieldEnum | ChallengePhaseConstraintScalarFieldEnum[] + } + + /** + * ChallengePhase without action + */ + export type ChallengePhaseDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengePhase + */ + select?: ChallengePhaseSelect | null + /** + * Omit specific fields from the ChallengePhase + */ + omit?: ChallengePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseInclude | null + } + + + /** + * Model ChallengePhaseConstraint + */ + + export type AggregateChallengePhaseConstraint = { + _count: ChallengePhaseConstraintCountAggregateOutputType | null + _avg: ChallengePhaseConstraintAvgAggregateOutputType | null + _sum: ChallengePhaseConstraintSumAggregateOutputType | null + _min: ChallengePhaseConstraintMinAggregateOutputType | null + _max: ChallengePhaseConstraintMaxAggregateOutputType | null + } + + export type ChallengePhaseConstraintAvgAggregateOutputType = { + value: number | null + } + + export type ChallengePhaseConstraintSumAggregateOutputType = { + value: number | null + } + + export type ChallengePhaseConstraintMinAggregateOutputType = { + id: string | null + challengePhaseId: string | null + name: string | null + value: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengePhaseConstraintMaxAggregateOutputType = { + id: string | null + challengePhaseId: string | null + name: string | null + value: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengePhaseConstraintCountAggregateOutputType = { + id: number + challengePhaseId: number + name: number + value: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengePhaseConstraintAvgAggregateInputType = { + value?: true + } + + export type ChallengePhaseConstraintSumAggregateInputType = { + value?: true + } + + export type ChallengePhaseConstraintMinAggregateInputType = { + id?: true + challengePhaseId?: true + name?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengePhaseConstraintMaxAggregateInputType = { + id?: true + challengePhaseId?: true + name?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengePhaseConstraintCountAggregateInputType = { + id?: true + challengePhaseId?: true + name?: true + value?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengePhaseConstraintAggregateArgs = { + /** + * Filter which ChallengePhaseConstraint to aggregate. + */ + where?: ChallengePhaseConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhaseConstraints to fetch. + */ + orderBy?: ChallengePhaseConstraintOrderByWithRelationInput | ChallengePhaseConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengePhaseConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhaseConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhaseConstraints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengePhaseConstraints + **/ + _count?: true | ChallengePhaseConstraintCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengePhaseConstraintAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengePhaseConstraintSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengePhaseConstraintMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengePhaseConstraintMaxAggregateInputType + } + + export type GetChallengePhaseConstraintAggregateType = { + [P in keyof T & keyof AggregateChallengePhaseConstraint]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengePhaseConstraintGroupByArgs = { + where?: ChallengePhaseConstraintWhereInput + orderBy?: ChallengePhaseConstraintOrderByWithAggregationInput | ChallengePhaseConstraintOrderByWithAggregationInput[] + by: ChallengePhaseConstraintScalarFieldEnum[] | ChallengePhaseConstraintScalarFieldEnum + having?: ChallengePhaseConstraintScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengePhaseConstraintCountAggregateInputType | true + _avg?: ChallengePhaseConstraintAvgAggregateInputType + _sum?: ChallengePhaseConstraintSumAggregateInputType + _min?: ChallengePhaseConstraintMinAggregateInputType + _max?: ChallengePhaseConstraintMaxAggregateInputType + } + + export type ChallengePhaseConstraintGroupByOutputType = { + id: string + challengePhaseId: string + name: string + value: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengePhaseConstraintCountAggregateOutputType | null + _avg: ChallengePhaseConstraintAvgAggregateOutputType | null + _sum: ChallengePhaseConstraintSumAggregateOutputType | null + _min: ChallengePhaseConstraintMinAggregateOutputType | null + _max: ChallengePhaseConstraintMaxAggregateOutputType | null + } + + type GetChallengePhaseConstraintGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengePhaseConstraintGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengePhaseConstraintSelect = $Extensions.GetSelect<{ + id?: boolean + challengePhaseId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challengePhase?: boolean | ChallengePhaseDefaultArgs + }, ExtArgs["result"]["challengePhaseConstraint"]> + + export type ChallengePhaseConstraintSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengePhaseId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challengePhase?: boolean | ChallengePhaseDefaultArgs + }, ExtArgs["result"]["challengePhaseConstraint"]> + + export type ChallengePhaseConstraintSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengePhaseId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challengePhase?: boolean | ChallengePhaseDefaultArgs + }, ExtArgs["result"]["challengePhaseConstraint"]> + + export type ChallengePhaseConstraintSelectScalar = { + id?: boolean + challengePhaseId?: boolean + name?: boolean + value?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengePhaseConstraintOmit = $Extensions.GetOmit<"id" | "challengePhaseId" | "name" | "value" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengePhaseConstraint"]> + export type ChallengePhaseConstraintInclude = { + challengePhase?: boolean | ChallengePhaseDefaultArgs + } + export type ChallengePhaseConstraintIncludeCreateManyAndReturn = { + challengePhase?: boolean | ChallengePhaseDefaultArgs + } + export type ChallengePhaseConstraintIncludeUpdateManyAndReturn = { + challengePhase?: boolean | ChallengePhaseDefaultArgs + } + + export type $ChallengePhaseConstraintPayload = { + name: "ChallengePhaseConstraint" + objects: { + challengePhase: Prisma.$ChallengePhasePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengePhaseId: string + name: string + value: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengePhaseConstraint"]> + composites: {} + } + + type ChallengePhaseConstraintGetPayload = $Result.GetResult + + type ChallengePhaseConstraintCountArgs = + Omit & { + select?: ChallengePhaseConstraintCountAggregateInputType | true + } + + export interface ChallengePhaseConstraintDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengePhaseConstraint'], meta: { name: 'ChallengePhaseConstraint' } } + /** + * Find zero or one ChallengePhaseConstraint that matches the filter. + * @param {ChallengePhaseConstraintFindUniqueArgs} args - Arguments to find a ChallengePhaseConstraint + * @example + * // Get one ChallengePhaseConstraint + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengePhaseConstraint that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengePhaseConstraintFindUniqueOrThrowArgs} args - Arguments to find a ChallengePhaseConstraint + * @example + * // Get one ChallengePhaseConstraint + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengePhaseConstraint that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseConstraintFindFirstArgs} args - Arguments to find a ChallengePhaseConstraint + * @example + * // Get one ChallengePhaseConstraint + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengePhaseConstraint that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseConstraintFindFirstOrThrowArgs} args - Arguments to find a ChallengePhaseConstraint + * @example + * // Get one ChallengePhaseConstraint + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengePhaseConstraints that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseConstraintFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengePhaseConstraints + * const challengePhaseConstraints = await prisma.challengePhaseConstraint.findMany() + * + * // Get first 10 ChallengePhaseConstraints + * const challengePhaseConstraints = await prisma.challengePhaseConstraint.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengePhaseConstraintWithIdOnly = await prisma.challengePhaseConstraint.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengePhaseConstraint. + * @param {ChallengePhaseConstraintCreateArgs} args - Arguments to create a ChallengePhaseConstraint. + * @example + * // Create one ChallengePhaseConstraint + * const ChallengePhaseConstraint = await prisma.challengePhaseConstraint.create({ + * data: { + * // ... data to create a ChallengePhaseConstraint + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengePhaseConstraints. + * @param {ChallengePhaseConstraintCreateManyArgs} args - Arguments to create many ChallengePhaseConstraints. + * @example + * // Create many ChallengePhaseConstraints + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengePhaseConstraints and returns the data saved in the database. + * @param {ChallengePhaseConstraintCreateManyAndReturnArgs} args - Arguments to create many ChallengePhaseConstraints. + * @example + * // Create many ChallengePhaseConstraints + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengePhaseConstraints and only return the `id` + * const challengePhaseConstraintWithIdOnly = await prisma.challengePhaseConstraint.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengePhaseConstraint. + * @param {ChallengePhaseConstraintDeleteArgs} args - Arguments to delete one ChallengePhaseConstraint. + * @example + * // Delete one ChallengePhaseConstraint + * const ChallengePhaseConstraint = await prisma.challengePhaseConstraint.delete({ + * where: { + * // ... filter to delete one ChallengePhaseConstraint + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengePhaseConstraint. + * @param {ChallengePhaseConstraintUpdateArgs} args - Arguments to update one ChallengePhaseConstraint. + * @example + * // Update one ChallengePhaseConstraint + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengePhaseConstraints. + * @param {ChallengePhaseConstraintDeleteManyArgs} args - Arguments to filter ChallengePhaseConstraints to delete. + * @example + * // Delete a few ChallengePhaseConstraints + * const { count } = await prisma.challengePhaseConstraint.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengePhaseConstraints. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseConstraintUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengePhaseConstraints + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengePhaseConstraints and returns the data updated in the database. + * @param {ChallengePhaseConstraintUpdateManyAndReturnArgs} args - Arguments to update many ChallengePhaseConstraints. + * @example + * // Update many ChallengePhaseConstraints + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengePhaseConstraints and only return the `id` + * const challengePhaseConstraintWithIdOnly = await prisma.challengePhaseConstraint.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengePhaseConstraint. + * @param {ChallengePhaseConstraintUpsertArgs} args - Arguments to update or create a ChallengePhaseConstraint. + * @example + * // Update or create a ChallengePhaseConstraint + * const challengePhaseConstraint = await prisma.challengePhaseConstraint.upsert({ + * create: { + * // ... data to create a ChallengePhaseConstraint + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengePhaseConstraint we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengePhaseConstraintClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengePhaseConstraints. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseConstraintCountArgs} args - Arguments to filter ChallengePhaseConstraints to count. + * @example + * // Count the number of ChallengePhaseConstraints + * const count = await prisma.challengePhaseConstraint.count({ + * where: { + * // ... the filter for the ChallengePhaseConstraints we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengePhaseConstraint. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseConstraintAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengePhaseConstraint. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePhaseConstraintGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengePhaseConstraintGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengePhaseConstraintGroupByArgs['orderBy'] } + : { orderBy?: ChallengePhaseConstraintGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengePhaseConstraintGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengePhaseConstraint model + */ + readonly fields: ChallengePhaseConstraintFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengePhaseConstraint. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengePhaseConstraintClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challengePhase = {}>(args?: Subset>): Prisma__ChallengePhaseClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengePhaseConstraint model + */ + interface ChallengePhaseConstraintFieldRefs { + readonly id: FieldRef<"ChallengePhaseConstraint", 'String'> + readonly challengePhaseId: FieldRef<"ChallengePhaseConstraint", 'String'> + readonly name: FieldRef<"ChallengePhaseConstraint", 'String'> + readonly value: FieldRef<"ChallengePhaseConstraint", 'Int'> + readonly createdAt: FieldRef<"ChallengePhaseConstraint", 'DateTime'> + readonly createdBy: FieldRef<"ChallengePhaseConstraint", 'String'> + readonly updatedAt: FieldRef<"ChallengePhaseConstraint", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengePhaseConstraint", 'String'> + } + + + // Custom InputTypes + /** + * ChallengePhaseConstraint findUnique + */ + export type ChallengePhaseConstraintFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * Filter, which ChallengePhaseConstraint to fetch. + */ + where: ChallengePhaseConstraintWhereUniqueInput + } + + /** + * ChallengePhaseConstraint findUniqueOrThrow + */ + export type ChallengePhaseConstraintFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * Filter, which ChallengePhaseConstraint to fetch. + */ + where: ChallengePhaseConstraintWhereUniqueInput + } + + /** + * ChallengePhaseConstraint findFirst + */ + export type ChallengePhaseConstraintFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * Filter, which ChallengePhaseConstraint to fetch. + */ + where?: ChallengePhaseConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhaseConstraints to fetch. + */ + orderBy?: ChallengePhaseConstraintOrderByWithRelationInput | ChallengePhaseConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengePhaseConstraints. + */ + cursor?: ChallengePhaseConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhaseConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhaseConstraints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengePhaseConstraints. + */ + distinct?: ChallengePhaseConstraintScalarFieldEnum | ChallengePhaseConstraintScalarFieldEnum[] + } + + /** + * ChallengePhaseConstraint findFirstOrThrow + */ + export type ChallengePhaseConstraintFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * Filter, which ChallengePhaseConstraint to fetch. + */ + where?: ChallengePhaseConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhaseConstraints to fetch. + */ + orderBy?: ChallengePhaseConstraintOrderByWithRelationInput | ChallengePhaseConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengePhaseConstraints. + */ + cursor?: ChallengePhaseConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhaseConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhaseConstraints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengePhaseConstraints. + */ + distinct?: ChallengePhaseConstraintScalarFieldEnum | ChallengePhaseConstraintScalarFieldEnum[] + } + + /** + * ChallengePhaseConstraint findMany + */ + export type ChallengePhaseConstraintFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * Filter, which ChallengePhaseConstraints to fetch. + */ + where?: ChallengePhaseConstraintWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePhaseConstraints to fetch. + */ + orderBy?: ChallengePhaseConstraintOrderByWithRelationInput | ChallengePhaseConstraintOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengePhaseConstraints. + */ + cursor?: ChallengePhaseConstraintWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePhaseConstraints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePhaseConstraints. + */ + skip?: number + distinct?: ChallengePhaseConstraintScalarFieldEnum | ChallengePhaseConstraintScalarFieldEnum[] + } + + /** + * ChallengePhaseConstraint create + */ + export type ChallengePhaseConstraintCreateArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * The data needed to create a ChallengePhaseConstraint. + */ + data: XOR + } + + /** + * ChallengePhaseConstraint createMany + */ + export type ChallengePhaseConstraintCreateManyArgs = { + /** + * The data used to create many ChallengePhaseConstraints. + */ + data: ChallengePhaseConstraintCreateManyInput | ChallengePhaseConstraintCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengePhaseConstraint createManyAndReturn + */ + export type ChallengePhaseConstraintCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * The data used to create many ChallengePhaseConstraints. + */ + data: ChallengePhaseConstraintCreateManyInput | ChallengePhaseConstraintCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintIncludeCreateManyAndReturn | null + } + + /** + * ChallengePhaseConstraint update + */ + export type ChallengePhaseConstraintUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * The data needed to update a ChallengePhaseConstraint. + */ + data: XOR + /** + * Choose, which ChallengePhaseConstraint to update. + */ + where: ChallengePhaseConstraintWhereUniqueInput + } + + /** + * ChallengePhaseConstraint updateMany + */ + export type ChallengePhaseConstraintUpdateManyArgs = { + /** + * The data used to update ChallengePhaseConstraints. + */ + data: XOR + /** + * Filter which ChallengePhaseConstraints to update + */ + where?: ChallengePhaseConstraintWhereInput + /** + * Limit how many ChallengePhaseConstraints to update. + */ + limit?: number + } + + /** + * ChallengePhaseConstraint updateManyAndReturn + */ + export type ChallengePhaseConstraintUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * The data used to update ChallengePhaseConstraints. + */ + data: XOR + /** + * Filter which ChallengePhaseConstraints to update + */ + where?: ChallengePhaseConstraintWhereInput + /** + * Limit how many ChallengePhaseConstraints to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintIncludeUpdateManyAndReturn | null + } + + /** + * ChallengePhaseConstraint upsert + */ + export type ChallengePhaseConstraintUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * The filter to search for the ChallengePhaseConstraint to update in case it exists. + */ + where: ChallengePhaseConstraintWhereUniqueInput + /** + * In case the ChallengePhaseConstraint found by the `where` argument doesn't exist, create a new ChallengePhaseConstraint with this data. + */ + create: XOR + /** + * In case the ChallengePhaseConstraint was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengePhaseConstraint delete + */ + export type ChallengePhaseConstraintDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + /** + * Filter which ChallengePhaseConstraint to delete. + */ + where: ChallengePhaseConstraintWhereUniqueInput + } + + /** + * ChallengePhaseConstraint deleteMany + */ + export type ChallengePhaseConstraintDeleteManyArgs = { + /** + * Filter which ChallengePhaseConstraints to delete + */ + where?: ChallengePhaseConstraintWhereInput + /** + * Limit how many ChallengePhaseConstraints to delete. + */ + limit?: number + } + + /** + * ChallengePhaseConstraint without action + */ + export type ChallengePhaseConstraintDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengePhaseConstraint + */ + select?: ChallengePhaseConstraintSelect | null + /** + * Omit specific fields from the ChallengePhaseConstraint + */ + omit?: ChallengePhaseConstraintOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePhaseConstraintInclude | null + } + + + /** + * Model ChallengePrizeSet + */ + + export type AggregateChallengePrizeSet = { + _count: ChallengePrizeSetCountAggregateOutputType | null + _min: ChallengePrizeSetMinAggregateOutputType | null + _max: ChallengePrizeSetMaxAggregateOutputType | null + } + + export type ChallengePrizeSetMinAggregateOutputType = { + id: string | null + challengeId: string | null + type: $Enums.PrizeSetTypeEnum | null + description: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengePrizeSetMaxAggregateOutputType = { + id: string | null + challengeId: string | null + type: $Enums.PrizeSetTypeEnum | null + description: string | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengePrizeSetCountAggregateOutputType = { + id: number + challengeId: number + type: number + description: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengePrizeSetMinAggregateInputType = { + id?: true + challengeId?: true + type?: true + description?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengePrizeSetMaxAggregateInputType = { + id?: true + challengeId?: true + type?: true + description?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengePrizeSetCountAggregateInputType = { + id?: true + challengeId?: true + type?: true + description?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengePrizeSetAggregateArgs = { + /** + * Filter which ChallengePrizeSet to aggregate. + */ + where?: ChallengePrizeSetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePrizeSets to fetch. + */ + orderBy?: ChallengePrizeSetOrderByWithRelationInput | ChallengePrizeSetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengePrizeSetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePrizeSets from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePrizeSets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengePrizeSets + **/ + _count?: true | ChallengePrizeSetCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengePrizeSetMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengePrizeSetMaxAggregateInputType + } + + export type GetChallengePrizeSetAggregateType = { + [P in keyof T & keyof AggregateChallengePrizeSet]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengePrizeSetGroupByArgs = { + where?: ChallengePrizeSetWhereInput + orderBy?: ChallengePrizeSetOrderByWithAggregationInput | ChallengePrizeSetOrderByWithAggregationInput[] + by: ChallengePrizeSetScalarFieldEnum[] | ChallengePrizeSetScalarFieldEnum + having?: ChallengePrizeSetScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengePrizeSetCountAggregateInputType | true + _min?: ChallengePrizeSetMinAggregateInputType + _max?: ChallengePrizeSetMaxAggregateInputType + } + + export type ChallengePrizeSetGroupByOutputType = { + id: string + challengeId: string + type: $Enums.PrizeSetTypeEnum + description: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengePrizeSetCountAggregateOutputType | null + _min: ChallengePrizeSetMinAggregateOutputType | null + _max: ChallengePrizeSetMaxAggregateOutputType | null + } + + type GetChallengePrizeSetGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengePrizeSetGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengePrizeSetSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + type?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + prizes?: boolean | ChallengePrizeSet$prizesArgs + challenge?: boolean | ChallengeDefaultArgs + _count?: boolean | ChallengePrizeSetCountOutputTypeDefaultArgs + }, ExtArgs["result"]["challengePrizeSet"]> + + export type ChallengePrizeSetSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + type?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengePrizeSet"]> + + export type ChallengePrizeSetSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + type?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["challengePrizeSet"]> + + export type ChallengePrizeSetSelectScalar = { + id?: boolean + challengeId?: boolean + type?: boolean + description?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengePrizeSetOmit = $Extensions.GetOmit<"id" | "challengeId" | "type" | "description" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengePrizeSet"]> + export type ChallengePrizeSetInclude = { + prizes?: boolean | ChallengePrizeSet$prizesArgs + challenge?: boolean | ChallengeDefaultArgs + _count?: boolean | ChallengePrizeSetCountOutputTypeDefaultArgs + } + export type ChallengePrizeSetIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + export type ChallengePrizeSetIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $ChallengePrizeSetPayload = { + name: "ChallengePrizeSet" + objects: { + prizes: Prisma.$PrizePayload[] + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + type: $Enums.PrizeSetTypeEnum + description: string | null + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengePrizeSet"]> + composites: {} + } + + type ChallengePrizeSetGetPayload = $Result.GetResult + + type ChallengePrizeSetCountArgs = + Omit & { + select?: ChallengePrizeSetCountAggregateInputType | true + } + + export interface ChallengePrizeSetDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengePrizeSet'], meta: { name: 'ChallengePrizeSet' } } + /** + * Find zero or one ChallengePrizeSet that matches the filter. + * @param {ChallengePrizeSetFindUniqueArgs} args - Arguments to find a ChallengePrizeSet + * @example + * // Get one ChallengePrizeSet + * const challengePrizeSet = await prisma.challengePrizeSet.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengePrizeSet that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengePrizeSetFindUniqueOrThrowArgs} args - Arguments to find a ChallengePrizeSet + * @example + * // Get one ChallengePrizeSet + * const challengePrizeSet = await prisma.challengePrizeSet.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengePrizeSet that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePrizeSetFindFirstArgs} args - Arguments to find a ChallengePrizeSet + * @example + * // Get one ChallengePrizeSet + * const challengePrizeSet = await prisma.challengePrizeSet.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengePrizeSet that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePrizeSetFindFirstOrThrowArgs} args - Arguments to find a ChallengePrizeSet + * @example + * // Get one ChallengePrizeSet + * const challengePrizeSet = await prisma.challengePrizeSet.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengePrizeSets that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePrizeSetFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengePrizeSets + * const challengePrizeSets = await prisma.challengePrizeSet.findMany() + * + * // Get first 10 ChallengePrizeSets + * const challengePrizeSets = await prisma.challengePrizeSet.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengePrizeSetWithIdOnly = await prisma.challengePrizeSet.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengePrizeSet. + * @param {ChallengePrizeSetCreateArgs} args - Arguments to create a ChallengePrizeSet. + * @example + * // Create one ChallengePrizeSet + * const ChallengePrizeSet = await prisma.challengePrizeSet.create({ + * data: { + * // ... data to create a ChallengePrizeSet + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengePrizeSets. + * @param {ChallengePrizeSetCreateManyArgs} args - Arguments to create many ChallengePrizeSets. + * @example + * // Create many ChallengePrizeSets + * const challengePrizeSet = await prisma.challengePrizeSet.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengePrizeSets and returns the data saved in the database. + * @param {ChallengePrizeSetCreateManyAndReturnArgs} args - Arguments to create many ChallengePrizeSets. + * @example + * // Create many ChallengePrizeSets + * const challengePrizeSet = await prisma.challengePrizeSet.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengePrizeSets and only return the `id` + * const challengePrizeSetWithIdOnly = await prisma.challengePrizeSet.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengePrizeSet. + * @param {ChallengePrizeSetDeleteArgs} args - Arguments to delete one ChallengePrizeSet. + * @example + * // Delete one ChallengePrizeSet + * const ChallengePrizeSet = await prisma.challengePrizeSet.delete({ + * where: { + * // ... filter to delete one ChallengePrizeSet + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengePrizeSet. + * @param {ChallengePrizeSetUpdateArgs} args - Arguments to update one ChallengePrizeSet. + * @example + * // Update one ChallengePrizeSet + * const challengePrizeSet = await prisma.challengePrizeSet.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengePrizeSets. + * @param {ChallengePrizeSetDeleteManyArgs} args - Arguments to filter ChallengePrizeSets to delete. + * @example + * // Delete a few ChallengePrizeSets + * const { count } = await prisma.challengePrizeSet.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengePrizeSets. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePrizeSetUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengePrizeSets + * const challengePrizeSet = await prisma.challengePrizeSet.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengePrizeSets and returns the data updated in the database. + * @param {ChallengePrizeSetUpdateManyAndReturnArgs} args - Arguments to update many ChallengePrizeSets. + * @example + * // Update many ChallengePrizeSets + * const challengePrizeSet = await prisma.challengePrizeSet.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengePrizeSets and only return the `id` + * const challengePrizeSetWithIdOnly = await prisma.challengePrizeSet.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengePrizeSet. + * @param {ChallengePrizeSetUpsertArgs} args - Arguments to update or create a ChallengePrizeSet. + * @example + * // Update or create a ChallengePrizeSet + * const challengePrizeSet = await prisma.challengePrizeSet.upsert({ + * create: { + * // ... data to create a ChallengePrizeSet + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengePrizeSet we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengePrizeSetClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengePrizeSets. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePrizeSetCountArgs} args - Arguments to filter ChallengePrizeSets to count. + * @example + * // Count the number of ChallengePrizeSets + * const count = await prisma.challengePrizeSet.count({ + * where: { + * // ... the filter for the ChallengePrizeSets we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengePrizeSet. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePrizeSetAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengePrizeSet. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengePrizeSetGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengePrizeSetGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengePrizeSetGroupByArgs['orderBy'] } + : { orderBy?: ChallengePrizeSetGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengePrizeSetGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengePrizeSet model + */ + readonly fields: ChallengePrizeSetFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengePrizeSet. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengePrizeSetClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + prizes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengePrizeSet model + */ + interface ChallengePrizeSetFieldRefs { + readonly id: FieldRef<"ChallengePrizeSet", 'String'> + readonly challengeId: FieldRef<"ChallengePrizeSet", 'String'> + readonly type: FieldRef<"ChallengePrizeSet", 'PrizeSetTypeEnum'> + readonly description: FieldRef<"ChallengePrizeSet", 'String'> + readonly createdAt: FieldRef<"ChallengePrizeSet", 'DateTime'> + readonly createdBy: FieldRef<"ChallengePrizeSet", 'String'> + readonly updatedAt: FieldRef<"ChallengePrizeSet", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengePrizeSet", 'String'> + } + + + // Custom InputTypes + /** + * ChallengePrizeSet findUnique + */ + export type ChallengePrizeSetFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * Filter, which ChallengePrizeSet to fetch. + */ + where: ChallengePrizeSetWhereUniqueInput + } + + /** + * ChallengePrizeSet findUniqueOrThrow + */ + export type ChallengePrizeSetFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * Filter, which ChallengePrizeSet to fetch. + */ + where: ChallengePrizeSetWhereUniqueInput + } + + /** + * ChallengePrizeSet findFirst + */ + export type ChallengePrizeSetFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * Filter, which ChallengePrizeSet to fetch. + */ + where?: ChallengePrizeSetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePrizeSets to fetch. + */ + orderBy?: ChallengePrizeSetOrderByWithRelationInput | ChallengePrizeSetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengePrizeSets. + */ + cursor?: ChallengePrizeSetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePrizeSets from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePrizeSets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengePrizeSets. + */ + distinct?: ChallengePrizeSetScalarFieldEnum | ChallengePrizeSetScalarFieldEnum[] + } + + /** + * ChallengePrizeSet findFirstOrThrow + */ + export type ChallengePrizeSetFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * Filter, which ChallengePrizeSet to fetch. + */ + where?: ChallengePrizeSetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePrizeSets to fetch. + */ + orderBy?: ChallengePrizeSetOrderByWithRelationInput | ChallengePrizeSetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengePrizeSets. + */ + cursor?: ChallengePrizeSetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePrizeSets from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePrizeSets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengePrizeSets. + */ + distinct?: ChallengePrizeSetScalarFieldEnum | ChallengePrizeSetScalarFieldEnum[] + } + + /** + * ChallengePrizeSet findMany + */ + export type ChallengePrizeSetFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * Filter, which ChallengePrizeSets to fetch. + */ + where?: ChallengePrizeSetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengePrizeSets to fetch. + */ + orderBy?: ChallengePrizeSetOrderByWithRelationInput | ChallengePrizeSetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengePrizeSets. + */ + cursor?: ChallengePrizeSetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengePrizeSets from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengePrizeSets. + */ + skip?: number + distinct?: ChallengePrizeSetScalarFieldEnum | ChallengePrizeSetScalarFieldEnum[] + } + + /** + * ChallengePrizeSet create + */ + export type ChallengePrizeSetCreateArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * The data needed to create a ChallengePrizeSet. + */ + data: XOR + } + + /** + * ChallengePrizeSet createMany + */ + export type ChallengePrizeSetCreateManyArgs = { + /** + * The data used to create many ChallengePrizeSets. + */ + data: ChallengePrizeSetCreateManyInput | ChallengePrizeSetCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengePrizeSet createManyAndReturn + */ + export type ChallengePrizeSetCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * The data used to create many ChallengePrizeSets. + */ + data: ChallengePrizeSetCreateManyInput | ChallengePrizeSetCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetIncludeCreateManyAndReturn | null + } + + /** + * ChallengePrizeSet update + */ + export type ChallengePrizeSetUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * The data needed to update a ChallengePrizeSet. + */ + data: XOR + /** + * Choose, which ChallengePrizeSet to update. + */ + where: ChallengePrizeSetWhereUniqueInput + } + + /** + * ChallengePrizeSet updateMany + */ + export type ChallengePrizeSetUpdateManyArgs = { + /** + * The data used to update ChallengePrizeSets. + */ + data: XOR + /** + * Filter which ChallengePrizeSets to update + */ + where?: ChallengePrizeSetWhereInput + /** + * Limit how many ChallengePrizeSets to update. + */ + limit?: number + } + + /** + * ChallengePrizeSet updateManyAndReturn + */ + export type ChallengePrizeSetUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * The data used to update ChallengePrizeSets. + */ + data: XOR + /** + * Filter which ChallengePrizeSets to update + */ + where?: ChallengePrizeSetWhereInput + /** + * Limit how many ChallengePrizeSets to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetIncludeUpdateManyAndReturn | null + } + + /** + * ChallengePrizeSet upsert + */ + export type ChallengePrizeSetUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * The filter to search for the ChallengePrizeSet to update in case it exists. + */ + where: ChallengePrizeSetWhereUniqueInput + /** + * In case the ChallengePrizeSet found by the `where` argument doesn't exist, create a new ChallengePrizeSet with this data. + */ + create: XOR + /** + * In case the ChallengePrizeSet was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengePrizeSet delete + */ + export type ChallengePrizeSetDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + /** + * Filter which ChallengePrizeSet to delete. + */ + where: ChallengePrizeSetWhereUniqueInput + } + + /** + * ChallengePrizeSet deleteMany + */ + export type ChallengePrizeSetDeleteManyArgs = { + /** + * Filter which ChallengePrizeSets to delete + */ + where?: ChallengePrizeSetWhereInput + /** + * Limit how many ChallengePrizeSets to delete. + */ + limit?: number + } + + /** + * ChallengePrizeSet.prizes + */ + export type ChallengePrizeSet$prizesArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Omit specific fields from the Prize + */ + omit?: PrizeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + where?: PrizeWhereInput + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + cursor?: PrizeWhereUniqueInput + take?: number + skip?: number + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * ChallengePrizeSet without action + */ + export type ChallengePrizeSetDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengePrizeSet + */ + select?: ChallengePrizeSetSelect | null + /** + * Omit specific fields from the ChallengePrizeSet + */ + omit?: ChallengePrizeSetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengePrizeSetInclude | null + } + + + /** + * Model ChallengeReviewer + */ + + export type AggregateChallengeReviewer = { + _count: ChallengeReviewerCountAggregateOutputType | null + _avg: ChallengeReviewerAvgAggregateOutputType | null + _sum: ChallengeReviewerSumAggregateOutputType | null + _min: ChallengeReviewerMinAggregateOutputType | null + _max: ChallengeReviewerMaxAggregateOutputType | null + } + + export type ChallengeReviewerAvgAggregateOutputType = { + memberReviewerCount: number | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + } + + export type ChallengeReviewerSumAggregateOutputType = { + memberReviewerCount: number | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + } + + export type ChallengeReviewerMinAggregateOutputType = { + id: string | null + challengeId: string | null + scorecardId: string | null + isMemberReview: boolean | null + memberReviewerCount: number | null + phaseId: string | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + type: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeReviewerMaxAggregateOutputType = { + id: string | null + challengeId: string | null + scorecardId: string | null + isMemberReview: boolean | null + memberReviewerCount: number | null + phaseId: string | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + type: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ChallengeReviewerCountAggregateOutputType = { + id: number + challengeId: number + scorecardId: number + isMemberReview: number + memberReviewerCount: number + phaseId: number + fixedAmount: number + baseCoefficient: number + incrementalCoefficient: number + type: number + aiWorkflowId: number + shouldOpenOpportunity: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ChallengeReviewerAvgAggregateInputType = { + memberReviewerCount?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + } + + export type ChallengeReviewerSumAggregateInputType = { + memberReviewerCount?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + } + + export type ChallengeReviewerMinAggregateInputType = { + id?: true + challengeId?: true + scorecardId?: true + isMemberReview?: true + memberReviewerCount?: true + phaseId?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + type?: true + aiWorkflowId?: true + shouldOpenOpportunity?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeReviewerMaxAggregateInputType = { + id?: true + challengeId?: true + scorecardId?: true + isMemberReview?: true + memberReviewerCount?: true + phaseId?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + type?: true + aiWorkflowId?: true + shouldOpenOpportunity?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type ChallengeReviewerCountAggregateInputType = { + id?: true + challengeId?: true + scorecardId?: true + isMemberReview?: true + memberReviewerCount?: true + phaseId?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + type?: true + aiWorkflowId?: true + shouldOpenOpportunity?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ChallengeReviewerAggregateArgs = { + /** + * Filter which ChallengeReviewer to aggregate. + */ + where?: ChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeReviewers to fetch. + */ + orderBy?: ChallengeReviewerOrderByWithRelationInput | ChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeReviewers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChallengeReviewers + **/ + _count?: true | ChallengeReviewerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChallengeReviewerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChallengeReviewerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChallengeReviewerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChallengeReviewerMaxAggregateInputType + } + + export type GetChallengeReviewerAggregateType = { + [P in keyof T & keyof AggregateChallengeReviewer]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChallengeReviewerGroupByArgs = { + where?: ChallengeReviewerWhereInput + orderBy?: ChallengeReviewerOrderByWithAggregationInput | ChallengeReviewerOrderByWithAggregationInput[] + by: ChallengeReviewerScalarFieldEnum[] | ChallengeReviewerScalarFieldEnum + having?: ChallengeReviewerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChallengeReviewerCountAggregateInputType | true + _avg?: ChallengeReviewerAvgAggregateInputType + _sum?: ChallengeReviewerSumAggregateInputType + _min?: ChallengeReviewerMinAggregateInputType + _max?: ChallengeReviewerMaxAggregateInputType + } + + export type ChallengeReviewerGroupByOutputType = { + id: string + challengeId: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount: number | null + phaseId: string + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + type: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: ChallengeReviewerCountAggregateOutputType | null + _avg: ChallengeReviewerAvgAggregateOutputType | null + _sum: ChallengeReviewerSumAggregateOutputType | null + _min: ChallengeReviewerMinAggregateOutputType | null + _max: ChallengeReviewerMaxAggregateOutputType | null + } + + type GetChallengeReviewerGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChallengeReviewerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChallengeReviewerSelect = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + type?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + }, ExtArgs["result"]["challengeReviewer"]> + + export type ChallengeReviewerSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + type?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + }, ExtArgs["result"]["challengeReviewer"]> + + export type ChallengeReviewerSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + challengeId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + type?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + }, ExtArgs["result"]["challengeReviewer"]> + + export type ChallengeReviewerSelectScalar = { + id?: boolean + challengeId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + type?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ChallengeReviewerOmit = $Extensions.GetOmit<"id" | "challengeId" | "scorecardId" | "isMemberReview" | "memberReviewerCount" | "phaseId" | "fixedAmount" | "baseCoefficient" | "incrementalCoefficient" | "type" | "aiWorkflowId" | "shouldOpenOpportunity" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["challengeReviewer"]> + export type ChallengeReviewerInclude = { + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + } + export type ChallengeReviewerIncludeCreateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + } + export type ChallengeReviewerIncludeUpdateManyAndReturn = { + challenge?: boolean | ChallengeDefaultArgs + phase?: boolean | PhaseDefaultArgs + } + + export type $ChallengeReviewerPayload = { + name: "ChallengeReviewer" + objects: { + challenge: Prisma.$ChallengePayload + phase: Prisma.$PhasePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + challengeId: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount: number | null + phaseId: string + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + type: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["challengeReviewer"]> + composites: {} + } + + type ChallengeReviewerGetPayload = $Result.GetResult + + type ChallengeReviewerCountArgs = + Omit & { + select?: ChallengeReviewerCountAggregateInputType | true + } + + export interface ChallengeReviewerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChallengeReviewer'], meta: { name: 'ChallengeReviewer' } } + /** + * Find zero or one ChallengeReviewer that matches the filter. + * @param {ChallengeReviewerFindUniqueArgs} args - Arguments to find a ChallengeReviewer + * @example + * // Get one ChallengeReviewer + * const challengeReviewer = await prisma.challengeReviewer.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ChallengeReviewer that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChallengeReviewerFindUniqueOrThrowArgs} args - Arguments to find a ChallengeReviewer + * @example + * // Get one ChallengeReviewer + * const challengeReviewer = await prisma.challengeReviewer.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeReviewer that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeReviewerFindFirstArgs} args - Arguments to find a ChallengeReviewer + * @example + * // Get one ChallengeReviewer + * const challengeReviewer = await prisma.challengeReviewer.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ChallengeReviewer that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeReviewerFindFirstOrThrowArgs} args - Arguments to find a ChallengeReviewer + * @example + * // Get one ChallengeReviewer + * const challengeReviewer = await prisma.challengeReviewer.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ChallengeReviewers that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeReviewerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChallengeReviewers + * const challengeReviewers = await prisma.challengeReviewer.findMany() + * + * // Get first 10 ChallengeReviewers + * const challengeReviewers = await prisma.challengeReviewer.findMany({ take: 10 }) + * + * // Only select the `id` + * const challengeReviewerWithIdOnly = await prisma.challengeReviewer.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ChallengeReviewer. + * @param {ChallengeReviewerCreateArgs} args - Arguments to create a ChallengeReviewer. + * @example + * // Create one ChallengeReviewer + * const ChallengeReviewer = await prisma.challengeReviewer.create({ + * data: { + * // ... data to create a ChallengeReviewer + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ChallengeReviewers. + * @param {ChallengeReviewerCreateManyArgs} args - Arguments to create many ChallengeReviewers. + * @example + * // Create many ChallengeReviewers + * const challengeReviewer = await prisma.challengeReviewer.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChallengeReviewers and returns the data saved in the database. + * @param {ChallengeReviewerCreateManyAndReturnArgs} args - Arguments to create many ChallengeReviewers. + * @example + * // Create many ChallengeReviewers + * const challengeReviewer = await prisma.challengeReviewer.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChallengeReviewers and only return the `id` + * const challengeReviewerWithIdOnly = await prisma.challengeReviewer.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ChallengeReviewer. + * @param {ChallengeReviewerDeleteArgs} args - Arguments to delete one ChallengeReviewer. + * @example + * // Delete one ChallengeReviewer + * const ChallengeReviewer = await prisma.challengeReviewer.delete({ + * where: { + * // ... filter to delete one ChallengeReviewer + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ChallengeReviewer. + * @param {ChallengeReviewerUpdateArgs} args - Arguments to update one ChallengeReviewer. + * @example + * // Update one ChallengeReviewer + * const challengeReviewer = await prisma.challengeReviewer.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ChallengeReviewers. + * @param {ChallengeReviewerDeleteManyArgs} args - Arguments to filter ChallengeReviewers to delete. + * @example + * // Delete a few ChallengeReviewers + * const { count } = await prisma.challengeReviewer.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeReviewers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeReviewerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChallengeReviewers + * const challengeReviewer = await prisma.challengeReviewer.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChallengeReviewers and returns the data updated in the database. + * @param {ChallengeReviewerUpdateManyAndReturnArgs} args - Arguments to update many ChallengeReviewers. + * @example + * // Update many ChallengeReviewers + * const challengeReviewer = await prisma.challengeReviewer.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ChallengeReviewers and only return the `id` + * const challengeReviewerWithIdOnly = await prisma.challengeReviewer.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ChallengeReviewer. + * @param {ChallengeReviewerUpsertArgs} args - Arguments to update or create a ChallengeReviewer. + * @example + * // Update or create a ChallengeReviewer + * const challengeReviewer = await prisma.challengeReviewer.upsert({ + * create: { + * // ... data to create a ChallengeReviewer + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChallengeReviewer we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChallengeReviewerClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ChallengeReviewers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeReviewerCountArgs} args - Arguments to filter ChallengeReviewers to count. + * @example + * // Count the number of ChallengeReviewers + * const count = await prisma.challengeReviewer.count({ + * where: { + * // ... the filter for the ChallengeReviewers we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChallengeReviewer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeReviewerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChallengeReviewer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChallengeReviewerGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChallengeReviewerGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChallengeReviewerGroupByArgs['orderBy'] } + : { orderBy?: ChallengeReviewerGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChallengeReviewerGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChallengeReviewer model + */ + readonly fields: ChallengeReviewerFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChallengeReviewer. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChallengeReviewerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + phase = {}>(args?: Subset>): Prisma__PhaseClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChallengeReviewer model + */ + interface ChallengeReviewerFieldRefs { + readonly id: FieldRef<"ChallengeReviewer", 'String'> + readonly challengeId: FieldRef<"ChallengeReviewer", 'String'> + readonly scorecardId: FieldRef<"ChallengeReviewer", 'String'> + readonly isMemberReview: FieldRef<"ChallengeReviewer", 'Boolean'> + readonly memberReviewerCount: FieldRef<"ChallengeReviewer", 'Int'> + readonly phaseId: FieldRef<"ChallengeReviewer", 'String'> + readonly fixedAmount: FieldRef<"ChallengeReviewer", 'Float'> + readonly baseCoefficient: FieldRef<"ChallengeReviewer", 'Float'> + readonly incrementalCoefficient: FieldRef<"ChallengeReviewer", 'Float'> + readonly type: FieldRef<"ChallengeReviewer", 'ReviewOpportunityTypeEnum'> + readonly aiWorkflowId: FieldRef<"ChallengeReviewer", 'String'> + readonly shouldOpenOpportunity: FieldRef<"ChallengeReviewer", 'Boolean'> + readonly createdAt: FieldRef<"ChallengeReviewer", 'DateTime'> + readonly createdBy: FieldRef<"ChallengeReviewer", 'String'> + readonly updatedAt: FieldRef<"ChallengeReviewer", 'DateTime'> + readonly updatedBy: FieldRef<"ChallengeReviewer", 'String'> + } + + + // Custom InputTypes + /** + * ChallengeReviewer findUnique + */ + export type ChallengeReviewerFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * Filter, which ChallengeReviewer to fetch. + */ + where: ChallengeReviewerWhereUniqueInput + } + + /** + * ChallengeReviewer findUniqueOrThrow + */ + export type ChallengeReviewerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * Filter, which ChallengeReviewer to fetch. + */ + where: ChallengeReviewerWhereUniqueInput + } + + /** + * ChallengeReviewer findFirst + */ + export type ChallengeReviewerFindFirstArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * Filter, which ChallengeReviewer to fetch. + */ + where?: ChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeReviewers to fetch. + */ + orderBy?: ChallengeReviewerOrderByWithRelationInput | ChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeReviewers. + */ + cursor?: ChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeReviewers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeReviewers. + */ + distinct?: ChallengeReviewerScalarFieldEnum | ChallengeReviewerScalarFieldEnum[] + } + + /** + * ChallengeReviewer findFirstOrThrow + */ + export type ChallengeReviewerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * Filter, which ChallengeReviewer to fetch. + */ + where?: ChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeReviewers to fetch. + */ + orderBy?: ChallengeReviewerOrderByWithRelationInput | ChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChallengeReviewers. + */ + cursor?: ChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeReviewers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChallengeReviewers. + */ + distinct?: ChallengeReviewerScalarFieldEnum | ChallengeReviewerScalarFieldEnum[] + } + + /** + * ChallengeReviewer findMany + */ + export type ChallengeReviewerFindManyArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * Filter, which ChallengeReviewers to fetch. + */ + where?: ChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChallengeReviewers to fetch. + */ + orderBy?: ChallengeReviewerOrderByWithRelationInput | ChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChallengeReviewers. + */ + cursor?: ChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChallengeReviewers. + */ + skip?: number + distinct?: ChallengeReviewerScalarFieldEnum | ChallengeReviewerScalarFieldEnum[] + } + + /** + * ChallengeReviewer create + */ + export type ChallengeReviewerCreateArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * The data needed to create a ChallengeReviewer. + */ + data: XOR + } + + /** + * ChallengeReviewer createMany + */ + export type ChallengeReviewerCreateManyArgs = { + /** + * The data used to create many ChallengeReviewers. + */ + data: ChallengeReviewerCreateManyInput | ChallengeReviewerCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChallengeReviewer createManyAndReturn + */ + export type ChallengeReviewerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * The data used to create many ChallengeReviewers. + */ + data: ChallengeReviewerCreateManyInput | ChallengeReviewerCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerIncludeCreateManyAndReturn | null + } + + /** + * ChallengeReviewer update + */ + export type ChallengeReviewerUpdateArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * The data needed to update a ChallengeReviewer. + */ + data: XOR + /** + * Choose, which ChallengeReviewer to update. + */ + where: ChallengeReviewerWhereUniqueInput + } + + /** + * ChallengeReviewer updateMany + */ + export type ChallengeReviewerUpdateManyArgs = { + /** + * The data used to update ChallengeReviewers. + */ + data: XOR + /** + * Filter which ChallengeReviewers to update + */ + where?: ChallengeReviewerWhereInput + /** + * Limit how many ChallengeReviewers to update. + */ + limit?: number + } + + /** + * ChallengeReviewer updateManyAndReturn + */ + export type ChallengeReviewerUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * The data used to update ChallengeReviewers. + */ + data: XOR + /** + * Filter which ChallengeReviewers to update + */ + where?: ChallengeReviewerWhereInput + /** + * Limit how many ChallengeReviewers to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerIncludeUpdateManyAndReturn | null + } + + /** + * ChallengeReviewer upsert + */ + export type ChallengeReviewerUpsertArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * The filter to search for the ChallengeReviewer to update in case it exists. + */ + where: ChallengeReviewerWhereUniqueInput + /** + * In case the ChallengeReviewer found by the `where` argument doesn't exist, create a new ChallengeReviewer with this data. + */ + create: XOR + /** + * In case the ChallengeReviewer was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChallengeReviewer delete + */ + export type ChallengeReviewerDeleteArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + /** + * Filter which ChallengeReviewer to delete. + */ + where: ChallengeReviewerWhereUniqueInput + } + + /** + * ChallengeReviewer deleteMany + */ + export type ChallengeReviewerDeleteManyArgs = { + /** + * Filter which ChallengeReviewers to delete + */ + where?: ChallengeReviewerWhereInput + /** + * Limit how many ChallengeReviewers to delete. + */ + limit?: number + } + + /** + * ChallengeReviewer without action + */ + export type ChallengeReviewerDefaultArgs = { + /** + * Select specific fields to fetch from the ChallengeReviewer + */ + select?: ChallengeReviewerSelect | null + /** + * Omit specific fields from the ChallengeReviewer + */ + omit?: ChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeReviewerInclude | null + } + + + /** + * Model DefaultChallengeReviewer + */ + + export type AggregateDefaultChallengeReviewer = { + _count: DefaultChallengeReviewerCountAggregateOutputType | null + _avg: DefaultChallengeReviewerAvgAggregateOutputType | null + _sum: DefaultChallengeReviewerSumAggregateOutputType | null + _min: DefaultChallengeReviewerMinAggregateOutputType | null + _max: DefaultChallengeReviewerMaxAggregateOutputType | null + } + + export type DefaultChallengeReviewerAvgAggregateOutputType = { + memberReviewerCount: number | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + } + + export type DefaultChallengeReviewerSumAggregateOutputType = { + memberReviewerCount: number | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + } + + export type DefaultChallengeReviewerMinAggregateOutputType = { + id: string | null + typeId: string | null + trackId: string | null + timelineTemplateId: string | null + scorecardId: string | null + isMemberReview: boolean | null + memberReviewerCount: number | null + phaseName: string | null + phaseId: string | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + opportunityType: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type DefaultChallengeReviewerMaxAggregateOutputType = { + id: string | null + typeId: string | null + trackId: string | null + timelineTemplateId: string | null + scorecardId: string | null + isMemberReview: boolean | null + memberReviewerCount: number | null + phaseName: string | null + phaseId: string | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + opportunityType: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type DefaultChallengeReviewerCountAggregateOutputType = { + id: number + typeId: number + trackId: number + timelineTemplateId: number + scorecardId: number + isMemberReview: number + memberReviewerCount: number + phaseName: number + phaseId: number + fixedAmount: number + baseCoefficient: number + incrementalCoefficient: number + opportunityType: number + aiWorkflowId: number + shouldOpenOpportunity: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type DefaultChallengeReviewerAvgAggregateInputType = { + memberReviewerCount?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + } + + export type DefaultChallengeReviewerSumAggregateInputType = { + memberReviewerCount?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + } + + export type DefaultChallengeReviewerMinAggregateInputType = { + id?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + scorecardId?: true + isMemberReview?: true + memberReviewerCount?: true + phaseName?: true + phaseId?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + opportunityType?: true + aiWorkflowId?: true + shouldOpenOpportunity?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type DefaultChallengeReviewerMaxAggregateInputType = { + id?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + scorecardId?: true + isMemberReview?: true + memberReviewerCount?: true + phaseName?: true + phaseId?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + opportunityType?: true + aiWorkflowId?: true + shouldOpenOpportunity?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type DefaultChallengeReviewerCountAggregateInputType = { + id?: true + typeId?: true + trackId?: true + timelineTemplateId?: true + scorecardId?: true + isMemberReview?: true + memberReviewerCount?: true + phaseName?: true + phaseId?: true + fixedAmount?: true + baseCoefficient?: true + incrementalCoefficient?: true + opportunityType?: true + aiWorkflowId?: true + shouldOpenOpportunity?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type DefaultChallengeReviewerAggregateArgs = { + /** + * Filter which DefaultChallengeReviewer to aggregate. + */ + where?: DefaultChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DefaultChallengeReviewers to fetch. + */ + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: DefaultChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DefaultChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DefaultChallengeReviewers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned DefaultChallengeReviewers + **/ + _count?: true | DefaultChallengeReviewerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: DefaultChallengeReviewerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: DefaultChallengeReviewerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: DefaultChallengeReviewerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: DefaultChallengeReviewerMaxAggregateInputType + } + + export type GetDefaultChallengeReviewerAggregateType = { + [P in keyof T & keyof AggregateDefaultChallengeReviewer]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type DefaultChallengeReviewerGroupByArgs = { + where?: DefaultChallengeReviewerWhereInput + orderBy?: DefaultChallengeReviewerOrderByWithAggregationInput | DefaultChallengeReviewerOrderByWithAggregationInput[] + by: DefaultChallengeReviewerScalarFieldEnum[] | DefaultChallengeReviewerScalarFieldEnum + having?: DefaultChallengeReviewerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: DefaultChallengeReviewerCountAggregateInputType | true + _avg?: DefaultChallengeReviewerAvgAggregateInputType + _sum?: DefaultChallengeReviewerSumAggregateInputType + _min?: DefaultChallengeReviewerMinAggregateInputType + _max?: DefaultChallengeReviewerMaxAggregateInputType + } + + export type DefaultChallengeReviewerGroupByOutputType = { + id: string + typeId: string + trackId: string + timelineTemplateId: string | null + scorecardId: string | null + isMemberReview: boolean + memberReviewerCount: number | null + phaseName: string + phaseId: string | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + opportunityType: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: DefaultChallengeReviewerCountAggregateOutputType | null + _avg: DefaultChallengeReviewerAvgAggregateOutputType | null + _sum: DefaultChallengeReviewerSumAggregateOutputType | null + _min: DefaultChallengeReviewerMinAggregateOutputType | null + _max: DefaultChallengeReviewerMaxAggregateOutputType | null + } + + type GetDefaultChallengeReviewerGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof DefaultChallengeReviewerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type DefaultChallengeReviewerSelect = $Extensions.GetSelect<{ + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseName?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + opportunityType?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challengeType?: boolean | ChallengeTypeDefaultArgs + challengeTrack?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | DefaultChallengeReviewer$timelineTemplateArgs + phase?: boolean | DefaultChallengeReviewer$phaseArgs + }, ExtArgs["result"]["defaultChallengeReviewer"]> + + export type DefaultChallengeReviewerSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseName?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + opportunityType?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challengeType?: boolean | ChallengeTypeDefaultArgs + challengeTrack?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | DefaultChallengeReviewer$timelineTemplateArgs + phase?: boolean | DefaultChallengeReviewer$phaseArgs + }, ExtArgs["result"]["defaultChallengeReviewer"]> + + export type DefaultChallengeReviewerSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseName?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + opportunityType?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + challengeType?: boolean | ChallengeTypeDefaultArgs + challengeTrack?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | DefaultChallengeReviewer$timelineTemplateArgs + phase?: boolean | DefaultChallengeReviewer$phaseArgs + }, ExtArgs["result"]["defaultChallengeReviewer"]> + + export type DefaultChallengeReviewerSelectScalar = { + id?: boolean + typeId?: boolean + trackId?: boolean + timelineTemplateId?: boolean + scorecardId?: boolean + isMemberReview?: boolean + memberReviewerCount?: boolean + phaseName?: boolean + phaseId?: boolean + fixedAmount?: boolean + baseCoefficient?: boolean + incrementalCoefficient?: boolean + opportunityType?: boolean + aiWorkflowId?: boolean + shouldOpenOpportunity?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type DefaultChallengeReviewerOmit = $Extensions.GetOmit<"id" | "typeId" | "trackId" | "timelineTemplateId" | "scorecardId" | "isMemberReview" | "memberReviewerCount" | "phaseName" | "phaseId" | "fixedAmount" | "baseCoefficient" | "incrementalCoefficient" | "opportunityType" | "aiWorkflowId" | "shouldOpenOpportunity" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["defaultChallengeReviewer"]> + export type DefaultChallengeReviewerInclude = { + challengeType?: boolean | ChallengeTypeDefaultArgs + challengeTrack?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | DefaultChallengeReviewer$timelineTemplateArgs + phase?: boolean | DefaultChallengeReviewer$phaseArgs + } + export type DefaultChallengeReviewerIncludeCreateManyAndReturn = { + challengeType?: boolean | ChallengeTypeDefaultArgs + challengeTrack?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | DefaultChallengeReviewer$timelineTemplateArgs + phase?: boolean | DefaultChallengeReviewer$phaseArgs + } + export type DefaultChallengeReviewerIncludeUpdateManyAndReturn = { + challengeType?: boolean | ChallengeTypeDefaultArgs + challengeTrack?: boolean | ChallengeTrackDefaultArgs + timelineTemplate?: boolean | DefaultChallengeReviewer$timelineTemplateArgs + phase?: boolean | DefaultChallengeReviewer$phaseArgs + } + + export type $DefaultChallengeReviewerPayload = { + name: "DefaultChallengeReviewer" + objects: { + challengeType: Prisma.$ChallengeTypePayload + challengeTrack: Prisma.$ChallengeTrackPayload + timelineTemplate: Prisma.$TimelineTemplatePayload | null + phase: Prisma.$PhasePayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + typeId: string + trackId: string + timelineTemplateId: string | null + scorecardId: string | null + isMemberReview: boolean + memberReviewerCount: number | null + phaseName: string + phaseId: string | null + fixedAmount: number | null + baseCoefficient: number | null + incrementalCoefficient: number | null + opportunityType: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId: string | null + shouldOpenOpportunity: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["defaultChallengeReviewer"]> + composites: {} + } + + type DefaultChallengeReviewerGetPayload = $Result.GetResult + + type DefaultChallengeReviewerCountArgs = + Omit & { + select?: DefaultChallengeReviewerCountAggregateInputType | true + } + + export interface DefaultChallengeReviewerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['DefaultChallengeReviewer'], meta: { name: 'DefaultChallengeReviewer' } } + /** + * Find zero or one DefaultChallengeReviewer that matches the filter. + * @param {DefaultChallengeReviewerFindUniqueArgs} args - Arguments to find a DefaultChallengeReviewer + * @example + * // Get one DefaultChallengeReviewer + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one DefaultChallengeReviewer that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {DefaultChallengeReviewerFindUniqueOrThrowArgs} args - Arguments to find a DefaultChallengeReviewer + * @example + * // Get one DefaultChallengeReviewer + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first DefaultChallengeReviewer that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DefaultChallengeReviewerFindFirstArgs} args - Arguments to find a DefaultChallengeReviewer + * @example + * // Get one DefaultChallengeReviewer + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first DefaultChallengeReviewer that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DefaultChallengeReviewerFindFirstOrThrowArgs} args - Arguments to find a DefaultChallengeReviewer + * @example + * // Get one DefaultChallengeReviewer + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more DefaultChallengeReviewers that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DefaultChallengeReviewerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all DefaultChallengeReviewers + * const defaultChallengeReviewers = await prisma.defaultChallengeReviewer.findMany() + * + * // Get first 10 DefaultChallengeReviewers + * const defaultChallengeReviewers = await prisma.defaultChallengeReviewer.findMany({ take: 10 }) + * + * // Only select the `id` + * const defaultChallengeReviewerWithIdOnly = await prisma.defaultChallengeReviewer.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a DefaultChallengeReviewer. + * @param {DefaultChallengeReviewerCreateArgs} args - Arguments to create a DefaultChallengeReviewer. + * @example + * // Create one DefaultChallengeReviewer + * const DefaultChallengeReviewer = await prisma.defaultChallengeReviewer.create({ + * data: { + * // ... data to create a DefaultChallengeReviewer + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many DefaultChallengeReviewers. + * @param {DefaultChallengeReviewerCreateManyArgs} args - Arguments to create many DefaultChallengeReviewers. + * @example + * // Create many DefaultChallengeReviewers + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many DefaultChallengeReviewers and returns the data saved in the database. + * @param {DefaultChallengeReviewerCreateManyAndReturnArgs} args - Arguments to create many DefaultChallengeReviewers. + * @example + * // Create many DefaultChallengeReviewers + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many DefaultChallengeReviewers and only return the `id` + * const defaultChallengeReviewerWithIdOnly = await prisma.defaultChallengeReviewer.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a DefaultChallengeReviewer. + * @param {DefaultChallengeReviewerDeleteArgs} args - Arguments to delete one DefaultChallengeReviewer. + * @example + * // Delete one DefaultChallengeReviewer + * const DefaultChallengeReviewer = await prisma.defaultChallengeReviewer.delete({ + * where: { + * // ... filter to delete one DefaultChallengeReviewer + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one DefaultChallengeReviewer. + * @param {DefaultChallengeReviewerUpdateArgs} args - Arguments to update one DefaultChallengeReviewer. + * @example + * // Update one DefaultChallengeReviewer + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more DefaultChallengeReviewers. + * @param {DefaultChallengeReviewerDeleteManyArgs} args - Arguments to filter DefaultChallengeReviewers to delete. + * @example + * // Delete a few DefaultChallengeReviewers + * const { count } = await prisma.defaultChallengeReviewer.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more DefaultChallengeReviewers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DefaultChallengeReviewerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many DefaultChallengeReviewers + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more DefaultChallengeReviewers and returns the data updated in the database. + * @param {DefaultChallengeReviewerUpdateManyAndReturnArgs} args - Arguments to update many DefaultChallengeReviewers. + * @example + * // Update many DefaultChallengeReviewers + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more DefaultChallengeReviewers and only return the `id` + * const defaultChallengeReviewerWithIdOnly = await prisma.defaultChallengeReviewer.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one DefaultChallengeReviewer. + * @param {DefaultChallengeReviewerUpsertArgs} args - Arguments to update or create a DefaultChallengeReviewer. + * @example + * // Update or create a DefaultChallengeReviewer + * const defaultChallengeReviewer = await prisma.defaultChallengeReviewer.upsert({ + * create: { + * // ... data to create a DefaultChallengeReviewer + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the DefaultChallengeReviewer we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__DefaultChallengeReviewerClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of DefaultChallengeReviewers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DefaultChallengeReviewerCountArgs} args - Arguments to filter DefaultChallengeReviewers to count. + * @example + * // Count the number of DefaultChallengeReviewers + * const count = await prisma.defaultChallengeReviewer.count({ + * where: { + * // ... the filter for the DefaultChallengeReviewers we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a DefaultChallengeReviewer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DefaultChallengeReviewerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by DefaultChallengeReviewer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DefaultChallengeReviewerGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends DefaultChallengeReviewerGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: DefaultChallengeReviewerGroupByArgs['orderBy'] } + : { orderBy?: DefaultChallengeReviewerGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetDefaultChallengeReviewerGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the DefaultChallengeReviewer model + */ + readonly fields: DefaultChallengeReviewerFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for DefaultChallengeReviewer. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__DefaultChallengeReviewerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challengeType = {}>(args?: Subset>): Prisma__ChallengeTypeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + challengeTrack = {}>(args?: Subset>): Prisma__ChallengeTrackClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + timelineTemplate = {}>(args?: Subset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + phase = {}>(args?: Subset>): Prisma__PhaseClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the DefaultChallengeReviewer model + */ + interface DefaultChallengeReviewerFieldRefs { + readonly id: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly typeId: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly trackId: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly timelineTemplateId: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly scorecardId: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly isMemberReview: FieldRef<"DefaultChallengeReviewer", 'Boolean'> + readonly memberReviewerCount: FieldRef<"DefaultChallengeReviewer", 'Int'> + readonly phaseName: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly phaseId: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly fixedAmount: FieldRef<"DefaultChallengeReviewer", 'Float'> + readonly baseCoefficient: FieldRef<"DefaultChallengeReviewer", 'Float'> + readonly incrementalCoefficient: FieldRef<"DefaultChallengeReviewer", 'Float'> + readonly opportunityType: FieldRef<"DefaultChallengeReviewer", 'ReviewOpportunityTypeEnum'> + readonly aiWorkflowId: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly shouldOpenOpportunity: FieldRef<"DefaultChallengeReviewer", 'Boolean'> + readonly createdAt: FieldRef<"DefaultChallengeReviewer", 'DateTime'> + readonly createdBy: FieldRef<"DefaultChallengeReviewer", 'String'> + readonly updatedAt: FieldRef<"DefaultChallengeReviewer", 'DateTime'> + readonly updatedBy: FieldRef<"DefaultChallengeReviewer", 'String'> + } + + + // Custom InputTypes + /** + * DefaultChallengeReviewer findUnique + */ + export type DefaultChallengeReviewerFindUniqueArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * Filter, which DefaultChallengeReviewer to fetch. + */ + where: DefaultChallengeReviewerWhereUniqueInput + } + + /** + * DefaultChallengeReviewer findUniqueOrThrow + */ + export type DefaultChallengeReviewerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * Filter, which DefaultChallengeReviewer to fetch. + */ + where: DefaultChallengeReviewerWhereUniqueInput + } + + /** + * DefaultChallengeReviewer findFirst + */ + export type DefaultChallengeReviewerFindFirstArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * Filter, which DefaultChallengeReviewer to fetch. + */ + where?: DefaultChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DefaultChallengeReviewers to fetch. + */ + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for DefaultChallengeReviewers. + */ + cursor?: DefaultChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DefaultChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DefaultChallengeReviewers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of DefaultChallengeReviewers. + */ + distinct?: DefaultChallengeReviewerScalarFieldEnum | DefaultChallengeReviewerScalarFieldEnum[] + } + + /** + * DefaultChallengeReviewer findFirstOrThrow + */ + export type DefaultChallengeReviewerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * Filter, which DefaultChallengeReviewer to fetch. + */ + where?: DefaultChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DefaultChallengeReviewers to fetch. + */ + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for DefaultChallengeReviewers. + */ + cursor?: DefaultChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DefaultChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DefaultChallengeReviewers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of DefaultChallengeReviewers. + */ + distinct?: DefaultChallengeReviewerScalarFieldEnum | DefaultChallengeReviewerScalarFieldEnum[] + } + + /** + * DefaultChallengeReviewer findMany + */ + export type DefaultChallengeReviewerFindManyArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * Filter, which DefaultChallengeReviewers to fetch. + */ + where?: DefaultChallengeReviewerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DefaultChallengeReviewers to fetch. + */ + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing DefaultChallengeReviewers. + */ + cursor?: DefaultChallengeReviewerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DefaultChallengeReviewers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DefaultChallengeReviewers. + */ + skip?: number + distinct?: DefaultChallengeReviewerScalarFieldEnum | DefaultChallengeReviewerScalarFieldEnum[] + } + + /** + * DefaultChallengeReviewer create + */ + export type DefaultChallengeReviewerCreateArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * The data needed to create a DefaultChallengeReviewer. + */ + data: XOR + } + + /** + * DefaultChallengeReviewer createMany + */ + export type DefaultChallengeReviewerCreateManyArgs = { + /** + * The data used to create many DefaultChallengeReviewers. + */ + data: DefaultChallengeReviewerCreateManyInput | DefaultChallengeReviewerCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * DefaultChallengeReviewer createManyAndReturn + */ + export type DefaultChallengeReviewerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelectCreateManyAndReturn | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * The data used to create many DefaultChallengeReviewers. + */ + data: DefaultChallengeReviewerCreateManyInput | DefaultChallengeReviewerCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerIncludeCreateManyAndReturn | null + } + + /** + * DefaultChallengeReviewer update + */ + export type DefaultChallengeReviewerUpdateArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * The data needed to update a DefaultChallengeReviewer. + */ + data: XOR + /** + * Choose, which DefaultChallengeReviewer to update. + */ + where: DefaultChallengeReviewerWhereUniqueInput + } + + /** + * DefaultChallengeReviewer updateMany + */ + export type DefaultChallengeReviewerUpdateManyArgs = { + /** + * The data used to update DefaultChallengeReviewers. + */ + data: XOR + /** + * Filter which DefaultChallengeReviewers to update + */ + where?: DefaultChallengeReviewerWhereInput + /** + * Limit how many DefaultChallengeReviewers to update. + */ + limit?: number + } + + /** + * DefaultChallengeReviewer updateManyAndReturn + */ + export type DefaultChallengeReviewerUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * The data used to update DefaultChallengeReviewers. + */ + data: XOR + /** + * Filter which DefaultChallengeReviewers to update + */ + where?: DefaultChallengeReviewerWhereInput + /** + * Limit how many DefaultChallengeReviewers to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerIncludeUpdateManyAndReturn | null + } + + /** + * DefaultChallengeReviewer upsert + */ + export type DefaultChallengeReviewerUpsertArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * The filter to search for the DefaultChallengeReviewer to update in case it exists. + */ + where: DefaultChallengeReviewerWhereUniqueInput + /** + * In case the DefaultChallengeReviewer found by the `where` argument doesn't exist, create a new DefaultChallengeReviewer with this data. + */ + create: XOR + /** + * In case the DefaultChallengeReviewer was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * DefaultChallengeReviewer delete + */ + export type DefaultChallengeReviewerDeleteArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + /** + * Filter which DefaultChallengeReviewer to delete. + */ + where: DefaultChallengeReviewerWhereUniqueInput + } + + /** + * DefaultChallengeReviewer deleteMany + */ + export type DefaultChallengeReviewerDeleteManyArgs = { + /** + * Filter which DefaultChallengeReviewers to delete + */ + where?: DefaultChallengeReviewerWhereInput + /** + * Limit how many DefaultChallengeReviewers to delete. + */ + limit?: number + } + + /** + * DefaultChallengeReviewer.timelineTemplate + */ + export type DefaultChallengeReviewer$timelineTemplateArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + where?: TimelineTemplateWhereInput + } + + /** + * DefaultChallengeReviewer.phase + */ + export type DefaultChallengeReviewer$phaseArgs = { + /** + * Select specific fields to fetch from the Phase + */ + select?: PhaseSelect | null + /** + * Omit specific fields from the Phase + */ + omit?: PhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PhaseInclude | null + where?: PhaseWhereInput + } + + /** + * DefaultChallengeReviewer without action + */ + export type DefaultChallengeReviewerDefaultArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + } + + + /** + * Model TimelineTemplate + */ + + export type AggregateTimelineTemplate = { + _count: TimelineTemplateCountAggregateOutputType | null + _min: TimelineTemplateMinAggregateOutputType | null + _max: TimelineTemplateMaxAggregateOutputType | null + } + + export type TimelineTemplateMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isActive: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type TimelineTemplateMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + isActive: boolean | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type TimelineTemplateCountAggregateOutputType = { + id: number + name: number + description: number + isActive: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type TimelineTemplateMinAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type TimelineTemplateMaxAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type TimelineTemplateCountAggregateInputType = { + id?: true + name?: true + description?: true + isActive?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type TimelineTemplateAggregateArgs = { + /** + * Filter which TimelineTemplate to aggregate. + */ + where?: TimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplates to fetch. + */ + orderBy?: TimelineTemplateOrderByWithRelationInput | TimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: TimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplates. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned TimelineTemplates + **/ + _count?: true | TimelineTemplateCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: TimelineTemplateMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: TimelineTemplateMaxAggregateInputType + } + + export type GetTimelineTemplateAggregateType = { + [P in keyof T & keyof AggregateTimelineTemplate]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type TimelineTemplateGroupByArgs = { + where?: TimelineTemplateWhereInput + orderBy?: TimelineTemplateOrderByWithAggregationInput | TimelineTemplateOrderByWithAggregationInput[] + by: TimelineTemplateScalarFieldEnum[] | TimelineTemplateScalarFieldEnum + having?: TimelineTemplateScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: TimelineTemplateCountAggregateInputType | true + _min?: TimelineTemplateMinAggregateInputType + _max?: TimelineTemplateMaxAggregateInputType + } + + export type TimelineTemplateGroupByOutputType = { + id: string + name: string + description: string | null + isActive: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: TimelineTemplateCountAggregateOutputType | null + _min: TimelineTemplateMinAggregateOutputType | null + _max: TimelineTemplateMaxAggregateOutputType | null + } + + type GetTimelineTemplateGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof TimelineTemplateGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type TimelineTemplateSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + phases?: boolean | TimelineTemplate$phasesArgs + challengeTimelineTemplates?: boolean | TimelineTemplate$challengeTimelineTemplatesArgs + challenges?: boolean | TimelineTemplate$challengesArgs + DefaultChallengeReviewer?: boolean | TimelineTemplate$DefaultChallengeReviewerArgs + _count?: boolean | TimelineTemplateCountOutputTypeDefaultArgs + }, ExtArgs["result"]["timelineTemplate"]> + + export type TimelineTemplateSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["timelineTemplate"]> + + export type TimelineTemplateSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["timelineTemplate"]> + + export type TimelineTemplateSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + isActive?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type TimelineTemplateOmit = $Extensions.GetOmit<"id" | "name" | "description" | "isActive" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["timelineTemplate"]> + export type TimelineTemplateInclude = { + phases?: boolean | TimelineTemplate$phasesArgs + challengeTimelineTemplates?: boolean | TimelineTemplate$challengeTimelineTemplatesArgs + challenges?: boolean | TimelineTemplate$challengesArgs + DefaultChallengeReviewer?: boolean | TimelineTemplate$DefaultChallengeReviewerArgs + _count?: boolean | TimelineTemplateCountOutputTypeDefaultArgs + } + export type TimelineTemplateIncludeCreateManyAndReturn = {} + export type TimelineTemplateIncludeUpdateManyAndReturn = {} + + export type $TimelineTemplatePayload = { + name: "TimelineTemplate" + objects: { + phases: Prisma.$TimelineTemplatePhasePayload[] + challengeTimelineTemplates: Prisma.$ChallengeTimelineTemplatePayload[] + challenges: Prisma.$ChallengePayload[] + DefaultChallengeReviewer: Prisma.$DefaultChallengeReviewerPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + description: string | null + isActive: boolean + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["timelineTemplate"]> + composites: {} + } + + type TimelineTemplateGetPayload = $Result.GetResult + + type TimelineTemplateCountArgs = + Omit & { + select?: TimelineTemplateCountAggregateInputType | true + } + + export interface TimelineTemplateDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['TimelineTemplate'], meta: { name: 'TimelineTemplate' } } + /** + * Find zero or one TimelineTemplate that matches the filter. + * @param {TimelineTemplateFindUniqueArgs} args - Arguments to find a TimelineTemplate + * @example + * // Get one TimelineTemplate + * const timelineTemplate = await prisma.timelineTemplate.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one TimelineTemplate that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {TimelineTemplateFindUniqueOrThrowArgs} args - Arguments to find a TimelineTemplate + * @example + * // Get one TimelineTemplate + * const timelineTemplate = await prisma.timelineTemplate.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first TimelineTemplate that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplateFindFirstArgs} args - Arguments to find a TimelineTemplate + * @example + * // Get one TimelineTemplate + * const timelineTemplate = await prisma.timelineTemplate.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first TimelineTemplate that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplateFindFirstOrThrowArgs} args - Arguments to find a TimelineTemplate + * @example + * // Get one TimelineTemplate + * const timelineTemplate = await prisma.timelineTemplate.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more TimelineTemplates that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplateFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all TimelineTemplates + * const timelineTemplates = await prisma.timelineTemplate.findMany() + * + * // Get first 10 TimelineTemplates + * const timelineTemplates = await prisma.timelineTemplate.findMany({ take: 10 }) + * + * // Only select the `id` + * const timelineTemplateWithIdOnly = await prisma.timelineTemplate.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a TimelineTemplate. + * @param {TimelineTemplateCreateArgs} args - Arguments to create a TimelineTemplate. + * @example + * // Create one TimelineTemplate + * const TimelineTemplate = await prisma.timelineTemplate.create({ + * data: { + * // ... data to create a TimelineTemplate + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many TimelineTemplates. + * @param {TimelineTemplateCreateManyArgs} args - Arguments to create many TimelineTemplates. + * @example + * // Create many TimelineTemplates + * const timelineTemplate = await prisma.timelineTemplate.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many TimelineTemplates and returns the data saved in the database. + * @param {TimelineTemplateCreateManyAndReturnArgs} args - Arguments to create many TimelineTemplates. + * @example + * // Create many TimelineTemplates + * const timelineTemplate = await prisma.timelineTemplate.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many TimelineTemplates and only return the `id` + * const timelineTemplateWithIdOnly = await prisma.timelineTemplate.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a TimelineTemplate. + * @param {TimelineTemplateDeleteArgs} args - Arguments to delete one TimelineTemplate. + * @example + * // Delete one TimelineTemplate + * const TimelineTemplate = await prisma.timelineTemplate.delete({ + * where: { + * // ... filter to delete one TimelineTemplate + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one TimelineTemplate. + * @param {TimelineTemplateUpdateArgs} args - Arguments to update one TimelineTemplate. + * @example + * // Update one TimelineTemplate + * const timelineTemplate = await prisma.timelineTemplate.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more TimelineTemplates. + * @param {TimelineTemplateDeleteManyArgs} args - Arguments to filter TimelineTemplates to delete. + * @example + * // Delete a few TimelineTemplates + * const { count } = await prisma.timelineTemplate.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more TimelineTemplates. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplateUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many TimelineTemplates + * const timelineTemplate = await prisma.timelineTemplate.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more TimelineTemplates and returns the data updated in the database. + * @param {TimelineTemplateUpdateManyAndReturnArgs} args - Arguments to update many TimelineTemplates. + * @example + * // Update many TimelineTemplates + * const timelineTemplate = await prisma.timelineTemplate.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more TimelineTemplates and only return the `id` + * const timelineTemplateWithIdOnly = await prisma.timelineTemplate.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one TimelineTemplate. + * @param {TimelineTemplateUpsertArgs} args - Arguments to update or create a TimelineTemplate. + * @example + * // Update or create a TimelineTemplate + * const timelineTemplate = await prisma.timelineTemplate.upsert({ + * create: { + * // ... data to create a TimelineTemplate + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the TimelineTemplate we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of TimelineTemplates. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplateCountArgs} args - Arguments to filter TimelineTemplates to count. + * @example + * // Count the number of TimelineTemplates + * const count = await prisma.timelineTemplate.count({ + * where: { + * // ... the filter for the TimelineTemplates we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a TimelineTemplate. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplateAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by TimelineTemplate. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplateGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends TimelineTemplateGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: TimelineTemplateGroupByArgs['orderBy'] } + : { orderBy?: TimelineTemplateGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetTimelineTemplateGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the TimelineTemplate model + */ + readonly fields: TimelineTemplateFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for TimelineTemplate. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__TimelineTemplateClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + phases = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + challengeTimelineTemplates = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + challenges = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + DefaultChallengeReviewer = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the TimelineTemplate model + */ + interface TimelineTemplateFieldRefs { + readonly id: FieldRef<"TimelineTemplate", 'String'> + readonly name: FieldRef<"TimelineTemplate", 'String'> + readonly description: FieldRef<"TimelineTemplate", 'String'> + readonly isActive: FieldRef<"TimelineTemplate", 'Boolean'> + readonly createdAt: FieldRef<"TimelineTemplate", 'DateTime'> + readonly createdBy: FieldRef<"TimelineTemplate", 'String'> + readonly updatedAt: FieldRef<"TimelineTemplate", 'DateTime'> + readonly updatedBy: FieldRef<"TimelineTemplate", 'String'> + } + + + // Custom InputTypes + /** + * TimelineTemplate findUnique + */ + export type TimelineTemplateFindUniqueArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * Filter, which TimelineTemplate to fetch. + */ + where: TimelineTemplateWhereUniqueInput + } + + /** + * TimelineTemplate findUniqueOrThrow + */ + export type TimelineTemplateFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * Filter, which TimelineTemplate to fetch. + */ + where: TimelineTemplateWhereUniqueInput + } + + /** + * TimelineTemplate findFirst + */ + export type TimelineTemplateFindFirstArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * Filter, which TimelineTemplate to fetch. + */ + where?: TimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplates to fetch. + */ + orderBy?: TimelineTemplateOrderByWithRelationInput | TimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for TimelineTemplates. + */ + cursor?: TimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplates. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of TimelineTemplates. + */ + distinct?: TimelineTemplateScalarFieldEnum | TimelineTemplateScalarFieldEnum[] + } + + /** + * TimelineTemplate findFirstOrThrow + */ + export type TimelineTemplateFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * Filter, which TimelineTemplate to fetch. + */ + where?: TimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplates to fetch. + */ + orderBy?: TimelineTemplateOrderByWithRelationInput | TimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for TimelineTemplates. + */ + cursor?: TimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplates. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of TimelineTemplates. + */ + distinct?: TimelineTemplateScalarFieldEnum | TimelineTemplateScalarFieldEnum[] + } + + /** + * TimelineTemplate findMany + */ + export type TimelineTemplateFindManyArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * Filter, which TimelineTemplates to fetch. + */ + where?: TimelineTemplateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplates to fetch. + */ + orderBy?: TimelineTemplateOrderByWithRelationInput | TimelineTemplateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing TimelineTemplates. + */ + cursor?: TimelineTemplateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplates from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplates. + */ + skip?: number + distinct?: TimelineTemplateScalarFieldEnum | TimelineTemplateScalarFieldEnum[] + } + + /** + * TimelineTemplate create + */ + export type TimelineTemplateCreateArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * The data needed to create a TimelineTemplate. + */ + data: XOR + } + + /** + * TimelineTemplate createMany + */ + export type TimelineTemplateCreateManyArgs = { + /** + * The data used to create many TimelineTemplates. + */ + data: TimelineTemplateCreateManyInput | TimelineTemplateCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * TimelineTemplate createManyAndReturn + */ + export type TimelineTemplateCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelectCreateManyAndReturn | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * The data used to create many TimelineTemplates. + */ + data: TimelineTemplateCreateManyInput | TimelineTemplateCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * TimelineTemplate update + */ + export type TimelineTemplateUpdateArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * The data needed to update a TimelineTemplate. + */ + data: XOR + /** + * Choose, which TimelineTemplate to update. + */ + where: TimelineTemplateWhereUniqueInput + } + + /** + * TimelineTemplate updateMany + */ + export type TimelineTemplateUpdateManyArgs = { + /** + * The data used to update TimelineTemplates. + */ + data: XOR + /** + * Filter which TimelineTemplates to update + */ + where?: TimelineTemplateWhereInput + /** + * Limit how many TimelineTemplates to update. + */ + limit?: number + } + + /** + * TimelineTemplate updateManyAndReturn + */ + export type TimelineTemplateUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * The data used to update TimelineTemplates. + */ + data: XOR + /** + * Filter which TimelineTemplates to update + */ + where?: TimelineTemplateWhereInput + /** + * Limit how many TimelineTemplates to update. + */ + limit?: number + } + + /** + * TimelineTemplate upsert + */ + export type TimelineTemplateUpsertArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * The filter to search for the TimelineTemplate to update in case it exists. + */ + where: TimelineTemplateWhereUniqueInput + /** + * In case the TimelineTemplate found by the `where` argument doesn't exist, create a new TimelineTemplate with this data. + */ + create: XOR + /** + * In case the TimelineTemplate was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * TimelineTemplate delete + */ + export type TimelineTemplateDeleteArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + /** + * Filter which TimelineTemplate to delete. + */ + where: TimelineTemplateWhereUniqueInput + } + + /** + * TimelineTemplate deleteMany + */ + export type TimelineTemplateDeleteManyArgs = { + /** + * Filter which TimelineTemplates to delete + */ + where?: TimelineTemplateWhereInput + /** + * Limit how many TimelineTemplates to delete. + */ + limit?: number + } + + /** + * TimelineTemplate.phases + */ + export type TimelineTemplate$phasesArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + where?: TimelineTemplatePhaseWhereInput + orderBy?: TimelineTemplatePhaseOrderByWithRelationInput | TimelineTemplatePhaseOrderByWithRelationInput[] + cursor?: TimelineTemplatePhaseWhereUniqueInput + take?: number + skip?: number + distinct?: TimelineTemplatePhaseScalarFieldEnum | TimelineTemplatePhaseScalarFieldEnum[] + } + + /** + * TimelineTemplate.challengeTimelineTemplates + */ + export type TimelineTemplate$challengeTimelineTemplatesArgs = { + /** + * Select specific fields to fetch from the ChallengeTimelineTemplate + */ + select?: ChallengeTimelineTemplateSelect | null + /** + * Omit specific fields from the ChallengeTimelineTemplate + */ + omit?: ChallengeTimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeTimelineTemplateInclude | null + where?: ChallengeTimelineTemplateWhereInput + orderBy?: ChallengeTimelineTemplateOrderByWithRelationInput | ChallengeTimelineTemplateOrderByWithRelationInput[] + cursor?: ChallengeTimelineTemplateWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeTimelineTemplateScalarFieldEnum | ChallengeTimelineTemplateScalarFieldEnum[] + } + + /** + * TimelineTemplate.challenges + */ + export type TimelineTemplate$challengesArgs = { + /** + * Select specific fields to fetch from the Challenge + */ + select?: ChallengeSelect | null + /** + * Omit specific fields from the Challenge + */ + omit?: ChallengeOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChallengeInclude | null + where?: ChallengeWhereInput + orderBy?: ChallengeOrderByWithRelationInput | ChallengeOrderByWithRelationInput[] + cursor?: ChallengeWhereUniqueInput + take?: number + skip?: number + distinct?: ChallengeScalarFieldEnum | ChallengeScalarFieldEnum[] + } + + /** + * TimelineTemplate.DefaultChallengeReviewer + */ + export type TimelineTemplate$DefaultChallengeReviewerArgs = { + /** + * Select specific fields to fetch from the DefaultChallengeReviewer + */ + select?: DefaultChallengeReviewerSelect | null + /** + * Omit specific fields from the DefaultChallengeReviewer + */ + omit?: DefaultChallengeReviewerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DefaultChallengeReviewerInclude | null + where?: DefaultChallengeReviewerWhereInput + orderBy?: DefaultChallengeReviewerOrderByWithRelationInput | DefaultChallengeReviewerOrderByWithRelationInput[] + cursor?: DefaultChallengeReviewerWhereUniqueInput + take?: number + skip?: number + distinct?: DefaultChallengeReviewerScalarFieldEnum | DefaultChallengeReviewerScalarFieldEnum[] + } + + /** + * TimelineTemplate without action + */ + export type TimelineTemplateDefaultArgs = { + /** + * Select specific fields to fetch from the TimelineTemplate + */ + select?: TimelineTemplateSelect | null + /** + * Omit specific fields from the TimelineTemplate + */ + omit?: TimelineTemplateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplateInclude | null + } + + + /** + * Model TimelineTemplatePhase + */ + + export type AggregateTimelineTemplatePhase = { + _count: TimelineTemplatePhaseCountAggregateOutputType | null + _avg: TimelineTemplatePhaseAvgAggregateOutputType | null + _sum: TimelineTemplatePhaseSumAggregateOutputType | null + _min: TimelineTemplatePhaseMinAggregateOutputType | null + _max: TimelineTemplatePhaseMaxAggregateOutputType | null + } + + export type TimelineTemplatePhaseAvgAggregateOutputType = { + defaultDuration: number | null + } + + export type TimelineTemplatePhaseSumAggregateOutputType = { + defaultDuration: number | null + } + + export type TimelineTemplatePhaseMinAggregateOutputType = { + id: string | null + timelineTemplateId: string | null + phaseId: string | null + predecessor: string | null + defaultDuration: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type TimelineTemplatePhaseMaxAggregateOutputType = { + id: string | null + timelineTemplateId: string | null + phaseId: string | null + predecessor: string | null + defaultDuration: number | null + createdAt: Date | null + createdBy: string | null + updatedAt: Date | null + updatedBy: string | null + } + + export type TimelineTemplatePhaseCountAggregateOutputType = { + id: number + timelineTemplateId: number + phaseId: number + predecessor: number + defaultDuration: number + createdAt: number + createdBy: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type TimelineTemplatePhaseAvgAggregateInputType = { + defaultDuration?: true + } + + export type TimelineTemplatePhaseSumAggregateInputType = { + defaultDuration?: true + } + + export type TimelineTemplatePhaseMinAggregateInputType = { + id?: true + timelineTemplateId?: true + phaseId?: true + predecessor?: true + defaultDuration?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type TimelineTemplatePhaseMaxAggregateInputType = { + id?: true + timelineTemplateId?: true + phaseId?: true + predecessor?: true + defaultDuration?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + } + + export type TimelineTemplatePhaseCountAggregateInputType = { + id?: true + timelineTemplateId?: true + phaseId?: true + predecessor?: true + defaultDuration?: true + createdAt?: true + createdBy?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type TimelineTemplatePhaseAggregateArgs = { + /** + * Filter which TimelineTemplatePhase to aggregate. + */ + where?: TimelineTemplatePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplatePhases to fetch. + */ + orderBy?: TimelineTemplatePhaseOrderByWithRelationInput | TimelineTemplatePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: TimelineTemplatePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplatePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplatePhases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned TimelineTemplatePhases + **/ + _count?: true | TimelineTemplatePhaseCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: TimelineTemplatePhaseAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: TimelineTemplatePhaseSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: TimelineTemplatePhaseMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: TimelineTemplatePhaseMaxAggregateInputType + } + + export type GetTimelineTemplatePhaseAggregateType = { + [P in keyof T & keyof AggregateTimelineTemplatePhase]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type TimelineTemplatePhaseGroupByArgs = { + where?: TimelineTemplatePhaseWhereInput + orderBy?: TimelineTemplatePhaseOrderByWithAggregationInput | TimelineTemplatePhaseOrderByWithAggregationInput[] + by: TimelineTemplatePhaseScalarFieldEnum[] | TimelineTemplatePhaseScalarFieldEnum + having?: TimelineTemplatePhaseScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: TimelineTemplatePhaseCountAggregateInputType | true + _avg?: TimelineTemplatePhaseAvgAggregateInputType + _sum?: TimelineTemplatePhaseSumAggregateInputType + _min?: TimelineTemplatePhaseMinAggregateInputType + _max?: TimelineTemplatePhaseMaxAggregateInputType + } + + export type TimelineTemplatePhaseGroupByOutputType = { + id: string + timelineTemplateId: string + phaseId: string + predecessor: string | null + defaultDuration: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + _count: TimelineTemplatePhaseCountAggregateOutputType | null + _avg: TimelineTemplatePhaseAvgAggregateOutputType | null + _sum: TimelineTemplatePhaseSumAggregateOutputType | null + _min: TimelineTemplatePhaseMinAggregateOutputType | null + _max: TimelineTemplatePhaseMaxAggregateOutputType | null + } + + type GetTimelineTemplatePhaseGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof TimelineTemplatePhaseGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type TimelineTemplatePhaseSelect = $Extensions.GetSelect<{ + id?: boolean + timelineTemplateId?: boolean + phaseId?: boolean + predecessor?: boolean + defaultDuration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + }, ExtArgs["result"]["timelineTemplatePhase"]> + + export type TimelineTemplatePhaseSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + timelineTemplateId?: boolean + phaseId?: boolean + predecessor?: boolean + defaultDuration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + }, ExtArgs["result"]["timelineTemplatePhase"]> + + export type TimelineTemplatePhaseSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + timelineTemplateId?: boolean + phaseId?: boolean + predecessor?: boolean + defaultDuration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + }, ExtArgs["result"]["timelineTemplatePhase"]> + + export type TimelineTemplatePhaseSelectScalar = { + id?: boolean + timelineTemplateId?: boolean + phaseId?: boolean + predecessor?: boolean + defaultDuration?: boolean + createdAt?: boolean + createdBy?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type TimelineTemplatePhaseOmit = $Extensions.GetOmit<"id" | "timelineTemplateId" | "phaseId" | "predecessor" | "defaultDuration" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy", ExtArgs["result"]["timelineTemplatePhase"]> + export type TimelineTemplatePhaseInclude = { + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + } + export type TimelineTemplatePhaseIncludeCreateManyAndReturn = { + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + } + export type TimelineTemplatePhaseIncludeUpdateManyAndReturn = { + timelineTemplate?: boolean | TimelineTemplateDefaultArgs + } + + export type $TimelineTemplatePhasePayload = { + name: "TimelineTemplatePhase" + objects: { + timelineTemplate: Prisma.$TimelineTemplatePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + timelineTemplateId: string + phaseId: string + predecessor: string | null + defaultDuration: number + createdAt: Date + createdBy: string + updatedAt: Date + updatedBy: string + }, ExtArgs["result"]["timelineTemplatePhase"]> + composites: {} + } + + type TimelineTemplatePhaseGetPayload = $Result.GetResult + + type TimelineTemplatePhaseCountArgs = + Omit & { + select?: TimelineTemplatePhaseCountAggregateInputType | true + } + + export interface TimelineTemplatePhaseDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['TimelineTemplatePhase'], meta: { name: 'TimelineTemplatePhase' } } + /** + * Find zero or one TimelineTemplatePhase that matches the filter. + * @param {TimelineTemplatePhaseFindUniqueArgs} args - Arguments to find a TimelineTemplatePhase + * @example + * // Get one TimelineTemplatePhase + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one TimelineTemplatePhase that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {TimelineTemplatePhaseFindUniqueOrThrowArgs} args - Arguments to find a TimelineTemplatePhase + * @example + * // Get one TimelineTemplatePhase + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first TimelineTemplatePhase that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplatePhaseFindFirstArgs} args - Arguments to find a TimelineTemplatePhase + * @example + * // Get one TimelineTemplatePhase + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first TimelineTemplatePhase that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplatePhaseFindFirstOrThrowArgs} args - Arguments to find a TimelineTemplatePhase + * @example + * // Get one TimelineTemplatePhase + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more TimelineTemplatePhases that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplatePhaseFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all TimelineTemplatePhases + * const timelineTemplatePhases = await prisma.timelineTemplatePhase.findMany() + * + * // Get first 10 TimelineTemplatePhases + * const timelineTemplatePhases = await prisma.timelineTemplatePhase.findMany({ take: 10 }) + * + * // Only select the `id` + * const timelineTemplatePhaseWithIdOnly = await prisma.timelineTemplatePhase.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a TimelineTemplatePhase. + * @param {TimelineTemplatePhaseCreateArgs} args - Arguments to create a TimelineTemplatePhase. + * @example + * // Create one TimelineTemplatePhase + * const TimelineTemplatePhase = await prisma.timelineTemplatePhase.create({ + * data: { + * // ... data to create a TimelineTemplatePhase + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many TimelineTemplatePhases. + * @param {TimelineTemplatePhaseCreateManyArgs} args - Arguments to create many TimelineTemplatePhases. + * @example + * // Create many TimelineTemplatePhases + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many TimelineTemplatePhases and returns the data saved in the database. + * @param {TimelineTemplatePhaseCreateManyAndReturnArgs} args - Arguments to create many TimelineTemplatePhases. + * @example + * // Create many TimelineTemplatePhases + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many TimelineTemplatePhases and only return the `id` + * const timelineTemplatePhaseWithIdOnly = await prisma.timelineTemplatePhase.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a TimelineTemplatePhase. + * @param {TimelineTemplatePhaseDeleteArgs} args - Arguments to delete one TimelineTemplatePhase. + * @example + * // Delete one TimelineTemplatePhase + * const TimelineTemplatePhase = await prisma.timelineTemplatePhase.delete({ + * where: { + * // ... filter to delete one TimelineTemplatePhase + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one TimelineTemplatePhase. + * @param {TimelineTemplatePhaseUpdateArgs} args - Arguments to update one TimelineTemplatePhase. + * @example + * // Update one TimelineTemplatePhase + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more TimelineTemplatePhases. + * @param {TimelineTemplatePhaseDeleteManyArgs} args - Arguments to filter TimelineTemplatePhases to delete. + * @example + * // Delete a few TimelineTemplatePhases + * const { count } = await prisma.timelineTemplatePhase.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more TimelineTemplatePhases. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplatePhaseUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many TimelineTemplatePhases + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more TimelineTemplatePhases and returns the data updated in the database. + * @param {TimelineTemplatePhaseUpdateManyAndReturnArgs} args - Arguments to update many TimelineTemplatePhases. + * @example + * // Update many TimelineTemplatePhases + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more TimelineTemplatePhases and only return the `id` + * const timelineTemplatePhaseWithIdOnly = await prisma.timelineTemplatePhase.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one TimelineTemplatePhase. + * @param {TimelineTemplatePhaseUpsertArgs} args - Arguments to update or create a TimelineTemplatePhase. + * @example + * // Update or create a TimelineTemplatePhase + * const timelineTemplatePhase = await prisma.timelineTemplatePhase.upsert({ + * create: { + * // ... data to create a TimelineTemplatePhase + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the TimelineTemplatePhase we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__TimelineTemplatePhaseClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of TimelineTemplatePhases. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplatePhaseCountArgs} args - Arguments to filter TimelineTemplatePhases to count. + * @example + * // Count the number of TimelineTemplatePhases + * const count = await prisma.timelineTemplatePhase.count({ + * where: { + * // ... the filter for the TimelineTemplatePhases we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a TimelineTemplatePhase. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplatePhaseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by TimelineTemplatePhase. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TimelineTemplatePhaseGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends TimelineTemplatePhaseGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: TimelineTemplatePhaseGroupByArgs['orderBy'] } + : { orderBy?: TimelineTemplatePhaseGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetTimelineTemplatePhaseGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the TimelineTemplatePhase model + */ + readonly fields: TimelineTemplatePhaseFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for TimelineTemplatePhase. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__TimelineTemplatePhaseClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + timelineTemplate = {}>(args?: Subset>): Prisma__TimelineTemplateClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the TimelineTemplatePhase model + */ + interface TimelineTemplatePhaseFieldRefs { + readonly id: FieldRef<"TimelineTemplatePhase", 'String'> + readonly timelineTemplateId: FieldRef<"TimelineTemplatePhase", 'String'> + readonly phaseId: FieldRef<"TimelineTemplatePhase", 'String'> + readonly predecessor: FieldRef<"TimelineTemplatePhase", 'String'> + readonly defaultDuration: FieldRef<"TimelineTemplatePhase", 'Int'> + readonly createdAt: FieldRef<"TimelineTemplatePhase", 'DateTime'> + readonly createdBy: FieldRef<"TimelineTemplatePhase", 'String'> + readonly updatedAt: FieldRef<"TimelineTemplatePhase", 'DateTime'> + readonly updatedBy: FieldRef<"TimelineTemplatePhase", 'String'> + } + + + // Custom InputTypes + /** + * TimelineTemplatePhase findUnique + */ + export type TimelineTemplatePhaseFindUniqueArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * Filter, which TimelineTemplatePhase to fetch. + */ + where: TimelineTemplatePhaseWhereUniqueInput + } + + /** + * TimelineTemplatePhase findUniqueOrThrow + */ + export type TimelineTemplatePhaseFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * Filter, which TimelineTemplatePhase to fetch. + */ + where: TimelineTemplatePhaseWhereUniqueInput + } + + /** + * TimelineTemplatePhase findFirst + */ + export type TimelineTemplatePhaseFindFirstArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * Filter, which TimelineTemplatePhase to fetch. + */ + where?: TimelineTemplatePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplatePhases to fetch. + */ + orderBy?: TimelineTemplatePhaseOrderByWithRelationInput | TimelineTemplatePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for TimelineTemplatePhases. + */ + cursor?: TimelineTemplatePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplatePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplatePhases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of TimelineTemplatePhases. + */ + distinct?: TimelineTemplatePhaseScalarFieldEnum | TimelineTemplatePhaseScalarFieldEnum[] + } + + /** + * TimelineTemplatePhase findFirstOrThrow + */ + export type TimelineTemplatePhaseFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * Filter, which TimelineTemplatePhase to fetch. + */ + where?: TimelineTemplatePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplatePhases to fetch. + */ + orderBy?: TimelineTemplatePhaseOrderByWithRelationInput | TimelineTemplatePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for TimelineTemplatePhases. + */ + cursor?: TimelineTemplatePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplatePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplatePhases. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of TimelineTemplatePhases. + */ + distinct?: TimelineTemplatePhaseScalarFieldEnum | TimelineTemplatePhaseScalarFieldEnum[] + } + + /** + * TimelineTemplatePhase findMany + */ + export type TimelineTemplatePhaseFindManyArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * Filter, which TimelineTemplatePhases to fetch. + */ + where?: TimelineTemplatePhaseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TimelineTemplatePhases to fetch. + */ + orderBy?: TimelineTemplatePhaseOrderByWithRelationInput | TimelineTemplatePhaseOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing TimelineTemplatePhases. + */ + cursor?: TimelineTemplatePhaseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TimelineTemplatePhases from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TimelineTemplatePhases. + */ + skip?: number + distinct?: TimelineTemplatePhaseScalarFieldEnum | TimelineTemplatePhaseScalarFieldEnum[] + } + + /** + * TimelineTemplatePhase create + */ + export type TimelineTemplatePhaseCreateArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * The data needed to create a TimelineTemplatePhase. + */ + data: XOR + } + + /** + * TimelineTemplatePhase createMany + */ + export type TimelineTemplatePhaseCreateManyArgs = { + /** + * The data used to create many TimelineTemplatePhases. + */ + data: TimelineTemplatePhaseCreateManyInput | TimelineTemplatePhaseCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * TimelineTemplatePhase createManyAndReturn + */ + export type TimelineTemplatePhaseCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelectCreateManyAndReturn | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * The data used to create many TimelineTemplatePhases. + */ + data: TimelineTemplatePhaseCreateManyInput | TimelineTemplatePhaseCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseIncludeCreateManyAndReturn | null + } + + /** + * TimelineTemplatePhase update + */ + export type TimelineTemplatePhaseUpdateArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * The data needed to update a TimelineTemplatePhase. + */ + data: XOR + /** + * Choose, which TimelineTemplatePhase to update. + */ + where: TimelineTemplatePhaseWhereUniqueInput + } + + /** + * TimelineTemplatePhase updateMany + */ + export type TimelineTemplatePhaseUpdateManyArgs = { + /** + * The data used to update TimelineTemplatePhases. + */ + data: XOR + /** + * Filter which TimelineTemplatePhases to update + */ + where?: TimelineTemplatePhaseWhereInput + /** + * Limit how many TimelineTemplatePhases to update. + */ + limit?: number + } + + /** + * TimelineTemplatePhase updateManyAndReturn + */ + export type TimelineTemplatePhaseUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * The data used to update TimelineTemplatePhases. + */ + data: XOR + /** + * Filter which TimelineTemplatePhases to update + */ + where?: TimelineTemplatePhaseWhereInput + /** + * Limit how many TimelineTemplatePhases to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseIncludeUpdateManyAndReturn | null + } + + /** + * TimelineTemplatePhase upsert + */ + export type TimelineTemplatePhaseUpsertArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * The filter to search for the TimelineTemplatePhase to update in case it exists. + */ + where: TimelineTemplatePhaseWhereUniqueInput + /** + * In case the TimelineTemplatePhase found by the `where` argument doesn't exist, create a new TimelineTemplatePhase with this data. + */ + create: XOR + /** + * In case the TimelineTemplatePhase was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * TimelineTemplatePhase delete + */ + export type TimelineTemplatePhaseDeleteArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + /** + * Filter which TimelineTemplatePhase to delete. + */ + where: TimelineTemplatePhaseWhereUniqueInput + } + + /** + * TimelineTemplatePhase deleteMany + */ + export type TimelineTemplatePhaseDeleteManyArgs = { + /** + * Filter which TimelineTemplatePhases to delete + */ + where?: TimelineTemplatePhaseWhereInput + /** + * Limit how many TimelineTemplatePhases to delete. + */ + limit?: number + } + + /** + * TimelineTemplatePhase without action + */ + export type TimelineTemplatePhaseDefaultArgs = { + /** + * Select specific fields to fetch from the TimelineTemplatePhase + */ + select?: TimelineTemplatePhaseSelect | null + /** + * Omit specific fields from the TimelineTemplatePhase + */ + omit?: TimelineTemplatePhaseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TimelineTemplatePhaseInclude | null + } + + + /** + * Model MemberChallengeAccess + */ + + export type AggregateMemberChallengeAccess = { + _count: MemberChallengeAccessCountAggregateOutputType | null + _min: MemberChallengeAccessMinAggregateOutputType | null + _max: MemberChallengeAccessMaxAggregateOutputType | null + } + + export type MemberChallengeAccessMinAggregateOutputType = { + challengeId: string | null + memberId: string | null + } + + export type MemberChallengeAccessMaxAggregateOutputType = { + challengeId: string | null + memberId: string | null + } + + export type MemberChallengeAccessCountAggregateOutputType = { + challengeId: number + memberId: number + _all: number + } + + + export type MemberChallengeAccessMinAggregateInputType = { + challengeId?: true + memberId?: true + } + + export type MemberChallengeAccessMaxAggregateInputType = { + challengeId?: true + memberId?: true + } + + export type MemberChallengeAccessCountAggregateInputType = { + challengeId?: true + memberId?: true + _all?: true + } + + export type MemberChallengeAccessAggregateArgs = { + /** + * Filter which MemberChallengeAccess to aggregate. + */ + where?: MemberChallengeAccessWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MemberChallengeAccesses to fetch. + */ + orderBy?: MemberChallengeAccessOrderByWithRelationInput | MemberChallengeAccessOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MemberChallengeAccesses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MemberChallengeAccesses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned MemberChallengeAccesses + **/ + _count?: true | MemberChallengeAccessCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: MemberChallengeAccessMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: MemberChallengeAccessMaxAggregateInputType + } + + export type GetMemberChallengeAccessAggregateType = { + [P in keyof T & keyof AggregateMemberChallengeAccess]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type MemberChallengeAccessGroupByArgs = { + where?: MemberChallengeAccessWhereInput + orderBy?: MemberChallengeAccessOrderByWithAggregationInput | MemberChallengeAccessOrderByWithAggregationInput[] + by: MemberChallengeAccessScalarFieldEnum[] | MemberChallengeAccessScalarFieldEnum + having?: MemberChallengeAccessScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: MemberChallengeAccessCountAggregateInputType | true + _min?: MemberChallengeAccessMinAggregateInputType + _max?: MemberChallengeAccessMaxAggregateInputType + } + + export type MemberChallengeAccessGroupByOutputType = { + challengeId: string + memberId: string + _count: MemberChallengeAccessCountAggregateOutputType | null + _min: MemberChallengeAccessMinAggregateOutputType | null + _max: MemberChallengeAccessMaxAggregateOutputType | null + } + + type GetMemberChallengeAccessGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof MemberChallengeAccessGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type MemberChallengeAccessSelect = $Extensions.GetSelect<{ + challengeId?: boolean + memberId?: boolean + challenge?: boolean | ChallengeDefaultArgs + }, ExtArgs["result"]["memberChallengeAccess"]> + + + + export type MemberChallengeAccessSelectScalar = { + challengeId?: boolean + memberId?: boolean + } + + export type MemberChallengeAccessOmit = $Extensions.GetOmit<"challengeId" | "memberId", ExtArgs["result"]["memberChallengeAccess"]> + export type MemberChallengeAccessInclude = { + challenge?: boolean | ChallengeDefaultArgs + } + + export type $MemberChallengeAccessPayload = { + name: "MemberChallengeAccess" + objects: { + challenge: Prisma.$ChallengePayload + } + scalars: $Extensions.GetPayloadResult<{ + challengeId: string + memberId: string + }, ExtArgs["result"]["memberChallengeAccess"]> + composites: {} + } + + type MemberChallengeAccessGetPayload = $Result.GetResult + + type MemberChallengeAccessCountArgs = + Omit & { + select?: MemberChallengeAccessCountAggregateInputType | true + } + + export interface MemberChallengeAccessDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['MemberChallengeAccess'], meta: { name: 'MemberChallengeAccess' } } + /** + * Find the first MemberChallengeAccess that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MemberChallengeAccessFindFirstArgs} args - Arguments to find a MemberChallengeAccess + * @example + * // Get one MemberChallengeAccess + * const memberChallengeAccess = await prisma.memberChallengeAccess.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst ? { + orderBy: {} + } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { + orderBy: {} + } : {}>(args?: SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma__MemberChallengeAccessClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first MemberChallengeAccess that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MemberChallengeAccessFindFirstOrThrowArgs} args - Arguments to find a MemberChallengeAccess + * @example + * // Get one MemberChallengeAccess + * const memberChallengeAccess = await prisma.memberChallengeAccess.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow ? { + orderBy: {} + } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { + orderBy: {} + } : {}>(args?: SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma__MemberChallengeAccessClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more MemberChallengeAccesses that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MemberChallengeAccessFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all MemberChallengeAccesses + * const memberChallengeAccesses = await prisma.memberChallengeAccess.findMany() + * + * // Get first 10 MemberChallengeAccesses + * const memberChallengeAccesses = await prisma.memberChallengeAccess.findMany({ take: 10 }) + * + * // Only select the `challengeId` + * const memberChallengeAccessWithChallengeIdOnly = await prisma.memberChallengeAccess.findMany({ select: { challengeId: true } }) + * + */ + findMany ? { + orderBy: {} + } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { + orderBy: {} + } : {}>(args?: SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + + /** + * Count the number of MemberChallengeAccesses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MemberChallengeAccessCountArgs} args - Arguments to filter MemberChallengeAccesses to count. + * @example + * // Count the number of MemberChallengeAccesses + * const count = await prisma.memberChallengeAccess.count({ + * where: { + * // ... the filter for the MemberChallengeAccesses we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a MemberChallengeAccess. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MemberChallengeAccessAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by MemberChallengeAccess. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MemberChallengeAccessGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends MemberChallengeAccessGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: MemberChallengeAccessGroupByArgs['orderBy'] } + : { orderBy?: MemberChallengeAccessGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMemberChallengeAccessGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the MemberChallengeAccess model + */ + readonly fields: MemberChallengeAccessFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for MemberChallengeAccess. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__MemberChallengeAccessClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + challenge = {}>(args?: Subset>): Prisma__ChallengeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the MemberChallengeAccess model + */ + interface MemberChallengeAccessFieldRefs { + readonly challengeId: FieldRef<"MemberChallengeAccess", 'String'> + readonly memberId: FieldRef<"MemberChallengeAccess", 'String'> + } + + + // Custom InputTypes + /** + * MemberChallengeAccess findFirst + */ + export type MemberChallengeAccessFindFirstArgs = { + /** + * Select specific fields to fetch from the MemberChallengeAccess + */ + select?: MemberChallengeAccessSelect | null + /** + * Omit specific fields from the MemberChallengeAccess + */ + omit?: MemberChallengeAccessOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemberChallengeAccessInclude | null + /** + * Filter, which MemberChallengeAccess to fetch. + */ + where?: MemberChallengeAccessWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MemberChallengeAccesses to fetch. + */ + orderBy?: MemberChallengeAccessOrderByWithRelationInput | MemberChallengeAccessOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MemberChallengeAccesses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MemberChallengeAccesses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MemberChallengeAccesses. + */ + distinct?: MemberChallengeAccessScalarFieldEnum | MemberChallengeAccessScalarFieldEnum[] + } + + /** + * MemberChallengeAccess findFirstOrThrow + */ + export type MemberChallengeAccessFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the MemberChallengeAccess + */ + select?: MemberChallengeAccessSelect | null + /** + * Omit specific fields from the MemberChallengeAccess + */ + omit?: MemberChallengeAccessOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemberChallengeAccessInclude | null + /** + * Filter, which MemberChallengeAccess to fetch. + */ + where?: MemberChallengeAccessWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MemberChallengeAccesses to fetch. + */ + orderBy?: MemberChallengeAccessOrderByWithRelationInput | MemberChallengeAccessOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MemberChallengeAccesses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MemberChallengeAccesses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MemberChallengeAccesses. + */ + distinct?: MemberChallengeAccessScalarFieldEnum | MemberChallengeAccessScalarFieldEnum[] + } + + /** + * MemberChallengeAccess findMany + */ + export type MemberChallengeAccessFindManyArgs = { + /** + * Select specific fields to fetch from the MemberChallengeAccess + */ + select?: MemberChallengeAccessSelect | null + /** + * Omit specific fields from the MemberChallengeAccess + */ + omit?: MemberChallengeAccessOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemberChallengeAccessInclude | null + /** + * Filter, which MemberChallengeAccesses to fetch. + */ + where?: MemberChallengeAccessWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MemberChallengeAccesses to fetch. + */ + orderBy?: MemberChallengeAccessOrderByWithRelationInput | MemberChallengeAccessOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MemberChallengeAccesses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MemberChallengeAccesses. + */ + skip?: number + distinct?: MemberChallengeAccessScalarFieldEnum | MemberChallengeAccessScalarFieldEnum[] + } + + /** + * MemberChallengeAccess without action + */ + export type MemberChallengeAccessDefaultArgs = { + /** + * Select specific fields to fetch from the MemberChallengeAccess + */ + select?: MemberChallengeAccessSelect | null + /** + * Omit specific fields from the MemberChallengeAccess + */ + omit?: MemberChallengeAccessOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemberChallengeAccessInclude | null + } + + + /** + * Enums + */ + + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' + }; + + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + + export const ChallengeScalarFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + projectId: 'projectId', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + overviewTotalPrizes: 'overviewTotalPrizes', + numOfRegistrants: 'numOfRegistrants', + numOfSubmissions: 'numOfSubmissions', + numOfCheckpointSubmissions: 'numOfCheckpointSubmissions', + currentPhaseNames: 'currentPhaseNames', + wiproAllowed: 'wiproAllowed', + tags: 'tags', + groups: 'groups', + taskIsTask: 'taskIsTask', + taskIsAssigned: 'taskIsAssigned', + taskMemberId: 'taskMemberId', + submissionStartDate: 'submissionStartDate', + submissionEndDate: 'submissionEndDate', + registrationStartDate: 'registrationStartDate', + registrationEndDate: 'registrationEndDate', + startDate: 'startDate', + endDate: 'endDate', + legacyId: 'legacyId', + status: 'status', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeScalarFieldEnum = (typeof ChallengeScalarFieldEnum)[keyof typeof ChallengeScalarFieldEnum] + + + export const ChallengeTypeScalarFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + isTask: 'isTask', + abbreviation: 'abbreviation', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeTypeScalarFieldEnum = (typeof ChallengeTypeScalarFieldEnum)[keyof typeof ChallengeTypeScalarFieldEnum] + + + export const ChallengeTrackScalarFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + abbreviation: 'abbreviation', + legacyId: 'legacyId', + track: 'track', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeTrackScalarFieldEnum = (typeof ChallengeTrackScalarFieldEnum)[keyof typeof ChallengeTrackScalarFieldEnum] + + + export const ChallengeTimelineTemplateScalarFieldEnum: { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + isDefault: 'isDefault', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeTimelineTemplateScalarFieldEnum = (typeof ChallengeTimelineTemplateScalarFieldEnum)[keyof typeof ChallengeTimelineTemplateScalarFieldEnum] + + + export const AuditLogScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + memberId: 'memberId' + }; + + export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum] + + + export const AttachmentScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + name: 'name', + fileSize: 'fileSize', + url: 'url', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type AttachmentScalarFieldEnum = (typeof AttachmentScalarFieldEnum)[keyof typeof AttachmentScalarFieldEnum] + + + export const ChallengeMetadataScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeMetadataScalarFieldEnum = (typeof ChallengeMetadataScalarFieldEnum)[keyof typeof ChallengeMetadataScalarFieldEnum] + + + export const PrizeScalarFieldEnum: { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type PrizeScalarFieldEnum = (typeof PrizeScalarFieldEnum)[keyof typeof PrizeScalarFieldEnum] + + + export const ChallengeWinnerScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + userId: 'userId', + handle: 'handle', + placement: 'placement', + type: 'type', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeWinnerScalarFieldEnum = (typeof ChallengeWinnerScalarFieldEnum)[keyof typeof ChallengeWinnerScalarFieldEnum] + + + export const ChallengeTermScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeTermScalarFieldEnum = (typeof ChallengeTermScalarFieldEnum)[keyof typeof ChallengeTermScalarFieldEnum] + + + export const ChallengeSkillScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeSkillScalarFieldEnum = (typeof ChallengeSkillScalarFieldEnum)[keyof typeof ChallengeSkillScalarFieldEnum] + + + export const ChallengeBillingScalarFieldEnum: { + id: 'id', + billingAccountId: 'billingAccountId', + markup: 'markup', + clientBillingRate: 'clientBillingRate', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeBillingScalarFieldEnum = (typeof ChallengeBillingScalarFieldEnum)[keyof typeof ChallengeBillingScalarFieldEnum] + + + export const ChallengeLegacyScalarFieldEnum: { + id: 'id', + reviewType: 'reviewType', + confidentialityType: 'confidentialityType', + forumId: 'forumId', + directProjectId: 'directProjectId', + screeningScorecardId: 'screeningScorecardId', + reviewScorecardId: 'reviewScorecardId', + isTask: 'isTask', + useSchedulingAPI: 'useSchedulingAPI', + pureV5Task: 'pureV5Task', + pureV5: 'pureV5', + selfService: 'selfService', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + legacySystemId: 'legacySystemId', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeLegacyScalarFieldEnum = (typeof ChallengeLegacyScalarFieldEnum)[keyof typeof ChallengeLegacyScalarFieldEnum] + + + export const ChallengeEventScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + eventId: 'eventId', + name: 'name', + key: 'key', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeEventScalarFieldEnum = (typeof ChallengeEventScalarFieldEnum)[keyof typeof ChallengeEventScalarFieldEnum] + + + export const ChallengeDiscussionScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + type: 'type', + provider: 'provider', + url: 'url', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeDiscussionScalarFieldEnum = (typeof ChallengeDiscussionScalarFieldEnum)[keyof typeof ChallengeDiscussionScalarFieldEnum] + + + export const ChallengeDiscussionOptionScalarFieldEnum: { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeDiscussionOptionScalarFieldEnum = (typeof ChallengeDiscussionOptionScalarFieldEnum)[keyof typeof ChallengeDiscussionOptionScalarFieldEnum] + + + export const ChallengeConstraintScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeConstraintScalarFieldEnum = (typeof ChallengeConstraintScalarFieldEnum)[keyof typeof ChallengeConstraintScalarFieldEnum] + + + export const PhaseScalarFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + isOpen: 'isOpen', + duration: 'duration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type PhaseScalarFieldEnum = (typeof PhaseScalarFieldEnum)[keyof typeof PhaseScalarFieldEnum] + + + export const ChallengePhaseScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + isOpen: 'isOpen', + predecessor: 'predecessor', + duration: 'duration', + scheduledStartDate: 'scheduledStartDate', + scheduledEndDate: 'scheduledEndDate', + actualStartDate: 'actualStartDate', + actualEndDate: 'actualEndDate', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengePhaseScalarFieldEnum = (typeof ChallengePhaseScalarFieldEnum)[keyof typeof ChallengePhaseScalarFieldEnum] + + + export const ChallengePhaseConstraintScalarFieldEnum: { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengePhaseConstraintScalarFieldEnum = (typeof ChallengePhaseConstraintScalarFieldEnum)[keyof typeof ChallengePhaseConstraintScalarFieldEnum] + + + export const ChallengePrizeSetScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + type: 'type', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengePrizeSetScalarFieldEnum = (typeof ChallengePrizeSetScalarFieldEnum)[keyof typeof ChallengePrizeSetScalarFieldEnum] + + + export const ChallengeReviewerScalarFieldEnum: { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + type: 'type', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ChallengeReviewerScalarFieldEnum = (typeof ChallengeReviewerScalarFieldEnum)[keyof typeof ChallengeReviewerScalarFieldEnum] + + + export const DefaultChallengeReviewerScalarFieldEnum: { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseName: 'phaseName', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + opportunityType: 'opportunityType', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type DefaultChallengeReviewerScalarFieldEnum = (typeof DefaultChallengeReviewerScalarFieldEnum)[keyof typeof DefaultChallengeReviewerScalarFieldEnum] + + + export const TimelineTemplateScalarFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type TimelineTemplateScalarFieldEnum = (typeof TimelineTemplateScalarFieldEnum)[keyof typeof TimelineTemplateScalarFieldEnum] + + + export const TimelineTemplatePhaseScalarFieldEnum: { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + defaultDuration: 'defaultDuration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type TimelineTemplatePhaseScalarFieldEnum = (typeof TimelineTemplatePhaseScalarFieldEnum)[keyof typeof TimelineTemplatePhaseScalarFieldEnum] + + + export const MemberChallengeAccessScalarFieldEnum: { + challengeId: 'challengeId', + memberId: 'memberId' + }; + + export type MemberChallengeAccessScalarFieldEnum = (typeof MemberChallengeAccessScalarFieldEnum)[keyof typeof MemberChallengeAccessScalarFieldEnum] + + + export const SortOrder: { + asc: 'asc', + desc: 'desc' + }; + + export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + export const ChallengeOrderByRelevanceFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + currentPhaseNames: 'currentPhaseNames', + tags: 'tags', + groups: 'groups', + taskMemberId: 'taskMemberId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeOrderByRelevanceFieldEnum = (typeof ChallengeOrderByRelevanceFieldEnum)[keyof typeof ChallengeOrderByRelevanceFieldEnum] + + + export const ChallengeTypeOrderByRelevanceFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeTypeOrderByRelevanceFieldEnum = (typeof ChallengeTypeOrderByRelevanceFieldEnum)[keyof typeof ChallengeTypeOrderByRelevanceFieldEnum] + + + export const ChallengeTrackOrderByRelevanceFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeTrackOrderByRelevanceFieldEnum = (typeof ChallengeTrackOrderByRelevanceFieldEnum)[keyof typeof ChallengeTrackOrderByRelevanceFieldEnum] + + + export const ChallengeTimelineTemplateOrderByRelevanceFieldEnum: { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeTimelineTemplateOrderByRelevanceFieldEnum = (typeof ChallengeTimelineTemplateOrderByRelevanceFieldEnum)[keyof typeof ChallengeTimelineTemplateOrderByRelevanceFieldEnum] + + + export const AuditLogOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdBy: 'createdBy', + memberId: 'memberId' + }; + + export type AuditLogOrderByRelevanceFieldEnum = (typeof AuditLogOrderByRelevanceFieldEnum)[keyof typeof AuditLogOrderByRelevanceFieldEnum] + + + export const AttachmentOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + name: 'name', + url: 'url', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type AttachmentOrderByRelevanceFieldEnum = (typeof AttachmentOrderByRelevanceFieldEnum)[keyof typeof AttachmentOrderByRelevanceFieldEnum] + + + export const ChallengeMetadataOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeMetadataOrderByRelevanceFieldEnum = (typeof ChallengeMetadataOrderByRelevanceFieldEnum)[keyof typeof ChallengeMetadataOrderByRelevanceFieldEnum] + + + export const PrizeOrderByRelevanceFieldEnum: { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type PrizeOrderByRelevanceFieldEnum = (typeof PrizeOrderByRelevanceFieldEnum)[keyof typeof PrizeOrderByRelevanceFieldEnum] + + + export const ChallengeWinnerOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + handle: 'handle', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeWinnerOrderByRelevanceFieldEnum = (typeof ChallengeWinnerOrderByRelevanceFieldEnum)[keyof typeof ChallengeWinnerOrderByRelevanceFieldEnum] + + + export const ChallengeTermOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeTermOrderByRelevanceFieldEnum = (typeof ChallengeTermOrderByRelevanceFieldEnum)[keyof typeof ChallengeTermOrderByRelevanceFieldEnum] + + + export const ChallengeSkillOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeSkillOrderByRelevanceFieldEnum = (typeof ChallengeSkillOrderByRelevanceFieldEnum)[keyof typeof ChallengeSkillOrderByRelevanceFieldEnum] + + + export const ChallengeBillingOrderByRelevanceFieldEnum: { + id: 'id', + billingAccountId: 'billingAccountId', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeBillingOrderByRelevanceFieldEnum = (typeof ChallengeBillingOrderByRelevanceFieldEnum)[keyof typeof ChallengeBillingOrderByRelevanceFieldEnum] + + + export const ChallengeLegacyOrderByRelevanceFieldEnum: { + id: 'id', + confidentialityType: 'confidentialityType', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeLegacyOrderByRelevanceFieldEnum = (typeof ChallengeLegacyOrderByRelevanceFieldEnum)[keyof typeof ChallengeLegacyOrderByRelevanceFieldEnum] + + + export const ChallengeEventOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + name: 'name', + key: 'key', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeEventOrderByRelevanceFieldEnum = (typeof ChallengeEventOrderByRelevanceFieldEnum)[keyof typeof ChallengeEventOrderByRelevanceFieldEnum] + + + export const ChallengeDiscussionOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + provider: 'provider', + url: 'url', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeDiscussionOrderByRelevanceFieldEnum = (typeof ChallengeDiscussionOrderByRelevanceFieldEnum)[keyof typeof ChallengeDiscussionOrderByRelevanceFieldEnum] + + + export const ChallengeDiscussionOptionOrderByRelevanceFieldEnum: { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeDiscussionOptionOrderByRelevanceFieldEnum = (typeof ChallengeDiscussionOptionOrderByRelevanceFieldEnum)[keyof typeof ChallengeDiscussionOptionOrderByRelevanceFieldEnum] + + + export const ChallengeConstraintOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeConstraintOrderByRelevanceFieldEnum = (typeof ChallengeConstraintOrderByRelevanceFieldEnum)[keyof typeof ChallengeConstraintOrderByRelevanceFieldEnum] + + + export const PhaseOrderByRelevanceFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type PhaseOrderByRelevanceFieldEnum = (typeof PhaseOrderByRelevanceFieldEnum)[keyof typeof PhaseOrderByRelevanceFieldEnum] + + + export const ChallengePhaseOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengePhaseOrderByRelevanceFieldEnum = (typeof ChallengePhaseOrderByRelevanceFieldEnum)[keyof typeof ChallengePhaseOrderByRelevanceFieldEnum] + + + export const ChallengePhaseConstraintOrderByRelevanceFieldEnum: { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengePhaseConstraintOrderByRelevanceFieldEnum = (typeof ChallengePhaseConstraintOrderByRelevanceFieldEnum)[keyof typeof ChallengePhaseConstraintOrderByRelevanceFieldEnum] + + + export const ChallengePrizeSetOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengePrizeSetOrderByRelevanceFieldEnum = (typeof ChallengePrizeSetOrderByRelevanceFieldEnum)[keyof typeof ChallengePrizeSetOrderByRelevanceFieldEnum] + + + export const ChallengeReviewerOrderByRelevanceFieldEnum: { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type ChallengeReviewerOrderByRelevanceFieldEnum = (typeof ChallengeReviewerOrderByRelevanceFieldEnum)[keyof typeof ChallengeReviewerOrderByRelevanceFieldEnum] + + + export const DefaultChallengeReviewerOrderByRelevanceFieldEnum: { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + phaseName: 'phaseName', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type DefaultChallengeReviewerOrderByRelevanceFieldEnum = (typeof DefaultChallengeReviewerOrderByRelevanceFieldEnum)[keyof typeof DefaultChallengeReviewerOrderByRelevanceFieldEnum] + + + export const TimelineTemplateOrderByRelevanceFieldEnum: { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type TimelineTemplateOrderByRelevanceFieldEnum = (typeof TimelineTemplateOrderByRelevanceFieldEnum)[keyof typeof TimelineTemplateOrderByRelevanceFieldEnum] + + + export const TimelineTemplatePhaseOrderByRelevanceFieldEnum: { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' + }; + + export type TimelineTemplatePhaseOrderByRelevanceFieldEnum = (typeof TimelineTemplatePhaseOrderByRelevanceFieldEnum)[keyof typeof TimelineTemplatePhaseOrderByRelevanceFieldEnum] + + + export const MemberChallengeAccessOrderByRelevanceFieldEnum: { + challengeId: 'challengeId', + memberId: 'memberId' + }; + + export type MemberChallengeAccessOrderByRelevanceFieldEnum = (typeof MemberChallengeAccessOrderByRelevanceFieldEnum)[keyof typeof MemberChallengeAccessOrderByRelevanceFieldEnum] + + + /** + * Field references + */ + + + /** + * Reference to a field of type 'String' + */ + export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + + /** + * Reference to a field of type 'String[]' + */ + export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + + /** + * Reference to a field of type 'Int' + */ + export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + + /** + * Reference to a field of type 'Int[]' + */ + export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + + /** + * Reference to a field of type 'Float' + */ + export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + + /** + * Reference to a field of type 'Float[]' + */ + export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + + + /** + * Reference to a field of type 'Boolean' + */ + export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + + /** + * Reference to a field of type 'DateTime' + */ + export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + + /** + * Reference to a field of type 'DateTime[]' + */ + export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + + /** + * Reference to a field of type 'ChallengeStatusEnum' + */ + export type EnumChallengeStatusEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChallengeStatusEnum'> + + + + /** + * Reference to a field of type 'ChallengeStatusEnum[]' + */ + export type ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChallengeStatusEnum[]'> + + + + /** + * Reference to a field of type 'ChallengeTrackEnum' + */ + export type EnumChallengeTrackEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChallengeTrackEnum'> + + + + /** + * Reference to a field of type 'ChallengeTrackEnum[]' + */ + export type ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChallengeTrackEnum[]'> + + + + /** + * Reference to a field of type 'PrizeSetTypeEnum' + */ + export type EnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeSetTypeEnum'> + + + + /** + * Reference to a field of type 'PrizeSetTypeEnum[]' + */ + export type ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeSetTypeEnum[]'> + + + + /** + * Reference to a field of type 'ReviewTypeEnum' + */ + export type EnumReviewTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ReviewTypeEnum'> + + + + /** + * Reference to a field of type 'ReviewTypeEnum[]' + */ + export type ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ReviewTypeEnum[]'> + + + + /** + * Reference to a field of type 'DiscussionTypeEnum' + */ + export type EnumDiscussionTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DiscussionTypeEnum'> + + + + /** + * Reference to a field of type 'DiscussionTypeEnum[]' + */ + export type ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DiscussionTypeEnum[]'> + + + + /** + * Reference to a field of type 'ReviewOpportunityTypeEnum' + */ + export type EnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ReviewOpportunityTypeEnum'> + + + + /** + * Reference to a field of type 'ReviewOpportunityTypeEnum[]' + */ + export type ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ReviewOpportunityTypeEnum[]'> + + /** + * Deep Input Types + */ + + + export type ChallengeWhereInput = { + AND?: ChallengeWhereInput | ChallengeWhereInput[] + OR?: ChallengeWhereInput[] + NOT?: ChallengeWhereInput | ChallengeWhereInput[] + id?: StringFilter<"Challenge"> | string + name?: StringFilter<"Challenge"> | string + description?: StringNullableFilter<"Challenge"> | string | null + privateDescription?: StringNullableFilter<"Challenge"> | string | null + challengeSource?: StringNullableFilter<"Challenge"> | string | null + descriptionFormat?: StringNullableFilter<"Challenge"> | string | null + projectId?: IntNullableFilter<"Challenge"> | number | null + typeId?: StringFilter<"Challenge"> | string + trackId?: StringFilter<"Challenge"> | string + timelineTemplateId?: StringNullableFilter<"Challenge"> | string | null + overviewTotalPrizes?: FloatNullableFilter<"Challenge"> | number | null + numOfRegistrants?: IntFilter<"Challenge"> | number + numOfSubmissions?: IntFilter<"Challenge"> | number + numOfCheckpointSubmissions?: IntFilter<"Challenge"> | number + currentPhaseNames?: StringNullableListFilter<"Challenge"> + wiproAllowed?: BoolFilter<"Challenge"> | boolean + tags?: StringNullableListFilter<"Challenge"> + groups?: StringNullableListFilter<"Challenge"> + taskIsTask?: BoolFilter<"Challenge"> | boolean + taskIsAssigned?: BoolFilter<"Challenge"> | boolean + taskMemberId?: StringNullableFilter<"Challenge"> | string | null + submissionStartDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + submissionEndDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + registrationStartDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + registrationEndDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + startDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + endDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + legacyId?: IntNullableFilter<"Challenge"> | number | null + status?: EnumChallengeStatusEnumFilter<"Challenge"> | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFilter<"Challenge"> | Date | string + createdBy?: StringFilter<"Challenge"> | string + updatedAt?: DateTimeFilter<"Challenge"> | Date | string + updatedBy?: StringFilter<"Challenge"> | string + billingRecord?: XOR | null + legacyRecord?: XOR | null + constraintRecord?: XOR | null + events?: ChallengeEventListRelationFilter + discussions?: ChallengeDiscussionListRelationFilter + metadata?: ChallengeMetadataListRelationFilter + phases?: ChallengePhaseListRelationFilter + prizeSets?: ChallengePrizeSetListRelationFilter + reviewers?: ChallengeReviewerListRelationFilter + winners?: ChallengeWinnerListRelationFilter + attachments?: AttachmentListRelationFilter + terms?: ChallengeTermListRelationFilter + skills?: ChallengeSkillListRelationFilter + auditLogs?: AuditLogListRelationFilter + memberAccesses?: MemberChallengeAccessListRelationFilter + type?: XOR + track?: XOR + timelineTemplate?: XOR | null + } + + export type ChallengeOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + privateDescription?: SortOrderInput | SortOrder + challengeSource?: SortOrderInput | SortOrder + descriptionFormat?: SortOrderInput | SortOrder + projectId?: SortOrderInput | SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrderInput | SortOrder + overviewTotalPrizes?: SortOrderInput | SortOrder + numOfRegistrants?: SortOrder + numOfSubmissions?: SortOrder + numOfCheckpointSubmissions?: SortOrder + currentPhaseNames?: SortOrder + wiproAllowed?: SortOrder + tags?: SortOrder + groups?: SortOrder + taskIsTask?: SortOrder + taskIsAssigned?: SortOrder + taskMemberId?: SortOrderInput | SortOrder + submissionStartDate?: SortOrderInput | SortOrder + submissionEndDate?: SortOrderInput | SortOrder + registrationStartDate?: SortOrderInput | SortOrder + registrationEndDate?: SortOrderInput | SortOrder + startDate?: SortOrderInput | SortOrder + endDate?: SortOrderInput | SortOrder + legacyId?: SortOrderInput | SortOrder + status?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + billingRecord?: ChallengeBillingOrderByWithRelationInput + legacyRecord?: ChallengeLegacyOrderByWithRelationInput + constraintRecord?: ChallengeConstraintOrderByWithRelationInput + events?: ChallengeEventOrderByRelationAggregateInput + discussions?: ChallengeDiscussionOrderByRelationAggregateInput + metadata?: ChallengeMetadataOrderByRelationAggregateInput + phases?: ChallengePhaseOrderByRelationAggregateInput + prizeSets?: ChallengePrizeSetOrderByRelationAggregateInput + reviewers?: ChallengeReviewerOrderByRelationAggregateInput + winners?: ChallengeWinnerOrderByRelationAggregateInput + attachments?: AttachmentOrderByRelationAggregateInput + terms?: ChallengeTermOrderByRelationAggregateInput + skills?: ChallengeSkillOrderByRelationAggregateInput + auditLogs?: AuditLogOrderByRelationAggregateInput + memberAccesses?: MemberChallengeAccessOrderByRelationAggregateInput + type?: ChallengeTypeOrderByWithRelationInput + track?: ChallengeTrackOrderByWithRelationInput + timelineTemplate?: TimelineTemplateOrderByWithRelationInput + _relevance?: ChallengeOrderByRelevanceInput + } + + export type ChallengeWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeWhereInput | ChallengeWhereInput[] + OR?: ChallengeWhereInput[] + NOT?: ChallengeWhereInput | ChallengeWhereInput[] + name?: StringFilter<"Challenge"> | string + description?: StringNullableFilter<"Challenge"> | string | null + privateDescription?: StringNullableFilter<"Challenge"> | string | null + challengeSource?: StringNullableFilter<"Challenge"> | string | null + descriptionFormat?: StringNullableFilter<"Challenge"> | string | null + projectId?: IntNullableFilter<"Challenge"> | number | null + typeId?: StringFilter<"Challenge"> | string + trackId?: StringFilter<"Challenge"> | string + timelineTemplateId?: StringNullableFilter<"Challenge"> | string | null + overviewTotalPrizes?: FloatNullableFilter<"Challenge"> | number | null + numOfRegistrants?: IntFilter<"Challenge"> | number + numOfSubmissions?: IntFilter<"Challenge"> | number + numOfCheckpointSubmissions?: IntFilter<"Challenge"> | number + currentPhaseNames?: StringNullableListFilter<"Challenge"> + wiproAllowed?: BoolFilter<"Challenge"> | boolean + tags?: StringNullableListFilter<"Challenge"> + groups?: StringNullableListFilter<"Challenge"> + taskIsTask?: BoolFilter<"Challenge"> | boolean + taskIsAssigned?: BoolFilter<"Challenge"> | boolean + taskMemberId?: StringNullableFilter<"Challenge"> | string | null + submissionStartDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + submissionEndDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + registrationStartDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + registrationEndDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + startDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + endDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + legacyId?: IntNullableFilter<"Challenge"> | number | null + status?: EnumChallengeStatusEnumFilter<"Challenge"> | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFilter<"Challenge"> | Date | string + createdBy?: StringFilter<"Challenge"> | string + updatedAt?: DateTimeFilter<"Challenge"> | Date | string + updatedBy?: StringFilter<"Challenge"> | string + billingRecord?: XOR | null + legacyRecord?: XOR | null + constraintRecord?: XOR | null + events?: ChallengeEventListRelationFilter + discussions?: ChallengeDiscussionListRelationFilter + metadata?: ChallengeMetadataListRelationFilter + phases?: ChallengePhaseListRelationFilter + prizeSets?: ChallengePrizeSetListRelationFilter + reviewers?: ChallengeReviewerListRelationFilter + winners?: ChallengeWinnerListRelationFilter + attachments?: AttachmentListRelationFilter + terms?: ChallengeTermListRelationFilter + skills?: ChallengeSkillListRelationFilter + auditLogs?: AuditLogListRelationFilter + memberAccesses?: MemberChallengeAccessListRelationFilter + type?: XOR + track?: XOR + timelineTemplate?: XOR | null + }, "id"> + + export type ChallengeOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + privateDescription?: SortOrderInput | SortOrder + challengeSource?: SortOrderInput | SortOrder + descriptionFormat?: SortOrderInput | SortOrder + projectId?: SortOrderInput | SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrderInput | SortOrder + overviewTotalPrizes?: SortOrderInput | SortOrder + numOfRegistrants?: SortOrder + numOfSubmissions?: SortOrder + numOfCheckpointSubmissions?: SortOrder + currentPhaseNames?: SortOrder + wiproAllowed?: SortOrder + tags?: SortOrder + groups?: SortOrder + taskIsTask?: SortOrder + taskIsAssigned?: SortOrder + taskMemberId?: SortOrderInput | SortOrder + submissionStartDate?: SortOrderInput | SortOrder + submissionEndDate?: SortOrderInput | SortOrder + registrationStartDate?: SortOrderInput | SortOrder + registrationEndDate?: SortOrderInput | SortOrder + startDate?: SortOrderInput | SortOrder + endDate?: SortOrderInput | SortOrder + legacyId?: SortOrderInput | SortOrder + status?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeCountOrderByAggregateInput + _avg?: ChallengeAvgOrderByAggregateInput + _max?: ChallengeMaxOrderByAggregateInput + _min?: ChallengeMinOrderByAggregateInput + _sum?: ChallengeSumOrderByAggregateInput + } + + export type ChallengeScalarWhereWithAggregatesInput = { + AND?: ChallengeScalarWhereWithAggregatesInput | ChallengeScalarWhereWithAggregatesInput[] + OR?: ChallengeScalarWhereWithAggregatesInput[] + NOT?: ChallengeScalarWhereWithAggregatesInput | ChallengeScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Challenge"> | string + name?: StringWithAggregatesFilter<"Challenge"> | string + description?: StringNullableWithAggregatesFilter<"Challenge"> | string | null + privateDescription?: StringNullableWithAggregatesFilter<"Challenge"> | string | null + challengeSource?: StringNullableWithAggregatesFilter<"Challenge"> | string | null + descriptionFormat?: StringNullableWithAggregatesFilter<"Challenge"> | string | null + projectId?: IntNullableWithAggregatesFilter<"Challenge"> | number | null + typeId?: StringWithAggregatesFilter<"Challenge"> | string + trackId?: StringWithAggregatesFilter<"Challenge"> | string + timelineTemplateId?: StringNullableWithAggregatesFilter<"Challenge"> | string | null + overviewTotalPrizes?: FloatNullableWithAggregatesFilter<"Challenge"> | number | null + numOfRegistrants?: IntWithAggregatesFilter<"Challenge"> | number + numOfSubmissions?: IntWithAggregatesFilter<"Challenge"> | number + numOfCheckpointSubmissions?: IntWithAggregatesFilter<"Challenge"> | number + currentPhaseNames?: StringNullableListFilter<"Challenge"> + wiproAllowed?: BoolWithAggregatesFilter<"Challenge"> | boolean + tags?: StringNullableListFilter<"Challenge"> + groups?: StringNullableListFilter<"Challenge"> + taskIsTask?: BoolWithAggregatesFilter<"Challenge"> | boolean + taskIsAssigned?: BoolWithAggregatesFilter<"Challenge"> | boolean + taskMemberId?: StringNullableWithAggregatesFilter<"Challenge"> | string | null + submissionStartDate?: DateTimeNullableWithAggregatesFilter<"Challenge"> | Date | string | null + submissionEndDate?: DateTimeNullableWithAggregatesFilter<"Challenge"> | Date | string | null + registrationStartDate?: DateTimeNullableWithAggregatesFilter<"Challenge"> | Date | string | null + registrationEndDate?: DateTimeNullableWithAggregatesFilter<"Challenge"> | Date | string | null + startDate?: DateTimeNullableWithAggregatesFilter<"Challenge"> | Date | string | null + endDate?: DateTimeNullableWithAggregatesFilter<"Challenge"> | Date | string | null + legacyId?: IntNullableWithAggregatesFilter<"Challenge"> | number | null + status?: EnumChallengeStatusEnumWithAggregatesFilter<"Challenge"> | $Enums.ChallengeStatusEnum + createdAt?: DateTimeWithAggregatesFilter<"Challenge"> | Date | string + createdBy?: StringWithAggregatesFilter<"Challenge"> | string + updatedAt?: DateTimeWithAggregatesFilter<"Challenge"> | Date | string + updatedBy?: StringWithAggregatesFilter<"Challenge"> | string + } + + export type ChallengeTypeWhereInput = { + AND?: ChallengeTypeWhereInput | ChallengeTypeWhereInput[] + OR?: ChallengeTypeWhereInput[] + NOT?: ChallengeTypeWhereInput | ChallengeTypeWhereInput[] + id?: StringFilter<"ChallengeType"> | string + name?: StringFilter<"ChallengeType"> | string + description?: StringNullableFilter<"ChallengeType"> | string | null + isActive?: BoolFilter<"ChallengeType"> | boolean + isTask?: BoolFilter<"ChallengeType"> | boolean + abbreviation?: StringFilter<"ChallengeType"> | string + createdAt?: DateTimeFilter<"ChallengeType"> | Date | string + createdBy?: StringFilter<"ChallengeType"> | string + updatedAt?: DateTimeFilter<"ChallengeType"> | Date | string + updatedBy?: StringFilter<"ChallengeType"> | string + challenges?: ChallengeListRelationFilter + timelineTemplates?: ChallengeTimelineTemplateListRelationFilter + defaultReviewers?: DefaultChallengeReviewerListRelationFilter + } + + export type ChallengeTypeOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + isTask?: SortOrder + abbreviation?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenges?: ChallengeOrderByRelationAggregateInput + timelineTemplates?: ChallengeTimelineTemplateOrderByRelationAggregateInput + defaultReviewers?: DefaultChallengeReviewerOrderByRelationAggregateInput + _relevance?: ChallengeTypeOrderByRelevanceInput + } + + export type ChallengeTypeWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeTypeWhereInput | ChallengeTypeWhereInput[] + OR?: ChallengeTypeWhereInput[] + NOT?: ChallengeTypeWhereInput | ChallengeTypeWhereInput[] + name?: StringFilter<"ChallengeType"> | string + description?: StringNullableFilter<"ChallengeType"> | string | null + isActive?: BoolFilter<"ChallengeType"> | boolean + isTask?: BoolFilter<"ChallengeType"> | boolean + abbreviation?: StringFilter<"ChallengeType"> | string + createdAt?: DateTimeFilter<"ChallengeType"> | Date | string + createdBy?: StringFilter<"ChallengeType"> | string + updatedAt?: DateTimeFilter<"ChallengeType"> | Date | string + updatedBy?: StringFilter<"ChallengeType"> | string + challenges?: ChallengeListRelationFilter + timelineTemplates?: ChallengeTimelineTemplateListRelationFilter + defaultReviewers?: DefaultChallengeReviewerListRelationFilter + }, "id"> + + export type ChallengeTypeOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + isTask?: SortOrder + abbreviation?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeTypeCountOrderByAggregateInput + _max?: ChallengeTypeMaxOrderByAggregateInput + _min?: ChallengeTypeMinOrderByAggregateInput + } + + export type ChallengeTypeScalarWhereWithAggregatesInput = { + AND?: ChallengeTypeScalarWhereWithAggregatesInput | ChallengeTypeScalarWhereWithAggregatesInput[] + OR?: ChallengeTypeScalarWhereWithAggregatesInput[] + NOT?: ChallengeTypeScalarWhereWithAggregatesInput | ChallengeTypeScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeType"> | string + name?: StringWithAggregatesFilter<"ChallengeType"> | string + description?: StringNullableWithAggregatesFilter<"ChallengeType"> | string | null + isActive?: BoolWithAggregatesFilter<"ChallengeType"> | boolean + isTask?: BoolWithAggregatesFilter<"ChallengeType"> | boolean + abbreviation?: StringWithAggregatesFilter<"ChallengeType"> | string + createdAt?: DateTimeWithAggregatesFilter<"ChallengeType"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeType"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeType"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeType"> | string + } + + export type ChallengeTrackWhereInput = { + AND?: ChallengeTrackWhereInput | ChallengeTrackWhereInput[] + OR?: ChallengeTrackWhereInput[] + NOT?: ChallengeTrackWhereInput | ChallengeTrackWhereInput[] + id?: StringFilter<"ChallengeTrack"> | string + name?: StringFilter<"ChallengeTrack"> | string + description?: StringNullableFilter<"ChallengeTrack"> | string | null + isActive?: BoolFilter<"ChallengeTrack"> | boolean + abbreviation?: StringFilter<"ChallengeTrack"> | string + legacyId?: IntNullableFilter<"ChallengeTrack"> | number | null + track?: EnumChallengeTrackEnumNullableFilter<"ChallengeTrack"> | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFilter<"ChallengeTrack"> | Date | string + createdBy?: StringFilter<"ChallengeTrack"> | string + updatedAt?: DateTimeFilter<"ChallengeTrack"> | Date | string + updatedBy?: StringFilter<"ChallengeTrack"> | string + challenges?: ChallengeListRelationFilter + timelineTemplates?: ChallengeTimelineTemplateListRelationFilter + defaultReviewers?: DefaultChallengeReviewerListRelationFilter + } + + export type ChallengeTrackOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + abbreviation?: SortOrder + legacyId?: SortOrderInput | SortOrder + track?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenges?: ChallengeOrderByRelationAggregateInput + timelineTemplates?: ChallengeTimelineTemplateOrderByRelationAggregateInput + defaultReviewers?: DefaultChallengeReviewerOrderByRelationAggregateInput + _relevance?: ChallengeTrackOrderByRelevanceInput + } + + export type ChallengeTrackWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeTrackWhereInput | ChallengeTrackWhereInput[] + OR?: ChallengeTrackWhereInput[] + NOT?: ChallengeTrackWhereInput | ChallengeTrackWhereInput[] + name?: StringFilter<"ChallengeTrack"> | string + description?: StringNullableFilter<"ChallengeTrack"> | string | null + isActive?: BoolFilter<"ChallengeTrack"> | boolean + abbreviation?: StringFilter<"ChallengeTrack"> | string + legacyId?: IntNullableFilter<"ChallengeTrack"> | number | null + track?: EnumChallengeTrackEnumNullableFilter<"ChallengeTrack"> | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFilter<"ChallengeTrack"> | Date | string + createdBy?: StringFilter<"ChallengeTrack"> | string + updatedAt?: DateTimeFilter<"ChallengeTrack"> | Date | string + updatedBy?: StringFilter<"ChallengeTrack"> | string + challenges?: ChallengeListRelationFilter + timelineTemplates?: ChallengeTimelineTemplateListRelationFilter + defaultReviewers?: DefaultChallengeReviewerListRelationFilter + }, "id"> + + export type ChallengeTrackOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + abbreviation?: SortOrder + legacyId?: SortOrderInput | SortOrder + track?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeTrackCountOrderByAggregateInput + _avg?: ChallengeTrackAvgOrderByAggregateInput + _max?: ChallengeTrackMaxOrderByAggregateInput + _min?: ChallengeTrackMinOrderByAggregateInput + _sum?: ChallengeTrackSumOrderByAggregateInput + } + + export type ChallengeTrackScalarWhereWithAggregatesInput = { + AND?: ChallengeTrackScalarWhereWithAggregatesInput | ChallengeTrackScalarWhereWithAggregatesInput[] + OR?: ChallengeTrackScalarWhereWithAggregatesInput[] + NOT?: ChallengeTrackScalarWhereWithAggregatesInput | ChallengeTrackScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeTrack"> | string + name?: StringWithAggregatesFilter<"ChallengeTrack"> | string + description?: StringNullableWithAggregatesFilter<"ChallengeTrack"> | string | null + isActive?: BoolWithAggregatesFilter<"ChallengeTrack"> | boolean + abbreviation?: StringWithAggregatesFilter<"ChallengeTrack"> | string + legacyId?: IntNullableWithAggregatesFilter<"ChallengeTrack"> | number | null + track?: EnumChallengeTrackEnumNullableWithAggregatesFilter<"ChallengeTrack"> | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeWithAggregatesFilter<"ChallengeTrack"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeTrack"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeTrack"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeTrack"> | string + } + + export type ChallengeTimelineTemplateWhereInput = { + AND?: ChallengeTimelineTemplateWhereInput | ChallengeTimelineTemplateWhereInput[] + OR?: ChallengeTimelineTemplateWhereInput[] + NOT?: ChallengeTimelineTemplateWhereInput | ChallengeTimelineTemplateWhereInput[] + id?: StringFilter<"ChallengeTimelineTemplate"> | string + typeId?: StringFilter<"ChallengeTimelineTemplate"> | string + trackId?: StringFilter<"ChallengeTimelineTemplate"> | string + timelineTemplateId?: StringFilter<"ChallengeTimelineTemplate"> | string + isDefault?: BoolFilter<"ChallengeTimelineTemplate"> | boolean + createdAt?: DateTimeFilter<"ChallengeTimelineTemplate"> | Date | string + createdBy?: StringFilter<"ChallengeTimelineTemplate"> | string + updatedAt?: DateTimeFilter<"ChallengeTimelineTemplate"> | Date | string + updatedBy?: StringFilter<"ChallengeTimelineTemplate"> | string + timelineTemplate?: XOR + track?: XOR + type?: XOR + } + + export type ChallengeTimelineTemplateOrderByWithRelationInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + isDefault?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + timelineTemplate?: TimelineTemplateOrderByWithRelationInput + track?: ChallengeTrackOrderByWithRelationInput + type?: ChallengeTypeOrderByWithRelationInput + _relevance?: ChallengeTimelineTemplateOrderByRelevanceInput + } + + export type ChallengeTimelineTemplateWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeTimelineTemplateWhereInput | ChallengeTimelineTemplateWhereInput[] + OR?: ChallengeTimelineTemplateWhereInput[] + NOT?: ChallengeTimelineTemplateWhereInput | ChallengeTimelineTemplateWhereInput[] + typeId?: StringFilter<"ChallengeTimelineTemplate"> | string + trackId?: StringFilter<"ChallengeTimelineTemplate"> | string + timelineTemplateId?: StringFilter<"ChallengeTimelineTemplate"> | string + isDefault?: BoolFilter<"ChallengeTimelineTemplate"> | boolean + createdAt?: DateTimeFilter<"ChallengeTimelineTemplate"> | Date | string + createdBy?: StringFilter<"ChallengeTimelineTemplate"> | string + updatedAt?: DateTimeFilter<"ChallengeTimelineTemplate"> | Date | string + updatedBy?: StringFilter<"ChallengeTimelineTemplate"> | string + timelineTemplate?: XOR + track?: XOR + type?: XOR + }, "id"> + + export type ChallengeTimelineTemplateOrderByWithAggregationInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + isDefault?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeTimelineTemplateCountOrderByAggregateInput + _max?: ChallengeTimelineTemplateMaxOrderByAggregateInput + _min?: ChallengeTimelineTemplateMinOrderByAggregateInput + } + + export type ChallengeTimelineTemplateScalarWhereWithAggregatesInput = { + AND?: ChallengeTimelineTemplateScalarWhereWithAggregatesInput | ChallengeTimelineTemplateScalarWhereWithAggregatesInput[] + OR?: ChallengeTimelineTemplateScalarWhereWithAggregatesInput[] + NOT?: ChallengeTimelineTemplateScalarWhereWithAggregatesInput | ChallengeTimelineTemplateScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeTimelineTemplate"> | string + typeId?: StringWithAggregatesFilter<"ChallengeTimelineTemplate"> | string + trackId?: StringWithAggregatesFilter<"ChallengeTimelineTemplate"> | string + timelineTemplateId?: StringWithAggregatesFilter<"ChallengeTimelineTemplate"> | string + isDefault?: BoolWithAggregatesFilter<"ChallengeTimelineTemplate"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"ChallengeTimelineTemplate"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeTimelineTemplate"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeTimelineTemplate"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeTimelineTemplate"> | string + } + + export type AuditLogWhereInput = { + AND?: AuditLogWhereInput | AuditLogWhereInput[] + OR?: AuditLogWhereInput[] + NOT?: AuditLogWhereInput | AuditLogWhereInput[] + id?: StringFilter<"AuditLog"> | string + challengeId?: StringNullableFilter<"AuditLog"> | string | null + fieldName?: StringFilter<"AuditLog"> | string + oldValue?: StringNullableFilter<"AuditLog"> | string | null + newValue?: StringNullableFilter<"AuditLog"> | string | null + createdAt?: DateTimeFilter<"AuditLog"> | Date | string + createdBy?: StringFilter<"AuditLog"> | string + memberId?: StringNullableFilter<"AuditLog"> | string | null + challenge?: XOR | null + } + + export type AuditLogOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrderInput | SortOrder + fieldName?: SortOrder + oldValue?: SortOrderInput | SortOrder + newValue?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + memberId?: SortOrderInput | SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: AuditLogOrderByRelevanceInput + } + + export type AuditLogWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: AuditLogWhereInput | AuditLogWhereInput[] + OR?: AuditLogWhereInput[] + NOT?: AuditLogWhereInput | AuditLogWhereInput[] + challengeId?: StringNullableFilter<"AuditLog"> | string | null + fieldName?: StringFilter<"AuditLog"> | string + oldValue?: StringNullableFilter<"AuditLog"> | string | null + newValue?: StringNullableFilter<"AuditLog"> | string | null + createdAt?: DateTimeFilter<"AuditLog"> | Date | string + createdBy?: StringFilter<"AuditLog"> | string + memberId?: StringNullableFilter<"AuditLog"> | string | null + challenge?: XOR | null + }, "id"> + + export type AuditLogOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrderInput | SortOrder + fieldName?: SortOrder + oldValue?: SortOrderInput | SortOrder + newValue?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + memberId?: SortOrderInput | SortOrder + _count?: AuditLogCountOrderByAggregateInput + _max?: AuditLogMaxOrderByAggregateInput + _min?: AuditLogMinOrderByAggregateInput + } + + export type AuditLogScalarWhereWithAggregatesInput = { + AND?: AuditLogScalarWhereWithAggregatesInput | AuditLogScalarWhereWithAggregatesInput[] + OR?: AuditLogScalarWhereWithAggregatesInput[] + NOT?: AuditLogScalarWhereWithAggregatesInput | AuditLogScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AuditLog"> | string + challengeId?: StringNullableWithAggregatesFilter<"AuditLog"> | string | null + fieldName?: StringWithAggregatesFilter<"AuditLog"> | string + oldValue?: StringNullableWithAggregatesFilter<"AuditLog"> | string | null + newValue?: StringNullableWithAggregatesFilter<"AuditLog"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"AuditLog"> | Date | string + createdBy?: StringWithAggregatesFilter<"AuditLog"> | string + memberId?: StringNullableWithAggregatesFilter<"AuditLog"> | string | null + } + + export type AttachmentWhereInput = { + AND?: AttachmentWhereInput | AttachmentWhereInput[] + OR?: AttachmentWhereInput[] + NOT?: AttachmentWhereInput | AttachmentWhereInput[] + id?: StringFilter<"Attachment"> | string + challengeId?: StringFilter<"Attachment"> | string + name?: StringFilter<"Attachment"> | string + fileSize?: IntFilter<"Attachment"> | number + url?: StringFilter<"Attachment"> | string + description?: StringNullableFilter<"Attachment"> | string | null + createdAt?: DateTimeFilter<"Attachment"> | Date | string + createdBy?: StringFilter<"Attachment"> | string + updatedAt?: DateTimeFilter<"Attachment"> | Date | string + updatedBy?: StringFilter<"Attachment"> | string + challenge?: XOR + } + + export type AttachmentOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + fileSize?: SortOrder + url?: SortOrder + description?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: AttachmentOrderByRelevanceInput + } + + export type AttachmentWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: AttachmentWhereInput | AttachmentWhereInput[] + OR?: AttachmentWhereInput[] + NOT?: AttachmentWhereInput | AttachmentWhereInput[] + challengeId?: StringFilter<"Attachment"> | string + name?: StringFilter<"Attachment"> | string + fileSize?: IntFilter<"Attachment"> | number + url?: StringFilter<"Attachment"> | string + description?: StringNullableFilter<"Attachment"> | string | null + createdAt?: DateTimeFilter<"Attachment"> | Date | string + createdBy?: StringFilter<"Attachment"> | string + updatedAt?: DateTimeFilter<"Attachment"> | Date | string + updatedBy?: StringFilter<"Attachment"> | string + challenge?: XOR + }, "id"> + + export type AttachmentOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + fileSize?: SortOrder + url?: SortOrder + description?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: AttachmentCountOrderByAggregateInput + _avg?: AttachmentAvgOrderByAggregateInput + _max?: AttachmentMaxOrderByAggregateInput + _min?: AttachmentMinOrderByAggregateInput + _sum?: AttachmentSumOrderByAggregateInput + } + + export type AttachmentScalarWhereWithAggregatesInput = { + AND?: AttachmentScalarWhereWithAggregatesInput | AttachmentScalarWhereWithAggregatesInput[] + OR?: AttachmentScalarWhereWithAggregatesInput[] + NOT?: AttachmentScalarWhereWithAggregatesInput | AttachmentScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Attachment"> | string + challengeId?: StringWithAggregatesFilter<"Attachment"> | string + name?: StringWithAggregatesFilter<"Attachment"> | string + fileSize?: IntWithAggregatesFilter<"Attachment"> | number + url?: StringWithAggregatesFilter<"Attachment"> | string + description?: StringNullableWithAggregatesFilter<"Attachment"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"Attachment"> | Date | string + createdBy?: StringWithAggregatesFilter<"Attachment"> | string + updatedAt?: DateTimeWithAggregatesFilter<"Attachment"> | Date | string + updatedBy?: StringWithAggregatesFilter<"Attachment"> | string + } + + export type ChallengeMetadataWhereInput = { + AND?: ChallengeMetadataWhereInput | ChallengeMetadataWhereInput[] + OR?: ChallengeMetadataWhereInput[] + NOT?: ChallengeMetadataWhereInput | ChallengeMetadataWhereInput[] + id?: StringFilter<"ChallengeMetadata"> | string + challengeId?: StringFilter<"ChallengeMetadata"> | string + name?: StringFilter<"ChallengeMetadata"> | string + value?: StringFilter<"ChallengeMetadata"> | string + createdAt?: DateTimeFilter<"ChallengeMetadata"> | Date | string + createdBy?: StringFilter<"ChallengeMetadata"> | string + updatedAt?: DateTimeFilter<"ChallengeMetadata"> | Date | string + updatedBy?: StringFilter<"ChallengeMetadata"> | string + challenge?: XOR + } + + export type ChallengeMetadataOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeMetadataOrderByRelevanceInput + } + + export type ChallengeMetadataWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeMetadataWhereInput | ChallengeMetadataWhereInput[] + OR?: ChallengeMetadataWhereInput[] + NOT?: ChallengeMetadataWhereInput | ChallengeMetadataWhereInput[] + challengeId?: StringFilter<"ChallengeMetadata"> | string + name?: StringFilter<"ChallengeMetadata"> | string + value?: StringFilter<"ChallengeMetadata"> | string + createdAt?: DateTimeFilter<"ChallengeMetadata"> | Date | string + createdBy?: StringFilter<"ChallengeMetadata"> | string + updatedAt?: DateTimeFilter<"ChallengeMetadata"> | Date | string + updatedBy?: StringFilter<"ChallengeMetadata"> | string + challenge?: XOR + }, "id"> + + export type ChallengeMetadataOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeMetadataCountOrderByAggregateInput + _max?: ChallengeMetadataMaxOrderByAggregateInput + _min?: ChallengeMetadataMinOrderByAggregateInput + } + + export type ChallengeMetadataScalarWhereWithAggregatesInput = { + AND?: ChallengeMetadataScalarWhereWithAggregatesInput | ChallengeMetadataScalarWhereWithAggregatesInput[] + OR?: ChallengeMetadataScalarWhereWithAggregatesInput[] + NOT?: ChallengeMetadataScalarWhereWithAggregatesInput | ChallengeMetadataScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeMetadata"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeMetadata"> | string + name?: StringWithAggregatesFilter<"ChallengeMetadata"> | string + value?: StringWithAggregatesFilter<"ChallengeMetadata"> | string + createdAt?: DateTimeWithAggregatesFilter<"ChallengeMetadata"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeMetadata"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeMetadata"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeMetadata"> | string + } + + export type PrizeWhereInput = { + AND?: PrizeWhereInput | PrizeWhereInput[] + OR?: PrizeWhereInput[] + NOT?: PrizeWhereInput | PrizeWhereInput[] + id?: StringFilter<"Prize"> | string + description?: StringNullableFilter<"Prize"> | string | null + prizeSetId?: StringFilter<"Prize"> | string + type?: StringFilter<"Prize"> | string + value?: FloatFilter<"Prize"> | number + createdAt?: DateTimeFilter<"Prize"> | Date | string + createdBy?: StringFilter<"Prize"> | string + updatedAt?: DateTimeFilter<"Prize"> | Date | string + updatedBy?: StringFilter<"Prize"> | string + prizeSet?: XOR + } + + export type PrizeOrderByWithRelationInput = { + id?: SortOrder + description?: SortOrderInput | SortOrder + prizeSetId?: SortOrder + type?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + prizeSet?: ChallengePrizeSetOrderByWithRelationInput + _relevance?: PrizeOrderByRelevanceInput + } + + export type PrizeWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: PrizeWhereInput | PrizeWhereInput[] + OR?: PrizeWhereInput[] + NOT?: PrizeWhereInput | PrizeWhereInput[] + description?: StringNullableFilter<"Prize"> | string | null + prizeSetId?: StringFilter<"Prize"> | string + type?: StringFilter<"Prize"> | string + value?: FloatFilter<"Prize"> | number + createdAt?: DateTimeFilter<"Prize"> | Date | string + createdBy?: StringFilter<"Prize"> | string + updatedAt?: DateTimeFilter<"Prize"> | Date | string + updatedBy?: StringFilter<"Prize"> | string + prizeSet?: XOR + }, "id"> + + export type PrizeOrderByWithAggregationInput = { + id?: SortOrder + description?: SortOrderInput | SortOrder + prizeSetId?: SortOrder + type?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: PrizeCountOrderByAggregateInput + _avg?: PrizeAvgOrderByAggregateInput + _max?: PrizeMaxOrderByAggregateInput + _min?: PrizeMinOrderByAggregateInput + _sum?: PrizeSumOrderByAggregateInput + } + + export type PrizeScalarWhereWithAggregatesInput = { + AND?: PrizeScalarWhereWithAggregatesInput | PrizeScalarWhereWithAggregatesInput[] + OR?: PrizeScalarWhereWithAggregatesInput[] + NOT?: PrizeScalarWhereWithAggregatesInput | PrizeScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Prize"> | string + description?: StringNullableWithAggregatesFilter<"Prize"> | string | null + prizeSetId?: StringWithAggregatesFilter<"Prize"> | string + type?: StringWithAggregatesFilter<"Prize"> | string + value?: FloatWithAggregatesFilter<"Prize"> | number + createdAt?: DateTimeWithAggregatesFilter<"Prize"> | Date | string + createdBy?: StringWithAggregatesFilter<"Prize"> | string + updatedAt?: DateTimeWithAggregatesFilter<"Prize"> | Date | string + updatedBy?: StringWithAggregatesFilter<"Prize"> | string + } + + export type ChallengeWinnerWhereInput = { + AND?: ChallengeWinnerWhereInput | ChallengeWinnerWhereInput[] + OR?: ChallengeWinnerWhereInput[] + NOT?: ChallengeWinnerWhereInput | ChallengeWinnerWhereInput[] + id?: StringFilter<"ChallengeWinner"> | string + challengeId?: StringFilter<"ChallengeWinner"> | string + userId?: IntFilter<"ChallengeWinner"> | number + handle?: StringFilter<"ChallengeWinner"> | string + placement?: IntFilter<"ChallengeWinner"> | number + type?: EnumPrizeSetTypeEnumFilter<"ChallengeWinner"> | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFilter<"ChallengeWinner"> | Date | string + createdBy?: StringFilter<"ChallengeWinner"> | string + updatedAt?: DateTimeFilter<"ChallengeWinner"> | Date | string + updatedBy?: StringFilter<"ChallengeWinner"> | string + challenge?: XOR + } + + export type ChallengeWinnerOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + userId?: SortOrder + handle?: SortOrder + placement?: SortOrder + type?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeWinnerOrderByRelevanceInput + } + + export type ChallengeWinnerWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeWinnerWhereInput | ChallengeWinnerWhereInput[] + OR?: ChallengeWinnerWhereInput[] + NOT?: ChallengeWinnerWhereInput | ChallengeWinnerWhereInput[] + challengeId?: StringFilter<"ChallengeWinner"> | string + userId?: IntFilter<"ChallengeWinner"> | number + handle?: StringFilter<"ChallengeWinner"> | string + placement?: IntFilter<"ChallengeWinner"> | number + type?: EnumPrizeSetTypeEnumFilter<"ChallengeWinner"> | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFilter<"ChallengeWinner"> | Date | string + createdBy?: StringFilter<"ChallengeWinner"> | string + updatedAt?: DateTimeFilter<"ChallengeWinner"> | Date | string + updatedBy?: StringFilter<"ChallengeWinner"> | string + challenge?: XOR + }, "id"> + + export type ChallengeWinnerOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + userId?: SortOrder + handle?: SortOrder + placement?: SortOrder + type?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeWinnerCountOrderByAggregateInput + _avg?: ChallengeWinnerAvgOrderByAggregateInput + _max?: ChallengeWinnerMaxOrderByAggregateInput + _min?: ChallengeWinnerMinOrderByAggregateInput + _sum?: ChallengeWinnerSumOrderByAggregateInput + } + + export type ChallengeWinnerScalarWhereWithAggregatesInput = { + AND?: ChallengeWinnerScalarWhereWithAggregatesInput | ChallengeWinnerScalarWhereWithAggregatesInput[] + OR?: ChallengeWinnerScalarWhereWithAggregatesInput[] + NOT?: ChallengeWinnerScalarWhereWithAggregatesInput | ChallengeWinnerScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeWinner"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeWinner"> | string + userId?: IntWithAggregatesFilter<"ChallengeWinner"> | number + handle?: StringWithAggregatesFilter<"ChallengeWinner"> | string + placement?: IntWithAggregatesFilter<"ChallengeWinner"> | number + type?: EnumPrizeSetTypeEnumWithAggregatesFilter<"ChallengeWinner"> | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeWithAggregatesFilter<"ChallengeWinner"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeWinner"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeWinner"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeWinner"> | string + } + + export type ChallengeTermWhereInput = { + AND?: ChallengeTermWhereInput | ChallengeTermWhereInput[] + OR?: ChallengeTermWhereInput[] + NOT?: ChallengeTermWhereInput | ChallengeTermWhereInput[] + id?: StringFilter<"ChallengeTerm"> | string + challengeId?: StringFilter<"ChallengeTerm"> | string + termId?: StringFilter<"ChallengeTerm"> | string + roleId?: StringFilter<"ChallengeTerm"> | string + createdAt?: DateTimeFilter<"ChallengeTerm"> | Date | string + createdBy?: StringFilter<"ChallengeTerm"> | string + updatedAt?: DateTimeFilter<"ChallengeTerm"> | Date | string + updatedBy?: StringFilter<"ChallengeTerm"> | string + challenge?: XOR + } + + export type ChallengeTermOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + termId?: SortOrder + roleId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeTermOrderByRelevanceInput + } + + export type ChallengeTermWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeTermWhereInput | ChallengeTermWhereInput[] + OR?: ChallengeTermWhereInput[] + NOT?: ChallengeTermWhereInput | ChallengeTermWhereInput[] + challengeId?: StringFilter<"ChallengeTerm"> | string + termId?: StringFilter<"ChallengeTerm"> | string + roleId?: StringFilter<"ChallengeTerm"> | string + createdAt?: DateTimeFilter<"ChallengeTerm"> | Date | string + createdBy?: StringFilter<"ChallengeTerm"> | string + updatedAt?: DateTimeFilter<"ChallengeTerm"> | Date | string + updatedBy?: StringFilter<"ChallengeTerm"> | string + challenge?: XOR + }, "id"> + + export type ChallengeTermOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + termId?: SortOrder + roleId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeTermCountOrderByAggregateInput + _max?: ChallengeTermMaxOrderByAggregateInput + _min?: ChallengeTermMinOrderByAggregateInput + } + + export type ChallengeTermScalarWhereWithAggregatesInput = { + AND?: ChallengeTermScalarWhereWithAggregatesInput | ChallengeTermScalarWhereWithAggregatesInput[] + OR?: ChallengeTermScalarWhereWithAggregatesInput[] + NOT?: ChallengeTermScalarWhereWithAggregatesInput | ChallengeTermScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeTerm"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeTerm"> | string + termId?: StringWithAggregatesFilter<"ChallengeTerm"> | string + roleId?: StringWithAggregatesFilter<"ChallengeTerm"> | string + createdAt?: DateTimeWithAggregatesFilter<"ChallengeTerm"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeTerm"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeTerm"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeTerm"> | string + } + + export type ChallengeSkillWhereInput = { + AND?: ChallengeSkillWhereInput | ChallengeSkillWhereInput[] + OR?: ChallengeSkillWhereInput[] + NOT?: ChallengeSkillWhereInput | ChallengeSkillWhereInput[] + id?: StringFilter<"ChallengeSkill"> | string + challengeId?: StringFilter<"ChallengeSkill"> | string + skillId?: StringFilter<"ChallengeSkill"> | string + createdAt?: DateTimeFilter<"ChallengeSkill"> | Date | string + createdBy?: StringFilter<"ChallengeSkill"> | string + updatedAt?: DateTimeFilter<"ChallengeSkill"> | Date | string + updatedBy?: StringFilter<"ChallengeSkill"> | string + challenge?: XOR + } + + export type ChallengeSkillOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + skillId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeSkillOrderByRelevanceInput + } + + export type ChallengeSkillWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeSkillWhereInput | ChallengeSkillWhereInput[] + OR?: ChallengeSkillWhereInput[] + NOT?: ChallengeSkillWhereInput | ChallengeSkillWhereInput[] + challengeId?: StringFilter<"ChallengeSkill"> | string + skillId?: StringFilter<"ChallengeSkill"> | string + createdAt?: DateTimeFilter<"ChallengeSkill"> | Date | string + createdBy?: StringFilter<"ChallengeSkill"> | string + updatedAt?: DateTimeFilter<"ChallengeSkill"> | Date | string + updatedBy?: StringFilter<"ChallengeSkill"> | string + challenge?: XOR + }, "id"> + + export type ChallengeSkillOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + skillId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeSkillCountOrderByAggregateInput + _max?: ChallengeSkillMaxOrderByAggregateInput + _min?: ChallengeSkillMinOrderByAggregateInput + } + + export type ChallengeSkillScalarWhereWithAggregatesInput = { + AND?: ChallengeSkillScalarWhereWithAggregatesInput | ChallengeSkillScalarWhereWithAggregatesInput[] + OR?: ChallengeSkillScalarWhereWithAggregatesInput[] + NOT?: ChallengeSkillScalarWhereWithAggregatesInput | ChallengeSkillScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeSkill"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeSkill"> | string + skillId?: StringWithAggregatesFilter<"ChallengeSkill"> | string + createdAt?: DateTimeWithAggregatesFilter<"ChallengeSkill"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeSkill"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeSkill"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeSkill"> | string + } + + export type ChallengeBillingWhereInput = { + AND?: ChallengeBillingWhereInput | ChallengeBillingWhereInput[] + OR?: ChallengeBillingWhereInput[] + NOT?: ChallengeBillingWhereInput | ChallengeBillingWhereInput[] + id?: StringFilter<"ChallengeBilling"> | string + billingAccountId?: StringNullableFilter<"ChallengeBilling"> | string | null + markup?: FloatNullableFilter<"ChallengeBilling"> | number | null + clientBillingRate?: FloatNullableFilter<"ChallengeBilling"> | number | null + challengeId?: StringFilter<"ChallengeBilling"> | string + createdAt?: DateTimeFilter<"ChallengeBilling"> | Date | string + createdBy?: StringFilter<"ChallengeBilling"> | string + updatedAt?: DateTimeFilter<"ChallengeBilling"> | Date | string + updatedBy?: StringFilter<"ChallengeBilling"> | string + challenge?: XOR + } + + export type ChallengeBillingOrderByWithRelationInput = { + id?: SortOrder + billingAccountId?: SortOrderInput | SortOrder + markup?: SortOrderInput | SortOrder + clientBillingRate?: SortOrderInput | SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeBillingOrderByRelevanceInput + } + + export type ChallengeBillingWhereUniqueInput = Prisma.AtLeast<{ + id?: string + challengeId?: string + AND?: ChallengeBillingWhereInput | ChallengeBillingWhereInput[] + OR?: ChallengeBillingWhereInput[] + NOT?: ChallengeBillingWhereInput | ChallengeBillingWhereInput[] + billingAccountId?: StringNullableFilter<"ChallengeBilling"> | string | null + markup?: FloatNullableFilter<"ChallengeBilling"> | number | null + clientBillingRate?: FloatNullableFilter<"ChallengeBilling"> | number | null + createdAt?: DateTimeFilter<"ChallengeBilling"> | Date | string + createdBy?: StringFilter<"ChallengeBilling"> | string + updatedAt?: DateTimeFilter<"ChallengeBilling"> | Date | string + updatedBy?: StringFilter<"ChallengeBilling"> | string + challenge?: XOR + }, "id" | "challengeId"> + + export type ChallengeBillingOrderByWithAggregationInput = { + id?: SortOrder + billingAccountId?: SortOrderInput | SortOrder + markup?: SortOrderInput | SortOrder + clientBillingRate?: SortOrderInput | SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeBillingCountOrderByAggregateInput + _avg?: ChallengeBillingAvgOrderByAggregateInput + _max?: ChallengeBillingMaxOrderByAggregateInput + _min?: ChallengeBillingMinOrderByAggregateInput + _sum?: ChallengeBillingSumOrderByAggregateInput + } + + export type ChallengeBillingScalarWhereWithAggregatesInput = { + AND?: ChallengeBillingScalarWhereWithAggregatesInput | ChallengeBillingScalarWhereWithAggregatesInput[] + OR?: ChallengeBillingScalarWhereWithAggregatesInput[] + NOT?: ChallengeBillingScalarWhereWithAggregatesInput | ChallengeBillingScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeBilling"> | string + billingAccountId?: StringNullableWithAggregatesFilter<"ChallengeBilling"> | string | null + markup?: FloatNullableWithAggregatesFilter<"ChallengeBilling"> | number | null + clientBillingRate?: FloatNullableWithAggregatesFilter<"ChallengeBilling"> | number | null + challengeId?: StringWithAggregatesFilter<"ChallengeBilling"> | string + createdAt?: DateTimeWithAggregatesFilter<"ChallengeBilling"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeBilling"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeBilling"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeBilling"> | string + } + + export type ChallengeLegacyWhereInput = { + AND?: ChallengeLegacyWhereInput | ChallengeLegacyWhereInput[] + OR?: ChallengeLegacyWhereInput[] + NOT?: ChallengeLegacyWhereInput | ChallengeLegacyWhereInput[] + id?: StringFilter<"ChallengeLegacy"> | string + reviewType?: EnumReviewTypeEnumFilter<"ChallengeLegacy"> | $Enums.ReviewTypeEnum + confidentialityType?: StringFilter<"ChallengeLegacy"> | string + forumId?: IntNullableFilter<"ChallengeLegacy"> | number | null + directProjectId?: IntNullableFilter<"ChallengeLegacy"> | number | null + screeningScorecardId?: IntNullableFilter<"ChallengeLegacy"> | number | null + reviewScorecardId?: IntNullableFilter<"ChallengeLegacy"> | number | null + isTask?: BoolFilter<"ChallengeLegacy"> | boolean + useSchedulingAPI?: BoolFilter<"ChallengeLegacy"> | boolean + pureV5Task?: BoolFilter<"ChallengeLegacy"> | boolean + pureV5?: BoolFilter<"ChallengeLegacy"> | boolean + selfService?: BoolFilter<"ChallengeLegacy"> | boolean + selfServiceCopilot?: StringNullableFilter<"ChallengeLegacy"> | string | null + track?: StringNullableFilter<"ChallengeLegacy"> | string | null + subTrack?: StringNullableFilter<"ChallengeLegacy"> | string | null + legacySystemId?: IntNullableFilter<"ChallengeLegacy"> | number | null + challengeId?: StringFilter<"ChallengeLegacy"> | string + createdAt?: DateTimeFilter<"ChallengeLegacy"> | Date | string + createdBy?: StringFilter<"ChallengeLegacy"> | string + updatedAt?: DateTimeFilter<"ChallengeLegacy"> | Date | string + updatedBy?: StringFilter<"ChallengeLegacy"> | string + challenge?: XOR + } + + export type ChallengeLegacyOrderByWithRelationInput = { + id?: SortOrder + reviewType?: SortOrder + confidentialityType?: SortOrder + forumId?: SortOrderInput | SortOrder + directProjectId?: SortOrderInput | SortOrder + screeningScorecardId?: SortOrderInput | SortOrder + reviewScorecardId?: SortOrderInput | SortOrder + isTask?: SortOrder + useSchedulingAPI?: SortOrder + pureV5Task?: SortOrder + pureV5?: SortOrder + selfService?: SortOrder + selfServiceCopilot?: SortOrderInput | SortOrder + track?: SortOrderInput | SortOrder + subTrack?: SortOrderInput | SortOrder + legacySystemId?: SortOrderInput | SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeLegacyOrderByRelevanceInput + } + + export type ChallengeLegacyWhereUniqueInput = Prisma.AtLeast<{ + id?: string + challengeId?: string + AND?: ChallengeLegacyWhereInput | ChallengeLegacyWhereInput[] + OR?: ChallengeLegacyWhereInput[] + NOT?: ChallengeLegacyWhereInput | ChallengeLegacyWhereInput[] + reviewType?: EnumReviewTypeEnumFilter<"ChallengeLegacy"> | $Enums.ReviewTypeEnum + confidentialityType?: StringFilter<"ChallengeLegacy"> | string + forumId?: IntNullableFilter<"ChallengeLegacy"> | number | null + directProjectId?: IntNullableFilter<"ChallengeLegacy"> | number | null + screeningScorecardId?: IntNullableFilter<"ChallengeLegacy"> | number | null + reviewScorecardId?: IntNullableFilter<"ChallengeLegacy"> | number | null + isTask?: BoolFilter<"ChallengeLegacy"> | boolean + useSchedulingAPI?: BoolFilter<"ChallengeLegacy"> | boolean + pureV5Task?: BoolFilter<"ChallengeLegacy"> | boolean + pureV5?: BoolFilter<"ChallengeLegacy"> | boolean + selfService?: BoolFilter<"ChallengeLegacy"> | boolean + selfServiceCopilot?: StringNullableFilter<"ChallengeLegacy"> | string | null + track?: StringNullableFilter<"ChallengeLegacy"> | string | null + subTrack?: StringNullableFilter<"ChallengeLegacy"> | string | null + legacySystemId?: IntNullableFilter<"ChallengeLegacy"> | number | null + createdAt?: DateTimeFilter<"ChallengeLegacy"> | Date | string + createdBy?: StringFilter<"ChallengeLegacy"> | string + updatedAt?: DateTimeFilter<"ChallengeLegacy"> | Date | string + updatedBy?: StringFilter<"ChallengeLegacy"> | string + challenge?: XOR + }, "id" | "challengeId"> + + export type ChallengeLegacyOrderByWithAggregationInput = { + id?: SortOrder + reviewType?: SortOrder + confidentialityType?: SortOrder + forumId?: SortOrderInput | SortOrder + directProjectId?: SortOrderInput | SortOrder + screeningScorecardId?: SortOrderInput | SortOrder + reviewScorecardId?: SortOrderInput | SortOrder + isTask?: SortOrder + useSchedulingAPI?: SortOrder + pureV5Task?: SortOrder + pureV5?: SortOrder + selfService?: SortOrder + selfServiceCopilot?: SortOrderInput | SortOrder + track?: SortOrderInput | SortOrder + subTrack?: SortOrderInput | SortOrder + legacySystemId?: SortOrderInput | SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeLegacyCountOrderByAggregateInput + _avg?: ChallengeLegacyAvgOrderByAggregateInput + _max?: ChallengeLegacyMaxOrderByAggregateInput + _min?: ChallengeLegacyMinOrderByAggregateInput + _sum?: ChallengeLegacySumOrderByAggregateInput + } + + export type ChallengeLegacyScalarWhereWithAggregatesInput = { + AND?: ChallengeLegacyScalarWhereWithAggregatesInput | ChallengeLegacyScalarWhereWithAggregatesInput[] + OR?: ChallengeLegacyScalarWhereWithAggregatesInput[] + NOT?: ChallengeLegacyScalarWhereWithAggregatesInput | ChallengeLegacyScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeLegacy"> | string + reviewType?: EnumReviewTypeEnumWithAggregatesFilter<"ChallengeLegacy"> | $Enums.ReviewTypeEnum + confidentialityType?: StringWithAggregatesFilter<"ChallengeLegacy"> | string + forumId?: IntNullableWithAggregatesFilter<"ChallengeLegacy"> | number | null + directProjectId?: IntNullableWithAggregatesFilter<"ChallengeLegacy"> | number | null + screeningScorecardId?: IntNullableWithAggregatesFilter<"ChallengeLegacy"> | number | null + reviewScorecardId?: IntNullableWithAggregatesFilter<"ChallengeLegacy"> | number | null + isTask?: BoolWithAggregatesFilter<"ChallengeLegacy"> | boolean + useSchedulingAPI?: BoolWithAggregatesFilter<"ChallengeLegacy"> | boolean + pureV5Task?: BoolWithAggregatesFilter<"ChallengeLegacy"> | boolean + pureV5?: BoolWithAggregatesFilter<"ChallengeLegacy"> | boolean + selfService?: BoolWithAggregatesFilter<"ChallengeLegacy"> | boolean + selfServiceCopilot?: StringNullableWithAggregatesFilter<"ChallengeLegacy"> | string | null + track?: StringNullableWithAggregatesFilter<"ChallengeLegacy"> | string | null + subTrack?: StringNullableWithAggregatesFilter<"ChallengeLegacy"> | string | null + legacySystemId?: IntNullableWithAggregatesFilter<"ChallengeLegacy"> | number | null + challengeId?: StringWithAggregatesFilter<"ChallengeLegacy"> | string + createdAt?: DateTimeWithAggregatesFilter<"ChallengeLegacy"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeLegacy"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeLegacy"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeLegacy"> | string + } + + export type ChallengeEventWhereInput = { + AND?: ChallengeEventWhereInput | ChallengeEventWhereInput[] + OR?: ChallengeEventWhereInput[] + NOT?: ChallengeEventWhereInput | ChallengeEventWhereInput[] + id?: StringFilter<"ChallengeEvent"> | string + challengeId?: StringFilter<"ChallengeEvent"> | string + eventId?: IntFilter<"ChallengeEvent"> | number + name?: StringNullableFilter<"ChallengeEvent"> | string | null + key?: StringNullableFilter<"ChallengeEvent"> | string | null + createdAt?: DateTimeFilter<"ChallengeEvent"> | Date | string + createdBy?: StringFilter<"ChallengeEvent"> | string + updatedAt?: DateTimeFilter<"ChallengeEvent"> | Date | string + updatedBy?: StringFilter<"ChallengeEvent"> | string + challenge?: XOR + } + + export type ChallengeEventOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + eventId?: SortOrder + name?: SortOrderInput | SortOrder + key?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeEventOrderByRelevanceInput + } + + export type ChallengeEventWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeEventWhereInput | ChallengeEventWhereInput[] + OR?: ChallengeEventWhereInput[] + NOT?: ChallengeEventWhereInput | ChallengeEventWhereInput[] + challengeId?: StringFilter<"ChallengeEvent"> | string + eventId?: IntFilter<"ChallengeEvent"> | number + name?: StringNullableFilter<"ChallengeEvent"> | string | null + key?: StringNullableFilter<"ChallengeEvent"> | string | null + createdAt?: DateTimeFilter<"ChallengeEvent"> | Date | string + createdBy?: StringFilter<"ChallengeEvent"> | string + updatedAt?: DateTimeFilter<"ChallengeEvent"> | Date | string + updatedBy?: StringFilter<"ChallengeEvent"> | string + challenge?: XOR + }, "id"> + + export type ChallengeEventOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + eventId?: SortOrder + name?: SortOrderInput | SortOrder + key?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeEventCountOrderByAggregateInput + _avg?: ChallengeEventAvgOrderByAggregateInput + _max?: ChallengeEventMaxOrderByAggregateInput + _min?: ChallengeEventMinOrderByAggregateInput + _sum?: ChallengeEventSumOrderByAggregateInput + } + + export type ChallengeEventScalarWhereWithAggregatesInput = { + AND?: ChallengeEventScalarWhereWithAggregatesInput | ChallengeEventScalarWhereWithAggregatesInput[] + OR?: ChallengeEventScalarWhereWithAggregatesInput[] + NOT?: ChallengeEventScalarWhereWithAggregatesInput | ChallengeEventScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeEvent"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeEvent"> | string + eventId?: IntWithAggregatesFilter<"ChallengeEvent"> | number + name?: StringNullableWithAggregatesFilter<"ChallengeEvent"> | string | null + key?: StringNullableWithAggregatesFilter<"ChallengeEvent"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"ChallengeEvent"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeEvent"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeEvent"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeEvent"> | string + } + + export type ChallengeDiscussionWhereInput = { + AND?: ChallengeDiscussionWhereInput | ChallengeDiscussionWhereInput[] + OR?: ChallengeDiscussionWhereInput[] + NOT?: ChallengeDiscussionWhereInput | ChallengeDiscussionWhereInput[] + id?: StringFilter<"ChallengeDiscussion"> | string + challengeId?: StringFilter<"ChallengeDiscussion"> | string + discussionId?: StringNullableFilter<"ChallengeDiscussion"> | string | null + name?: StringFilter<"ChallengeDiscussion"> | string + type?: EnumDiscussionTypeEnumFilter<"ChallengeDiscussion"> | $Enums.DiscussionTypeEnum + provider?: StringFilter<"ChallengeDiscussion"> | string + url?: StringNullableFilter<"ChallengeDiscussion"> | string | null + createdAt?: DateTimeFilter<"ChallengeDiscussion"> | Date | string + createdBy?: StringFilter<"ChallengeDiscussion"> | string + updatedAt?: DateTimeFilter<"ChallengeDiscussion"> | Date | string + updatedBy?: StringFilter<"ChallengeDiscussion"> | string + challenge?: XOR + options?: ChallengeDiscussionOptionListRelationFilter + } + + export type ChallengeDiscussionOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + discussionId?: SortOrderInput | SortOrder + name?: SortOrder + type?: SortOrder + provider?: SortOrder + url?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + options?: ChallengeDiscussionOptionOrderByRelationAggregateInput + _relevance?: ChallengeDiscussionOrderByRelevanceInput + } + + export type ChallengeDiscussionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeDiscussionWhereInput | ChallengeDiscussionWhereInput[] + OR?: ChallengeDiscussionWhereInput[] + NOT?: ChallengeDiscussionWhereInput | ChallengeDiscussionWhereInput[] + challengeId?: StringFilter<"ChallengeDiscussion"> | string + discussionId?: StringNullableFilter<"ChallengeDiscussion"> | string | null + name?: StringFilter<"ChallengeDiscussion"> | string + type?: EnumDiscussionTypeEnumFilter<"ChallengeDiscussion"> | $Enums.DiscussionTypeEnum + provider?: StringFilter<"ChallengeDiscussion"> | string + url?: StringNullableFilter<"ChallengeDiscussion"> | string | null + createdAt?: DateTimeFilter<"ChallengeDiscussion"> | Date | string + createdBy?: StringFilter<"ChallengeDiscussion"> | string + updatedAt?: DateTimeFilter<"ChallengeDiscussion"> | Date | string + updatedBy?: StringFilter<"ChallengeDiscussion"> | string + challenge?: XOR + options?: ChallengeDiscussionOptionListRelationFilter + }, "id"> + + export type ChallengeDiscussionOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + discussionId?: SortOrderInput | SortOrder + name?: SortOrder + type?: SortOrder + provider?: SortOrder + url?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeDiscussionCountOrderByAggregateInput + _max?: ChallengeDiscussionMaxOrderByAggregateInput + _min?: ChallengeDiscussionMinOrderByAggregateInput + } + + export type ChallengeDiscussionScalarWhereWithAggregatesInput = { + AND?: ChallengeDiscussionScalarWhereWithAggregatesInput | ChallengeDiscussionScalarWhereWithAggregatesInput[] + OR?: ChallengeDiscussionScalarWhereWithAggregatesInput[] + NOT?: ChallengeDiscussionScalarWhereWithAggregatesInput | ChallengeDiscussionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeDiscussion"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeDiscussion"> | string + discussionId?: StringNullableWithAggregatesFilter<"ChallengeDiscussion"> | string | null + name?: StringWithAggregatesFilter<"ChallengeDiscussion"> | string + type?: EnumDiscussionTypeEnumWithAggregatesFilter<"ChallengeDiscussion"> | $Enums.DiscussionTypeEnum + provider?: StringWithAggregatesFilter<"ChallengeDiscussion"> | string + url?: StringNullableWithAggregatesFilter<"ChallengeDiscussion"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"ChallengeDiscussion"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeDiscussion"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeDiscussion"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeDiscussion"> | string + } + + export type ChallengeDiscussionOptionWhereInput = { + AND?: ChallengeDiscussionOptionWhereInput | ChallengeDiscussionOptionWhereInput[] + OR?: ChallengeDiscussionOptionWhereInput[] + NOT?: ChallengeDiscussionOptionWhereInput | ChallengeDiscussionOptionWhereInput[] + id?: StringFilter<"ChallengeDiscussionOption"> | string + discussionId?: StringFilter<"ChallengeDiscussionOption"> | string + optionKey?: StringFilter<"ChallengeDiscussionOption"> | string + optionValue?: StringFilter<"ChallengeDiscussionOption"> | string + createdAt?: DateTimeFilter<"ChallengeDiscussionOption"> | Date | string + createdBy?: StringFilter<"ChallengeDiscussionOption"> | string + updatedAt?: DateTimeFilter<"ChallengeDiscussionOption"> | Date | string + updatedBy?: StringFilter<"ChallengeDiscussionOption"> | string + discussion?: XOR + } + + export type ChallengeDiscussionOptionOrderByWithRelationInput = { + id?: SortOrder + discussionId?: SortOrder + optionKey?: SortOrder + optionValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + discussion?: ChallengeDiscussionOrderByWithRelationInput + _relevance?: ChallengeDiscussionOptionOrderByRelevanceInput + } + + export type ChallengeDiscussionOptionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeDiscussionOptionWhereInput | ChallengeDiscussionOptionWhereInput[] + OR?: ChallengeDiscussionOptionWhereInput[] + NOT?: ChallengeDiscussionOptionWhereInput | ChallengeDiscussionOptionWhereInput[] + discussionId?: StringFilter<"ChallengeDiscussionOption"> | string + optionKey?: StringFilter<"ChallengeDiscussionOption"> | string + optionValue?: StringFilter<"ChallengeDiscussionOption"> | string + createdAt?: DateTimeFilter<"ChallengeDiscussionOption"> | Date | string + createdBy?: StringFilter<"ChallengeDiscussionOption"> | string + updatedAt?: DateTimeFilter<"ChallengeDiscussionOption"> | Date | string + updatedBy?: StringFilter<"ChallengeDiscussionOption"> | string + discussion?: XOR + }, "id"> + + export type ChallengeDiscussionOptionOrderByWithAggregationInput = { + id?: SortOrder + discussionId?: SortOrder + optionKey?: SortOrder + optionValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeDiscussionOptionCountOrderByAggregateInput + _max?: ChallengeDiscussionOptionMaxOrderByAggregateInput + _min?: ChallengeDiscussionOptionMinOrderByAggregateInput + } + + export type ChallengeDiscussionOptionScalarWhereWithAggregatesInput = { + AND?: ChallengeDiscussionOptionScalarWhereWithAggregatesInput | ChallengeDiscussionOptionScalarWhereWithAggregatesInput[] + OR?: ChallengeDiscussionOptionScalarWhereWithAggregatesInput[] + NOT?: ChallengeDiscussionOptionScalarWhereWithAggregatesInput | ChallengeDiscussionOptionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeDiscussionOption"> | string + discussionId?: StringWithAggregatesFilter<"ChallengeDiscussionOption"> | string + optionKey?: StringWithAggregatesFilter<"ChallengeDiscussionOption"> | string + optionValue?: StringWithAggregatesFilter<"ChallengeDiscussionOption"> | string + createdAt?: DateTimeWithAggregatesFilter<"ChallengeDiscussionOption"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeDiscussionOption"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeDiscussionOption"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeDiscussionOption"> | string + } + + export type ChallengeConstraintWhereInput = { + AND?: ChallengeConstraintWhereInput | ChallengeConstraintWhereInput[] + OR?: ChallengeConstraintWhereInput[] + NOT?: ChallengeConstraintWhereInput | ChallengeConstraintWhereInput[] + id?: StringFilter<"ChallengeConstraint"> | string + challengeId?: StringFilter<"ChallengeConstraint"> | string + allowedRegistrants?: StringNullableListFilter<"ChallengeConstraint"> + createdAt?: DateTimeFilter<"ChallengeConstraint"> | Date | string + createdBy?: StringFilter<"ChallengeConstraint"> | string + updatedAt?: DateTimeFilter<"ChallengeConstraint"> | Date | string + updatedBy?: StringFilter<"ChallengeConstraint"> | string + challenge?: XOR + } + + export type ChallengeConstraintOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + allowedRegistrants?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengeConstraintOrderByRelevanceInput + } + + export type ChallengeConstraintWhereUniqueInput = Prisma.AtLeast<{ + id?: string + challengeId?: string + AND?: ChallengeConstraintWhereInput | ChallengeConstraintWhereInput[] + OR?: ChallengeConstraintWhereInput[] + NOT?: ChallengeConstraintWhereInput | ChallengeConstraintWhereInput[] + allowedRegistrants?: StringNullableListFilter<"ChallengeConstraint"> + createdAt?: DateTimeFilter<"ChallengeConstraint"> | Date | string + createdBy?: StringFilter<"ChallengeConstraint"> | string + updatedAt?: DateTimeFilter<"ChallengeConstraint"> | Date | string + updatedBy?: StringFilter<"ChallengeConstraint"> | string + challenge?: XOR + }, "id" | "challengeId"> + + export type ChallengeConstraintOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + allowedRegistrants?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeConstraintCountOrderByAggregateInput + _max?: ChallengeConstraintMaxOrderByAggregateInput + _min?: ChallengeConstraintMinOrderByAggregateInput + } + + export type ChallengeConstraintScalarWhereWithAggregatesInput = { + AND?: ChallengeConstraintScalarWhereWithAggregatesInput | ChallengeConstraintScalarWhereWithAggregatesInput[] + OR?: ChallengeConstraintScalarWhereWithAggregatesInput[] + NOT?: ChallengeConstraintScalarWhereWithAggregatesInput | ChallengeConstraintScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeConstraint"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeConstraint"> | string + allowedRegistrants?: StringNullableListFilter<"ChallengeConstraint"> + createdAt?: DateTimeWithAggregatesFilter<"ChallengeConstraint"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeConstraint"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeConstraint"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeConstraint"> | string + } + + export type PhaseWhereInput = { + AND?: PhaseWhereInput | PhaseWhereInput[] + OR?: PhaseWhereInput[] + NOT?: PhaseWhereInput | PhaseWhereInput[] + id?: StringFilter<"Phase"> | string + name?: StringFilter<"Phase"> | string + description?: StringNullableFilter<"Phase"> | string | null + isOpen?: BoolFilter<"Phase"> | boolean + duration?: IntFilter<"Phase"> | number + createdAt?: DateTimeFilter<"Phase"> | Date | string + createdBy?: StringFilter<"Phase"> | string + updatedAt?: DateTimeFilter<"Phase"> | Date | string + updatedBy?: StringFilter<"Phase"> | string + challengePhases?: ChallengePhaseListRelationFilter + ChallengeReviewer?: ChallengeReviewerListRelationFilter + DefaultChallengeReviewer?: DefaultChallengeReviewerListRelationFilter + } + + export type PhaseOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isOpen?: SortOrder + duration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challengePhases?: ChallengePhaseOrderByRelationAggregateInput + ChallengeReviewer?: ChallengeReviewerOrderByRelationAggregateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerOrderByRelationAggregateInput + _relevance?: PhaseOrderByRelevanceInput + } + + export type PhaseWhereUniqueInput = Prisma.AtLeast<{ + id?: string + name?: string + AND?: PhaseWhereInput | PhaseWhereInput[] + OR?: PhaseWhereInput[] + NOT?: PhaseWhereInput | PhaseWhereInput[] + description?: StringNullableFilter<"Phase"> | string | null + isOpen?: BoolFilter<"Phase"> | boolean + duration?: IntFilter<"Phase"> | number + createdAt?: DateTimeFilter<"Phase"> | Date | string + createdBy?: StringFilter<"Phase"> | string + updatedAt?: DateTimeFilter<"Phase"> | Date | string + updatedBy?: StringFilter<"Phase"> | string + challengePhases?: ChallengePhaseListRelationFilter + ChallengeReviewer?: ChallengeReviewerListRelationFilter + DefaultChallengeReviewer?: DefaultChallengeReviewerListRelationFilter + }, "id" | "name"> + + export type PhaseOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isOpen?: SortOrder + duration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: PhaseCountOrderByAggregateInput + _avg?: PhaseAvgOrderByAggregateInput + _max?: PhaseMaxOrderByAggregateInput + _min?: PhaseMinOrderByAggregateInput + _sum?: PhaseSumOrderByAggregateInput + } + + export type PhaseScalarWhereWithAggregatesInput = { + AND?: PhaseScalarWhereWithAggregatesInput | PhaseScalarWhereWithAggregatesInput[] + OR?: PhaseScalarWhereWithAggregatesInput[] + NOT?: PhaseScalarWhereWithAggregatesInput | PhaseScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Phase"> | string + name?: StringWithAggregatesFilter<"Phase"> | string + description?: StringNullableWithAggregatesFilter<"Phase"> | string | null + isOpen?: BoolWithAggregatesFilter<"Phase"> | boolean + duration?: IntWithAggregatesFilter<"Phase"> | number + createdAt?: DateTimeWithAggregatesFilter<"Phase"> | Date | string + createdBy?: StringWithAggregatesFilter<"Phase"> | string + updatedAt?: DateTimeWithAggregatesFilter<"Phase"> | Date | string + updatedBy?: StringWithAggregatesFilter<"Phase"> | string + } + + export type ChallengePhaseWhereInput = { + AND?: ChallengePhaseWhereInput | ChallengePhaseWhereInput[] + OR?: ChallengePhaseWhereInput[] + NOT?: ChallengePhaseWhereInput | ChallengePhaseWhereInput[] + id?: StringFilter<"ChallengePhase"> | string + challengeId?: StringFilter<"ChallengePhase"> | string + phaseId?: StringFilter<"ChallengePhase"> | string + name?: StringFilter<"ChallengePhase"> | string + description?: StringNullableFilter<"ChallengePhase"> | string | null + isOpen?: BoolNullableFilter<"ChallengePhase"> | boolean | null + predecessor?: StringNullableFilter<"ChallengePhase"> | string | null + duration?: IntNullableFilter<"ChallengePhase"> | number | null + scheduledStartDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + scheduledEndDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + actualStartDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + actualEndDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + createdAt?: DateTimeFilter<"ChallengePhase"> | Date | string + createdBy?: StringFilter<"ChallengePhase"> | string + updatedAt?: DateTimeFilter<"ChallengePhase"> | Date | string + updatedBy?: StringFilter<"ChallengePhase"> | string + constraints?: ChallengePhaseConstraintListRelationFilter + challenge?: XOR + phase?: XOR + } + + export type ChallengePhaseOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + phaseId?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isOpen?: SortOrderInput | SortOrder + predecessor?: SortOrderInput | SortOrder + duration?: SortOrderInput | SortOrder + scheduledStartDate?: SortOrderInput | SortOrder + scheduledEndDate?: SortOrderInput | SortOrder + actualStartDate?: SortOrderInput | SortOrder + actualEndDate?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + constraints?: ChallengePhaseConstraintOrderByRelationAggregateInput + challenge?: ChallengeOrderByWithRelationInput + phase?: PhaseOrderByWithRelationInput + _relevance?: ChallengePhaseOrderByRelevanceInput + } + + export type ChallengePhaseWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengePhaseWhereInput | ChallengePhaseWhereInput[] + OR?: ChallengePhaseWhereInput[] + NOT?: ChallengePhaseWhereInput | ChallengePhaseWhereInput[] + challengeId?: StringFilter<"ChallengePhase"> | string + phaseId?: StringFilter<"ChallengePhase"> | string + name?: StringFilter<"ChallengePhase"> | string + description?: StringNullableFilter<"ChallengePhase"> | string | null + isOpen?: BoolNullableFilter<"ChallengePhase"> | boolean | null + predecessor?: StringNullableFilter<"ChallengePhase"> | string | null + duration?: IntNullableFilter<"ChallengePhase"> | number | null + scheduledStartDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + scheduledEndDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + actualStartDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + actualEndDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + createdAt?: DateTimeFilter<"ChallengePhase"> | Date | string + createdBy?: StringFilter<"ChallengePhase"> | string + updatedAt?: DateTimeFilter<"ChallengePhase"> | Date | string + updatedBy?: StringFilter<"ChallengePhase"> | string + constraints?: ChallengePhaseConstraintListRelationFilter + challenge?: XOR + phase?: XOR + }, "id"> + + export type ChallengePhaseOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + phaseId?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isOpen?: SortOrderInput | SortOrder + predecessor?: SortOrderInput | SortOrder + duration?: SortOrderInput | SortOrder + scheduledStartDate?: SortOrderInput | SortOrder + scheduledEndDate?: SortOrderInput | SortOrder + actualStartDate?: SortOrderInput | SortOrder + actualEndDate?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengePhaseCountOrderByAggregateInput + _avg?: ChallengePhaseAvgOrderByAggregateInput + _max?: ChallengePhaseMaxOrderByAggregateInput + _min?: ChallengePhaseMinOrderByAggregateInput + _sum?: ChallengePhaseSumOrderByAggregateInput + } + + export type ChallengePhaseScalarWhereWithAggregatesInput = { + AND?: ChallengePhaseScalarWhereWithAggregatesInput | ChallengePhaseScalarWhereWithAggregatesInput[] + OR?: ChallengePhaseScalarWhereWithAggregatesInput[] + NOT?: ChallengePhaseScalarWhereWithAggregatesInput | ChallengePhaseScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengePhase"> | string + challengeId?: StringWithAggregatesFilter<"ChallengePhase"> | string + phaseId?: StringWithAggregatesFilter<"ChallengePhase"> | string + name?: StringWithAggregatesFilter<"ChallengePhase"> | string + description?: StringNullableWithAggregatesFilter<"ChallengePhase"> | string | null + isOpen?: BoolNullableWithAggregatesFilter<"ChallengePhase"> | boolean | null + predecessor?: StringNullableWithAggregatesFilter<"ChallengePhase"> | string | null + duration?: IntNullableWithAggregatesFilter<"ChallengePhase"> | number | null + scheduledStartDate?: DateTimeNullableWithAggregatesFilter<"ChallengePhase"> | Date | string | null + scheduledEndDate?: DateTimeNullableWithAggregatesFilter<"ChallengePhase"> | Date | string | null + actualStartDate?: DateTimeNullableWithAggregatesFilter<"ChallengePhase"> | Date | string | null + actualEndDate?: DateTimeNullableWithAggregatesFilter<"ChallengePhase"> | Date | string | null + createdAt?: DateTimeWithAggregatesFilter<"ChallengePhase"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengePhase"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengePhase"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengePhase"> | string + } + + export type ChallengePhaseConstraintWhereInput = { + AND?: ChallengePhaseConstraintWhereInput | ChallengePhaseConstraintWhereInput[] + OR?: ChallengePhaseConstraintWhereInput[] + NOT?: ChallengePhaseConstraintWhereInput | ChallengePhaseConstraintWhereInput[] + id?: StringFilter<"ChallengePhaseConstraint"> | string + challengePhaseId?: StringFilter<"ChallengePhaseConstraint"> | string + name?: StringFilter<"ChallengePhaseConstraint"> | string + value?: IntFilter<"ChallengePhaseConstraint"> | number + createdAt?: DateTimeFilter<"ChallengePhaseConstraint"> | Date | string + createdBy?: StringFilter<"ChallengePhaseConstraint"> | string + updatedAt?: DateTimeFilter<"ChallengePhaseConstraint"> | Date | string + updatedBy?: StringFilter<"ChallengePhaseConstraint"> | string + challengePhase?: XOR + } + + export type ChallengePhaseConstraintOrderByWithRelationInput = { + id?: SortOrder + challengePhaseId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challengePhase?: ChallengePhaseOrderByWithRelationInput + _relevance?: ChallengePhaseConstraintOrderByRelevanceInput + } + + export type ChallengePhaseConstraintWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengePhaseConstraintWhereInput | ChallengePhaseConstraintWhereInput[] + OR?: ChallengePhaseConstraintWhereInput[] + NOT?: ChallengePhaseConstraintWhereInput | ChallengePhaseConstraintWhereInput[] + challengePhaseId?: StringFilter<"ChallengePhaseConstraint"> | string + name?: StringFilter<"ChallengePhaseConstraint"> | string + value?: IntFilter<"ChallengePhaseConstraint"> | number + createdAt?: DateTimeFilter<"ChallengePhaseConstraint"> | Date | string + createdBy?: StringFilter<"ChallengePhaseConstraint"> | string + updatedAt?: DateTimeFilter<"ChallengePhaseConstraint"> | Date | string + updatedBy?: StringFilter<"ChallengePhaseConstraint"> | string + challengePhase?: XOR + }, "id"> + + export type ChallengePhaseConstraintOrderByWithAggregationInput = { + id?: SortOrder + challengePhaseId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengePhaseConstraintCountOrderByAggregateInput + _avg?: ChallengePhaseConstraintAvgOrderByAggregateInput + _max?: ChallengePhaseConstraintMaxOrderByAggregateInput + _min?: ChallengePhaseConstraintMinOrderByAggregateInput + _sum?: ChallengePhaseConstraintSumOrderByAggregateInput + } + + export type ChallengePhaseConstraintScalarWhereWithAggregatesInput = { + AND?: ChallengePhaseConstraintScalarWhereWithAggregatesInput | ChallengePhaseConstraintScalarWhereWithAggregatesInput[] + OR?: ChallengePhaseConstraintScalarWhereWithAggregatesInput[] + NOT?: ChallengePhaseConstraintScalarWhereWithAggregatesInput | ChallengePhaseConstraintScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengePhaseConstraint"> | string + challengePhaseId?: StringWithAggregatesFilter<"ChallengePhaseConstraint"> | string + name?: StringWithAggregatesFilter<"ChallengePhaseConstraint"> | string + value?: IntWithAggregatesFilter<"ChallengePhaseConstraint"> | number + createdAt?: DateTimeWithAggregatesFilter<"ChallengePhaseConstraint"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengePhaseConstraint"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengePhaseConstraint"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengePhaseConstraint"> | string + } + + export type ChallengePrizeSetWhereInput = { + AND?: ChallengePrizeSetWhereInput | ChallengePrizeSetWhereInput[] + OR?: ChallengePrizeSetWhereInput[] + NOT?: ChallengePrizeSetWhereInput | ChallengePrizeSetWhereInput[] + id?: StringFilter<"ChallengePrizeSet"> | string + challengeId?: StringFilter<"ChallengePrizeSet"> | string + type?: EnumPrizeSetTypeEnumFilter<"ChallengePrizeSet"> | $Enums.PrizeSetTypeEnum + description?: StringNullableFilter<"ChallengePrizeSet"> | string | null + createdAt?: DateTimeFilter<"ChallengePrizeSet"> | Date | string + createdBy?: StringFilter<"ChallengePrizeSet"> | string + updatedAt?: DateTimeFilter<"ChallengePrizeSet"> | Date | string + updatedBy?: StringFilter<"ChallengePrizeSet"> | string + prizes?: PrizeListRelationFilter + challenge?: XOR + } + + export type ChallengePrizeSetOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + type?: SortOrder + description?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + prizes?: PrizeOrderByRelationAggregateInput + challenge?: ChallengeOrderByWithRelationInput + _relevance?: ChallengePrizeSetOrderByRelevanceInput + } + + export type ChallengePrizeSetWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengePrizeSetWhereInput | ChallengePrizeSetWhereInput[] + OR?: ChallengePrizeSetWhereInput[] + NOT?: ChallengePrizeSetWhereInput | ChallengePrizeSetWhereInput[] + challengeId?: StringFilter<"ChallengePrizeSet"> | string + type?: EnumPrizeSetTypeEnumFilter<"ChallengePrizeSet"> | $Enums.PrizeSetTypeEnum + description?: StringNullableFilter<"ChallengePrizeSet"> | string | null + createdAt?: DateTimeFilter<"ChallengePrizeSet"> | Date | string + createdBy?: StringFilter<"ChallengePrizeSet"> | string + updatedAt?: DateTimeFilter<"ChallengePrizeSet"> | Date | string + updatedBy?: StringFilter<"ChallengePrizeSet"> | string + prizes?: PrizeListRelationFilter + challenge?: XOR + }, "id"> + + export type ChallengePrizeSetOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + type?: SortOrder + description?: SortOrderInput | SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengePrizeSetCountOrderByAggregateInput + _max?: ChallengePrizeSetMaxOrderByAggregateInput + _min?: ChallengePrizeSetMinOrderByAggregateInput + } + + export type ChallengePrizeSetScalarWhereWithAggregatesInput = { + AND?: ChallengePrizeSetScalarWhereWithAggregatesInput | ChallengePrizeSetScalarWhereWithAggregatesInput[] + OR?: ChallengePrizeSetScalarWhereWithAggregatesInput[] + NOT?: ChallengePrizeSetScalarWhereWithAggregatesInput | ChallengePrizeSetScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengePrizeSet"> | string + challengeId?: StringWithAggregatesFilter<"ChallengePrizeSet"> | string + type?: EnumPrizeSetTypeEnumWithAggregatesFilter<"ChallengePrizeSet"> | $Enums.PrizeSetTypeEnum + description?: StringNullableWithAggregatesFilter<"ChallengePrizeSet"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"ChallengePrizeSet"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengePrizeSet"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengePrizeSet"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengePrizeSet"> | string + } + + export type ChallengeReviewerWhereInput = { + AND?: ChallengeReviewerWhereInput | ChallengeReviewerWhereInput[] + OR?: ChallengeReviewerWhereInput[] + NOT?: ChallengeReviewerWhereInput | ChallengeReviewerWhereInput[] + id?: StringFilter<"ChallengeReviewer"> | string + challengeId?: StringFilter<"ChallengeReviewer"> | string + scorecardId?: StringFilter<"ChallengeReviewer"> | string + isMemberReview?: BoolFilter<"ChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableFilter<"ChallengeReviewer"> | number | null + phaseId?: StringFilter<"ChallengeReviewer"> | string + fixedAmount?: FloatNullableFilter<"ChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableFilter<"ChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableFilter<"ChallengeReviewer"> | number | null + type?: EnumReviewOpportunityTypeEnumNullableFilter<"ChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableFilter<"ChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolFilter<"ChallengeReviewer"> | boolean + createdAt?: DateTimeFilter<"ChallengeReviewer"> | Date | string + createdBy?: StringFilter<"ChallengeReviewer"> | string + updatedAt?: DateTimeFilter<"ChallengeReviewer"> | Date | string + updatedBy?: StringFilter<"ChallengeReviewer"> | string + challenge?: XOR + phase?: XOR + } + + export type ChallengeReviewerOrderByWithRelationInput = { + id?: SortOrder + challengeId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrderInput | SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrderInput | SortOrder + baseCoefficient?: SortOrderInput | SortOrder + incrementalCoefficient?: SortOrderInput | SortOrder + type?: SortOrderInput | SortOrder + aiWorkflowId?: SortOrderInput | SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + phase?: PhaseOrderByWithRelationInput + _relevance?: ChallengeReviewerOrderByRelevanceInput + } + + export type ChallengeReviewerWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChallengeReviewerWhereInput | ChallengeReviewerWhereInput[] + OR?: ChallengeReviewerWhereInput[] + NOT?: ChallengeReviewerWhereInput | ChallengeReviewerWhereInput[] + challengeId?: StringFilter<"ChallengeReviewer"> | string + scorecardId?: StringFilter<"ChallengeReviewer"> | string + isMemberReview?: BoolFilter<"ChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableFilter<"ChallengeReviewer"> | number | null + phaseId?: StringFilter<"ChallengeReviewer"> | string + fixedAmount?: FloatNullableFilter<"ChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableFilter<"ChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableFilter<"ChallengeReviewer"> | number | null + type?: EnumReviewOpportunityTypeEnumNullableFilter<"ChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableFilter<"ChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolFilter<"ChallengeReviewer"> | boolean + createdAt?: DateTimeFilter<"ChallengeReviewer"> | Date | string + createdBy?: StringFilter<"ChallengeReviewer"> | string + updatedAt?: DateTimeFilter<"ChallengeReviewer"> | Date | string + updatedBy?: StringFilter<"ChallengeReviewer"> | string + challenge?: XOR + phase?: XOR + }, "id"> + + export type ChallengeReviewerOrderByWithAggregationInput = { + id?: SortOrder + challengeId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrderInput | SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrderInput | SortOrder + baseCoefficient?: SortOrderInput | SortOrder + incrementalCoefficient?: SortOrderInput | SortOrder + type?: SortOrderInput | SortOrder + aiWorkflowId?: SortOrderInput | SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: ChallengeReviewerCountOrderByAggregateInput + _avg?: ChallengeReviewerAvgOrderByAggregateInput + _max?: ChallengeReviewerMaxOrderByAggregateInput + _min?: ChallengeReviewerMinOrderByAggregateInput + _sum?: ChallengeReviewerSumOrderByAggregateInput + } + + export type ChallengeReviewerScalarWhereWithAggregatesInput = { + AND?: ChallengeReviewerScalarWhereWithAggregatesInput | ChallengeReviewerScalarWhereWithAggregatesInput[] + OR?: ChallengeReviewerScalarWhereWithAggregatesInput[] + NOT?: ChallengeReviewerScalarWhereWithAggregatesInput | ChallengeReviewerScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChallengeReviewer"> | string + challengeId?: StringWithAggregatesFilter<"ChallengeReviewer"> | string + scorecardId?: StringWithAggregatesFilter<"ChallengeReviewer"> | string + isMemberReview?: BoolWithAggregatesFilter<"ChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableWithAggregatesFilter<"ChallengeReviewer"> | number | null + phaseId?: StringWithAggregatesFilter<"ChallengeReviewer"> | string + fixedAmount?: FloatNullableWithAggregatesFilter<"ChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableWithAggregatesFilter<"ChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableWithAggregatesFilter<"ChallengeReviewer"> | number | null + type?: EnumReviewOpportunityTypeEnumNullableWithAggregatesFilter<"ChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableWithAggregatesFilter<"ChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolWithAggregatesFilter<"ChallengeReviewer"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"ChallengeReviewer"> | Date | string + createdBy?: StringWithAggregatesFilter<"ChallengeReviewer"> | string + updatedAt?: DateTimeWithAggregatesFilter<"ChallengeReviewer"> | Date | string + updatedBy?: StringWithAggregatesFilter<"ChallengeReviewer"> | string + } + + export type DefaultChallengeReviewerWhereInput = { + AND?: DefaultChallengeReviewerWhereInput | DefaultChallengeReviewerWhereInput[] + OR?: DefaultChallengeReviewerWhereInput[] + NOT?: DefaultChallengeReviewerWhereInput | DefaultChallengeReviewerWhereInput[] + id?: StringFilter<"DefaultChallengeReviewer"> | string + typeId?: StringFilter<"DefaultChallengeReviewer"> | string + trackId?: StringFilter<"DefaultChallengeReviewer"> | string + timelineTemplateId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + scorecardId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + isMemberReview?: BoolFilter<"DefaultChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableFilter<"DefaultChallengeReviewer"> | number | null + phaseName?: StringFilter<"DefaultChallengeReviewer"> | string + phaseId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + fixedAmount?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + opportunityType?: EnumReviewOpportunityTypeEnumNullableFilter<"DefaultChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolFilter<"DefaultChallengeReviewer"> | boolean + createdAt?: DateTimeFilter<"DefaultChallengeReviewer"> | Date | string + createdBy?: StringFilter<"DefaultChallengeReviewer"> | string + updatedAt?: DateTimeFilter<"DefaultChallengeReviewer"> | Date | string + updatedBy?: StringFilter<"DefaultChallengeReviewer"> | string + challengeType?: XOR + challengeTrack?: XOR + timelineTemplate?: XOR | null + phase?: XOR | null + } + + export type DefaultChallengeReviewerOrderByWithRelationInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrderInput | SortOrder + scorecardId?: SortOrderInput | SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrderInput | SortOrder + phaseName?: SortOrder + phaseId?: SortOrderInput | SortOrder + fixedAmount?: SortOrderInput | SortOrder + baseCoefficient?: SortOrderInput | SortOrder + incrementalCoefficient?: SortOrderInput | SortOrder + opportunityType?: SortOrderInput | SortOrder + aiWorkflowId?: SortOrderInput | SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + challengeType?: ChallengeTypeOrderByWithRelationInput + challengeTrack?: ChallengeTrackOrderByWithRelationInput + timelineTemplate?: TimelineTemplateOrderByWithRelationInput + phase?: PhaseOrderByWithRelationInput + _relevance?: DefaultChallengeReviewerOrderByRelevanceInput + } + + export type DefaultChallengeReviewerWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: DefaultChallengeReviewerWhereInput | DefaultChallengeReviewerWhereInput[] + OR?: DefaultChallengeReviewerWhereInput[] + NOT?: DefaultChallengeReviewerWhereInput | DefaultChallengeReviewerWhereInput[] + typeId?: StringFilter<"DefaultChallengeReviewer"> | string + trackId?: StringFilter<"DefaultChallengeReviewer"> | string + timelineTemplateId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + scorecardId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + isMemberReview?: BoolFilter<"DefaultChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableFilter<"DefaultChallengeReviewer"> | number | null + phaseName?: StringFilter<"DefaultChallengeReviewer"> | string + phaseId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + fixedAmount?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + opportunityType?: EnumReviewOpportunityTypeEnumNullableFilter<"DefaultChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolFilter<"DefaultChallengeReviewer"> | boolean + createdAt?: DateTimeFilter<"DefaultChallengeReviewer"> | Date | string + createdBy?: StringFilter<"DefaultChallengeReviewer"> | string + updatedAt?: DateTimeFilter<"DefaultChallengeReviewer"> | Date | string + updatedBy?: StringFilter<"DefaultChallengeReviewer"> | string + challengeType?: XOR + challengeTrack?: XOR + timelineTemplate?: XOR | null + phase?: XOR | null + }, "id"> + + export type DefaultChallengeReviewerOrderByWithAggregationInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrderInput | SortOrder + scorecardId?: SortOrderInput | SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrderInput | SortOrder + phaseName?: SortOrder + phaseId?: SortOrderInput | SortOrder + fixedAmount?: SortOrderInput | SortOrder + baseCoefficient?: SortOrderInput | SortOrder + incrementalCoefficient?: SortOrderInput | SortOrder + opportunityType?: SortOrderInput | SortOrder + aiWorkflowId?: SortOrderInput | SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: DefaultChallengeReviewerCountOrderByAggregateInput + _avg?: DefaultChallengeReviewerAvgOrderByAggregateInput + _max?: DefaultChallengeReviewerMaxOrderByAggregateInput + _min?: DefaultChallengeReviewerMinOrderByAggregateInput + _sum?: DefaultChallengeReviewerSumOrderByAggregateInput + } + + export type DefaultChallengeReviewerScalarWhereWithAggregatesInput = { + AND?: DefaultChallengeReviewerScalarWhereWithAggregatesInput | DefaultChallengeReviewerScalarWhereWithAggregatesInput[] + OR?: DefaultChallengeReviewerScalarWhereWithAggregatesInput[] + NOT?: DefaultChallengeReviewerScalarWhereWithAggregatesInput | DefaultChallengeReviewerScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"DefaultChallengeReviewer"> | string + typeId?: StringWithAggregatesFilter<"DefaultChallengeReviewer"> | string + trackId?: StringWithAggregatesFilter<"DefaultChallengeReviewer"> | string + timelineTemplateId?: StringNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | string | null + scorecardId?: StringNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | string | null + isMemberReview?: BoolWithAggregatesFilter<"DefaultChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | number | null + phaseName?: StringWithAggregatesFilter<"DefaultChallengeReviewer"> | string + phaseId?: StringNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | string | null + fixedAmount?: FloatNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | number | null + opportunityType?: EnumReviewOpportunityTypeEnumNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableWithAggregatesFilter<"DefaultChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolWithAggregatesFilter<"DefaultChallengeReviewer"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"DefaultChallengeReviewer"> | Date | string + createdBy?: StringWithAggregatesFilter<"DefaultChallengeReviewer"> | string + updatedAt?: DateTimeWithAggregatesFilter<"DefaultChallengeReviewer"> | Date | string + updatedBy?: StringWithAggregatesFilter<"DefaultChallengeReviewer"> | string + } + + export type TimelineTemplateWhereInput = { + AND?: TimelineTemplateWhereInput | TimelineTemplateWhereInput[] + OR?: TimelineTemplateWhereInput[] + NOT?: TimelineTemplateWhereInput | TimelineTemplateWhereInput[] + id?: StringFilter<"TimelineTemplate"> | string + name?: StringFilter<"TimelineTemplate"> | string + description?: StringNullableFilter<"TimelineTemplate"> | string | null + isActive?: BoolFilter<"TimelineTemplate"> | boolean + createdAt?: DateTimeFilter<"TimelineTemplate"> | Date | string + createdBy?: StringFilter<"TimelineTemplate"> | string + updatedAt?: DateTimeFilter<"TimelineTemplate"> | Date | string + updatedBy?: StringFilter<"TimelineTemplate"> | string + phases?: TimelineTemplatePhaseListRelationFilter + challengeTimelineTemplates?: ChallengeTimelineTemplateListRelationFilter + challenges?: ChallengeListRelationFilter + DefaultChallengeReviewer?: DefaultChallengeReviewerListRelationFilter + } + + export type TimelineTemplateOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + phases?: TimelineTemplatePhaseOrderByRelationAggregateInput + challengeTimelineTemplates?: ChallengeTimelineTemplateOrderByRelationAggregateInput + challenges?: ChallengeOrderByRelationAggregateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerOrderByRelationAggregateInput + _relevance?: TimelineTemplateOrderByRelevanceInput + } + + export type TimelineTemplateWhereUniqueInput = Prisma.AtLeast<{ + id?: string + name?: string + AND?: TimelineTemplateWhereInput | TimelineTemplateWhereInput[] + OR?: TimelineTemplateWhereInput[] + NOT?: TimelineTemplateWhereInput | TimelineTemplateWhereInput[] + description?: StringNullableFilter<"TimelineTemplate"> | string | null + isActive?: BoolFilter<"TimelineTemplate"> | boolean + createdAt?: DateTimeFilter<"TimelineTemplate"> | Date | string + createdBy?: StringFilter<"TimelineTemplate"> | string + updatedAt?: DateTimeFilter<"TimelineTemplate"> | Date | string + updatedBy?: StringFilter<"TimelineTemplate"> | string + phases?: TimelineTemplatePhaseListRelationFilter + challengeTimelineTemplates?: ChallengeTimelineTemplateListRelationFilter + challenges?: ChallengeListRelationFilter + DefaultChallengeReviewer?: DefaultChallengeReviewerListRelationFilter + }, "id" | "name"> + + export type TimelineTemplateOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: TimelineTemplateCountOrderByAggregateInput + _max?: TimelineTemplateMaxOrderByAggregateInput + _min?: TimelineTemplateMinOrderByAggregateInput + } + + export type TimelineTemplateScalarWhereWithAggregatesInput = { + AND?: TimelineTemplateScalarWhereWithAggregatesInput | TimelineTemplateScalarWhereWithAggregatesInput[] + OR?: TimelineTemplateScalarWhereWithAggregatesInput[] + NOT?: TimelineTemplateScalarWhereWithAggregatesInput | TimelineTemplateScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"TimelineTemplate"> | string + name?: StringWithAggregatesFilter<"TimelineTemplate"> | string + description?: StringNullableWithAggregatesFilter<"TimelineTemplate"> | string | null + isActive?: BoolWithAggregatesFilter<"TimelineTemplate"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"TimelineTemplate"> | Date | string + createdBy?: StringWithAggregatesFilter<"TimelineTemplate"> | string + updatedAt?: DateTimeWithAggregatesFilter<"TimelineTemplate"> | Date | string + updatedBy?: StringWithAggregatesFilter<"TimelineTemplate"> | string + } + + export type TimelineTemplatePhaseWhereInput = { + AND?: TimelineTemplatePhaseWhereInput | TimelineTemplatePhaseWhereInput[] + OR?: TimelineTemplatePhaseWhereInput[] + NOT?: TimelineTemplatePhaseWhereInput | TimelineTemplatePhaseWhereInput[] + id?: StringFilter<"TimelineTemplatePhase"> | string + timelineTemplateId?: StringFilter<"TimelineTemplatePhase"> | string + phaseId?: StringFilter<"TimelineTemplatePhase"> | string + predecessor?: StringNullableFilter<"TimelineTemplatePhase"> | string | null + defaultDuration?: IntFilter<"TimelineTemplatePhase"> | number + createdAt?: DateTimeFilter<"TimelineTemplatePhase"> | Date | string + createdBy?: StringFilter<"TimelineTemplatePhase"> | string + updatedAt?: DateTimeFilter<"TimelineTemplatePhase"> | Date | string + updatedBy?: StringFilter<"TimelineTemplatePhase"> | string + timelineTemplate?: XOR + } + + export type TimelineTemplatePhaseOrderByWithRelationInput = { + id?: SortOrder + timelineTemplateId?: SortOrder + phaseId?: SortOrder + predecessor?: SortOrderInput | SortOrder + defaultDuration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + timelineTemplate?: TimelineTemplateOrderByWithRelationInput + _relevance?: TimelineTemplatePhaseOrderByRelevanceInput + } + + export type TimelineTemplatePhaseWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: TimelineTemplatePhaseWhereInput | TimelineTemplatePhaseWhereInput[] + OR?: TimelineTemplatePhaseWhereInput[] + NOT?: TimelineTemplatePhaseWhereInput | TimelineTemplatePhaseWhereInput[] + timelineTemplateId?: StringFilter<"TimelineTemplatePhase"> | string + phaseId?: StringFilter<"TimelineTemplatePhase"> | string + predecessor?: StringNullableFilter<"TimelineTemplatePhase"> | string | null + defaultDuration?: IntFilter<"TimelineTemplatePhase"> | number + createdAt?: DateTimeFilter<"TimelineTemplatePhase"> | Date | string + createdBy?: StringFilter<"TimelineTemplatePhase"> | string + updatedAt?: DateTimeFilter<"TimelineTemplatePhase"> | Date | string + updatedBy?: StringFilter<"TimelineTemplatePhase"> | string + timelineTemplate?: XOR + }, "id"> + + export type TimelineTemplatePhaseOrderByWithAggregationInput = { + id?: SortOrder + timelineTemplateId?: SortOrder + phaseId?: SortOrder + predecessor?: SortOrderInput | SortOrder + defaultDuration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + _count?: TimelineTemplatePhaseCountOrderByAggregateInput + _avg?: TimelineTemplatePhaseAvgOrderByAggregateInput + _max?: TimelineTemplatePhaseMaxOrderByAggregateInput + _min?: TimelineTemplatePhaseMinOrderByAggregateInput + _sum?: TimelineTemplatePhaseSumOrderByAggregateInput + } + + export type TimelineTemplatePhaseScalarWhereWithAggregatesInput = { + AND?: TimelineTemplatePhaseScalarWhereWithAggregatesInput | TimelineTemplatePhaseScalarWhereWithAggregatesInput[] + OR?: TimelineTemplatePhaseScalarWhereWithAggregatesInput[] + NOT?: TimelineTemplatePhaseScalarWhereWithAggregatesInput | TimelineTemplatePhaseScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"TimelineTemplatePhase"> | string + timelineTemplateId?: StringWithAggregatesFilter<"TimelineTemplatePhase"> | string + phaseId?: StringWithAggregatesFilter<"TimelineTemplatePhase"> | string + predecessor?: StringNullableWithAggregatesFilter<"TimelineTemplatePhase"> | string | null + defaultDuration?: IntWithAggregatesFilter<"TimelineTemplatePhase"> | number + createdAt?: DateTimeWithAggregatesFilter<"TimelineTemplatePhase"> | Date | string + createdBy?: StringWithAggregatesFilter<"TimelineTemplatePhase"> | string + updatedAt?: DateTimeWithAggregatesFilter<"TimelineTemplatePhase"> | Date | string + updatedBy?: StringWithAggregatesFilter<"TimelineTemplatePhase"> | string + } + + export type MemberChallengeAccessWhereInput = { + AND?: MemberChallengeAccessWhereInput | MemberChallengeAccessWhereInput[] + OR?: MemberChallengeAccessWhereInput[] + NOT?: MemberChallengeAccessWhereInput | MemberChallengeAccessWhereInput[] + challengeId?: StringFilter<"MemberChallengeAccess"> | string + memberId?: StringFilter<"MemberChallengeAccess"> | string + challenge?: XOR + } + + export type MemberChallengeAccessOrderByWithRelationInput = { + challengeId?: SortOrder + memberId?: SortOrder + challenge?: ChallengeOrderByWithRelationInput + _relevance?: MemberChallengeAccessOrderByRelevanceInput + } + + export type MemberChallengeAccessOrderByWithAggregationInput = { + challengeId?: SortOrder + memberId?: SortOrder + _count?: MemberChallengeAccessCountOrderByAggregateInput + _max?: MemberChallengeAccessMaxOrderByAggregateInput + _min?: MemberChallengeAccessMinOrderByAggregateInput + } + + export type MemberChallengeAccessScalarWhereWithAggregatesInput = { + AND?: MemberChallengeAccessScalarWhereWithAggregatesInput | MemberChallengeAccessScalarWhereWithAggregatesInput[] + OR?: MemberChallengeAccessScalarWhereWithAggregatesInput[] + NOT?: MemberChallengeAccessScalarWhereWithAggregatesInput | MemberChallengeAccessScalarWhereWithAggregatesInput[] + challengeId?: StringWithAggregatesFilter<"MemberChallengeAccess"> | string + memberId?: StringWithAggregatesFilter<"MemberChallengeAccess"> | string + } + + export type ChallengeCreateInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateManyInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTypeCreateInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeCreateNestedManyWithoutTypeInput + timelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTypeInput + defaultReviewers?: DefaultChallengeReviewerCreateNestedManyWithoutChallengeTypeInput + } + + export type ChallengeTypeUncheckedCreateInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeUncheckedCreateNestedManyWithoutTypeInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTypeInput + defaultReviewers?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTypeInput + } + + export type ChallengeTypeUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUpdateManyWithoutTypeNestedInput + timelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTypeNestedInput + defaultReviewers?: DefaultChallengeReviewerUpdateManyWithoutChallengeTypeNestedInput + } + + export type ChallengeTypeUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUncheckedUpdateManyWithoutTypeNestedInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTypeNestedInput + defaultReviewers?: DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTypeNestedInput + } + + export type ChallengeTypeCreateManyInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTypeUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTypeUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTrackCreateInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeCreateNestedManyWithoutTrackInput + timelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTrackInput + defaultReviewers?: DefaultChallengeReviewerCreateNestedManyWithoutChallengeTrackInput + } + + export type ChallengeTrackUncheckedCreateInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeUncheckedCreateNestedManyWithoutTrackInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTrackInput + defaultReviewers?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTrackInput + } + + export type ChallengeTrackUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUpdateManyWithoutTrackNestedInput + timelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTrackNestedInput + defaultReviewers?: DefaultChallengeReviewerUpdateManyWithoutChallengeTrackNestedInput + } + + export type ChallengeTrackUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUncheckedUpdateManyWithoutTrackNestedInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTrackNestedInput + defaultReviewers?: DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTrackNestedInput + } + + export type ChallengeTrackCreateManyInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTrackUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTrackUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateCreateInput = { + id?: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplate: TimelineTemplateCreateNestedOneWithoutChallengeTimelineTemplatesInput + track: ChallengeTrackCreateNestedOneWithoutTimelineTemplatesInput + type: ChallengeTypeCreateNestedOneWithoutTimelineTemplatesInput + } + + export type ChallengeTimelineTemplateUncheckedCreateInput = { + id?: string + typeId: string + trackId: string + timelineTemplateId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplate?: TimelineTemplateUpdateOneRequiredWithoutChallengeTimelineTemplatesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutTimelineTemplatesNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutTimelineTemplatesNestedInput + } + + export type ChallengeTimelineTemplateUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateCreateManyInput = { + id?: string + typeId: string + trackId: string + timelineTemplateId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type AuditLogCreateInput = { + id?: string + fieldName: string + oldValue?: string | null + newValue?: string | null + createdAt?: Date | string + createdBy: string + memberId?: string | null + challenge?: ChallengeCreateNestedOneWithoutAuditLogsInput + } + + export type AuditLogUncheckedCreateInput = { + id?: string + challengeId?: string | null + fieldName: string + oldValue?: string | null + newValue?: string | null + createdAt?: Date | string + createdBy: string + memberId?: string | null + } + + export type AuditLogUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + fieldName?: StringFieldUpdateOperationsInput | string + oldValue?: NullableStringFieldUpdateOperationsInput | string | null + newValue?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + memberId?: NullableStringFieldUpdateOperationsInput | string | null + challenge?: ChallengeUpdateOneWithoutAuditLogsNestedInput + } + + export type AuditLogUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: NullableStringFieldUpdateOperationsInput | string | null + fieldName?: StringFieldUpdateOperationsInput | string + oldValue?: NullableStringFieldUpdateOperationsInput | string | null + newValue?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + memberId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AuditLogCreateManyInput = { + id?: string + challengeId?: string | null + fieldName: string + oldValue?: string | null + newValue?: string | null + createdAt?: Date | string + createdBy: string + memberId?: string | null + } + + export type AuditLogUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + fieldName?: StringFieldUpdateOperationsInput | string + oldValue?: NullableStringFieldUpdateOperationsInput | string | null + newValue?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + memberId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AuditLogUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: NullableStringFieldUpdateOperationsInput | string | null + fieldName?: StringFieldUpdateOperationsInput | string + oldValue?: NullableStringFieldUpdateOperationsInput | string | null + newValue?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + memberId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AttachmentCreateInput = { + id?: string + name: string + fileSize: number + url: string + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutAttachmentsInput + } + + export type AttachmentUncheckedCreateInput = { + id?: string + challengeId: string + name: string + fileSize: number + url: string + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type AttachmentUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + fileSize?: IntFieldUpdateOperationsInput | number + url?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutAttachmentsNestedInput + } + + export type AttachmentUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + fileSize?: IntFieldUpdateOperationsInput | number + url?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type AttachmentCreateManyInput = { + id?: string + challengeId: string + name: string + fileSize: number + url: string + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type AttachmentUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + fileSize?: IntFieldUpdateOperationsInput | number + url?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type AttachmentUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + fileSize?: IntFieldUpdateOperationsInput | number + url?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeMetadataCreateInput = { + id?: string + name: string + value: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutMetadataInput + } + + export type ChallengeMetadataUncheckedCreateInput = { + id?: string + challengeId: string + name: string + value: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeMetadataUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutMetadataNestedInput + } + + export type ChallengeMetadataUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeMetadataCreateManyInput = { + id?: string + challengeId: string + name: string + value: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeMetadataUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeMetadataUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PrizeCreateInput = { + id?: string + description?: string | null + type: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + prizeSet: ChallengePrizeSetCreateNestedOneWithoutPrizesInput + } + + export type PrizeUncheckedCreateInput = { + id?: string + description?: string | null + prizeSetId: string + type: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type PrizeUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + type?: StringFieldUpdateOperationsInput | string + value?: FloatFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + prizeSet?: ChallengePrizeSetUpdateOneRequiredWithoutPrizesNestedInput + } + + export type PrizeUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + prizeSetId?: StringFieldUpdateOperationsInput | string + type?: StringFieldUpdateOperationsInput | string + value?: FloatFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PrizeCreateManyInput = { + id?: string + description?: string | null + prizeSetId: string + type: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type PrizeUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + type?: StringFieldUpdateOperationsInput | string + value?: FloatFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PrizeUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + prizeSetId?: StringFieldUpdateOperationsInput | string + type?: StringFieldUpdateOperationsInput | string + value?: FloatFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeWinnerCreateInput = { + id?: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutWinnersInput + } + + export type ChallengeWinnerUncheckedCreateInput = { + id?: string + challengeId: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeWinnerUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: IntFieldUpdateOperationsInput | number + handle?: StringFieldUpdateOperationsInput | string + placement?: IntFieldUpdateOperationsInput | number + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutWinnersNestedInput + } + + export type ChallengeWinnerUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + userId?: IntFieldUpdateOperationsInput | number + handle?: StringFieldUpdateOperationsInput | string + placement?: IntFieldUpdateOperationsInput | number + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeWinnerCreateManyInput = { + id?: string + challengeId: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeWinnerUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: IntFieldUpdateOperationsInput | number + handle?: StringFieldUpdateOperationsInput | string + placement?: IntFieldUpdateOperationsInput | number + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeWinnerUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + userId?: IntFieldUpdateOperationsInput | number + handle?: StringFieldUpdateOperationsInput | string + placement?: IntFieldUpdateOperationsInput | number + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTermCreateInput = { + id?: string + termId: string + roleId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutTermsInput + } + + export type ChallengeTermUncheckedCreateInput = { + id?: string + challengeId: string + termId: string + roleId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTermUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + termId?: StringFieldUpdateOperationsInput | string + roleId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutTermsNestedInput + } + + export type ChallengeTermUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + termId?: StringFieldUpdateOperationsInput | string + roleId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTermCreateManyInput = { + id?: string + challengeId: string + termId: string + roleId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTermUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + termId?: StringFieldUpdateOperationsInput | string + roleId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTermUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + termId?: StringFieldUpdateOperationsInput | string + roleId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeSkillCreateInput = { + id?: string + skillId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutSkillsInput + } + + export type ChallengeSkillUncheckedCreateInput = { + id?: string + challengeId: string + skillId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeSkillUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + skillId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutSkillsNestedInput + } + + export type ChallengeSkillUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + skillId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeSkillCreateManyInput = { + id?: string + challengeId: string + skillId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeSkillUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + skillId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeSkillUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + skillId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeBillingCreateInput = { + id?: string + billingAccountId?: string | null + markup?: number | null + clientBillingRate?: number | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutBillingRecordInput + } + + export type ChallengeBillingUncheckedCreateInput = { + id?: string + billingAccountId?: string | null + markup?: number | null + clientBillingRate?: number | null + challengeId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeBillingUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + billingAccountId?: NullableStringFieldUpdateOperationsInput | string | null + markup?: NullableFloatFieldUpdateOperationsInput | number | null + clientBillingRate?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutBillingRecordNestedInput + } + + export type ChallengeBillingUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + billingAccountId?: NullableStringFieldUpdateOperationsInput | string | null + markup?: NullableFloatFieldUpdateOperationsInput | number | null + clientBillingRate?: NullableFloatFieldUpdateOperationsInput | number | null + challengeId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeBillingCreateManyInput = { + id?: string + billingAccountId?: string | null + markup?: number | null + clientBillingRate?: number | null + challengeId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeBillingUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + billingAccountId?: NullableStringFieldUpdateOperationsInput | string | null + markup?: NullableFloatFieldUpdateOperationsInput | number | null + clientBillingRate?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeBillingUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + billingAccountId?: NullableStringFieldUpdateOperationsInput | string | null + markup?: NullableFloatFieldUpdateOperationsInput | number | null + clientBillingRate?: NullableFloatFieldUpdateOperationsInput | number | null + challengeId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeLegacyCreateInput = { + id?: string + reviewType?: $Enums.ReviewTypeEnum + confidentialityType?: string + forumId?: number | null + directProjectId?: number | null + screeningScorecardId?: number | null + reviewScorecardId?: number | null + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: string | null + track?: string | null + subTrack?: string | null + legacySystemId?: number | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutLegacyRecordInput + } + + export type ChallengeLegacyUncheckedCreateInput = { + id?: string + reviewType?: $Enums.ReviewTypeEnum + confidentialityType?: string + forumId?: number | null + directProjectId?: number | null + screeningScorecardId?: number | null + reviewScorecardId?: number | null + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: string | null + track?: string | null + subTrack?: string | null + legacySystemId?: number | null + challengeId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeLegacyUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + reviewType?: EnumReviewTypeEnumFieldUpdateOperationsInput | $Enums.ReviewTypeEnum + confidentialityType?: StringFieldUpdateOperationsInput | string + forumId?: NullableIntFieldUpdateOperationsInput | number | null + directProjectId?: NullableIntFieldUpdateOperationsInput | number | null + screeningScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + reviewScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + isTask?: BoolFieldUpdateOperationsInput | boolean + useSchedulingAPI?: BoolFieldUpdateOperationsInput | boolean + pureV5Task?: BoolFieldUpdateOperationsInput | boolean + pureV5?: BoolFieldUpdateOperationsInput | boolean + selfService?: BoolFieldUpdateOperationsInput | boolean + selfServiceCopilot?: NullableStringFieldUpdateOperationsInput | string | null + track?: NullableStringFieldUpdateOperationsInput | string | null + subTrack?: NullableStringFieldUpdateOperationsInput | string | null + legacySystemId?: NullableIntFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutLegacyRecordNestedInput + } + + export type ChallengeLegacyUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + reviewType?: EnumReviewTypeEnumFieldUpdateOperationsInput | $Enums.ReviewTypeEnum + confidentialityType?: StringFieldUpdateOperationsInput | string + forumId?: NullableIntFieldUpdateOperationsInput | number | null + directProjectId?: NullableIntFieldUpdateOperationsInput | number | null + screeningScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + reviewScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + isTask?: BoolFieldUpdateOperationsInput | boolean + useSchedulingAPI?: BoolFieldUpdateOperationsInput | boolean + pureV5Task?: BoolFieldUpdateOperationsInput | boolean + pureV5?: BoolFieldUpdateOperationsInput | boolean + selfService?: BoolFieldUpdateOperationsInput | boolean + selfServiceCopilot?: NullableStringFieldUpdateOperationsInput | string | null + track?: NullableStringFieldUpdateOperationsInput | string | null + subTrack?: NullableStringFieldUpdateOperationsInput | string | null + legacySystemId?: NullableIntFieldUpdateOperationsInput | number | null + challengeId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeLegacyCreateManyInput = { + id?: string + reviewType?: $Enums.ReviewTypeEnum + confidentialityType?: string + forumId?: number | null + directProjectId?: number | null + screeningScorecardId?: number | null + reviewScorecardId?: number | null + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: string | null + track?: string | null + subTrack?: string | null + legacySystemId?: number | null + challengeId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeLegacyUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + reviewType?: EnumReviewTypeEnumFieldUpdateOperationsInput | $Enums.ReviewTypeEnum + confidentialityType?: StringFieldUpdateOperationsInput | string + forumId?: NullableIntFieldUpdateOperationsInput | number | null + directProjectId?: NullableIntFieldUpdateOperationsInput | number | null + screeningScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + reviewScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + isTask?: BoolFieldUpdateOperationsInput | boolean + useSchedulingAPI?: BoolFieldUpdateOperationsInput | boolean + pureV5Task?: BoolFieldUpdateOperationsInput | boolean + pureV5?: BoolFieldUpdateOperationsInput | boolean + selfService?: BoolFieldUpdateOperationsInput | boolean + selfServiceCopilot?: NullableStringFieldUpdateOperationsInput | string | null + track?: NullableStringFieldUpdateOperationsInput | string | null + subTrack?: NullableStringFieldUpdateOperationsInput | string | null + legacySystemId?: NullableIntFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeLegacyUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + reviewType?: EnumReviewTypeEnumFieldUpdateOperationsInput | $Enums.ReviewTypeEnum + confidentialityType?: StringFieldUpdateOperationsInput | string + forumId?: NullableIntFieldUpdateOperationsInput | number | null + directProjectId?: NullableIntFieldUpdateOperationsInput | number | null + screeningScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + reviewScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + isTask?: BoolFieldUpdateOperationsInput | boolean + useSchedulingAPI?: BoolFieldUpdateOperationsInput | boolean + pureV5Task?: BoolFieldUpdateOperationsInput | boolean + pureV5?: BoolFieldUpdateOperationsInput | boolean + selfService?: BoolFieldUpdateOperationsInput | boolean + selfServiceCopilot?: NullableStringFieldUpdateOperationsInput | string | null + track?: NullableStringFieldUpdateOperationsInput | string | null + subTrack?: NullableStringFieldUpdateOperationsInput | string | null + legacySystemId?: NullableIntFieldUpdateOperationsInput | number | null + challengeId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeEventCreateInput = { + id?: string + eventId: number + name?: string | null + key?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutEventsInput + } + + export type ChallengeEventUncheckedCreateInput = { + id?: string + challengeId: string + eventId: number + name?: string | null + key?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeEventUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + eventId?: IntFieldUpdateOperationsInput | number + name?: NullableStringFieldUpdateOperationsInput | string | null + key?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutEventsNestedInput + } + + export type ChallengeEventUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + eventId?: IntFieldUpdateOperationsInput | number + name?: NullableStringFieldUpdateOperationsInput | string | null + key?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeEventCreateManyInput = { + id?: string + challengeId: string + eventId: number + name?: string | null + key?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeEventUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + eventId?: IntFieldUpdateOperationsInput | number + name?: NullableStringFieldUpdateOperationsInput | string | null + key?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeEventUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + eventId?: IntFieldUpdateOperationsInput | number + name?: NullableStringFieldUpdateOperationsInput | string | null + key?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionCreateInput = { + id?: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutDiscussionsInput + options?: ChallengeDiscussionOptionCreateNestedManyWithoutDiscussionInput + } + + export type ChallengeDiscussionUncheckedCreateInput = { + id?: string + challengeId: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + options?: ChallengeDiscussionOptionUncheckedCreateNestedManyWithoutDiscussionInput + } + + export type ChallengeDiscussionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutDiscussionsNestedInput + options?: ChallengeDiscussionOptionUpdateManyWithoutDiscussionNestedInput + } + + export type ChallengeDiscussionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + options?: ChallengeDiscussionOptionUncheckedUpdateManyWithoutDiscussionNestedInput + } + + export type ChallengeDiscussionCreateManyInput = { + id?: string + challengeId: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionOptionCreateInput = { + id?: string + optionKey: string + optionValue: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + discussion: ChallengeDiscussionCreateNestedOneWithoutOptionsInput + } + + export type ChallengeDiscussionOptionUncheckedCreateInput = { + id?: string + discussionId: string + optionKey: string + optionValue: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionOptionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + optionKey?: StringFieldUpdateOperationsInput | string + optionValue?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + discussion?: ChallengeDiscussionUpdateOneRequiredWithoutOptionsNestedInput + } + + export type ChallengeDiscussionOptionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: StringFieldUpdateOperationsInput | string + optionKey?: StringFieldUpdateOperationsInput | string + optionValue?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionOptionCreateManyInput = { + id?: string + discussionId: string + optionKey: string + optionValue: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionOptionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + optionKey?: StringFieldUpdateOperationsInput | string + optionValue?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionOptionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: StringFieldUpdateOperationsInput | string + optionKey?: StringFieldUpdateOperationsInput | string + optionValue?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeConstraintCreateInput = { + id?: string + allowedRegistrants?: ChallengeConstraintCreateallowedRegistrantsInput | string[] + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutConstraintRecordInput + } + + export type ChallengeConstraintUncheckedCreateInput = { + id?: string + challengeId: string + allowedRegistrants?: ChallengeConstraintCreateallowedRegistrantsInput | string[] + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeConstraintUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + allowedRegistrants?: ChallengeConstraintUpdateallowedRegistrantsInput | string[] + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutConstraintRecordNestedInput + } + + export type ChallengeConstraintUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + allowedRegistrants?: ChallengeConstraintUpdateallowedRegistrantsInput | string[] + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeConstraintCreateManyInput = { + id?: string + challengeId: string + allowedRegistrants?: ChallengeConstraintCreateallowedRegistrantsInput | string[] + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeConstraintUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + allowedRegistrants?: ChallengeConstraintUpdateallowedRegistrantsInput | string[] + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeConstraintUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + allowedRegistrants?: ChallengeConstraintUpdateallowedRegistrantsInput | string[] + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PhaseCreateInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengePhases?: ChallengePhaseCreateNestedManyWithoutPhaseInput + ChallengeReviewer?: ChallengeReviewerCreateNestedManyWithoutPhaseInput + DefaultChallengeReviewer?: DefaultChallengeReviewerCreateNestedManyWithoutPhaseInput + } + + export type PhaseUncheckedCreateInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengePhases?: ChallengePhaseUncheckedCreateNestedManyWithoutPhaseInput + ChallengeReviewer?: ChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput + } + + export type PhaseUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengePhases?: ChallengePhaseUpdateManyWithoutPhaseNestedInput + ChallengeReviewer?: ChallengeReviewerUpdateManyWithoutPhaseNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUpdateManyWithoutPhaseNestedInput + } + + export type PhaseUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengePhases?: ChallengePhaseUncheckedUpdateManyWithoutPhaseNestedInput + ChallengeReviewer?: ChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput + } + + export type PhaseCreateManyInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type PhaseUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PhaseUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseCreateInput = { + id?: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + constraints?: ChallengePhaseConstraintCreateNestedManyWithoutChallengePhaseInput + challenge: ChallengeCreateNestedOneWithoutPhasesInput + phase: PhaseCreateNestedOneWithoutChallengePhasesInput + } + + export type ChallengePhaseUncheckedCreateInput = { + id?: string + challengeId: string + phaseId: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + constraints?: ChallengePhaseConstraintUncheckedCreateNestedManyWithoutChallengePhaseInput + } + + export type ChallengePhaseUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + constraints?: ChallengePhaseConstraintUpdateManyWithoutChallengePhaseNestedInput + challenge?: ChallengeUpdateOneRequiredWithoutPhasesNestedInput + phase?: PhaseUpdateOneRequiredWithoutChallengePhasesNestedInput + } + + export type ChallengePhaseUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + constraints?: ChallengePhaseConstraintUncheckedUpdateManyWithoutChallengePhaseNestedInput + } + + export type ChallengePhaseCreateManyInput = { + id?: string + challengeId: string + phaseId: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseConstraintCreateInput = { + id?: string + name: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengePhase: ChallengePhaseCreateNestedOneWithoutConstraintsInput + } + + export type ChallengePhaseConstraintUncheckedCreateInput = { + id?: string + challengePhaseId: string + name: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseConstraintUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengePhase?: ChallengePhaseUpdateOneRequiredWithoutConstraintsNestedInput + } + + export type ChallengePhaseConstraintUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengePhaseId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseConstraintCreateManyInput = { + id?: string + challengePhaseId: string + name: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseConstraintUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseConstraintUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengePhaseId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePrizeSetCreateInput = { + id?: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + prizes?: PrizeCreateNestedManyWithoutPrizeSetInput + challenge: ChallengeCreateNestedOneWithoutPrizeSetsInput + } + + export type ChallengePrizeSetUncheckedCreateInput = { + id?: string + challengeId: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + prizes?: PrizeUncheckedCreateNestedManyWithoutPrizeSetInput + } + + export type ChallengePrizeSetUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + prizes?: PrizeUpdateManyWithoutPrizeSetNestedInput + challenge?: ChallengeUpdateOneRequiredWithoutPrizeSetsNestedInput + } + + export type ChallengePrizeSetUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + prizes?: PrizeUncheckedUpdateManyWithoutPrizeSetNestedInput + } + + export type ChallengePrizeSetCreateManyInput = { + id?: string + challengeId: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePrizeSetUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePrizeSetUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeReviewerCreateInput = { + id?: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutReviewersInput + phase: PhaseCreateNestedOneWithoutChallengeReviewerInput + } + + export type ChallengeReviewerUncheckedCreateInput = { + id?: string + challengeId: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + phaseId: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeReviewerUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutReviewersNestedInput + phase?: PhaseUpdateOneRequiredWithoutChallengeReviewerNestedInput + } + + export type ChallengeReviewerUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseId?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeReviewerCreateManyInput = { + id?: string + challengeId: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + phaseId: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeReviewerUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeReviewerUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseId?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerCreateInput = { + id?: string + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengeType: ChallengeTypeCreateNestedOneWithoutDefaultReviewersInput + challengeTrack: ChallengeTrackCreateNestedOneWithoutDefaultReviewersInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutDefaultChallengeReviewerInput + phase?: PhaseCreateNestedOneWithoutDefaultChallengeReviewerInput + } + + export type DefaultChallengeReviewerUncheckedCreateInput = { + id?: string + typeId: string + trackId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengeType?: ChallengeTypeUpdateOneRequiredWithoutDefaultReviewersNestedInput + challengeTrack?: ChallengeTrackUpdateOneRequiredWithoutDefaultReviewersNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutDefaultChallengeReviewerNestedInput + phase?: PhaseUpdateOneWithoutDefaultChallengeReviewerNestedInput + } + + export type DefaultChallengeReviewerUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerCreateManyInput = { + id?: string + typeId: string + trackId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplateCreateInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseCreateNestedManyWithoutTimelineTemplateInput + challengeTimelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateUncheckedCreateInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseUncheckedCreateNestedManyWithoutTimelineTemplateInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeUncheckedCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUpdateManyWithoutTimelineTemplateNestedInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUpdateManyWithoutTimelineTemplateNestedInput + } + + export type TimelineTemplateUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUncheckedUpdateManyWithoutTimelineTemplateNestedInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUncheckedUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedUpdateManyWithoutTimelineTemplateNestedInput + } + + export type TimelineTemplateCreateManyInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type TimelineTemplateUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplateUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplatePhaseCreateInput = { + id?: string + phaseId: string + predecessor?: string | null + defaultDuration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplate: TimelineTemplateCreateNestedOneWithoutPhasesInput + } + + export type TimelineTemplatePhaseUncheckedCreateInput = { + id?: string + timelineTemplateId: string + phaseId: string + predecessor?: string | null + defaultDuration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type TimelineTemplatePhaseUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + defaultDuration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplate?: TimelineTemplateUpdateOneRequiredWithoutPhasesNestedInput + } + + export type TimelineTemplatePhaseUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + defaultDuration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplatePhaseCreateManyInput = { + id?: string + timelineTemplateId: string + phaseId: string + predecessor?: string | null + defaultDuration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type TimelineTemplatePhaseUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + defaultDuration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplatePhaseUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + defaultDuration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type StringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + mode?: QueryMode + not?: NestedStringFilter<$PrismaModel> | string + } + + export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + mode?: QueryMode + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type FloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type IntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type StringNullableListFilter<$PrismaModel = never> = { + equals?: string[] | ListStringFieldRefInput<$PrismaModel> | null + has?: string | StringFieldRefInput<$PrismaModel> | null + hasEvery?: string[] | ListStringFieldRefInput<$PrismaModel> + hasSome?: string[] | ListStringFieldRefInput<$PrismaModel> + isEmpty?: boolean + } + + export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type EnumChallengeStatusEnumFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeStatusEnum | EnumChallengeStatusEnumFieldRefInput<$PrismaModel> + in?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + not?: NestedEnumChallengeStatusEnumFilter<$PrismaModel> | $Enums.ChallengeStatusEnum + } + + export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type ChallengeBillingNullableScalarRelationFilter = { + is?: ChallengeBillingWhereInput | null + isNot?: ChallengeBillingWhereInput | null + } + + export type ChallengeLegacyNullableScalarRelationFilter = { + is?: ChallengeLegacyWhereInput | null + isNot?: ChallengeLegacyWhereInput | null + } + + export type ChallengeConstraintNullableScalarRelationFilter = { + is?: ChallengeConstraintWhereInput | null + isNot?: ChallengeConstraintWhereInput | null + } + + export type ChallengeEventListRelationFilter = { + every?: ChallengeEventWhereInput + some?: ChallengeEventWhereInput + none?: ChallengeEventWhereInput + } + + export type ChallengeDiscussionListRelationFilter = { + every?: ChallengeDiscussionWhereInput + some?: ChallengeDiscussionWhereInput + none?: ChallengeDiscussionWhereInput + } + + export type ChallengeMetadataListRelationFilter = { + every?: ChallengeMetadataWhereInput + some?: ChallengeMetadataWhereInput + none?: ChallengeMetadataWhereInput + } + + export type ChallengePhaseListRelationFilter = { + every?: ChallengePhaseWhereInput + some?: ChallengePhaseWhereInput + none?: ChallengePhaseWhereInput + } + + export type ChallengePrizeSetListRelationFilter = { + every?: ChallengePrizeSetWhereInput + some?: ChallengePrizeSetWhereInput + none?: ChallengePrizeSetWhereInput + } + + export type ChallengeReviewerListRelationFilter = { + every?: ChallengeReviewerWhereInput + some?: ChallengeReviewerWhereInput + none?: ChallengeReviewerWhereInput + } + + export type ChallengeWinnerListRelationFilter = { + every?: ChallengeWinnerWhereInput + some?: ChallengeWinnerWhereInput + none?: ChallengeWinnerWhereInput + } + + export type AttachmentListRelationFilter = { + every?: AttachmentWhereInput + some?: AttachmentWhereInput + none?: AttachmentWhereInput + } + + export type ChallengeTermListRelationFilter = { + every?: ChallengeTermWhereInput + some?: ChallengeTermWhereInput + none?: ChallengeTermWhereInput + } + + export type ChallengeSkillListRelationFilter = { + every?: ChallengeSkillWhereInput + some?: ChallengeSkillWhereInput + none?: ChallengeSkillWhereInput + } + + export type AuditLogListRelationFilter = { + every?: AuditLogWhereInput + some?: AuditLogWhereInput + none?: AuditLogWhereInput + } + + export type MemberChallengeAccessListRelationFilter = { + every?: MemberChallengeAccessWhereInput + some?: MemberChallengeAccessWhereInput + none?: MemberChallengeAccessWhereInput + } + + export type ChallengeTypeScalarRelationFilter = { + is?: ChallengeTypeWhereInput + isNot?: ChallengeTypeWhereInput + } + + export type ChallengeTrackScalarRelationFilter = { + is?: ChallengeTrackWhereInput + isNot?: ChallengeTrackWhereInput + } + + export type TimelineTemplateNullableScalarRelationFilter = { + is?: TimelineTemplateWhereInput | null + isNot?: TimelineTemplateWhereInput | null + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder + } + + export type ChallengeEventOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeDiscussionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeMetadataOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengePhaseOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengePrizeSetOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeReviewerOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeWinnerOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type AttachmentOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeTermOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeSkillOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type AuditLogOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type MemberChallengeAccessOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeOrderByRelevanceInput = { + fields: ChallengeOrderByRelevanceFieldEnum | ChallengeOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + privateDescription?: SortOrder + challengeSource?: SortOrder + descriptionFormat?: SortOrder + projectId?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + overviewTotalPrizes?: SortOrder + numOfRegistrants?: SortOrder + numOfSubmissions?: SortOrder + numOfCheckpointSubmissions?: SortOrder + currentPhaseNames?: SortOrder + wiproAllowed?: SortOrder + tags?: SortOrder + groups?: SortOrder + taskIsTask?: SortOrder + taskIsAssigned?: SortOrder + taskMemberId?: SortOrder + submissionStartDate?: SortOrder + submissionEndDate?: SortOrder + registrationStartDate?: SortOrder + registrationEndDate?: SortOrder + startDate?: SortOrder + endDate?: SortOrder + legacyId?: SortOrder + status?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeAvgOrderByAggregateInput = { + projectId?: SortOrder + overviewTotalPrizes?: SortOrder + numOfRegistrants?: SortOrder + numOfSubmissions?: SortOrder + numOfCheckpointSubmissions?: SortOrder + legacyId?: SortOrder + } + + export type ChallengeMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + privateDescription?: SortOrder + challengeSource?: SortOrder + descriptionFormat?: SortOrder + projectId?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + overviewTotalPrizes?: SortOrder + numOfRegistrants?: SortOrder + numOfSubmissions?: SortOrder + numOfCheckpointSubmissions?: SortOrder + wiproAllowed?: SortOrder + taskIsTask?: SortOrder + taskIsAssigned?: SortOrder + taskMemberId?: SortOrder + submissionStartDate?: SortOrder + submissionEndDate?: SortOrder + registrationStartDate?: SortOrder + registrationEndDate?: SortOrder + startDate?: SortOrder + endDate?: SortOrder + legacyId?: SortOrder + status?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + privateDescription?: SortOrder + challengeSource?: SortOrder + descriptionFormat?: SortOrder + projectId?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + overviewTotalPrizes?: SortOrder + numOfRegistrants?: SortOrder + numOfSubmissions?: SortOrder + numOfCheckpointSubmissions?: SortOrder + wiproAllowed?: SortOrder + taskIsTask?: SortOrder + taskIsAssigned?: SortOrder + taskMemberId?: SortOrder + submissionStartDate?: SortOrder + submissionEndDate?: SortOrder + registrationStartDate?: SortOrder + registrationEndDate?: SortOrder + startDate?: SortOrder + endDate?: SortOrder + legacyId?: SortOrder + status?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeSumOrderByAggregateInput = { + projectId?: SortOrder + overviewTotalPrizes?: SortOrder + numOfRegistrants?: SortOrder + numOfSubmissions?: SortOrder + numOfCheckpointSubmissions?: SortOrder + legacyId?: SortOrder + } + + export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + mode?: QueryMode + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + mode?: QueryMode + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedIntNullableFilter<$PrismaModel> + _max?: NestedIntNullableFilter<$PrismaModel> + } + + export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedFloatNullableFilter<$PrismaModel> + _min?: NestedFloatNullableFilter<$PrismaModel> + _max?: NestedFloatNullableFilter<$PrismaModel> + } + + export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type EnumChallengeStatusEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeStatusEnum | EnumChallengeStatusEnumFieldRefInput<$PrismaModel> + in?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + not?: NestedEnumChallengeStatusEnumWithAggregatesFilter<$PrismaModel> | $Enums.ChallengeStatusEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumChallengeStatusEnumFilter<$PrismaModel> + _max?: NestedEnumChallengeStatusEnumFilter<$PrismaModel> + } + + export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type ChallengeListRelationFilter = { + every?: ChallengeWhereInput + some?: ChallengeWhereInput + none?: ChallengeWhereInput + } + + export type ChallengeTimelineTemplateListRelationFilter = { + every?: ChallengeTimelineTemplateWhereInput + some?: ChallengeTimelineTemplateWhereInput + none?: ChallengeTimelineTemplateWhereInput + } + + export type DefaultChallengeReviewerListRelationFilter = { + every?: DefaultChallengeReviewerWhereInput + some?: DefaultChallengeReviewerWhereInput + none?: DefaultChallengeReviewerWhereInput + } + + export type ChallengeOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeTimelineTemplateOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type DefaultChallengeReviewerOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeTypeOrderByRelevanceInput = { + fields: ChallengeTypeOrderByRelevanceFieldEnum | ChallengeTypeOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeTypeCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + isTask?: SortOrder + abbreviation?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTypeMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + isTask?: SortOrder + abbreviation?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTypeMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + isTask?: SortOrder + abbreviation?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type EnumChallengeTrackEnumNullableFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeTrackEnum | EnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumChallengeTrackEnumNullableFilter<$PrismaModel> | $Enums.ChallengeTrackEnum | null + } + + export type ChallengeTrackOrderByRelevanceInput = { + fields: ChallengeTrackOrderByRelevanceFieldEnum | ChallengeTrackOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeTrackCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + abbreviation?: SortOrder + legacyId?: SortOrder + track?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTrackAvgOrderByAggregateInput = { + legacyId?: SortOrder + } + + export type ChallengeTrackMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + abbreviation?: SortOrder + legacyId?: SortOrder + track?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTrackMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + abbreviation?: SortOrder + legacyId?: SortOrder + track?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTrackSumOrderByAggregateInput = { + legacyId?: SortOrder + } + + export type EnumChallengeTrackEnumNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeTrackEnum | EnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumChallengeTrackEnumNullableWithAggregatesFilter<$PrismaModel> | $Enums.ChallengeTrackEnum | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedEnumChallengeTrackEnumNullableFilter<$PrismaModel> + _max?: NestedEnumChallengeTrackEnumNullableFilter<$PrismaModel> + } + + export type TimelineTemplateScalarRelationFilter = { + is?: TimelineTemplateWhereInput + isNot?: TimelineTemplateWhereInput + } + + export type ChallengeTimelineTemplateOrderByRelevanceInput = { + fields: ChallengeTimelineTemplateOrderByRelevanceFieldEnum | ChallengeTimelineTemplateOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeTimelineTemplateCountOrderByAggregateInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + isDefault?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTimelineTemplateMaxOrderByAggregateInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + isDefault?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTimelineTemplateMinOrderByAggregateInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + isDefault?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeNullableScalarRelationFilter = { + is?: ChallengeWhereInput | null + isNot?: ChallengeWhereInput | null + } + + export type AuditLogOrderByRelevanceInput = { + fields: AuditLogOrderByRelevanceFieldEnum | AuditLogOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type AuditLogCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + fieldName?: SortOrder + oldValue?: SortOrder + newValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + memberId?: SortOrder + } + + export type AuditLogMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + fieldName?: SortOrder + oldValue?: SortOrder + newValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + memberId?: SortOrder + } + + export type AuditLogMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + fieldName?: SortOrder + oldValue?: SortOrder + newValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + memberId?: SortOrder + } + + export type ChallengeScalarRelationFilter = { + is?: ChallengeWhereInput + isNot?: ChallengeWhereInput + } + + export type AttachmentOrderByRelevanceInput = { + fields: AttachmentOrderByRelevanceFieldEnum | AttachmentOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type AttachmentCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + fileSize?: SortOrder + url?: SortOrder + description?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type AttachmentAvgOrderByAggregateInput = { + fileSize?: SortOrder + } + + export type AttachmentMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + fileSize?: SortOrder + url?: SortOrder + description?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type AttachmentMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + fileSize?: SortOrder + url?: SortOrder + description?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type AttachmentSumOrderByAggregateInput = { + fileSize?: SortOrder + } + + export type ChallengeMetadataOrderByRelevanceInput = { + fields: ChallengeMetadataOrderByRelevanceFieldEnum | ChallengeMetadataOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeMetadataCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeMetadataMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeMetadataMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type FloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type ChallengePrizeSetScalarRelationFilter = { + is?: ChallengePrizeSetWhereInput + isNot?: ChallengePrizeSetWhereInput + } + + export type PrizeOrderByRelevanceInput = { + fields: PrizeOrderByRelevanceFieldEnum | PrizeOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type PrizeCountOrderByAggregateInput = { + id?: SortOrder + description?: SortOrder + prizeSetId?: SortOrder + type?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type PrizeAvgOrderByAggregateInput = { + value?: SortOrder + } + + export type PrizeMaxOrderByAggregateInput = { + id?: SortOrder + description?: SortOrder + prizeSetId?: SortOrder + type?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type PrizeMinOrderByAggregateInput = { + id?: SortOrder + description?: SortOrder + prizeSetId?: SortOrder + type?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type PrizeSumOrderByAggregateInput = { + value?: SortOrder + } + + export type FloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedFloatFilter<$PrismaModel> + _min?: NestedFloatFilter<$PrismaModel> + _max?: NestedFloatFilter<$PrismaModel> + } + + export type EnumPrizeSetTypeEnumFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeSetTypeEnum | EnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeSetTypeEnumFilter<$PrismaModel> | $Enums.PrizeSetTypeEnum + } + + export type ChallengeWinnerOrderByRelevanceInput = { + fields: ChallengeWinnerOrderByRelevanceFieldEnum | ChallengeWinnerOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeWinnerCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + userId?: SortOrder + handle?: SortOrder + placement?: SortOrder + type?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeWinnerAvgOrderByAggregateInput = { + userId?: SortOrder + placement?: SortOrder + } + + export type ChallengeWinnerMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + userId?: SortOrder + handle?: SortOrder + placement?: SortOrder + type?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeWinnerMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + userId?: SortOrder + handle?: SortOrder + placement?: SortOrder + type?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeWinnerSumOrderByAggregateInput = { + userId?: SortOrder + placement?: SortOrder + } + + export type EnumPrizeSetTypeEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeSetTypeEnum | EnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeSetTypeEnumWithAggregatesFilter<$PrismaModel> | $Enums.PrizeSetTypeEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPrizeSetTypeEnumFilter<$PrismaModel> + _max?: NestedEnumPrizeSetTypeEnumFilter<$PrismaModel> + } + + export type ChallengeTermOrderByRelevanceInput = { + fields: ChallengeTermOrderByRelevanceFieldEnum | ChallengeTermOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeTermCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + termId?: SortOrder + roleId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTermMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + termId?: SortOrder + roleId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeTermMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + termId?: SortOrder + roleId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeSkillOrderByRelevanceInput = { + fields: ChallengeSkillOrderByRelevanceFieldEnum | ChallengeSkillOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeSkillCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + skillId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeSkillMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + skillId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeSkillMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + skillId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeBillingOrderByRelevanceInput = { + fields: ChallengeBillingOrderByRelevanceFieldEnum | ChallengeBillingOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeBillingCountOrderByAggregateInput = { + id?: SortOrder + billingAccountId?: SortOrder + markup?: SortOrder + clientBillingRate?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeBillingAvgOrderByAggregateInput = { + markup?: SortOrder + clientBillingRate?: SortOrder + } + + export type ChallengeBillingMaxOrderByAggregateInput = { + id?: SortOrder + billingAccountId?: SortOrder + markup?: SortOrder + clientBillingRate?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeBillingMinOrderByAggregateInput = { + id?: SortOrder + billingAccountId?: SortOrder + markup?: SortOrder + clientBillingRate?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeBillingSumOrderByAggregateInput = { + markup?: SortOrder + clientBillingRate?: SortOrder + } + + export type EnumReviewTypeEnumFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewTypeEnum | EnumReviewTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumReviewTypeEnumFilter<$PrismaModel> | $Enums.ReviewTypeEnum + } + + export type ChallengeLegacyOrderByRelevanceInput = { + fields: ChallengeLegacyOrderByRelevanceFieldEnum | ChallengeLegacyOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeLegacyCountOrderByAggregateInput = { + id?: SortOrder + reviewType?: SortOrder + confidentialityType?: SortOrder + forumId?: SortOrder + directProjectId?: SortOrder + screeningScorecardId?: SortOrder + reviewScorecardId?: SortOrder + isTask?: SortOrder + useSchedulingAPI?: SortOrder + pureV5Task?: SortOrder + pureV5?: SortOrder + selfService?: SortOrder + selfServiceCopilot?: SortOrder + track?: SortOrder + subTrack?: SortOrder + legacySystemId?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeLegacyAvgOrderByAggregateInput = { + forumId?: SortOrder + directProjectId?: SortOrder + screeningScorecardId?: SortOrder + reviewScorecardId?: SortOrder + legacySystemId?: SortOrder + } + + export type ChallengeLegacyMaxOrderByAggregateInput = { + id?: SortOrder + reviewType?: SortOrder + confidentialityType?: SortOrder + forumId?: SortOrder + directProjectId?: SortOrder + screeningScorecardId?: SortOrder + reviewScorecardId?: SortOrder + isTask?: SortOrder + useSchedulingAPI?: SortOrder + pureV5Task?: SortOrder + pureV5?: SortOrder + selfService?: SortOrder + selfServiceCopilot?: SortOrder + track?: SortOrder + subTrack?: SortOrder + legacySystemId?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeLegacyMinOrderByAggregateInput = { + id?: SortOrder + reviewType?: SortOrder + confidentialityType?: SortOrder + forumId?: SortOrder + directProjectId?: SortOrder + screeningScorecardId?: SortOrder + reviewScorecardId?: SortOrder + isTask?: SortOrder + useSchedulingAPI?: SortOrder + pureV5Task?: SortOrder + pureV5?: SortOrder + selfService?: SortOrder + selfServiceCopilot?: SortOrder + track?: SortOrder + subTrack?: SortOrder + legacySystemId?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeLegacySumOrderByAggregateInput = { + forumId?: SortOrder + directProjectId?: SortOrder + screeningScorecardId?: SortOrder + reviewScorecardId?: SortOrder + legacySystemId?: SortOrder + } + + export type EnumReviewTypeEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewTypeEnum | EnumReviewTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumReviewTypeEnumWithAggregatesFilter<$PrismaModel> | $Enums.ReviewTypeEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumReviewTypeEnumFilter<$PrismaModel> + _max?: NestedEnumReviewTypeEnumFilter<$PrismaModel> + } + + export type ChallengeEventOrderByRelevanceInput = { + fields: ChallengeEventOrderByRelevanceFieldEnum | ChallengeEventOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeEventCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + eventId?: SortOrder + name?: SortOrder + key?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeEventAvgOrderByAggregateInput = { + eventId?: SortOrder + } + + export type ChallengeEventMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + eventId?: SortOrder + name?: SortOrder + key?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeEventMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + eventId?: SortOrder + name?: SortOrder + key?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeEventSumOrderByAggregateInput = { + eventId?: SortOrder + } + + export type EnumDiscussionTypeEnumFilter<$PrismaModel = never> = { + equals?: $Enums.DiscussionTypeEnum | EnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumDiscussionTypeEnumFilter<$PrismaModel> | $Enums.DiscussionTypeEnum + } + + export type ChallengeDiscussionOptionListRelationFilter = { + every?: ChallengeDiscussionOptionWhereInput + some?: ChallengeDiscussionOptionWhereInput + none?: ChallengeDiscussionOptionWhereInput + } + + export type ChallengeDiscussionOptionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengeDiscussionOrderByRelevanceInput = { + fields: ChallengeDiscussionOrderByRelevanceFieldEnum | ChallengeDiscussionOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeDiscussionCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + discussionId?: SortOrder + name?: SortOrder + type?: SortOrder + provider?: SortOrder + url?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeDiscussionMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + discussionId?: SortOrder + name?: SortOrder + type?: SortOrder + provider?: SortOrder + url?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeDiscussionMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + discussionId?: SortOrder + name?: SortOrder + type?: SortOrder + provider?: SortOrder + url?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type EnumDiscussionTypeEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.DiscussionTypeEnum | EnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumDiscussionTypeEnumWithAggregatesFilter<$PrismaModel> | $Enums.DiscussionTypeEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumDiscussionTypeEnumFilter<$PrismaModel> + _max?: NestedEnumDiscussionTypeEnumFilter<$PrismaModel> + } + + export type ChallengeDiscussionScalarRelationFilter = { + is?: ChallengeDiscussionWhereInput + isNot?: ChallengeDiscussionWhereInput + } + + export type ChallengeDiscussionOptionOrderByRelevanceInput = { + fields: ChallengeDiscussionOptionOrderByRelevanceFieldEnum | ChallengeDiscussionOptionOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeDiscussionOptionCountOrderByAggregateInput = { + id?: SortOrder + discussionId?: SortOrder + optionKey?: SortOrder + optionValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeDiscussionOptionMaxOrderByAggregateInput = { + id?: SortOrder + discussionId?: SortOrder + optionKey?: SortOrder + optionValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeDiscussionOptionMinOrderByAggregateInput = { + id?: SortOrder + discussionId?: SortOrder + optionKey?: SortOrder + optionValue?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeConstraintOrderByRelevanceInput = { + fields: ChallengeConstraintOrderByRelevanceFieldEnum | ChallengeConstraintOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeConstraintCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + allowedRegistrants?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeConstraintMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeConstraintMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type PhaseOrderByRelevanceInput = { + fields: PhaseOrderByRelevanceFieldEnum | PhaseOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type PhaseCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isOpen?: SortOrder + duration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type PhaseAvgOrderByAggregateInput = { + duration?: SortOrder + } + + export type PhaseMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isOpen?: SortOrder + duration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type PhaseMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isOpen?: SortOrder + duration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type PhaseSumOrderByAggregateInput = { + duration?: SortOrder + } + + export type BoolNullableFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null + not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null + } + + export type ChallengePhaseConstraintListRelationFilter = { + every?: ChallengePhaseConstraintWhereInput + some?: ChallengePhaseConstraintWhereInput + none?: ChallengePhaseConstraintWhereInput + } + + export type PhaseScalarRelationFilter = { + is?: PhaseWhereInput + isNot?: PhaseWhereInput + } + + export type ChallengePhaseConstraintOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengePhaseOrderByRelevanceInput = { + fields: ChallengePhaseOrderByRelevanceFieldEnum | ChallengePhaseOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengePhaseCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + phaseId?: SortOrder + name?: SortOrder + description?: SortOrder + isOpen?: SortOrder + predecessor?: SortOrder + duration?: SortOrder + scheduledStartDate?: SortOrder + scheduledEndDate?: SortOrder + actualStartDate?: SortOrder + actualEndDate?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePhaseAvgOrderByAggregateInput = { + duration?: SortOrder + } + + export type ChallengePhaseMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + phaseId?: SortOrder + name?: SortOrder + description?: SortOrder + isOpen?: SortOrder + predecessor?: SortOrder + duration?: SortOrder + scheduledStartDate?: SortOrder + scheduledEndDate?: SortOrder + actualStartDate?: SortOrder + actualEndDate?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePhaseMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + phaseId?: SortOrder + name?: SortOrder + description?: SortOrder + isOpen?: SortOrder + predecessor?: SortOrder + duration?: SortOrder + scheduledStartDate?: SortOrder + scheduledEndDate?: SortOrder + actualStartDate?: SortOrder + actualEndDate?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePhaseSumOrderByAggregateInput = { + duration?: SortOrder + } + + export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null + not?: NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedBoolNullableFilter<$PrismaModel> + _max?: NestedBoolNullableFilter<$PrismaModel> + } + + export type ChallengePhaseScalarRelationFilter = { + is?: ChallengePhaseWhereInput + isNot?: ChallengePhaseWhereInput + } + + export type ChallengePhaseConstraintOrderByRelevanceInput = { + fields: ChallengePhaseConstraintOrderByRelevanceFieldEnum | ChallengePhaseConstraintOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengePhaseConstraintCountOrderByAggregateInput = { + id?: SortOrder + challengePhaseId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePhaseConstraintAvgOrderByAggregateInput = { + value?: SortOrder + } + + export type ChallengePhaseConstraintMaxOrderByAggregateInput = { + id?: SortOrder + challengePhaseId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePhaseConstraintMinOrderByAggregateInput = { + id?: SortOrder + challengePhaseId?: SortOrder + name?: SortOrder + value?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePhaseConstraintSumOrderByAggregateInput = { + value?: SortOrder + } + + export type PrizeListRelationFilter = { + every?: PrizeWhereInput + some?: PrizeWhereInput + none?: PrizeWhereInput + } + + export type PrizeOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChallengePrizeSetOrderByRelevanceInput = { + fields: ChallengePrizeSetOrderByRelevanceFieldEnum | ChallengePrizeSetOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengePrizeSetCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + type?: SortOrder + description?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePrizeSetMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + type?: SortOrder + description?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengePrizeSetMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + type?: SortOrder + description?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type EnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewOpportunityTypeEnum | EnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel> | $Enums.ReviewOpportunityTypeEnum | null + } + + export type ChallengeReviewerOrderByRelevanceInput = { + fields: ChallengeReviewerOrderByRelevanceFieldEnum | ChallengeReviewerOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type ChallengeReviewerCountOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + type?: SortOrder + aiWorkflowId?: SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeReviewerAvgOrderByAggregateInput = { + memberReviewerCount?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + } + + export type ChallengeReviewerMaxOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + type?: SortOrder + aiWorkflowId?: SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeReviewerMinOrderByAggregateInput = { + id?: SortOrder + challengeId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + type?: SortOrder + aiWorkflowId?: SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ChallengeReviewerSumOrderByAggregateInput = { + memberReviewerCount?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + } + + export type EnumReviewOpportunityTypeEnumNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewOpportunityTypeEnum | EnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumReviewOpportunityTypeEnumNullableWithAggregatesFilter<$PrismaModel> | $Enums.ReviewOpportunityTypeEnum | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedEnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel> + _max?: NestedEnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel> + } + + export type PhaseNullableScalarRelationFilter = { + is?: PhaseWhereInput | null + isNot?: PhaseWhereInput | null + } + + export type DefaultChallengeReviewerOrderByRelevanceInput = { + fields: DefaultChallengeReviewerOrderByRelevanceFieldEnum | DefaultChallengeReviewerOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type DefaultChallengeReviewerCountOrderByAggregateInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrder + phaseName?: SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + opportunityType?: SortOrder + aiWorkflowId?: SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type DefaultChallengeReviewerAvgOrderByAggregateInput = { + memberReviewerCount?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + } + + export type DefaultChallengeReviewerMaxOrderByAggregateInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrder + phaseName?: SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + opportunityType?: SortOrder + aiWorkflowId?: SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type DefaultChallengeReviewerMinOrderByAggregateInput = { + id?: SortOrder + typeId?: SortOrder + trackId?: SortOrder + timelineTemplateId?: SortOrder + scorecardId?: SortOrder + isMemberReview?: SortOrder + memberReviewerCount?: SortOrder + phaseName?: SortOrder + phaseId?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + opportunityType?: SortOrder + aiWorkflowId?: SortOrder + shouldOpenOpportunity?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type DefaultChallengeReviewerSumOrderByAggregateInput = { + memberReviewerCount?: SortOrder + fixedAmount?: SortOrder + baseCoefficient?: SortOrder + incrementalCoefficient?: SortOrder + } + + export type TimelineTemplatePhaseListRelationFilter = { + every?: TimelineTemplatePhaseWhereInput + some?: TimelineTemplatePhaseWhereInput + none?: TimelineTemplatePhaseWhereInput + } + + export type TimelineTemplatePhaseOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type TimelineTemplateOrderByRelevanceInput = { + fields: TimelineTemplateOrderByRelevanceFieldEnum | TimelineTemplateOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type TimelineTemplateCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type TimelineTemplateMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type TimelineTemplateMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + description?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type TimelineTemplatePhaseOrderByRelevanceInput = { + fields: TimelineTemplatePhaseOrderByRelevanceFieldEnum | TimelineTemplatePhaseOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type TimelineTemplatePhaseCountOrderByAggregateInput = { + id?: SortOrder + timelineTemplateId?: SortOrder + phaseId?: SortOrder + predecessor?: SortOrder + defaultDuration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type TimelineTemplatePhaseAvgOrderByAggregateInput = { + defaultDuration?: SortOrder + } + + export type TimelineTemplatePhaseMaxOrderByAggregateInput = { + id?: SortOrder + timelineTemplateId?: SortOrder + phaseId?: SortOrder + predecessor?: SortOrder + defaultDuration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type TimelineTemplatePhaseMinOrderByAggregateInput = { + id?: SortOrder + timelineTemplateId?: SortOrder + phaseId?: SortOrder + predecessor?: SortOrder + defaultDuration?: SortOrder + createdAt?: SortOrder + createdBy?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type TimelineTemplatePhaseSumOrderByAggregateInput = { + defaultDuration?: SortOrder + } + + export type MemberChallengeAccessOrderByRelevanceInput = { + fields: MemberChallengeAccessOrderByRelevanceFieldEnum | MemberChallengeAccessOrderByRelevanceFieldEnum[] + sort: SortOrder + search: string + } + + export type MemberChallengeAccessCountOrderByAggregateInput = { + challengeId?: SortOrder + memberId?: SortOrder + } + + export type MemberChallengeAccessMaxOrderByAggregateInput = { + challengeId?: SortOrder + memberId?: SortOrder + } + + export type MemberChallengeAccessMinOrderByAggregateInput = { + challengeId?: SortOrder + memberId?: SortOrder + } + + export type ChallengeCreatecurrentPhaseNamesInput = { + set: string[] + } + + export type ChallengeCreatetagsInput = { + set: string[] + } + + export type ChallengeCreategroupsInput = { + set: string[] + } + + export type ChallengeBillingCreateNestedOneWithoutChallengeInput = { + create?: XOR + connectOrCreate?: ChallengeBillingCreateOrConnectWithoutChallengeInput + connect?: ChallengeBillingWhereUniqueInput + } + + export type ChallengeLegacyCreateNestedOneWithoutChallengeInput = { + create?: XOR + connectOrCreate?: ChallengeLegacyCreateOrConnectWithoutChallengeInput + connect?: ChallengeLegacyWhereUniqueInput + } + + export type ChallengeConstraintCreateNestedOneWithoutChallengeInput = { + create?: XOR + connectOrCreate?: ChallengeConstraintCreateOrConnectWithoutChallengeInput + connect?: ChallengeConstraintWhereUniqueInput + } + + export type ChallengeEventCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeEventCreateWithoutChallengeInput[] | ChallengeEventUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeEventCreateOrConnectWithoutChallengeInput | ChallengeEventCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeEventCreateManyChallengeInputEnvelope + connect?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + } + + export type ChallengeDiscussionCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeDiscussionCreateWithoutChallengeInput[] | ChallengeDiscussionUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeDiscussionCreateOrConnectWithoutChallengeInput | ChallengeDiscussionCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeDiscussionCreateManyChallengeInputEnvelope + connect?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + } + + export type ChallengeMetadataCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeMetadataCreateWithoutChallengeInput[] | ChallengeMetadataUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeMetadataCreateOrConnectWithoutChallengeInput | ChallengeMetadataCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeMetadataCreateManyChallengeInputEnvelope + connect?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + } + + export type ChallengePhaseCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengePhaseCreateWithoutChallengeInput[] | ChallengePhaseUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutChallengeInput | ChallengePhaseCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengePhaseCreateManyChallengeInputEnvelope + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + } + + export type ChallengePrizeSetCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengePrizeSetCreateWithoutChallengeInput[] | ChallengePrizeSetUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePrizeSetCreateOrConnectWithoutChallengeInput | ChallengePrizeSetCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengePrizeSetCreateManyChallengeInputEnvelope + connect?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + } + + export type ChallengeReviewerCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeReviewerCreateWithoutChallengeInput[] | ChallengeReviewerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutChallengeInput | ChallengeReviewerCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeReviewerCreateManyChallengeInputEnvelope + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + } + + export type ChallengeWinnerCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeWinnerCreateWithoutChallengeInput[] | ChallengeWinnerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeWinnerCreateOrConnectWithoutChallengeInput | ChallengeWinnerCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeWinnerCreateManyChallengeInputEnvelope + connect?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + } + + export type AttachmentCreateNestedManyWithoutChallengeInput = { + create?: XOR | AttachmentCreateWithoutChallengeInput[] | AttachmentUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AttachmentCreateOrConnectWithoutChallengeInput | AttachmentCreateOrConnectWithoutChallengeInput[] + createMany?: AttachmentCreateManyChallengeInputEnvelope + connect?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + } + + export type ChallengeTermCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeTermCreateWithoutChallengeInput[] | ChallengeTermUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeTermCreateOrConnectWithoutChallengeInput | ChallengeTermCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeTermCreateManyChallengeInputEnvelope + connect?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + } + + export type ChallengeSkillCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeSkillCreateWithoutChallengeInput[] | ChallengeSkillUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeSkillCreateOrConnectWithoutChallengeInput | ChallengeSkillCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeSkillCreateManyChallengeInputEnvelope + connect?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + } + + export type AuditLogCreateNestedManyWithoutChallengeInput = { + create?: XOR | AuditLogCreateWithoutChallengeInput[] | AuditLogUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AuditLogCreateOrConnectWithoutChallengeInput | AuditLogCreateOrConnectWithoutChallengeInput[] + createMany?: AuditLogCreateManyChallengeInputEnvelope + connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + } + + export type MemberChallengeAccessCreateNestedManyWithoutChallengeInput = { + connect?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + } + + export type ChallengeTypeCreateNestedOneWithoutChallengesInput = { + create?: XOR + connectOrCreate?: ChallengeTypeCreateOrConnectWithoutChallengesInput + connect?: ChallengeTypeWhereUniqueInput + } + + export type ChallengeTrackCreateNestedOneWithoutChallengesInput = { + create?: XOR + connectOrCreate?: ChallengeTrackCreateOrConnectWithoutChallengesInput + connect?: ChallengeTrackWhereUniqueInput + } + + export type TimelineTemplateCreateNestedOneWithoutChallengesInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutChallengesInput + connect?: TimelineTemplateWhereUniqueInput + } + + export type ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput = { + create?: XOR + connectOrCreate?: ChallengeBillingCreateOrConnectWithoutChallengeInput + connect?: ChallengeBillingWhereUniqueInput + } + + export type ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput = { + create?: XOR + connectOrCreate?: ChallengeLegacyCreateOrConnectWithoutChallengeInput + connect?: ChallengeLegacyWhereUniqueInput + } + + export type ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput = { + create?: XOR + connectOrCreate?: ChallengeConstraintCreateOrConnectWithoutChallengeInput + connect?: ChallengeConstraintWhereUniqueInput + } + + export type ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeEventCreateWithoutChallengeInput[] | ChallengeEventUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeEventCreateOrConnectWithoutChallengeInput | ChallengeEventCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeEventCreateManyChallengeInputEnvelope + connect?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + } + + export type ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeDiscussionCreateWithoutChallengeInput[] | ChallengeDiscussionUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeDiscussionCreateOrConnectWithoutChallengeInput | ChallengeDiscussionCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeDiscussionCreateManyChallengeInputEnvelope + connect?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + } + + export type ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeMetadataCreateWithoutChallengeInput[] | ChallengeMetadataUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeMetadataCreateOrConnectWithoutChallengeInput | ChallengeMetadataCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeMetadataCreateManyChallengeInputEnvelope + connect?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + } + + export type ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengePhaseCreateWithoutChallengeInput[] | ChallengePhaseUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutChallengeInput | ChallengePhaseCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengePhaseCreateManyChallengeInputEnvelope + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + } + + export type ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengePrizeSetCreateWithoutChallengeInput[] | ChallengePrizeSetUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePrizeSetCreateOrConnectWithoutChallengeInput | ChallengePrizeSetCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengePrizeSetCreateManyChallengeInputEnvelope + connect?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + } + + export type ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeReviewerCreateWithoutChallengeInput[] | ChallengeReviewerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutChallengeInput | ChallengeReviewerCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeReviewerCreateManyChallengeInputEnvelope + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + } + + export type ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeWinnerCreateWithoutChallengeInput[] | ChallengeWinnerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeWinnerCreateOrConnectWithoutChallengeInput | ChallengeWinnerCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeWinnerCreateManyChallengeInputEnvelope + connect?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + } + + export type AttachmentUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | AttachmentCreateWithoutChallengeInput[] | AttachmentUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AttachmentCreateOrConnectWithoutChallengeInput | AttachmentCreateOrConnectWithoutChallengeInput[] + createMany?: AttachmentCreateManyChallengeInputEnvelope + connect?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + } + + export type ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeTermCreateWithoutChallengeInput[] | ChallengeTermUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeTermCreateOrConnectWithoutChallengeInput | ChallengeTermCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeTermCreateManyChallengeInputEnvelope + connect?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + } + + export type ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | ChallengeSkillCreateWithoutChallengeInput[] | ChallengeSkillUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeSkillCreateOrConnectWithoutChallengeInput | ChallengeSkillCreateOrConnectWithoutChallengeInput[] + createMany?: ChallengeSkillCreateManyChallengeInputEnvelope + connect?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + } + + export type AuditLogUncheckedCreateNestedManyWithoutChallengeInput = { + create?: XOR | AuditLogCreateWithoutChallengeInput[] | AuditLogUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AuditLogCreateOrConnectWithoutChallengeInput | AuditLogCreateOrConnectWithoutChallengeInput[] + createMany?: AuditLogCreateManyChallengeInputEnvelope + connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + } + + export type MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput = { + connect?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + } + + export type StringFieldUpdateOperationsInput = { + set?: string + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type NullableFloatFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type ChallengeUpdatecurrentPhaseNamesInput = { + set?: string[] + push?: string | string[] + } + + export type BoolFieldUpdateOperationsInput = { + set?: boolean + } + + export type ChallengeUpdatetagsInput = { + set?: string[] + push?: string | string[] + } + + export type ChallengeUpdategroupsInput = { + set?: string[] + push?: string | string[] + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type EnumChallengeStatusEnumFieldUpdateOperationsInput = { + set?: $Enums.ChallengeStatusEnum + } + + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type ChallengeBillingUpdateOneWithoutChallengeNestedInput = { + create?: XOR + connectOrCreate?: ChallengeBillingCreateOrConnectWithoutChallengeInput + upsert?: ChallengeBillingUpsertWithoutChallengeInput + disconnect?: ChallengeBillingWhereInput | boolean + delete?: ChallengeBillingWhereInput | boolean + connect?: ChallengeBillingWhereUniqueInput + update?: XOR, ChallengeBillingUncheckedUpdateWithoutChallengeInput> + } + + export type ChallengeLegacyUpdateOneWithoutChallengeNestedInput = { + create?: XOR + connectOrCreate?: ChallengeLegacyCreateOrConnectWithoutChallengeInput + upsert?: ChallengeLegacyUpsertWithoutChallengeInput + disconnect?: ChallengeLegacyWhereInput | boolean + delete?: ChallengeLegacyWhereInput | boolean + connect?: ChallengeLegacyWhereUniqueInput + update?: XOR, ChallengeLegacyUncheckedUpdateWithoutChallengeInput> + } + + export type ChallengeConstraintUpdateOneWithoutChallengeNestedInput = { + create?: XOR + connectOrCreate?: ChallengeConstraintCreateOrConnectWithoutChallengeInput + upsert?: ChallengeConstraintUpsertWithoutChallengeInput + disconnect?: ChallengeConstraintWhereInput | boolean + delete?: ChallengeConstraintWhereInput | boolean + connect?: ChallengeConstraintWhereUniqueInput + update?: XOR, ChallengeConstraintUncheckedUpdateWithoutChallengeInput> + } + + export type ChallengeEventUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeEventCreateWithoutChallengeInput[] | ChallengeEventUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeEventCreateOrConnectWithoutChallengeInput | ChallengeEventCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeEventUpsertWithWhereUniqueWithoutChallengeInput | ChallengeEventUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeEventCreateManyChallengeInputEnvelope + set?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + disconnect?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + delete?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + connect?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + update?: ChallengeEventUpdateWithWhereUniqueWithoutChallengeInput | ChallengeEventUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeEventUpdateManyWithWhereWithoutChallengeInput | ChallengeEventUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeEventScalarWhereInput | ChallengeEventScalarWhereInput[] + } + + export type ChallengeDiscussionUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeDiscussionCreateWithoutChallengeInput[] | ChallengeDiscussionUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeDiscussionCreateOrConnectWithoutChallengeInput | ChallengeDiscussionCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeDiscussionUpsertWithWhereUniqueWithoutChallengeInput | ChallengeDiscussionUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeDiscussionCreateManyChallengeInputEnvelope + set?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + disconnect?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + delete?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + connect?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + update?: ChallengeDiscussionUpdateWithWhereUniqueWithoutChallengeInput | ChallengeDiscussionUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeDiscussionUpdateManyWithWhereWithoutChallengeInput | ChallengeDiscussionUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeDiscussionScalarWhereInput | ChallengeDiscussionScalarWhereInput[] + } + + export type ChallengeMetadataUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeMetadataCreateWithoutChallengeInput[] | ChallengeMetadataUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeMetadataCreateOrConnectWithoutChallengeInput | ChallengeMetadataCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeMetadataUpsertWithWhereUniqueWithoutChallengeInput | ChallengeMetadataUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeMetadataCreateManyChallengeInputEnvelope + set?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + disconnect?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + delete?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + connect?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + update?: ChallengeMetadataUpdateWithWhereUniqueWithoutChallengeInput | ChallengeMetadataUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeMetadataUpdateManyWithWhereWithoutChallengeInput | ChallengeMetadataUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeMetadataScalarWhereInput | ChallengeMetadataScalarWhereInput[] + } + + export type ChallengePhaseUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengePhaseCreateWithoutChallengeInput[] | ChallengePhaseUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutChallengeInput | ChallengePhaseCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengePhaseUpsertWithWhereUniqueWithoutChallengeInput | ChallengePhaseUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengePhaseCreateManyChallengeInputEnvelope + set?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + disconnect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + delete?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + update?: ChallengePhaseUpdateWithWhereUniqueWithoutChallengeInput | ChallengePhaseUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengePhaseUpdateManyWithWhereWithoutChallengeInput | ChallengePhaseUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengePhaseScalarWhereInput | ChallengePhaseScalarWhereInput[] + } + + export type ChallengePrizeSetUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengePrizeSetCreateWithoutChallengeInput[] | ChallengePrizeSetUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePrizeSetCreateOrConnectWithoutChallengeInput | ChallengePrizeSetCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengePrizeSetUpsertWithWhereUniqueWithoutChallengeInput | ChallengePrizeSetUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengePrizeSetCreateManyChallengeInputEnvelope + set?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + disconnect?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + delete?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + connect?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + update?: ChallengePrizeSetUpdateWithWhereUniqueWithoutChallengeInput | ChallengePrizeSetUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengePrizeSetUpdateManyWithWhereWithoutChallengeInput | ChallengePrizeSetUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengePrizeSetScalarWhereInput | ChallengePrizeSetScalarWhereInput[] + } + + export type ChallengeReviewerUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeReviewerCreateWithoutChallengeInput[] | ChallengeReviewerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutChallengeInput | ChallengeReviewerCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeReviewerUpsertWithWhereUniqueWithoutChallengeInput | ChallengeReviewerUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeReviewerCreateManyChallengeInputEnvelope + set?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + disconnect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + delete?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + update?: ChallengeReviewerUpdateWithWhereUniqueWithoutChallengeInput | ChallengeReviewerUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeReviewerUpdateManyWithWhereWithoutChallengeInput | ChallengeReviewerUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeReviewerScalarWhereInput | ChallengeReviewerScalarWhereInput[] + } + + export type ChallengeWinnerUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeWinnerCreateWithoutChallengeInput[] | ChallengeWinnerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeWinnerCreateOrConnectWithoutChallengeInput | ChallengeWinnerCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeWinnerUpsertWithWhereUniqueWithoutChallengeInput | ChallengeWinnerUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeWinnerCreateManyChallengeInputEnvelope + set?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + disconnect?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + delete?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + connect?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + update?: ChallengeWinnerUpdateWithWhereUniqueWithoutChallengeInput | ChallengeWinnerUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeWinnerUpdateManyWithWhereWithoutChallengeInput | ChallengeWinnerUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeWinnerScalarWhereInput | ChallengeWinnerScalarWhereInput[] + } + + export type AttachmentUpdateManyWithoutChallengeNestedInput = { + create?: XOR | AttachmentCreateWithoutChallengeInput[] | AttachmentUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AttachmentCreateOrConnectWithoutChallengeInput | AttachmentCreateOrConnectWithoutChallengeInput[] + upsert?: AttachmentUpsertWithWhereUniqueWithoutChallengeInput | AttachmentUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: AttachmentCreateManyChallengeInputEnvelope + set?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + disconnect?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + delete?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + connect?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + update?: AttachmentUpdateWithWhereUniqueWithoutChallengeInput | AttachmentUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: AttachmentUpdateManyWithWhereWithoutChallengeInput | AttachmentUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: AttachmentScalarWhereInput | AttachmentScalarWhereInput[] + } + + export type ChallengeTermUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeTermCreateWithoutChallengeInput[] | ChallengeTermUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeTermCreateOrConnectWithoutChallengeInput | ChallengeTermCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeTermUpsertWithWhereUniqueWithoutChallengeInput | ChallengeTermUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeTermCreateManyChallengeInputEnvelope + set?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + disconnect?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + delete?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + connect?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + update?: ChallengeTermUpdateWithWhereUniqueWithoutChallengeInput | ChallengeTermUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeTermUpdateManyWithWhereWithoutChallengeInput | ChallengeTermUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeTermScalarWhereInput | ChallengeTermScalarWhereInput[] + } + + export type ChallengeSkillUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeSkillCreateWithoutChallengeInput[] | ChallengeSkillUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeSkillCreateOrConnectWithoutChallengeInput | ChallengeSkillCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeSkillUpsertWithWhereUniqueWithoutChallengeInput | ChallengeSkillUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeSkillCreateManyChallengeInputEnvelope + set?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + disconnect?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + delete?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + connect?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + update?: ChallengeSkillUpdateWithWhereUniqueWithoutChallengeInput | ChallengeSkillUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeSkillUpdateManyWithWhereWithoutChallengeInput | ChallengeSkillUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeSkillScalarWhereInput | ChallengeSkillScalarWhereInput[] + } + + export type AuditLogUpdateManyWithoutChallengeNestedInput = { + create?: XOR | AuditLogCreateWithoutChallengeInput[] | AuditLogUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AuditLogCreateOrConnectWithoutChallengeInput | AuditLogCreateOrConnectWithoutChallengeInput[] + upsert?: AuditLogUpsertWithWhereUniqueWithoutChallengeInput | AuditLogUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: AuditLogCreateManyChallengeInputEnvelope + set?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + disconnect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + delete?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + update?: AuditLogUpdateWithWhereUniqueWithoutChallengeInput | AuditLogUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: AuditLogUpdateManyWithWhereWithoutChallengeInput | AuditLogUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[] + } + + export type MemberChallengeAccessUpdateManyWithoutChallengeNestedInput = { + set?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + disconnect?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + delete?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + connect?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + update?: MemberChallengeAccessUpdateWithWhereUniqueWithoutChallengeInput | MemberChallengeAccessUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: MemberChallengeAccessUpdateManyWithWhereWithoutChallengeInput | MemberChallengeAccessUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: MemberChallengeAccessScalarWhereInput | MemberChallengeAccessScalarWhereInput[] + } + + export type ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput = { + create?: XOR + connectOrCreate?: ChallengeTypeCreateOrConnectWithoutChallengesInput + upsert?: ChallengeTypeUpsertWithoutChallengesInput + connect?: ChallengeTypeWhereUniqueInput + update?: XOR, ChallengeTypeUncheckedUpdateWithoutChallengesInput> + } + + export type ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput = { + create?: XOR + connectOrCreate?: ChallengeTrackCreateOrConnectWithoutChallengesInput + upsert?: ChallengeTrackUpsertWithoutChallengesInput + connect?: ChallengeTrackWhereUniqueInput + update?: XOR, ChallengeTrackUncheckedUpdateWithoutChallengesInput> + } + + export type TimelineTemplateUpdateOneWithoutChallengesNestedInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutChallengesInput + upsert?: TimelineTemplateUpsertWithoutChallengesInput + disconnect?: TimelineTemplateWhereInput | boolean + delete?: TimelineTemplateWhereInput | boolean + connect?: TimelineTemplateWhereUniqueInput + update?: XOR, TimelineTemplateUncheckedUpdateWithoutChallengesInput> + } + + export type ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput = { + create?: XOR + connectOrCreate?: ChallengeBillingCreateOrConnectWithoutChallengeInput + upsert?: ChallengeBillingUpsertWithoutChallengeInput + disconnect?: ChallengeBillingWhereInput | boolean + delete?: ChallengeBillingWhereInput | boolean + connect?: ChallengeBillingWhereUniqueInput + update?: XOR, ChallengeBillingUncheckedUpdateWithoutChallengeInput> + } + + export type ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput = { + create?: XOR + connectOrCreate?: ChallengeLegacyCreateOrConnectWithoutChallengeInput + upsert?: ChallengeLegacyUpsertWithoutChallengeInput + disconnect?: ChallengeLegacyWhereInput | boolean + delete?: ChallengeLegacyWhereInput | boolean + connect?: ChallengeLegacyWhereUniqueInput + update?: XOR, ChallengeLegacyUncheckedUpdateWithoutChallengeInput> + } + + export type ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput = { + create?: XOR + connectOrCreate?: ChallengeConstraintCreateOrConnectWithoutChallengeInput + upsert?: ChallengeConstraintUpsertWithoutChallengeInput + disconnect?: ChallengeConstraintWhereInput | boolean + delete?: ChallengeConstraintWhereInput | boolean + connect?: ChallengeConstraintWhereUniqueInput + update?: XOR, ChallengeConstraintUncheckedUpdateWithoutChallengeInput> + } + + export type ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeEventCreateWithoutChallengeInput[] | ChallengeEventUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeEventCreateOrConnectWithoutChallengeInput | ChallengeEventCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeEventUpsertWithWhereUniqueWithoutChallengeInput | ChallengeEventUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeEventCreateManyChallengeInputEnvelope + set?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + disconnect?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + delete?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + connect?: ChallengeEventWhereUniqueInput | ChallengeEventWhereUniqueInput[] + update?: ChallengeEventUpdateWithWhereUniqueWithoutChallengeInput | ChallengeEventUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeEventUpdateManyWithWhereWithoutChallengeInput | ChallengeEventUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeEventScalarWhereInput | ChallengeEventScalarWhereInput[] + } + + export type ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeDiscussionCreateWithoutChallengeInput[] | ChallengeDiscussionUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeDiscussionCreateOrConnectWithoutChallengeInput | ChallengeDiscussionCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeDiscussionUpsertWithWhereUniqueWithoutChallengeInput | ChallengeDiscussionUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeDiscussionCreateManyChallengeInputEnvelope + set?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + disconnect?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + delete?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + connect?: ChallengeDiscussionWhereUniqueInput | ChallengeDiscussionWhereUniqueInput[] + update?: ChallengeDiscussionUpdateWithWhereUniqueWithoutChallengeInput | ChallengeDiscussionUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeDiscussionUpdateManyWithWhereWithoutChallengeInput | ChallengeDiscussionUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeDiscussionScalarWhereInput | ChallengeDiscussionScalarWhereInput[] + } + + export type ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeMetadataCreateWithoutChallengeInput[] | ChallengeMetadataUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeMetadataCreateOrConnectWithoutChallengeInput | ChallengeMetadataCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeMetadataUpsertWithWhereUniqueWithoutChallengeInput | ChallengeMetadataUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeMetadataCreateManyChallengeInputEnvelope + set?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + disconnect?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + delete?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + connect?: ChallengeMetadataWhereUniqueInput | ChallengeMetadataWhereUniqueInput[] + update?: ChallengeMetadataUpdateWithWhereUniqueWithoutChallengeInput | ChallengeMetadataUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeMetadataUpdateManyWithWhereWithoutChallengeInput | ChallengeMetadataUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeMetadataScalarWhereInput | ChallengeMetadataScalarWhereInput[] + } + + export type ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengePhaseCreateWithoutChallengeInput[] | ChallengePhaseUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutChallengeInput | ChallengePhaseCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengePhaseUpsertWithWhereUniqueWithoutChallengeInput | ChallengePhaseUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengePhaseCreateManyChallengeInputEnvelope + set?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + disconnect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + delete?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + update?: ChallengePhaseUpdateWithWhereUniqueWithoutChallengeInput | ChallengePhaseUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengePhaseUpdateManyWithWhereWithoutChallengeInput | ChallengePhaseUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengePhaseScalarWhereInput | ChallengePhaseScalarWhereInput[] + } + + export type ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengePrizeSetCreateWithoutChallengeInput[] | ChallengePrizeSetUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengePrizeSetCreateOrConnectWithoutChallengeInput | ChallengePrizeSetCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengePrizeSetUpsertWithWhereUniqueWithoutChallengeInput | ChallengePrizeSetUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengePrizeSetCreateManyChallengeInputEnvelope + set?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + disconnect?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + delete?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + connect?: ChallengePrizeSetWhereUniqueInput | ChallengePrizeSetWhereUniqueInput[] + update?: ChallengePrizeSetUpdateWithWhereUniqueWithoutChallengeInput | ChallengePrizeSetUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengePrizeSetUpdateManyWithWhereWithoutChallengeInput | ChallengePrizeSetUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengePrizeSetScalarWhereInput | ChallengePrizeSetScalarWhereInput[] + } + + export type ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeReviewerCreateWithoutChallengeInput[] | ChallengeReviewerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutChallengeInput | ChallengeReviewerCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeReviewerUpsertWithWhereUniqueWithoutChallengeInput | ChallengeReviewerUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeReviewerCreateManyChallengeInputEnvelope + set?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + disconnect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + delete?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + update?: ChallengeReviewerUpdateWithWhereUniqueWithoutChallengeInput | ChallengeReviewerUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeReviewerUpdateManyWithWhereWithoutChallengeInput | ChallengeReviewerUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeReviewerScalarWhereInput | ChallengeReviewerScalarWhereInput[] + } + + export type ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeWinnerCreateWithoutChallengeInput[] | ChallengeWinnerUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeWinnerCreateOrConnectWithoutChallengeInput | ChallengeWinnerCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeWinnerUpsertWithWhereUniqueWithoutChallengeInput | ChallengeWinnerUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeWinnerCreateManyChallengeInputEnvelope + set?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + disconnect?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + delete?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + connect?: ChallengeWinnerWhereUniqueInput | ChallengeWinnerWhereUniqueInput[] + update?: ChallengeWinnerUpdateWithWhereUniqueWithoutChallengeInput | ChallengeWinnerUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeWinnerUpdateManyWithWhereWithoutChallengeInput | ChallengeWinnerUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeWinnerScalarWhereInput | ChallengeWinnerScalarWhereInput[] + } + + export type AttachmentUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | AttachmentCreateWithoutChallengeInput[] | AttachmentUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AttachmentCreateOrConnectWithoutChallengeInput | AttachmentCreateOrConnectWithoutChallengeInput[] + upsert?: AttachmentUpsertWithWhereUniqueWithoutChallengeInput | AttachmentUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: AttachmentCreateManyChallengeInputEnvelope + set?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + disconnect?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + delete?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + connect?: AttachmentWhereUniqueInput | AttachmentWhereUniqueInput[] + update?: AttachmentUpdateWithWhereUniqueWithoutChallengeInput | AttachmentUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: AttachmentUpdateManyWithWhereWithoutChallengeInput | AttachmentUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: AttachmentScalarWhereInput | AttachmentScalarWhereInput[] + } + + export type ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeTermCreateWithoutChallengeInput[] | ChallengeTermUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeTermCreateOrConnectWithoutChallengeInput | ChallengeTermCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeTermUpsertWithWhereUniqueWithoutChallengeInput | ChallengeTermUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeTermCreateManyChallengeInputEnvelope + set?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + disconnect?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + delete?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + connect?: ChallengeTermWhereUniqueInput | ChallengeTermWhereUniqueInput[] + update?: ChallengeTermUpdateWithWhereUniqueWithoutChallengeInput | ChallengeTermUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeTermUpdateManyWithWhereWithoutChallengeInput | ChallengeTermUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeTermScalarWhereInput | ChallengeTermScalarWhereInput[] + } + + export type ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | ChallengeSkillCreateWithoutChallengeInput[] | ChallengeSkillUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: ChallengeSkillCreateOrConnectWithoutChallengeInput | ChallengeSkillCreateOrConnectWithoutChallengeInput[] + upsert?: ChallengeSkillUpsertWithWhereUniqueWithoutChallengeInput | ChallengeSkillUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: ChallengeSkillCreateManyChallengeInputEnvelope + set?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + disconnect?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + delete?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + connect?: ChallengeSkillWhereUniqueInput | ChallengeSkillWhereUniqueInput[] + update?: ChallengeSkillUpdateWithWhereUniqueWithoutChallengeInput | ChallengeSkillUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: ChallengeSkillUpdateManyWithWhereWithoutChallengeInput | ChallengeSkillUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: ChallengeSkillScalarWhereInput | ChallengeSkillScalarWhereInput[] + } + + export type AuditLogUncheckedUpdateManyWithoutChallengeNestedInput = { + create?: XOR | AuditLogCreateWithoutChallengeInput[] | AuditLogUncheckedCreateWithoutChallengeInput[] + connectOrCreate?: AuditLogCreateOrConnectWithoutChallengeInput | AuditLogCreateOrConnectWithoutChallengeInput[] + upsert?: AuditLogUpsertWithWhereUniqueWithoutChallengeInput | AuditLogUpsertWithWhereUniqueWithoutChallengeInput[] + createMany?: AuditLogCreateManyChallengeInputEnvelope + set?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + disconnect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + delete?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[] + update?: AuditLogUpdateWithWhereUniqueWithoutChallengeInput | AuditLogUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: AuditLogUpdateManyWithWhereWithoutChallengeInput | AuditLogUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[] + } + + export type MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput = { + set?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + disconnect?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + delete?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + connect?: MemberChallengeAccessWhereUniqueInput | MemberChallengeAccessWhereUniqueInput[] + update?: MemberChallengeAccessUpdateWithWhereUniqueWithoutChallengeInput | MemberChallengeAccessUpdateWithWhereUniqueWithoutChallengeInput[] + updateMany?: MemberChallengeAccessUpdateManyWithWhereWithoutChallengeInput | MemberChallengeAccessUpdateManyWithWhereWithoutChallengeInput[] + deleteMany?: MemberChallengeAccessScalarWhereInput | MemberChallengeAccessScalarWhereInput[] + } + + export type ChallengeCreateNestedManyWithoutTypeInput = { + create?: XOR | ChallengeCreateWithoutTypeInput[] | ChallengeUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTypeInput | ChallengeCreateOrConnectWithoutTypeInput[] + createMany?: ChallengeCreateManyTypeInputEnvelope + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + } + + export type ChallengeTimelineTemplateCreateNestedManyWithoutTypeInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTypeInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput | ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput[] + createMany?: ChallengeTimelineTemplateCreateManyTypeInputEnvelope + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + } + + export type DefaultChallengeReviewerCreateNestedManyWithoutChallengeTypeInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTypeInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTypeInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTypeInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type ChallengeUncheckedCreateNestedManyWithoutTypeInput = { + create?: XOR | ChallengeCreateWithoutTypeInput[] | ChallengeUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTypeInput | ChallengeCreateOrConnectWithoutTypeInput[] + createMany?: ChallengeCreateManyTypeInputEnvelope + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + } + + export type ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTypeInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTypeInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput | ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput[] + createMany?: ChallengeTimelineTemplateCreateManyTypeInputEnvelope + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + } + + export type DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTypeInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTypeInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTypeInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTypeInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type ChallengeUpdateManyWithoutTypeNestedInput = { + create?: XOR | ChallengeCreateWithoutTypeInput[] | ChallengeUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTypeInput | ChallengeCreateOrConnectWithoutTypeInput[] + upsert?: ChallengeUpsertWithWhereUniqueWithoutTypeInput | ChallengeUpsertWithWhereUniqueWithoutTypeInput[] + createMany?: ChallengeCreateManyTypeInputEnvelope + set?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + disconnect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + delete?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + update?: ChallengeUpdateWithWhereUniqueWithoutTypeInput | ChallengeUpdateWithWhereUniqueWithoutTypeInput[] + updateMany?: ChallengeUpdateManyWithWhereWithoutTypeInput | ChallengeUpdateManyWithWhereWithoutTypeInput[] + deleteMany?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + } + + export type ChallengeTimelineTemplateUpdateManyWithoutTypeNestedInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTypeInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput | ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput[] + upsert?: ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTypeInput | ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTypeInput[] + createMany?: ChallengeTimelineTemplateCreateManyTypeInputEnvelope + set?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + disconnect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + delete?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + update?: ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTypeInput | ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTypeInput[] + updateMany?: ChallengeTimelineTemplateUpdateManyWithWhereWithoutTypeInput | ChallengeTimelineTemplateUpdateManyWithWhereWithoutTypeInput[] + deleteMany?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + } + + export type DefaultChallengeReviewerUpdateManyWithoutChallengeTypeNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTypeInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTypeInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTypeInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTypeInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTypeInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTypeInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTypeInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTypeInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTypeInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type ChallengeUncheckedUpdateManyWithoutTypeNestedInput = { + create?: XOR | ChallengeCreateWithoutTypeInput[] | ChallengeUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTypeInput | ChallengeCreateOrConnectWithoutTypeInput[] + upsert?: ChallengeUpsertWithWhereUniqueWithoutTypeInput | ChallengeUpsertWithWhereUniqueWithoutTypeInput[] + createMany?: ChallengeCreateManyTypeInputEnvelope + set?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + disconnect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + delete?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + update?: ChallengeUpdateWithWhereUniqueWithoutTypeInput | ChallengeUpdateWithWhereUniqueWithoutTypeInput[] + updateMany?: ChallengeUpdateManyWithWhereWithoutTypeInput | ChallengeUpdateManyWithWhereWithoutTypeInput[] + deleteMany?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + } + + export type ChallengeTimelineTemplateUncheckedUpdateManyWithoutTypeNestedInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTypeInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTypeInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput | ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput[] + upsert?: ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTypeInput | ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTypeInput[] + createMany?: ChallengeTimelineTemplateCreateManyTypeInputEnvelope + set?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + disconnect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + delete?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + update?: ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTypeInput | ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTypeInput[] + updateMany?: ChallengeTimelineTemplateUpdateManyWithWhereWithoutTypeInput | ChallengeTimelineTemplateUpdateManyWithWhereWithoutTypeInput[] + deleteMany?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTypeNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTypeInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTypeInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTypeInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTypeInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTypeInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTypeInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTypeInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTypeInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTypeInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type ChallengeCreateNestedManyWithoutTrackInput = { + create?: XOR | ChallengeCreateWithoutTrackInput[] | ChallengeUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTrackInput | ChallengeCreateOrConnectWithoutTrackInput[] + createMany?: ChallengeCreateManyTrackInputEnvelope + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + } + + export type ChallengeTimelineTemplateCreateNestedManyWithoutTrackInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTrackInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput | ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput[] + createMany?: ChallengeTimelineTemplateCreateManyTrackInputEnvelope + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + } + + export type DefaultChallengeReviewerCreateNestedManyWithoutChallengeTrackInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTrackInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTrackInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTrackInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type ChallengeUncheckedCreateNestedManyWithoutTrackInput = { + create?: XOR | ChallengeCreateWithoutTrackInput[] | ChallengeUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTrackInput | ChallengeCreateOrConnectWithoutTrackInput[] + createMany?: ChallengeCreateManyTrackInputEnvelope + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + } + + export type ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTrackInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTrackInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput | ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput[] + createMany?: ChallengeTimelineTemplateCreateManyTrackInputEnvelope + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + } + + export type DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTrackInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTrackInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTrackInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTrackInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type NullableEnumChallengeTrackEnumFieldUpdateOperationsInput = { + set?: $Enums.ChallengeTrackEnum | null + } + + export type ChallengeUpdateManyWithoutTrackNestedInput = { + create?: XOR | ChallengeCreateWithoutTrackInput[] | ChallengeUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTrackInput | ChallengeCreateOrConnectWithoutTrackInput[] + upsert?: ChallengeUpsertWithWhereUniqueWithoutTrackInput | ChallengeUpsertWithWhereUniqueWithoutTrackInput[] + createMany?: ChallengeCreateManyTrackInputEnvelope + set?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + disconnect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + delete?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + update?: ChallengeUpdateWithWhereUniqueWithoutTrackInput | ChallengeUpdateWithWhereUniqueWithoutTrackInput[] + updateMany?: ChallengeUpdateManyWithWhereWithoutTrackInput | ChallengeUpdateManyWithWhereWithoutTrackInput[] + deleteMany?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + } + + export type ChallengeTimelineTemplateUpdateManyWithoutTrackNestedInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTrackInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput | ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput[] + upsert?: ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTrackInput | ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTrackInput[] + createMany?: ChallengeTimelineTemplateCreateManyTrackInputEnvelope + set?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + disconnect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + delete?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + update?: ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTrackInput | ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTrackInput[] + updateMany?: ChallengeTimelineTemplateUpdateManyWithWhereWithoutTrackInput | ChallengeTimelineTemplateUpdateManyWithWhereWithoutTrackInput[] + deleteMany?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + } + + export type DefaultChallengeReviewerUpdateManyWithoutChallengeTrackNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTrackInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTrackInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTrackInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTrackInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTrackInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTrackInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTrackInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTrackInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTrackInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type ChallengeUncheckedUpdateManyWithoutTrackNestedInput = { + create?: XOR | ChallengeCreateWithoutTrackInput[] | ChallengeUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTrackInput | ChallengeCreateOrConnectWithoutTrackInput[] + upsert?: ChallengeUpsertWithWhereUniqueWithoutTrackInput | ChallengeUpsertWithWhereUniqueWithoutTrackInput[] + createMany?: ChallengeCreateManyTrackInputEnvelope + set?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + disconnect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + delete?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + update?: ChallengeUpdateWithWhereUniqueWithoutTrackInput | ChallengeUpdateWithWhereUniqueWithoutTrackInput[] + updateMany?: ChallengeUpdateManyWithWhereWithoutTrackInput | ChallengeUpdateManyWithWhereWithoutTrackInput[] + deleteMany?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + } + + export type ChallengeTimelineTemplateUncheckedUpdateManyWithoutTrackNestedInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTrackInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTrackInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput | ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput[] + upsert?: ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTrackInput | ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTrackInput[] + createMany?: ChallengeTimelineTemplateCreateManyTrackInputEnvelope + set?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + disconnect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + delete?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + update?: ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTrackInput | ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTrackInput[] + updateMany?: ChallengeTimelineTemplateUpdateManyWithWhereWithoutTrackInput | ChallengeTimelineTemplateUpdateManyWithWhereWithoutTrackInput[] + deleteMany?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTrackNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutChallengeTrackInput[] | DefaultChallengeReviewerUncheckedCreateWithoutChallengeTrackInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput | DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTrackInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTrackInput[] + createMany?: DefaultChallengeReviewerCreateManyChallengeTrackInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTrackInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTrackInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTrackInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTrackInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type TimelineTemplateCreateNestedOneWithoutChallengeTimelineTemplatesInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutChallengeTimelineTemplatesInput + connect?: TimelineTemplateWhereUniqueInput + } + + export type ChallengeTrackCreateNestedOneWithoutTimelineTemplatesInput = { + create?: XOR + connectOrCreate?: ChallengeTrackCreateOrConnectWithoutTimelineTemplatesInput + connect?: ChallengeTrackWhereUniqueInput + } + + export type ChallengeTypeCreateNestedOneWithoutTimelineTemplatesInput = { + create?: XOR + connectOrCreate?: ChallengeTypeCreateOrConnectWithoutTimelineTemplatesInput + connect?: ChallengeTypeWhereUniqueInput + } + + export type TimelineTemplateUpdateOneRequiredWithoutChallengeTimelineTemplatesNestedInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutChallengeTimelineTemplatesInput + upsert?: TimelineTemplateUpsertWithoutChallengeTimelineTemplatesInput + connect?: TimelineTemplateWhereUniqueInput + update?: XOR, TimelineTemplateUncheckedUpdateWithoutChallengeTimelineTemplatesInput> + } + + export type ChallengeTrackUpdateOneRequiredWithoutTimelineTemplatesNestedInput = { + create?: XOR + connectOrCreate?: ChallengeTrackCreateOrConnectWithoutTimelineTemplatesInput + upsert?: ChallengeTrackUpsertWithoutTimelineTemplatesInput + connect?: ChallengeTrackWhereUniqueInput + update?: XOR, ChallengeTrackUncheckedUpdateWithoutTimelineTemplatesInput> + } + + export type ChallengeTypeUpdateOneRequiredWithoutTimelineTemplatesNestedInput = { + create?: XOR + connectOrCreate?: ChallengeTypeCreateOrConnectWithoutTimelineTemplatesInput + upsert?: ChallengeTypeUpsertWithoutTimelineTemplatesInput + connect?: ChallengeTypeWhereUniqueInput + update?: XOR, ChallengeTypeUncheckedUpdateWithoutTimelineTemplatesInput> + } + + export type ChallengeCreateNestedOneWithoutAuditLogsInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutAuditLogsInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeUpdateOneWithoutAuditLogsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutAuditLogsInput + upsert?: ChallengeUpsertWithoutAuditLogsInput + disconnect?: ChallengeWhereInput | boolean + delete?: ChallengeWhereInput | boolean + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutAuditLogsInput> + } + + export type ChallengeCreateNestedOneWithoutAttachmentsInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutAttachmentsInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeUpdateOneRequiredWithoutAttachmentsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutAttachmentsInput + upsert?: ChallengeUpsertWithoutAttachmentsInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutAttachmentsInput> + } + + export type ChallengeCreateNestedOneWithoutMetadataInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutMetadataInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeUpdateOneRequiredWithoutMetadataNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutMetadataInput + upsert?: ChallengeUpsertWithoutMetadataInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutMetadataInput> + } + + export type ChallengePrizeSetCreateNestedOneWithoutPrizesInput = { + create?: XOR + connectOrCreate?: ChallengePrizeSetCreateOrConnectWithoutPrizesInput + connect?: ChallengePrizeSetWhereUniqueInput + } + + export type FloatFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type ChallengePrizeSetUpdateOneRequiredWithoutPrizesNestedInput = { + create?: XOR + connectOrCreate?: ChallengePrizeSetCreateOrConnectWithoutPrizesInput + upsert?: ChallengePrizeSetUpsertWithoutPrizesInput + connect?: ChallengePrizeSetWhereUniqueInput + update?: XOR, ChallengePrizeSetUncheckedUpdateWithoutPrizesInput> + } + + export type ChallengeCreateNestedOneWithoutWinnersInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutWinnersInput + connect?: ChallengeWhereUniqueInput + } + + export type EnumPrizeSetTypeEnumFieldUpdateOperationsInput = { + set?: $Enums.PrizeSetTypeEnum + } + + export type ChallengeUpdateOneRequiredWithoutWinnersNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutWinnersInput + upsert?: ChallengeUpsertWithoutWinnersInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutWinnersInput> + } + + export type ChallengeCreateNestedOneWithoutTermsInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutTermsInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeUpdateOneRequiredWithoutTermsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutTermsInput + upsert?: ChallengeUpsertWithoutTermsInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutTermsInput> + } + + export type ChallengeCreateNestedOneWithoutSkillsInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutSkillsInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeUpdateOneRequiredWithoutSkillsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutSkillsInput + upsert?: ChallengeUpsertWithoutSkillsInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutSkillsInput> + } + + export type ChallengeCreateNestedOneWithoutBillingRecordInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutBillingRecordInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeUpdateOneRequiredWithoutBillingRecordNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutBillingRecordInput + upsert?: ChallengeUpsertWithoutBillingRecordInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutBillingRecordInput> + } + + export type ChallengeCreateNestedOneWithoutLegacyRecordInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutLegacyRecordInput + connect?: ChallengeWhereUniqueInput + } + + export type EnumReviewTypeEnumFieldUpdateOperationsInput = { + set?: $Enums.ReviewTypeEnum + } + + export type ChallengeUpdateOneRequiredWithoutLegacyRecordNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutLegacyRecordInput + upsert?: ChallengeUpsertWithoutLegacyRecordInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutLegacyRecordInput> + } + + export type ChallengeCreateNestedOneWithoutEventsInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutEventsInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeUpdateOneRequiredWithoutEventsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutEventsInput + upsert?: ChallengeUpsertWithoutEventsInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutEventsInput> + } + + export type ChallengeCreateNestedOneWithoutDiscussionsInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutDiscussionsInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeDiscussionOptionCreateNestedManyWithoutDiscussionInput = { + create?: XOR | ChallengeDiscussionOptionCreateWithoutDiscussionInput[] | ChallengeDiscussionOptionUncheckedCreateWithoutDiscussionInput[] + connectOrCreate?: ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput | ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput[] + createMany?: ChallengeDiscussionOptionCreateManyDiscussionInputEnvelope + connect?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + } + + export type ChallengeDiscussionOptionUncheckedCreateNestedManyWithoutDiscussionInput = { + create?: XOR | ChallengeDiscussionOptionCreateWithoutDiscussionInput[] | ChallengeDiscussionOptionUncheckedCreateWithoutDiscussionInput[] + connectOrCreate?: ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput | ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput[] + createMany?: ChallengeDiscussionOptionCreateManyDiscussionInputEnvelope + connect?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + } + + export type EnumDiscussionTypeEnumFieldUpdateOperationsInput = { + set?: $Enums.DiscussionTypeEnum + } + + export type ChallengeUpdateOneRequiredWithoutDiscussionsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutDiscussionsInput + upsert?: ChallengeUpsertWithoutDiscussionsInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutDiscussionsInput> + } + + export type ChallengeDiscussionOptionUpdateManyWithoutDiscussionNestedInput = { + create?: XOR | ChallengeDiscussionOptionCreateWithoutDiscussionInput[] | ChallengeDiscussionOptionUncheckedCreateWithoutDiscussionInput[] + connectOrCreate?: ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput | ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput[] + upsert?: ChallengeDiscussionOptionUpsertWithWhereUniqueWithoutDiscussionInput | ChallengeDiscussionOptionUpsertWithWhereUniqueWithoutDiscussionInput[] + createMany?: ChallengeDiscussionOptionCreateManyDiscussionInputEnvelope + set?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + disconnect?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + delete?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + connect?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + update?: ChallengeDiscussionOptionUpdateWithWhereUniqueWithoutDiscussionInput | ChallengeDiscussionOptionUpdateWithWhereUniqueWithoutDiscussionInput[] + updateMany?: ChallengeDiscussionOptionUpdateManyWithWhereWithoutDiscussionInput | ChallengeDiscussionOptionUpdateManyWithWhereWithoutDiscussionInput[] + deleteMany?: ChallengeDiscussionOptionScalarWhereInput | ChallengeDiscussionOptionScalarWhereInput[] + } + + export type ChallengeDiscussionOptionUncheckedUpdateManyWithoutDiscussionNestedInput = { + create?: XOR | ChallengeDiscussionOptionCreateWithoutDiscussionInput[] | ChallengeDiscussionOptionUncheckedCreateWithoutDiscussionInput[] + connectOrCreate?: ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput | ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput[] + upsert?: ChallengeDiscussionOptionUpsertWithWhereUniqueWithoutDiscussionInput | ChallengeDiscussionOptionUpsertWithWhereUniqueWithoutDiscussionInput[] + createMany?: ChallengeDiscussionOptionCreateManyDiscussionInputEnvelope + set?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + disconnect?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + delete?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + connect?: ChallengeDiscussionOptionWhereUniqueInput | ChallengeDiscussionOptionWhereUniqueInput[] + update?: ChallengeDiscussionOptionUpdateWithWhereUniqueWithoutDiscussionInput | ChallengeDiscussionOptionUpdateWithWhereUniqueWithoutDiscussionInput[] + updateMany?: ChallengeDiscussionOptionUpdateManyWithWhereWithoutDiscussionInput | ChallengeDiscussionOptionUpdateManyWithWhereWithoutDiscussionInput[] + deleteMany?: ChallengeDiscussionOptionScalarWhereInput | ChallengeDiscussionOptionScalarWhereInput[] + } + + export type ChallengeDiscussionCreateNestedOneWithoutOptionsInput = { + create?: XOR + connectOrCreate?: ChallengeDiscussionCreateOrConnectWithoutOptionsInput + connect?: ChallengeDiscussionWhereUniqueInput + } + + export type ChallengeDiscussionUpdateOneRequiredWithoutOptionsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeDiscussionCreateOrConnectWithoutOptionsInput + upsert?: ChallengeDiscussionUpsertWithoutOptionsInput + connect?: ChallengeDiscussionWhereUniqueInput + update?: XOR, ChallengeDiscussionUncheckedUpdateWithoutOptionsInput> + } + + export type ChallengeConstraintCreateallowedRegistrantsInput = { + set: string[] + } + + export type ChallengeCreateNestedOneWithoutConstraintRecordInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutConstraintRecordInput + connect?: ChallengeWhereUniqueInput + } + + export type ChallengeConstraintUpdateallowedRegistrantsInput = { + set?: string[] + push?: string | string[] + } + + export type ChallengeUpdateOneRequiredWithoutConstraintRecordNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutConstraintRecordInput + upsert?: ChallengeUpsertWithoutConstraintRecordInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutConstraintRecordInput> + } + + export type ChallengePhaseCreateNestedManyWithoutPhaseInput = { + create?: XOR | ChallengePhaseCreateWithoutPhaseInput[] | ChallengePhaseUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutPhaseInput | ChallengePhaseCreateOrConnectWithoutPhaseInput[] + createMany?: ChallengePhaseCreateManyPhaseInputEnvelope + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + } + + export type ChallengeReviewerCreateNestedManyWithoutPhaseInput = { + create?: XOR | ChallengeReviewerCreateWithoutPhaseInput[] | ChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutPhaseInput | ChallengeReviewerCreateOrConnectWithoutPhaseInput[] + createMany?: ChallengeReviewerCreateManyPhaseInputEnvelope + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + } + + export type DefaultChallengeReviewerCreateNestedManyWithoutPhaseInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutPhaseInput[] | DefaultChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput | DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput[] + createMany?: DefaultChallengeReviewerCreateManyPhaseInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type ChallengePhaseUncheckedCreateNestedManyWithoutPhaseInput = { + create?: XOR | ChallengePhaseCreateWithoutPhaseInput[] | ChallengePhaseUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutPhaseInput | ChallengePhaseCreateOrConnectWithoutPhaseInput[] + createMany?: ChallengePhaseCreateManyPhaseInputEnvelope + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + } + + export type ChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput = { + create?: XOR | ChallengeReviewerCreateWithoutPhaseInput[] | ChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutPhaseInput | ChallengeReviewerCreateOrConnectWithoutPhaseInput[] + createMany?: ChallengeReviewerCreateManyPhaseInputEnvelope + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + } + + export type DefaultChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutPhaseInput[] | DefaultChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput | DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput[] + createMany?: DefaultChallengeReviewerCreateManyPhaseInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type ChallengePhaseUpdateManyWithoutPhaseNestedInput = { + create?: XOR | ChallengePhaseCreateWithoutPhaseInput[] | ChallengePhaseUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutPhaseInput | ChallengePhaseCreateOrConnectWithoutPhaseInput[] + upsert?: ChallengePhaseUpsertWithWhereUniqueWithoutPhaseInput | ChallengePhaseUpsertWithWhereUniqueWithoutPhaseInput[] + createMany?: ChallengePhaseCreateManyPhaseInputEnvelope + set?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + disconnect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + delete?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + update?: ChallengePhaseUpdateWithWhereUniqueWithoutPhaseInput | ChallengePhaseUpdateWithWhereUniqueWithoutPhaseInput[] + updateMany?: ChallengePhaseUpdateManyWithWhereWithoutPhaseInput | ChallengePhaseUpdateManyWithWhereWithoutPhaseInput[] + deleteMany?: ChallengePhaseScalarWhereInput | ChallengePhaseScalarWhereInput[] + } + + export type ChallengeReviewerUpdateManyWithoutPhaseNestedInput = { + create?: XOR | ChallengeReviewerCreateWithoutPhaseInput[] | ChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutPhaseInput | ChallengeReviewerCreateOrConnectWithoutPhaseInput[] + upsert?: ChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput | ChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput[] + createMany?: ChallengeReviewerCreateManyPhaseInputEnvelope + set?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + disconnect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + delete?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + update?: ChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput | ChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput[] + updateMany?: ChallengeReviewerUpdateManyWithWhereWithoutPhaseInput | ChallengeReviewerUpdateManyWithWhereWithoutPhaseInput[] + deleteMany?: ChallengeReviewerScalarWhereInput | ChallengeReviewerScalarWhereInput[] + } + + export type DefaultChallengeReviewerUpdateManyWithoutPhaseNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutPhaseInput[] | DefaultChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput | DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput[] + createMany?: DefaultChallengeReviewerCreateManyPhaseInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutPhaseInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutPhaseInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type ChallengePhaseUncheckedUpdateManyWithoutPhaseNestedInput = { + create?: XOR | ChallengePhaseCreateWithoutPhaseInput[] | ChallengePhaseUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutPhaseInput | ChallengePhaseCreateOrConnectWithoutPhaseInput[] + upsert?: ChallengePhaseUpsertWithWhereUniqueWithoutPhaseInput | ChallengePhaseUpsertWithWhereUniqueWithoutPhaseInput[] + createMany?: ChallengePhaseCreateManyPhaseInputEnvelope + set?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + disconnect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + delete?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + connect?: ChallengePhaseWhereUniqueInput | ChallengePhaseWhereUniqueInput[] + update?: ChallengePhaseUpdateWithWhereUniqueWithoutPhaseInput | ChallengePhaseUpdateWithWhereUniqueWithoutPhaseInput[] + updateMany?: ChallengePhaseUpdateManyWithWhereWithoutPhaseInput | ChallengePhaseUpdateManyWithWhereWithoutPhaseInput[] + deleteMany?: ChallengePhaseScalarWhereInput | ChallengePhaseScalarWhereInput[] + } + + export type ChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput = { + create?: XOR | ChallengeReviewerCreateWithoutPhaseInput[] | ChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: ChallengeReviewerCreateOrConnectWithoutPhaseInput | ChallengeReviewerCreateOrConnectWithoutPhaseInput[] + upsert?: ChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput | ChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput[] + createMany?: ChallengeReviewerCreateManyPhaseInputEnvelope + set?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + disconnect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + delete?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + connect?: ChallengeReviewerWhereUniqueInput | ChallengeReviewerWhereUniqueInput[] + update?: ChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput | ChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput[] + updateMany?: ChallengeReviewerUpdateManyWithWhereWithoutPhaseInput | ChallengeReviewerUpdateManyWithWhereWithoutPhaseInput[] + deleteMany?: ChallengeReviewerScalarWhereInput | ChallengeReviewerScalarWhereInput[] + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutPhaseInput[] | DefaultChallengeReviewerUncheckedCreateWithoutPhaseInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput | DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput[] + createMany?: DefaultChallengeReviewerCreateManyPhaseInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutPhaseInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutPhaseInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type ChallengePhaseConstraintCreateNestedManyWithoutChallengePhaseInput = { + create?: XOR | ChallengePhaseConstraintCreateWithoutChallengePhaseInput[] | ChallengePhaseConstraintUncheckedCreateWithoutChallengePhaseInput[] + connectOrCreate?: ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput | ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput[] + createMany?: ChallengePhaseConstraintCreateManyChallengePhaseInputEnvelope + connect?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + } + + export type ChallengeCreateNestedOneWithoutPhasesInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutPhasesInput + connect?: ChallengeWhereUniqueInput + } + + export type PhaseCreateNestedOneWithoutChallengePhasesInput = { + create?: XOR + connectOrCreate?: PhaseCreateOrConnectWithoutChallengePhasesInput + connect?: PhaseWhereUniqueInput + } + + export type ChallengePhaseConstraintUncheckedCreateNestedManyWithoutChallengePhaseInput = { + create?: XOR | ChallengePhaseConstraintCreateWithoutChallengePhaseInput[] | ChallengePhaseConstraintUncheckedCreateWithoutChallengePhaseInput[] + connectOrCreate?: ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput | ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput[] + createMany?: ChallengePhaseConstraintCreateManyChallengePhaseInputEnvelope + connect?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + } + + export type NullableBoolFieldUpdateOperationsInput = { + set?: boolean | null + } + + export type ChallengePhaseConstraintUpdateManyWithoutChallengePhaseNestedInput = { + create?: XOR | ChallengePhaseConstraintCreateWithoutChallengePhaseInput[] | ChallengePhaseConstraintUncheckedCreateWithoutChallengePhaseInput[] + connectOrCreate?: ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput | ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput[] + upsert?: ChallengePhaseConstraintUpsertWithWhereUniqueWithoutChallengePhaseInput | ChallengePhaseConstraintUpsertWithWhereUniqueWithoutChallengePhaseInput[] + createMany?: ChallengePhaseConstraintCreateManyChallengePhaseInputEnvelope + set?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + disconnect?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + delete?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + connect?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + update?: ChallengePhaseConstraintUpdateWithWhereUniqueWithoutChallengePhaseInput | ChallengePhaseConstraintUpdateWithWhereUniqueWithoutChallengePhaseInput[] + updateMany?: ChallengePhaseConstraintUpdateManyWithWhereWithoutChallengePhaseInput | ChallengePhaseConstraintUpdateManyWithWhereWithoutChallengePhaseInput[] + deleteMany?: ChallengePhaseConstraintScalarWhereInput | ChallengePhaseConstraintScalarWhereInput[] + } + + export type ChallengeUpdateOneRequiredWithoutPhasesNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutPhasesInput + upsert?: ChallengeUpsertWithoutPhasesInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutPhasesInput> + } + + export type PhaseUpdateOneRequiredWithoutChallengePhasesNestedInput = { + create?: XOR + connectOrCreate?: PhaseCreateOrConnectWithoutChallengePhasesInput + upsert?: PhaseUpsertWithoutChallengePhasesInput + connect?: PhaseWhereUniqueInput + update?: XOR, PhaseUncheckedUpdateWithoutChallengePhasesInput> + } + + export type ChallengePhaseConstraintUncheckedUpdateManyWithoutChallengePhaseNestedInput = { + create?: XOR | ChallengePhaseConstraintCreateWithoutChallengePhaseInput[] | ChallengePhaseConstraintUncheckedCreateWithoutChallengePhaseInput[] + connectOrCreate?: ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput | ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput[] + upsert?: ChallengePhaseConstraintUpsertWithWhereUniqueWithoutChallengePhaseInput | ChallengePhaseConstraintUpsertWithWhereUniqueWithoutChallengePhaseInput[] + createMany?: ChallengePhaseConstraintCreateManyChallengePhaseInputEnvelope + set?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + disconnect?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + delete?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + connect?: ChallengePhaseConstraintWhereUniqueInput | ChallengePhaseConstraintWhereUniqueInput[] + update?: ChallengePhaseConstraintUpdateWithWhereUniqueWithoutChallengePhaseInput | ChallengePhaseConstraintUpdateWithWhereUniqueWithoutChallengePhaseInput[] + updateMany?: ChallengePhaseConstraintUpdateManyWithWhereWithoutChallengePhaseInput | ChallengePhaseConstraintUpdateManyWithWhereWithoutChallengePhaseInput[] + deleteMany?: ChallengePhaseConstraintScalarWhereInput | ChallengePhaseConstraintScalarWhereInput[] + } + + export type ChallengePhaseCreateNestedOneWithoutConstraintsInput = { + create?: XOR + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutConstraintsInput + connect?: ChallengePhaseWhereUniqueInput + } + + export type ChallengePhaseUpdateOneRequiredWithoutConstraintsNestedInput = { + create?: XOR + connectOrCreate?: ChallengePhaseCreateOrConnectWithoutConstraintsInput + upsert?: ChallengePhaseUpsertWithoutConstraintsInput + connect?: ChallengePhaseWhereUniqueInput + update?: XOR, ChallengePhaseUncheckedUpdateWithoutConstraintsInput> + } + + export type PrizeCreateNestedManyWithoutPrizeSetInput = { + create?: XOR | PrizeCreateWithoutPrizeSetInput[] | PrizeUncheckedCreateWithoutPrizeSetInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutPrizeSetInput | PrizeCreateOrConnectWithoutPrizeSetInput[] + createMany?: PrizeCreateManyPrizeSetInputEnvelope + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + } + + export type ChallengeCreateNestedOneWithoutPrizeSetsInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutPrizeSetsInput + connect?: ChallengeWhereUniqueInput + } + + export type PrizeUncheckedCreateNestedManyWithoutPrizeSetInput = { + create?: XOR | PrizeCreateWithoutPrizeSetInput[] | PrizeUncheckedCreateWithoutPrizeSetInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutPrizeSetInput | PrizeCreateOrConnectWithoutPrizeSetInput[] + createMany?: PrizeCreateManyPrizeSetInputEnvelope + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + } + + export type PrizeUpdateManyWithoutPrizeSetNestedInput = { + create?: XOR | PrizeCreateWithoutPrizeSetInput[] | PrizeUncheckedCreateWithoutPrizeSetInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutPrizeSetInput | PrizeCreateOrConnectWithoutPrizeSetInput[] + upsert?: PrizeUpsertWithWhereUniqueWithoutPrizeSetInput | PrizeUpsertWithWhereUniqueWithoutPrizeSetInput[] + createMany?: PrizeCreateManyPrizeSetInputEnvelope + set?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + disconnect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + delete?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + update?: PrizeUpdateWithWhereUniqueWithoutPrizeSetInput | PrizeUpdateWithWhereUniqueWithoutPrizeSetInput[] + updateMany?: PrizeUpdateManyWithWhereWithoutPrizeSetInput | PrizeUpdateManyWithWhereWithoutPrizeSetInput[] + deleteMany?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + } + + export type ChallengeUpdateOneRequiredWithoutPrizeSetsNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutPrizeSetsInput + upsert?: ChallengeUpsertWithoutPrizeSetsInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutPrizeSetsInput> + } + + export type PrizeUncheckedUpdateManyWithoutPrizeSetNestedInput = { + create?: XOR | PrizeCreateWithoutPrizeSetInput[] | PrizeUncheckedCreateWithoutPrizeSetInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutPrizeSetInput | PrizeCreateOrConnectWithoutPrizeSetInput[] + upsert?: PrizeUpsertWithWhereUniqueWithoutPrizeSetInput | PrizeUpsertWithWhereUniqueWithoutPrizeSetInput[] + createMany?: PrizeCreateManyPrizeSetInputEnvelope + set?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + disconnect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + delete?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + update?: PrizeUpdateWithWhereUniqueWithoutPrizeSetInput | PrizeUpdateWithWhereUniqueWithoutPrizeSetInput[] + updateMany?: PrizeUpdateManyWithWhereWithoutPrizeSetInput | PrizeUpdateManyWithWhereWithoutPrizeSetInput[] + deleteMany?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + } + + export type ChallengeCreateNestedOneWithoutReviewersInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutReviewersInput + connect?: ChallengeWhereUniqueInput + } + + export type PhaseCreateNestedOneWithoutChallengeReviewerInput = { + create?: XOR + connectOrCreate?: PhaseCreateOrConnectWithoutChallengeReviewerInput + connect?: PhaseWhereUniqueInput + } + + export type NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput = { + set?: $Enums.ReviewOpportunityTypeEnum | null + } + + export type ChallengeUpdateOneRequiredWithoutReviewersNestedInput = { + create?: XOR + connectOrCreate?: ChallengeCreateOrConnectWithoutReviewersInput + upsert?: ChallengeUpsertWithoutReviewersInput + connect?: ChallengeWhereUniqueInput + update?: XOR, ChallengeUncheckedUpdateWithoutReviewersInput> + } + + export type PhaseUpdateOneRequiredWithoutChallengeReviewerNestedInput = { + create?: XOR + connectOrCreate?: PhaseCreateOrConnectWithoutChallengeReviewerInput + upsert?: PhaseUpsertWithoutChallengeReviewerInput + connect?: PhaseWhereUniqueInput + update?: XOR, PhaseUncheckedUpdateWithoutChallengeReviewerInput> + } + + export type ChallengeTypeCreateNestedOneWithoutDefaultReviewersInput = { + create?: XOR + connectOrCreate?: ChallengeTypeCreateOrConnectWithoutDefaultReviewersInput + connect?: ChallengeTypeWhereUniqueInput + } + + export type ChallengeTrackCreateNestedOneWithoutDefaultReviewersInput = { + create?: XOR + connectOrCreate?: ChallengeTrackCreateOrConnectWithoutDefaultReviewersInput + connect?: ChallengeTrackWhereUniqueInput + } + + export type TimelineTemplateCreateNestedOneWithoutDefaultChallengeReviewerInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutDefaultChallengeReviewerInput + connect?: TimelineTemplateWhereUniqueInput + } + + export type PhaseCreateNestedOneWithoutDefaultChallengeReviewerInput = { + create?: XOR + connectOrCreate?: PhaseCreateOrConnectWithoutDefaultChallengeReviewerInput + connect?: PhaseWhereUniqueInput + } + + export type ChallengeTypeUpdateOneRequiredWithoutDefaultReviewersNestedInput = { + create?: XOR + connectOrCreate?: ChallengeTypeCreateOrConnectWithoutDefaultReviewersInput + upsert?: ChallengeTypeUpsertWithoutDefaultReviewersInput + connect?: ChallengeTypeWhereUniqueInput + update?: XOR, ChallengeTypeUncheckedUpdateWithoutDefaultReviewersInput> + } + + export type ChallengeTrackUpdateOneRequiredWithoutDefaultReviewersNestedInput = { + create?: XOR + connectOrCreate?: ChallengeTrackCreateOrConnectWithoutDefaultReviewersInput + upsert?: ChallengeTrackUpsertWithoutDefaultReviewersInput + connect?: ChallengeTrackWhereUniqueInput + update?: XOR, ChallengeTrackUncheckedUpdateWithoutDefaultReviewersInput> + } + + export type TimelineTemplateUpdateOneWithoutDefaultChallengeReviewerNestedInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutDefaultChallengeReviewerInput + upsert?: TimelineTemplateUpsertWithoutDefaultChallengeReviewerInput + disconnect?: TimelineTemplateWhereInput | boolean + delete?: TimelineTemplateWhereInput | boolean + connect?: TimelineTemplateWhereUniqueInput + update?: XOR, TimelineTemplateUncheckedUpdateWithoutDefaultChallengeReviewerInput> + } + + export type PhaseUpdateOneWithoutDefaultChallengeReviewerNestedInput = { + create?: XOR + connectOrCreate?: PhaseCreateOrConnectWithoutDefaultChallengeReviewerInput + upsert?: PhaseUpsertWithoutDefaultChallengeReviewerInput + disconnect?: PhaseWhereInput | boolean + delete?: PhaseWhereInput | boolean + connect?: PhaseWhereUniqueInput + update?: XOR, PhaseUncheckedUpdateWithoutDefaultChallengeReviewerInput> + } + + export type TimelineTemplatePhaseCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | TimelineTemplatePhaseCreateWithoutTimelineTemplateInput[] | TimelineTemplatePhaseUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput | TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: TimelineTemplatePhaseCreateManyTimelineTemplateInputEnvelope + connect?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + } + + export type ChallengeTimelineTemplateCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTimelineTemplateInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput | ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: ChallengeTimelineTemplateCreateManyTimelineTemplateInputEnvelope + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + } + + export type ChallengeCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | ChallengeCreateWithoutTimelineTemplateInput[] | ChallengeUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTimelineTemplateInput | ChallengeCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: ChallengeCreateManyTimelineTemplateInputEnvelope + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + } + + export type DefaultChallengeReviewerCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutTimelineTemplateInput[] | DefaultChallengeReviewerUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput | DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: DefaultChallengeReviewerCreateManyTimelineTemplateInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type TimelineTemplatePhaseUncheckedCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | TimelineTemplatePhaseCreateWithoutTimelineTemplateInput[] | TimelineTemplatePhaseUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput | TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: TimelineTemplatePhaseCreateManyTimelineTemplateInputEnvelope + connect?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + } + + export type ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTimelineTemplateInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput | ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: ChallengeTimelineTemplateCreateManyTimelineTemplateInputEnvelope + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + } + + export type ChallengeUncheckedCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | ChallengeCreateWithoutTimelineTemplateInput[] | ChallengeUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTimelineTemplateInput | ChallengeCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: ChallengeCreateManyTimelineTemplateInputEnvelope + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + } + + export type DefaultChallengeReviewerUncheckedCreateNestedManyWithoutTimelineTemplateInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutTimelineTemplateInput[] | DefaultChallengeReviewerUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput | DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput[] + createMany?: DefaultChallengeReviewerCreateManyTimelineTemplateInputEnvelope + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + } + + export type TimelineTemplatePhaseUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | TimelineTemplatePhaseCreateWithoutTimelineTemplateInput[] | TimelineTemplatePhaseUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput | TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: TimelineTemplatePhaseUpsertWithWhereUniqueWithoutTimelineTemplateInput | TimelineTemplatePhaseUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: TimelineTemplatePhaseCreateManyTimelineTemplateInputEnvelope + set?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + disconnect?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + delete?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + connect?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + update?: TimelineTemplatePhaseUpdateWithWhereUniqueWithoutTimelineTemplateInput | TimelineTemplatePhaseUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: TimelineTemplatePhaseUpdateManyWithWhereWithoutTimelineTemplateInput | TimelineTemplatePhaseUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: TimelineTemplatePhaseScalarWhereInput | TimelineTemplatePhaseScalarWhereInput[] + } + + export type ChallengeTimelineTemplateUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTimelineTemplateInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput | ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTimelineTemplateInput | ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: ChallengeTimelineTemplateCreateManyTimelineTemplateInputEnvelope + set?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + disconnect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + delete?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + update?: ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTimelineTemplateInput | ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: ChallengeTimelineTemplateUpdateManyWithWhereWithoutTimelineTemplateInput | ChallengeTimelineTemplateUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + } + + export type ChallengeUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | ChallengeCreateWithoutTimelineTemplateInput[] | ChallengeUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTimelineTemplateInput | ChallengeCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: ChallengeUpsertWithWhereUniqueWithoutTimelineTemplateInput | ChallengeUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: ChallengeCreateManyTimelineTemplateInputEnvelope + set?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + disconnect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + delete?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + update?: ChallengeUpdateWithWhereUniqueWithoutTimelineTemplateInput | ChallengeUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: ChallengeUpdateManyWithWhereWithoutTimelineTemplateInput | ChallengeUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + } + + export type DefaultChallengeReviewerUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutTimelineTemplateInput[] | DefaultChallengeReviewerUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput | DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutTimelineTemplateInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: DefaultChallengeReviewerCreateManyTimelineTemplateInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutTimelineTemplateInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutTimelineTemplateInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type TimelineTemplatePhaseUncheckedUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | TimelineTemplatePhaseCreateWithoutTimelineTemplateInput[] | TimelineTemplatePhaseUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput | TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: TimelineTemplatePhaseUpsertWithWhereUniqueWithoutTimelineTemplateInput | TimelineTemplatePhaseUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: TimelineTemplatePhaseCreateManyTimelineTemplateInputEnvelope + set?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + disconnect?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + delete?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + connect?: TimelineTemplatePhaseWhereUniqueInput | TimelineTemplatePhaseWhereUniqueInput[] + update?: TimelineTemplatePhaseUpdateWithWhereUniqueWithoutTimelineTemplateInput | TimelineTemplatePhaseUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: TimelineTemplatePhaseUpdateManyWithWhereWithoutTimelineTemplateInput | TimelineTemplatePhaseUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: TimelineTemplatePhaseScalarWhereInput | TimelineTemplatePhaseScalarWhereInput[] + } + + export type ChallengeTimelineTemplateUncheckedUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | ChallengeTimelineTemplateCreateWithoutTimelineTemplateInput[] | ChallengeTimelineTemplateUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput | ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTimelineTemplateInput | ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: ChallengeTimelineTemplateCreateManyTimelineTemplateInputEnvelope + set?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + disconnect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + delete?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + connect?: ChallengeTimelineTemplateWhereUniqueInput | ChallengeTimelineTemplateWhereUniqueInput[] + update?: ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTimelineTemplateInput | ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: ChallengeTimelineTemplateUpdateManyWithWhereWithoutTimelineTemplateInput | ChallengeTimelineTemplateUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + } + + export type ChallengeUncheckedUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | ChallengeCreateWithoutTimelineTemplateInput[] | ChallengeUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: ChallengeCreateOrConnectWithoutTimelineTemplateInput | ChallengeCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: ChallengeUpsertWithWhereUniqueWithoutTimelineTemplateInput | ChallengeUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: ChallengeCreateManyTimelineTemplateInputEnvelope + set?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + disconnect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + delete?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + connect?: ChallengeWhereUniqueInput | ChallengeWhereUniqueInput[] + update?: ChallengeUpdateWithWhereUniqueWithoutTimelineTemplateInput | ChallengeUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: ChallengeUpdateManyWithWhereWithoutTimelineTemplateInput | ChallengeUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutTimelineTemplateNestedInput = { + create?: XOR | DefaultChallengeReviewerCreateWithoutTimelineTemplateInput[] | DefaultChallengeReviewerUncheckedCreateWithoutTimelineTemplateInput[] + connectOrCreate?: DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput | DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput[] + upsert?: DefaultChallengeReviewerUpsertWithWhereUniqueWithoutTimelineTemplateInput | DefaultChallengeReviewerUpsertWithWhereUniqueWithoutTimelineTemplateInput[] + createMany?: DefaultChallengeReviewerCreateManyTimelineTemplateInputEnvelope + set?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + disconnect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + delete?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + connect?: DefaultChallengeReviewerWhereUniqueInput | DefaultChallengeReviewerWhereUniqueInput[] + update?: DefaultChallengeReviewerUpdateWithWhereUniqueWithoutTimelineTemplateInput | DefaultChallengeReviewerUpdateWithWhereUniqueWithoutTimelineTemplateInput[] + updateMany?: DefaultChallengeReviewerUpdateManyWithWhereWithoutTimelineTemplateInput | DefaultChallengeReviewerUpdateManyWithWhereWithoutTimelineTemplateInput[] + deleteMany?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + } + + export type TimelineTemplateCreateNestedOneWithoutPhasesInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutPhasesInput + connect?: TimelineTemplateWhereUniqueInput + } + + export type TimelineTemplateUpdateOneRequiredWithoutPhasesNestedInput = { + create?: XOR + connectOrCreate?: TimelineTemplateCreateOrConnectWithoutPhasesInput + upsert?: TimelineTemplateUpsertWithoutPhasesInput + connect?: TimelineTemplateWhereUniqueInput + update?: XOR, TimelineTemplateUncheckedUpdateWithoutPhasesInput> + } + + export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + not?: NestedStringFilter<$PrismaModel> | string + } + + export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type NestedEnumChallengeStatusEnumFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeStatusEnum | EnumChallengeStatusEnumFieldRefInput<$PrismaModel> + in?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + not?: NestedEnumChallengeStatusEnumFilter<$PrismaModel> | $Enums.ChallengeStatusEnum + } + + export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + search?: string + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedIntNullableFilter<$PrismaModel> + _max?: NestedIntNullableFilter<$PrismaModel> + } + + export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedFloatNullableFilter<$PrismaModel> + _min?: NestedFloatNullableFilter<$PrismaModel> + _max?: NestedFloatNullableFilter<$PrismaModel> + } + + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type NestedEnumChallengeStatusEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeStatusEnum | EnumChallengeStatusEnumFieldRefInput<$PrismaModel> + in?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ChallengeStatusEnum[] | ListEnumChallengeStatusEnumFieldRefInput<$PrismaModel> + not?: NestedEnumChallengeStatusEnumWithAggregatesFilter<$PrismaModel> | $Enums.ChallengeStatusEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumChallengeStatusEnumFilter<$PrismaModel> + _max?: NestedEnumChallengeStatusEnumFilter<$PrismaModel> + } + + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type NestedEnumChallengeTrackEnumNullableFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeTrackEnum | EnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumChallengeTrackEnumNullableFilter<$PrismaModel> | $Enums.ChallengeTrackEnum | null + } + + export type NestedEnumChallengeTrackEnumNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ChallengeTrackEnum | EnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ChallengeTrackEnum[] | ListEnumChallengeTrackEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumChallengeTrackEnumNullableWithAggregatesFilter<$PrismaModel> | $Enums.ChallengeTrackEnum | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedEnumChallengeTrackEnumNullableFilter<$PrismaModel> + _max?: NestedEnumChallengeTrackEnumNullableFilter<$PrismaModel> + } + + export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedFloatFilter<$PrismaModel> + _min?: NestedFloatFilter<$PrismaModel> + _max?: NestedFloatFilter<$PrismaModel> + } + + export type NestedEnumPrizeSetTypeEnumFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeSetTypeEnum | EnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeSetTypeEnumFilter<$PrismaModel> | $Enums.PrizeSetTypeEnum + } + + export type NestedEnumPrizeSetTypeEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeSetTypeEnum | EnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeSetTypeEnum[] | ListEnumPrizeSetTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeSetTypeEnumWithAggregatesFilter<$PrismaModel> | $Enums.PrizeSetTypeEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPrizeSetTypeEnumFilter<$PrismaModel> + _max?: NestedEnumPrizeSetTypeEnumFilter<$PrismaModel> + } + + export type NestedEnumReviewTypeEnumFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewTypeEnum | EnumReviewTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumReviewTypeEnumFilter<$PrismaModel> | $Enums.ReviewTypeEnum + } + + export type NestedEnumReviewTypeEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewTypeEnum | EnumReviewTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.ReviewTypeEnum[] | ListEnumReviewTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumReviewTypeEnumWithAggregatesFilter<$PrismaModel> | $Enums.ReviewTypeEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumReviewTypeEnumFilter<$PrismaModel> + _max?: NestedEnumReviewTypeEnumFilter<$PrismaModel> + } + + export type NestedEnumDiscussionTypeEnumFilter<$PrismaModel = never> = { + equals?: $Enums.DiscussionTypeEnum | EnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumDiscussionTypeEnumFilter<$PrismaModel> | $Enums.DiscussionTypeEnum + } + + export type NestedEnumDiscussionTypeEnumWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.DiscussionTypeEnum | EnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + in?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + notIn?: $Enums.DiscussionTypeEnum[] | ListEnumDiscussionTypeEnumFieldRefInput<$PrismaModel> + not?: NestedEnumDiscussionTypeEnumWithAggregatesFilter<$PrismaModel> | $Enums.DiscussionTypeEnum + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumDiscussionTypeEnumFilter<$PrismaModel> + _max?: NestedEnumDiscussionTypeEnumFilter<$PrismaModel> + } + + export type NestedBoolNullableFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null + not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null + } + + export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null + not?: NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedBoolNullableFilter<$PrismaModel> + _max?: NestedBoolNullableFilter<$PrismaModel> + } + + export type NestedEnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewOpportunityTypeEnum | EnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel> | $Enums.ReviewOpportunityTypeEnum | null + } + + export type NestedEnumReviewOpportunityTypeEnumNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ReviewOpportunityTypeEnum | EnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + in?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + notIn?: $Enums.ReviewOpportunityTypeEnum[] | ListEnumReviewOpportunityTypeEnumFieldRefInput<$PrismaModel> | null + not?: NestedEnumReviewOpportunityTypeEnumNullableWithAggregatesFilter<$PrismaModel> | $Enums.ReviewOpportunityTypeEnum | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedEnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel> + _max?: NestedEnumReviewOpportunityTypeEnumNullableFilter<$PrismaModel> + } + + export type ChallengeBillingCreateWithoutChallengeInput = { + id?: string + billingAccountId?: string | null + markup?: number | null + clientBillingRate?: number | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeBillingUncheckedCreateWithoutChallengeInput = { + id?: string + billingAccountId?: string | null + markup?: number | null + clientBillingRate?: number | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeBillingCreateOrConnectWithoutChallengeInput = { + where: ChallengeBillingWhereUniqueInput + create: XOR + } + + export type ChallengeLegacyCreateWithoutChallengeInput = { + id?: string + reviewType?: $Enums.ReviewTypeEnum + confidentialityType?: string + forumId?: number | null + directProjectId?: number | null + screeningScorecardId?: number | null + reviewScorecardId?: number | null + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: string | null + track?: string | null + subTrack?: string | null + legacySystemId?: number | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeLegacyUncheckedCreateWithoutChallengeInput = { + id?: string + reviewType?: $Enums.ReviewTypeEnum + confidentialityType?: string + forumId?: number | null + directProjectId?: number | null + screeningScorecardId?: number | null + reviewScorecardId?: number | null + isTask?: boolean + useSchedulingAPI?: boolean + pureV5Task?: boolean + pureV5?: boolean + selfService?: boolean + selfServiceCopilot?: string | null + track?: string | null + subTrack?: string | null + legacySystemId?: number | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeLegacyCreateOrConnectWithoutChallengeInput = { + where: ChallengeLegacyWhereUniqueInput + create: XOR + } + + export type ChallengeConstraintCreateWithoutChallengeInput = { + id?: string + allowedRegistrants?: ChallengeConstraintCreateallowedRegistrantsInput | string[] + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeConstraintUncheckedCreateWithoutChallengeInput = { + id?: string + allowedRegistrants?: ChallengeConstraintCreateallowedRegistrantsInput | string[] + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeConstraintCreateOrConnectWithoutChallengeInput = { + where: ChallengeConstraintWhereUniqueInput + create: XOR + } + + export type ChallengeEventCreateWithoutChallengeInput = { + id?: string + eventId: number + name?: string | null + key?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeEventUncheckedCreateWithoutChallengeInput = { + id?: string + eventId: number + name?: string | null + key?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeEventCreateOrConnectWithoutChallengeInput = { + where: ChallengeEventWhereUniqueInput + create: XOR + } + + export type ChallengeEventCreateManyChallengeInputEnvelope = { + data: ChallengeEventCreateManyChallengeInput | ChallengeEventCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengeDiscussionCreateWithoutChallengeInput = { + id?: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + options?: ChallengeDiscussionOptionCreateNestedManyWithoutDiscussionInput + } + + export type ChallengeDiscussionUncheckedCreateWithoutChallengeInput = { + id?: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + options?: ChallengeDiscussionOptionUncheckedCreateNestedManyWithoutDiscussionInput + } + + export type ChallengeDiscussionCreateOrConnectWithoutChallengeInput = { + where: ChallengeDiscussionWhereUniqueInput + create: XOR + } + + export type ChallengeDiscussionCreateManyChallengeInputEnvelope = { + data: ChallengeDiscussionCreateManyChallengeInput | ChallengeDiscussionCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengeMetadataCreateWithoutChallengeInput = { + id?: string + name: string + value: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeMetadataUncheckedCreateWithoutChallengeInput = { + id?: string + name: string + value: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeMetadataCreateOrConnectWithoutChallengeInput = { + where: ChallengeMetadataWhereUniqueInput + create: XOR + } + + export type ChallengeMetadataCreateManyChallengeInputEnvelope = { + data: ChallengeMetadataCreateManyChallengeInput | ChallengeMetadataCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengePhaseCreateWithoutChallengeInput = { + id?: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + constraints?: ChallengePhaseConstraintCreateNestedManyWithoutChallengePhaseInput + phase: PhaseCreateNestedOneWithoutChallengePhasesInput + } + + export type ChallengePhaseUncheckedCreateWithoutChallengeInput = { + id?: string + phaseId: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + constraints?: ChallengePhaseConstraintUncheckedCreateNestedManyWithoutChallengePhaseInput + } + + export type ChallengePhaseCreateOrConnectWithoutChallengeInput = { + where: ChallengePhaseWhereUniqueInput + create: XOR + } + + export type ChallengePhaseCreateManyChallengeInputEnvelope = { + data: ChallengePhaseCreateManyChallengeInput | ChallengePhaseCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengePrizeSetCreateWithoutChallengeInput = { + id?: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + prizes?: PrizeCreateNestedManyWithoutPrizeSetInput + } + + export type ChallengePrizeSetUncheckedCreateWithoutChallengeInput = { + id?: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + prizes?: PrizeUncheckedCreateNestedManyWithoutPrizeSetInput + } + + export type ChallengePrizeSetCreateOrConnectWithoutChallengeInput = { + where: ChallengePrizeSetWhereUniqueInput + create: XOR + } + + export type ChallengePrizeSetCreateManyChallengeInputEnvelope = { + data: ChallengePrizeSetCreateManyChallengeInput | ChallengePrizeSetCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengeReviewerCreateWithoutChallengeInput = { + id?: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phase: PhaseCreateNestedOneWithoutChallengeReviewerInput + } + + export type ChallengeReviewerUncheckedCreateWithoutChallengeInput = { + id?: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + phaseId: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeReviewerCreateOrConnectWithoutChallengeInput = { + where: ChallengeReviewerWhereUniqueInput + create: XOR + } + + export type ChallengeReviewerCreateManyChallengeInputEnvelope = { + data: ChallengeReviewerCreateManyChallengeInput | ChallengeReviewerCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengeWinnerCreateWithoutChallengeInput = { + id?: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeWinnerUncheckedCreateWithoutChallengeInput = { + id?: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeWinnerCreateOrConnectWithoutChallengeInput = { + where: ChallengeWinnerWhereUniqueInput + create: XOR + } + + export type ChallengeWinnerCreateManyChallengeInputEnvelope = { + data: ChallengeWinnerCreateManyChallengeInput | ChallengeWinnerCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type AttachmentCreateWithoutChallengeInput = { + id?: string + name: string + fileSize: number + url: string + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type AttachmentUncheckedCreateWithoutChallengeInput = { + id?: string + name: string + fileSize: number + url: string + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type AttachmentCreateOrConnectWithoutChallengeInput = { + where: AttachmentWhereUniqueInput + create: XOR + } + + export type AttachmentCreateManyChallengeInputEnvelope = { + data: AttachmentCreateManyChallengeInput | AttachmentCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengeTermCreateWithoutChallengeInput = { + id?: string + termId: string + roleId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTermUncheckedCreateWithoutChallengeInput = { + id?: string + termId: string + roleId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTermCreateOrConnectWithoutChallengeInput = { + where: ChallengeTermWhereUniqueInput + create: XOR + } + + export type ChallengeTermCreateManyChallengeInputEnvelope = { + data: ChallengeTermCreateManyChallengeInput | ChallengeTermCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type ChallengeSkillCreateWithoutChallengeInput = { + id?: string + skillId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeSkillUncheckedCreateWithoutChallengeInput = { + id?: string + skillId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeSkillCreateOrConnectWithoutChallengeInput = { + where: ChallengeSkillWhereUniqueInput + create: XOR + } + + export type ChallengeSkillCreateManyChallengeInputEnvelope = { + data: ChallengeSkillCreateManyChallengeInput | ChallengeSkillCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type AuditLogCreateWithoutChallengeInput = { + id?: string + fieldName: string + oldValue?: string | null + newValue?: string | null + createdAt?: Date | string + createdBy: string + memberId?: string | null + } + + export type AuditLogUncheckedCreateWithoutChallengeInput = { + id?: string + fieldName: string + oldValue?: string | null + newValue?: string | null + createdAt?: Date | string + createdBy: string + memberId?: string | null + } + + export type AuditLogCreateOrConnectWithoutChallengeInput = { + where: AuditLogWhereUniqueInput + create: XOR + } + + export type AuditLogCreateManyChallengeInputEnvelope = { + data: AuditLogCreateManyChallengeInput | AuditLogCreateManyChallengeInput[] + skipDuplicates?: boolean + } + + export type MemberChallengeAccessWhereUniqueInput = { + AND?: MemberChallengeAccessWhereInput | MemberChallengeAccessWhereInput[] + OR?: MemberChallengeAccessWhereInput[] + NOT?: MemberChallengeAccessWhereInput | MemberChallengeAccessWhereInput[] + challengeId?: StringFilter<"MemberChallengeAccess"> | string + memberId?: StringFilter<"MemberChallengeAccess"> | string + challenge?: XOR + } + + export type ChallengeTypeCreateWithoutChallengesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTypeInput + defaultReviewers?: DefaultChallengeReviewerCreateNestedManyWithoutChallengeTypeInput + } + + export type ChallengeTypeUncheckedCreateWithoutChallengesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTypeInput + defaultReviewers?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTypeInput + } + + export type ChallengeTypeCreateOrConnectWithoutChallengesInput = { + where: ChallengeTypeWhereUniqueInput + create: XOR + } + + export type ChallengeTrackCreateWithoutChallengesInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTrackInput + defaultReviewers?: DefaultChallengeReviewerCreateNestedManyWithoutChallengeTrackInput + } + + export type ChallengeTrackUncheckedCreateWithoutChallengesInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTrackInput + defaultReviewers?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTrackInput + } + + export type ChallengeTrackCreateOrConnectWithoutChallengesInput = { + where: ChallengeTrackWhereUniqueInput + create: XOR + } + + export type TimelineTemplateCreateWithoutChallengesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseCreateNestedManyWithoutTimelineTemplateInput + challengeTimelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateUncheckedCreateWithoutChallengesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseUncheckedCreateNestedManyWithoutTimelineTemplateInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateCreateOrConnectWithoutChallengesInput = { + where: TimelineTemplateWhereUniqueInput + create: XOR + } + + export type ChallengeBillingUpsertWithoutChallengeInput = { + update: XOR + create: XOR + where?: ChallengeBillingWhereInput + } + + export type ChallengeBillingUpdateToOneWithWhereWithoutChallengeInput = { + where?: ChallengeBillingWhereInput + data: XOR + } + + export type ChallengeBillingUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + billingAccountId?: NullableStringFieldUpdateOperationsInput | string | null + markup?: NullableFloatFieldUpdateOperationsInput | number | null + clientBillingRate?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeBillingUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + billingAccountId?: NullableStringFieldUpdateOperationsInput | string | null + markup?: NullableFloatFieldUpdateOperationsInput | number | null + clientBillingRate?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeLegacyUpsertWithoutChallengeInput = { + update: XOR + create: XOR + where?: ChallengeLegacyWhereInput + } + + export type ChallengeLegacyUpdateToOneWithWhereWithoutChallengeInput = { + where?: ChallengeLegacyWhereInput + data: XOR + } + + export type ChallengeLegacyUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + reviewType?: EnumReviewTypeEnumFieldUpdateOperationsInput | $Enums.ReviewTypeEnum + confidentialityType?: StringFieldUpdateOperationsInput | string + forumId?: NullableIntFieldUpdateOperationsInput | number | null + directProjectId?: NullableIntFieldUpdateOperationsInput | number | null + screeningScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + reviewScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + isTask?: BoolFieldUpdateOperationsInput | boolean + useSchedulingAPI?: BoolFieldUpdateOperationsInput | boolean + pureV5Task?: BoolFieldUpdateOperationsInput | boolean + pureV5?: BoolFieldUpdateOperationsInput | boolean + selfService?: BoolFieldUpdateOperationsInput | boolean + selfServiceCopilot?: NullableStringFieldUpdateOperationsInput | string | null + track?: NullableStringFieldUpdateOperationsInput | string | null + subTrack?: NullableStringFieldUpdateOperationsInput | string | null + legacySystemId?: NullableIntFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeLegacyUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + reviewType?: EnumReviewTypeEnumFieldUpdateOperationsInput | $Enums.ReviewTypeEnum + confidentialityType?: StringFieldUpdateOperationsInput | string + forumId?: NullableIntFieldUpdateOperationsInput | number | null + directProjectId?: NullableIntFieldUpdateOperationsInput | number | null + screeningScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + reviewScorecardId?: NullableIntFieldUpdateOperationsInput | number | null + isTask?: BoolFieldUpdateOperationsInput | boolean + useSchedulingAPI?: BoolFieldUpdateOperationsInput | boolean + pureV5Task?: BoolFieldUpdateOperationsInput | boolean + pureV5?: BoolFieldUpdateOperationsInput | boolean + selfService?: BoolFieldUpdateOperationsInput | boolean + selfServiceCopilot?: NullableStringFieldUpdateOperationsInput | string | null + track?: NullableStringFieldUpdateOperationsInput | string | null + subTrack?: NullableStringFieldUpdateOperationsInput | string | null + legacySystemId?: NullableIntFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeConstraintUpsertWithoutChallengeInput = { + update: XOR + create: XOR + where?: ChallengeConstraintWhereInput + } + + export type ChallengeConstraintUpdateToOneWithWhereWithoutChallengeInput = { + where?: ChallengeConstraintWhereInput + data: XOR + } + + export type ChallengeConstraintUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + allowedRegistrants?: ChallengeConstraintUpdateallowedRegistrantsInput | string[] + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeConstraintUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + allowedRegistrants?: ChallengeConstraintUpdateallowedRegistrantsInput | string[] + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeEventUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengeEventWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeEventUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengeEventWhereUniqueInput + data: XOR + } + + export type ChallengeEventUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengeEventScalarWhereInput + data: XOR + } + + export type ChallengeEventScalarWhereInput = { + AND?: ChallengeEventScalarWhereInput | ChallengeEventScalarWhereInput[] + OR?: ChallengeEventScalarWhereInput[] + NOT?: ChallengeEventScalarWhereInput | ChallengeEventScalarWhereInput[] + id?: StringFilter<"ChallengeEvent"> | string + challengeId?: StringFilter<"ChallengeEvent"> | string + eventId?: IntFilter<"ChallengeEvent"> | number + name?: StringNullableFilter<"ChallengeEvent"> | string | null + key?: StringNullableFilter<"ChallengeEvent"> | string | null + createdAt?: DateTimeFilter<"ChallengeEvent"> | Date | string + createdBy?: StringFilter<"ChallengeEvent"> | string + updatedAt?: DateTimeFilter<"ChallengeEvent"> | Date | string + updatedBy?: StringFilter<"ChallengeEvent"> | string + } + + export type ChallengeDiscussionUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengeDiscussionWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeDiscussionUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengeDiscussionWhereUniqueInput + data: XOR + } + + export type ChallengeDiscussionUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengeDiscussionScalarWhereInput + data: XOR + } + + export type ChallengeDiscussionScalarWhereInput = { + AND?: ChallengeDiscussionScalarWhereInput | ChallengeDiscussionScalarWhereInput[] + OR?: ChallengeDiscussionScalarWhereInput[] + NOT?: ChallengeDiscussionScalarWhereInput | ChallengeDiscussionScalarWhereInput[] + id?: StringFilter<"ChallengeDiscussion"> | string + challengeId?: StringFilter<"ChallengeDiscussion"> | string + discussionId?: StringNullableFilter<"ChallengeDiscussion"> | string | null + name?: StringFilter<"ChallengeDiscussion"> | string + type?: EnumDiscussionTypeEnumFilter<"ChallengeDiscussion"> | $Enums.DiscussionTypeEnum + provider?: StringFilter<"ChallengeDiscussion"> | string + url?: StringNullableFilter<"ChallengeDiscussion"> | string | null + createdAt?: DateTimeFilter<"ChallengeDiscussion"> | Date | string + createdBy?: StringFilter<"ChallengeDiscussion"> | string + updatedAt?: DateTimeFilter<"ChallengeDiscussion"> | Date | string + updatedBy?: StringFilter<"ChallengeDiscussion"> | string + } + + export type ChallengeMetadataUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengeMetadataWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeMetadataUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengeMetadataWhereUniqueInput + data: XOR + } + + export type ChallengeMetadataUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengeMetadataScalarWhereInput + data: XOR + } + + export type ChallengeMetadataScalarWhereInput = { + AND?: ChallengeMetadataScalarWhereInput | ChallengeMetadataScalarWhereInput[] + OR?: ChallengeMetadataScalarWhereInput[] + NOT?: ChallengeMetadataScalarWhereInput | ChallengeMetadataScalarWhereInput[] + id?: StringFilter<"ChallengeMetadata"> | string + challengeId?: StringFilter<"ChallengeMetadata"> | string + name?: StringFilter<"ChallengeMetadata"> | string + value?: StringFilter<"ChallengeMetadata"> | string + createdAt?: DateTimeFilter<"ChallengeMetadata"> | Date | string + createdBy?: StringFilter<"ChallengeMetadata"> | string + updatedAt?: DateTimeFilter<"ChallengeMetadata"> | Date | string + updatedBy?: StringFilter<"ChallengeMetadata"> | string + } + + export type ChallengePhaseUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengePhaseWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengePhaseUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengePhaseWhereUniqueInput + data: XOR + } + + export type ChallengePhaseUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengePhaseScalarWhereInput + data: XOR + } + + export type ChallengePhaseScalarWhereInput = { + AND?: ChallengePhaseScalarWhereInput | ChallengePhaseScalarWhereInput[] + OR?: ChallengePhaseScalarWhereInput[] + NOT?: ChallengePhaseScalarWhereInput | ChallengePhaseScalarWhereInput[] + id?: StringFilter<"ChallengePhase"> | string + challengeId?: StringFilter<"ChallengePhase"> | string + phaseId?: StringFilter<"ChallengePhase"> | string + name?: StringFilter<"ChallengePhase"> | string + description?: StringNullableFilter<"ChallengePhase"> | string | null + isOpen?: BoolNullableFilter<"ChallengePhase"> | boolean | null + predecessor?: StringNullableFilter<"ChallengePhase"> | string | null + duration?: IntNullableFilter<"ChallengePhase"> | number | null + scheduledStartDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + scheduledEndDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + actualStartDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + actualEndDate?: DateTimeNullableFilter<"ChallengePhase"> | Date | string | null + createdAt?: DateTimeFilter<"ChallengePhase"> | Date | string + createdBy?: StringFilter<"ChallengePhase"> | string + updatedAt?: DateTimeFilter<"ChallengePhase"> | Date | string + updatedBy?: StringFilter<"ChallengePhase"> | string + } + + export type ChallengePrizeSetUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengePrizeSetWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengePrizeSetUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengePrizeSetWhereUniqueInput + data: XOR + } + + export type ChallengePrizeSetUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengePrizeSetScalarWhereInput + data: XOR + } + + export type ChallengePrizeSetScalarWhereInput = { + AND?: ChallengePrizeSetScalarWhereInput | ChallengePrizeSetScalarWhereInput[] + OR?: ChallengePrizeSetScalarWhereInput[] + NOT?: ChallengePrizeSetScalarWhereInput | ChallengePrizeSetScalarWhereInput[] + id?: StringFilter<"ChallengePrizeSet"> | string + challengeId?: StringFilter<"ChallengePrizeSet"> | string + type?: EnumPrizeSetTypeEnumFilter<"ChallengePrizeSet"> | $Enums.PrizeSetTypeEnum + description?: StringNullableFilter<"ChallengePrizeSet"> | string | null + createdAt?: DateTimeFilter<"ChallengePrizeSet"> | Date | string + createdBy?: StringFilter<"ChallengePrizeSet"> | string + updatedAt?: DateTimeFilter<"ChallengePrizeSet"> | Date | string + updatedBy?: StringFilter<"ChallengePrizeSet"> | string + } + + export type ChallengeReviewerUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengeReviewerWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeReviewerUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengeReviewerWhereUniqueInput + data: XOR + } + + export type ChallengeReviewerUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengeReviewerScalarWhereInput + data: XOR + } + + export type ChallengeReviewerScalarWhereInput = { + AND?: ChallengeReviewerScalarWhereInput | ChallengeReviewerScalarWhereInput[] + OR?: ChallengeReviewerScalarWhereInput[] + NOT?: ChallengeReviewerScalarWhereInput | ChallengeReviewerScalarWhereInput[] + id?: StringFilter<"ChallengeReviewer"> | string + challengeId?: StringFilter<"ChallengeReviewer"> | string + scorecardId?: StringFilter<"ChallengeReviewer"> | string + isMemberReview?: BoolFilter<"ChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableFilter<"ChallengeReviewer"> | number | null + phaseId?: StringFilter<"ChallengeReviewer"> | string + fixedAmount?: FloatNullableFilter<"ChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableFilter<"ChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableFilter<"ChallengeReviewer"> | number | null + type?: EnumReviewOpportunityTypeEnumNullableFilter<"ChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableFilter<"ChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolFilter<"ChallengeReviewer"> | boolean + createdAt?: DateTimeFilter<"ChallengeReviewer"> | Date | string + createdBy?: StringFilter<"ChallengeReviewer"> | string + updatedAt?: DateTimeFilter<"ChallengeReviewer"> | Date | string + updatedBy?: StringFilter<"ChallengeReviewer"> | string + } + + export type ChallengeWinnerUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengeWinnerWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeWinnerUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengeWinnerWhereUniqueInput + data: XOR + } + + export type ChallengeWinnerUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengeWinnerScalarWhereInput + data: XOR + } + + export type ChallengeWinnerScalarWhereInput = { + AND?: ChallengeWinnerScalarWhereInput | ChallengeWinnerScalarWhereInput[] + OR?: ChallengeWinnerScalarWhereInput[] + NOT?: ChallengeWinnerScalarWhereInput | ChallengeWinnerScalarWhereInput[] + id?: StringFilter<"ChallengeWinner"> | string + challengeId?: StringFilter<"ChallengeWinner"> | string + userId?: IntFilter<"ChallengeWinner"> | number + handle?: StringFilter<"ChallengeWinner"> | string + placement?: IntFilter<"ChallengeWinner"> | number + type?: EnumPrizeSetTypeEnumFilter<"ChallengeWinner"> | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFilter<"ChallengeWinner"> | Date | string + createdBy?: StringFilter<"ChallengeWinner"> | string + updatedAt?: DateTimeFilter<"ChallengeWinner"> | Date | string + updatedBy?: StringFilter<"ChallengeWinner"> | string + } + + export type AttachmentUpsertWithWhereUniqueWithoutChallengeInput = { + where: AttachmentWhereUniqueInput + update: XOR + create: XOR + } + + export type AttachmentUpdateWithWhereUniqueWithoutChallengeInput = { + where: AttachmentWhereUniqueInput + data: XOR + } + + export type AttachmentUpdateManyWithWhereWithoutChallengeInput = { + where: AttachmentScalarWhereInput + data: XOR + } + + export type AttachmentScalarWhereInput = { + AND?: AttachmentScalarWhereInput | AttachmentScalarWhereInput[] + OR?: AttachmentScalarWhereInput[] + NOT?: AttachmentScalarWhereInput | AttachmentScalarWhereInput[] + id?: StringFilter<"Attachment"> | string + challengeId?: StringFilter<"Attachment"> | string + name?: StringFilter<"Attachment"> | string + fileSize?: IntFilter<"Attachment"> | number + url?: StringFilter<"Attachment"> | string + description?: StringNullableFilter<"Attachment"> | string | null + createdAt?: DateTimeFilter<"Attachment"> | Date | string + createdBy?: StringFilter<"Attachment"> | string + updatedAt?: DateTimeFilter<"Attachment"> | Date | string + updatedBy?: StringFilter<"Attachment"> | string + } + + export type ChallengeTermUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengeTermWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeTermUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengeTermWhereUniqueInput + data: XOR + } + + export type ChallengeTermUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengeTermScalarWhereInput + data: XOR + } + + export type ChallengeTermScalarWhereInput = { + AND?: ChallengeTermScalarWhereInput | ChallengeTermScalarWhereInput[] + OR?: ChallengeTermScalarWhereInput[] + NOT?: ChallengeTermScalarWhereInput | ChallengeTermScalarWhereInput[] + id?: StringFilter<"ChallengeTerm"> | string + challengeId?: StringFilter<"ChallengeTerm"> | string + termId?: StringFilter<"ChallengeTerm"> | string + roleId?: StringFilter<"ChallengeTerm"> | string + createdAt?: DateTimeFilter<"ChallengeTerm"> | Date | string + createdBy?: StringFilter<"ChallengeTerm"> | string + updatedAt?: DateTimeFilter<"ChallengeTerm"> | Date | string + updatedBy?: StringFilter<"ChallengeTerm"> | string + } + + export type ChallengeSkillUpsertWithWhereUniqueWithoutChallengeInput = { + where: ChallengeSkillWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeSkillUpdateWithWhereUniqueWithoutChallengeInput = { + where: ChallengeSkillWhereUniqueInput + data: XOR + } + + export type ChallengeSkillUpdateManyWithWhereWithoutChallengeInput = { + where: ChallengeSkillScalarWhereInput + data: XOR + } + + export type ChallengeSkillScalarWhereInput = { + AND?: ChallengeSkillScalarWhereInput | ChallengeSkillScalarWhereInput[] + OR?: ChallengeSkillScalarWhereInput[] + NOT?: ChallengeSkillScalarWhereInput | ChallengeSkillScalarWhereInput[] + id?: StringFilter<"ChallengeSkill"> | string + challengeId?: StringFilter<"ChallengeSkill"> | string + skillId?: StringFilter<"ChallengeSkill"> | string + createdAt?: DateTimeFilter<"ChallengeSkill"> | Date | string + createdBy?: StringFilter<"ChallengeSkill"> | string + updatedAt?: DateTimeFilter<"ChallengeSkill"> | Date | string + updatedBy?: StringFilter<"ChallengeSkill"> | string + } + + export type AuditLogUpsertWithWhereUniqueWithoutChallengeInput = { + where: AuditLogWhereUniqueInput + update: XOR + create: XOR + } + + export type AuditLogUpdateWithWhereUniqueWithoutChallengeInput = { + where: AuditLogWhereUniqueInput + data: XOR + } + + export type AuditLogUpdateManyWithWhereWithoutChallengeInput = { + where: AuditLogScalarWhereInput + data: XOR + } + + export type AuditLogScalarWhereInput = { + AND?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[] + OR?: AuditLogScalarWhereInput[] + NOT?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[] + id?: StringFilter<"AuditLog"> | string + challengeId?: StringNullableFilter<"AuditLog"> | string | null + fieldName?: StringFilter<"AuditLog"> | string + oldValue?: StringNullableFilter<"AuditLog"> | string | null + newValue?: StringNullableFilter<"AuditLog"> | string | null + createdAt?: DateTimeFilter<"AuditLog"> | Date | string + createdBy?: StringFilter<"AuditLog"> | string + memberId?: StringNullableFilter<"AuditLog"> | string | null + } + + export type MemberChallengeAccessUpdateWithWhereUniqueWithoutChallengeInput = { + where: MemberChallengeAccessWhereUniqueInput + data: XOR + } + + export type MemberChallengeAccessUpdateManyWithWhereWithoutChallengeInput = { + where: MemberChallengeAccessScalarWhereInput + data: XOR + } + + export type MemberChallengeAccessScalarWhereInput = { + AND?: MemberChallengeAccessScalarWhereInput | MemberChallengeAccessScalarWhereInput[] + OR?: MemberChallengeAccessScalarWhereInput[] + NOT?: MemberChallengeAccessScalarWhereInput | MemberChallengeAccessScalarWhereInput[] + challengeId?: StringFilter<"MemberChallengeAccess"> | string + memberId?: StringFilter<"MemberChallengeAccess"> | string + } + + export type ChallengeTypeUpsertWithoutChallengesInput = { + update: XOR + create: XOR + where?: ChallengeTypeWhereInput + } + + export type ChallengeTypeUpdateToOneWithWhereWithoutChallengesInput = { + where?: ChallengeTypeWhereInput + data: XOR + } + + export type ChallengeTypeUpdateWithoutChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTypeNestedInput + defaultReviewers?: DefaultChallengeReviewerUpdateManyWithoutChallengeTypeNestedInput + } + + export type ChallengeTypeUncheckedUpdateWithoutChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTypeNestedInput + defaultReviewers?: DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTypeNestedInput + } + + export type ChallengeTrackUpsertWithoutChallengesInput = { + update: XOR + create: XOR + where?: ChallengeTrackWhereInput + } + + export type ChallengeTrackUpdateToOneWithWhereWithoutChallengesInput = { + where?: ChallengeTrackWhereInput + data: XOR + } + + export type ChallengeTrackUpdateWithoutChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTrackNestedInput + defaultReviewers?: DefaultChallengeReviewerUpdateManyWithoutChallengeTrackNestedInput + } + + export type ChallengeTrackUncheckedUpdateWithoutChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTrackNestedInput + defaultReviewers?: DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTrackNestedInput + } + + export type TimelineTemplateUpsertWithoutChallengesInput = { + update: XOR + create: XOR + where?: TimelineTemplateWhereInput + } + + export type TimelineTemplateUpdateToOneWithWhereWithoutChallengesInput = { + where?: TimelineTemplateWhereInput + data: XOR + } + + export type TimelineTemplateUpdateWithoutChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUpdateManyWithoutTimelineTemplateNestedInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUpdateManyWithoutTimelineTemplateNestedInput + } + + export type TimelineTemplateUncheckedUpdateWithoutChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUncheckedUpdateManyWithoutTimelineTemplateNestedInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedUpdateManyWithoutTimelineTemplateNestedInput + } + + export type ChallengeCreateWithoutTypeInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutTypeInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutTypeInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeCreateManyTypeInputEnvelope = { + data: ChallengeCreateManyTypeInput | ChallengeCreateManyTypeInput[] + skipDuplicates?: boolean + } + + export type ChallengeTimelineTemplateCreateWithoutTypeInput = { + id?: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplate: TimelineTemplateCreateNestedOneWithoutChallengeTimelineTemplatesInput + track: ChallengeTrackCreateNestedOneWithoutTimelineTemplatesInput + } + + export type ChallengeTimelineTemplateUncheckedCreateWithoutTypeInput = { + id?: string + trackId: string + timelineTemplateId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateCreateOrConnectWithoutTypeInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + create: XOR + } + + export type ChallengeTimelineTemplateCreateManyTypeInputEnvelope = { + data: ChallengeTimelineTemplateCreateManyTypeInput | ChallengeTimelineTemplateCreateManyTypeInput[] + skipDuplicates?: boolean + } + + export type DefaultChallengeReviewerCreateWithoutChallengeTypeInput = { + id?: string + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengeTrack: ChallengeTrackCreateNestedOneWithoutDefaultReviewersInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutDefaultChallengeReviewerInput + phase?: PhaseCreateNestedOneWithoutDefaultChallengeReviewerInput + } + + export type DefaultChallengeReviewerUncheckedCreateWithoutChallengeTypeInput = { + id?: string + trackId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateOrConnectWithoutChallengeTypeInput = { + where: DefaultChallengeReviewerWhereUniqueInput + create: XOR + } + + export type DefaultChallengeReviewerCreateManyChallengeTypeInputEnvelope = { + data: DefaultChallengeReviewerCreateManyChallengeTypeInput | DefaultChallengeReviewerCreateManyChallengeTypeInput[] + skipDuplicates?: boolean + } + + export type ChallengeUpsertWithWhereUniqueWithoutTypeInput = { + where: ChallengeWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeUpdateWithWhereUniqueWithoutTypeInput = { + where: ChallengeWhereUniqueInput + data: XOR + } + + export type ChallengeUpdateManyWithWhereWithoutTypeInput = { + where: ChallengeScalarWhereInput + data: XOR + } + + export type ChallengeScalarWhereInput = { + AND?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + OR?: ChallengeScalarWhereInput[] + NOT?: ChallengeScalarWhereInput | ChallengeScalarWhereInput[] + id?: StringFilter<"Challenge"> | string + name?: StringFilter<"Challenge"> | string + description?: StringNullableFilter<"Challenge"> | string | null + privateDescription?: StringNullableFilter<"Challenge"> | string | null + challengeSource?: StringNullableFilter<"Challenge"> | string | null + descriptionFormat?: StringNullableFilter<"Challenge"> | string | null + projectId?: IntNullableFilter<"Challenge"> | number | null + typeId?: StringFilter<"Challenge"> | string + trackId?: StringFilter<"Challenge"> | string + timelineTemplateId?: StringNullableFilter<"Challenge"> | string | null + overviewTotalPrizes?: FloatNullableFilter<"Challenge"> | number | null + numOfRegistrants?: IntFilter<"Challenge"> | number + numOfSubmissions?: IntFilter<"Challenge"> | number + numOfCheckpointSubmissions?: IntFilter<"Challenge"> | number + currentPhaseNames?: StringNullableListFilter<"Challenge"> + wiproAllowed?: BoolFilter<"Challenge"> | boolean + tags?: StringNullableListFilter<"Challenge"> + groups?: StringNullableListFilter<"Challenge"> + taskIsTask?: BoolFilter<"Challenge"> | boolean + taskIsAssigned?: BoolFilter<"Challenge"> | boolean + taskMemberId?: StringNullableFilter<"Challenge"> | string | null + submissionStartDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + submissionEndDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + registrationStartDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + registrationEndDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + startDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + endDate?: DateTimeNullableFilter<"Challenge"> | Date | string | null + legacyId?: IntNullableFilter<"Challenge"> | number | null + status?: EnumChallengeStatusEnumFilter<"Challenge"> | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFilter<"Challenge"> | Date | string + createdBy?: StringFilter<"Challenge"> | string + updatedAt?: DateTimeFilter<"Challenge"> | Date | string + updatedBy?: StringFilter<"Challenge"> | string + } + + export type ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTypeInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTypeInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + data: XOR + } + + export type ChallengeTimelineTemplateUpdateManyWithWhereWithoutTypeInput = { + where: ChallengeTimelineTemplateScalarWhereInput + data: XOR + } + + export type ChallengeTimelineTemplateScalarWhereInput = { + AND?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + OR?: ChallengeTimelineTemplateScalarWhereInput[] + NOT?: ChallengeTimelineTemplateScalarWhereInput | ChallengeTimelineTemplateScalarWhereInput[] + id?: StringFilter<"ChallengeTimelineTemplate"> | string + typeId?: StringFilter<"ChallengeTimelineTemplate"> | string + trackId?: StringFilter<"ChallengeTimelineTemplate"> | string + timelineTemplateId?: StringFilter<"ChallengeTimelineTemplate"> | string + isDefault?: BoolFilter<"ChallengeTimelineTemplate"> | boolean + createdAt?: DateTimeFilter<"ChallengeTimelineTemplate"> | Date | string + createdBy?: StringFilter<"ChallengeTimelineTemplate"> | string + updatedAt?: DateTimeFilter<"ChallengeTimelineTemplate"> | Date | string + updatedBy?: StringFilter<"ChallengeTimelineTemplate"> | string + } + + export type DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTypeInput = { + where: DefaultChallengeReviewerWhereUniqueInput + update: XOR + create: XOR + } + + export type DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTypeInput = { + where: DefaultChallengeReviewerWhereUniqueInput + data: XOR + } + + export type DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTypeInput = { + where: DefaultChallengeReviewerScalarWhereInput + data: XOR + } + + export type DefaultChallengeReviewerScalarWhereInput = { + AND?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + OR?: DefaultChallengeReviewerScalarWhereInput[] + NOT?: DefaultChallengeReviewerScalarWhereInput | DefaultChallengeReviewerScalarWhereInput[] + id?: StringFilter<"DefaultChallengeReviewer"> | string + typeId?: StringFilter<"DefaultChallengeReviewer"> | string + trackId?: StringFilter<"DefaultChallengeReviewer"> | string + timelineTemplateId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + scorecardId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + isMemberReview?: BoolFilter<"DefaultChallengeReviewer"> | boolean + memberReviewerCount?: IntNullableFilter<"DefaultChallengeReviewer"> | number | null + phaseName?: StringFilter<"DefaultChallengeReviewer"> | string + phaseId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + fixedAmount?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + baseCoefficient?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + incrementalCoefficient?: FloatNullableFilter<"DefaultChallengeReviewer"> | number | null + opportunityType?: EnumReviewOpportunityTypeEnumNullableFilter<"DefaultChallengeReviewer"> | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: StringNullableFilter<"DefaultChallengeReviewer"> | string | null + shouldOpenOpportunity?: BoolFilter<"DefaultChallengeReviewer"> | boolean + createdAt?: DateTimeFilter<"DefaultChallengeReviewer"> | Date | string + createdBy?: StringFilter<"DefaultChallengeReviewer"> | string + updatedAt?: DateTimeFilter<"DefaultChallengeReviewer"> | Date | string + updatedBy?: StringFilter<"DefaultChallengeReviewer"> | string + } + + export type ChallengeCreateWithoutTrackInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutTrackInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutTrackInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeCreateManyTrackInputEnvelope = { + data: ChallengeCreateManyTrackInput | ChallengeCreateManyTrackInput[] + skipDuplicates?: boolean + } + + export type ChallengeTimelineTemplateCreateWithoutTrackInput = { + id?: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + timelineTemplate: TimelineTemplateCreateNestedOneWithoutChallengeTimelineTemplatesInput + type: ChallengeTypeCreateNestedOneWithoutTimelineTemplatesInput + } + + export type ChallengeTimelineTemplateUncheckedCreateWithoutTrackInput = { + id?: string + typeId: string + timelineTemplateId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateCreateOrConnectWithoutTrackInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + create: XOR + } + + export type ChallengeTimelineTemplateCreateManyTrackInputEnvelope = { + data: ChallengeTimelineTemplateCreateManyTrackInput | ChallengeTimelineTemplateCreateManyTrackInput[] + skipDuplicates?: boolean + } + + export type DefaultChallengeReviewerCreateWithoutChallengeTrackInput = { + id?: string + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengeType: ChallengeTypeCreateNestedOneWithoutDefaultReviewersInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutDefaultChallengeReviewerInput + phase?: PhaseCreateNestedOneWithoutDefaultChallengeReviewerInput + } + + export type DefaultChallengeReviewerUncheckedCreateWithoutChallengeTrackInput = { + id?: string + typeId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateOrConnectWithoutChallengeTrackInput = { + where: DefaultChallengeReviewerWhereUniqueInput + create: XOR + } + + export type DefaultChallengeReviewerCreateManyChallengeTrackInputEnvelope = { + data: DefaultChallengeReviewerCreateManyChallengeTrackInput | DefaultChallengeReviewerCreateManyChallengeTrackInput[] + skipDuplicates?: boolean + } + + export type ChallengeUpsertWithWhereUniqueWithoutTrackInput = { + where: ChallengeWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeUpdateWithWhereUniqueWithoutTrackInput = { + where: ChallengeWhereUniqueInput + data: XOR + } + + export type ChallengeUpdateManyWithWhereWithoutTrackInput = { + where: ChallengeScalarWhereInput + data: XOR + } + + export type ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTrackInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTrackInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + data: XOR + } + + export type ChallengeTimelineTemplateUpdateManyWithWhereWithoutTrackInput = { + where: ChallengeTimelineTemplateScalarWhereInput + data: XOR + } + + export type DefaultChallengeReviewerUpsertWithWhereUniqueWithoutChallengeTrackInput = { + where: DefaultChallengeReviewerWhereUniqueInput + update: XOR + create: XOR + } + + export type DefaultChallengeReviewerUpdateWithWhereUniqueWithoutChallengeTrackInput = { + where: DefaultChallengeReviewerWhereUniqueInput + data: XOR + } + + export type DefaultChallengeReviewerUpdateManyWithWhereWithoutChallengeTrackInput = { + where: DefaultChallengeReviewerScalarWhereInput + data: XOR + } + + export type TimelineTemplateCreateWithoutChallengeTimelineTemplatesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateUncheckedCreateWithoutChallengeTimelineTemplatesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseUncheckedCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeUncheckedCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateCreateOrConnectWithoutChallengeTimelineTemplatesInput = { + where: TimelineTemplateWhereUniqueInput + create: XOR + } + + export type ChallengeTrackCreateWithoutTimelineTemplatesInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeCreateNestedManyWithoutTrackInput + defaultReviewers?: DefaultChallengeReviewerCreateNestedManyWithoutChallengeTrackInput + } + + export type ChallengeTrackUncheckedCreateWithoutTimelineTemplatesInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeUncheckedCreateNestedManyWithoutTrackInput + defaultReviewers?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTrackInput + } + + export type ChallengeTrackCreateOrConnectWithoutTimelineTemplatesInput = { + where: ChallengeTrackWhereUniqueInput + create: XOR + } + + export type ChallengeTypeCreateWithoutTimelineTemplatesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeCreateNestedManyWithoutTypeInput + defaultReviewers?: DefaultChallengeReviewerCreateNestedManyWithoutChallengeTypeInput + } + + export type ChallengeTypeUncheckedCreateWithoutTimelineTemplatesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeUncheckedCreateNestedManyWithoutTypeInput + defaultReviewers?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutChallengeTypeInput + } + + export type ChallengeTypeCreateOrConnectWithoutTimelineTemplatesInput = { + where: ChallengeTypeWhereUniqueInput + create: XOR + } + + export type TimelineTemplateUpsertWithoutChallengeTimelineTemplatesInput = { + update: XOR + create: XOR + where?: TimelineTemplateWhereInput + } + + export type TimelineTemplateUpdateToOneWithWhereWithoutChallengeTimelineTemplatesInput = { + where?: TimelineTemplateWhereInput + data: XOR + } + + export type TimelineTemplateUpdateWithoutChallengeTimelineTemplatesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUpdateManyWithoutTimelineTemplateNestedInput + } + + export type TimelineTemplateUncheckedUpdateWithoutChallengeTimelineTemplatesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUncheckedUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUncheckedUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedUpdateManyWithoutTimelineTemplateNestedInput + } + + export type ChallengeTrackUpsertWithoutTimelineTemplatesInput = { + update: XOR + create: XOR + where?: ChallengeTrackWhereInput + } + + export type ChallengeTrackUpdateToOneWithWhereWithoutTimelineTemplatesInput = { + where?: ChallengeTrackWhereInput + data: XOR + } + + export type ChallengeTrackUpdateWithoutTimelineTemplatesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUpdateManyWithoutTrackNestedInput + defaultReviewers?: DefaultChallengeReviewerUpdateManyWithoutChallengeTrackNestedInput + } + + export type ChallengeTrackUncheckedUpdateWithoutTimelineTemplatesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUncheckedUpdateManyWithoutTrackNestedInput + defaultReviewers?: DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTrackNestedInput + } + + export type ChallengeTypeUpsertWithoutTimelineTemplatesInput = { + update: XOR + create: XOR + where?: ChallengeTypeWhereInput + } + + export type ChallengeTypeUpdateToOneWithWhereWithoutTimelineTemplatesInput = { + where?: ChallengeTypeWhereInput + data: XOR + } + + export type ChallengeTypeUpdateWithoutTimelineTemplatesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUpdateManyWithoutTypeNestedInput + defaultReviewers?: DefaultChallengeReviewerUpdateManyWithoutChallengeTypeNestedInput + } + + export type ChallengeTypeUncheckedUpdateWithoutTimelineTemplatesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUncheckedUpdateManyWithoutTypeNestedInput + defaultReviewers?: DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTypeNestedInput + } + + export type ChallengeCreateWithoutAuditLogsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutAuditLogsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutAuditLogsInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutAuditLogsInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutAuditLogsInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutAuditLogsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutAuditLogsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutAttachmentsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutAttachmentsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutAttachmentsInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutAttachmentsInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutAttachmentsInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutAttachmentsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutAttachmentsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutMetadataInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutMetadataInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutMetadataInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutMetadataInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutMetadataInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutMetadataInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutMetadataInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengePrizeSetCreateWithoutPrizesInput = { + id?: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutPrizeSetsInput + } + + export type ChallengePrizeSetUncheckedCreateWithoutPrizesInput = { + id?: string + challengeId: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePrizeSetCreateOrConnectWithoutPrizesInput = { + where: ChallengePrizeSetWhereUniqueInput + create: XOR + } + + export type ChallengePrizeSetUpsertWithoutPrizesInput = { + update: XOR + create: XOR + where?: ChallengePrizeSetWhereInput + } + + export type ChallengePrizeSetUpdateToOneWithWhereWithoutPrizesInput = { + where?: ChallengePrizeSetWhereInput + data: XOR + } + + export type ChallengePrizeSetUpdateWithoutPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutPrizeSetsNestedInput + } + + export type ChallengePrizeSetUncheckedUpdateWithoutPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeCreateWithoutWinnersInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutWinnersInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutWinnersInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutWinnersInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutWinnersInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutWinnersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutWinnersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutTermsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutTermsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutTermsInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutTermsInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutTermsInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutTermsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutTermsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutSkillsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutSkillsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutSkillsInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutSkillsInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutSkillsInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutSkillsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutSkillsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutBillingRecordInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutBillingRecordInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutBillingRecordInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutBillingRecordInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutBillingRecordInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutBillingRecordInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutBillingRecordInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutLegacyRecordInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutLegacyRecordInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutLegacyRecordInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutLegacyRecordInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutLegacyRecordInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutLegacyRecordInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutLegacyRecordInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutEventsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutEventsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutEventsInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutEventsInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutEventsInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutEventsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutEventsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutDiscussionsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutDiscussionsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutDiscussionsInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeDiscussionOptionCreateWithoutDiscussionInput = { + id?: string + optionKey: string + optionValue: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionOptionUncheckedCreateWithoutDiscussionInput = { + id?: string + optionKey: string + optionValue: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionOptionCreateOrConnectWithoutDiscussionInput = { + where: ChallengeDiscussionOptionWhereUniqueInput + create: XOR + } + + export type ChallengeDiscussionOptionCreateManyDiscussionInputEnvelope = { + data: ChallengeDiscussionOptionCreateManyDiscussionInput | ChallengeDiscussionOptionCreateManyDiscussionInput[] + skipDuplicates?: boolean + } + + export type ChallengeUpsertWithoutDiscussionsInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutDiscussionsInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutDiscussionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutDiscussionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeDiscussionOptionUpsertWithWhereUniqueWithoutDiscussionInput = { + where: ChallengeDiscussionOptionWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeDiscussionOptionUpdateWithWhereUniqueWithoutDiscussionInput = { + where: ChallengeDiscussionOptionWhereUniqueInput + data: XOR + } + + export type ChallengeDiscussionOptionUpdateManyWithWhereWithoutDiscussionInput = { + where: ChallengeDiscussionOptionScalarWhereInput + data: XOR + } + + export type ChallengeDiscussionOptionScalarWhereInput = { + AND?: ChallengeDiscussionOptionScalarWhereInput | ChallengeDiscussionOptionScalarWhereInput[] + OR?: ChallengeDiscussionOptionScalarWhereInput[] + NOT?: ChallengeDiscussionOptionScalarWhereInput | ChallengeDiscussionOptionScalarWhereInput[] + id?: StringFilter<"ChallengeDiscussionOption"> | string + discussionId?: StringFilter<"ChallengeDiscussionOption"> | string + optionKey?: StringFilter<"ChallengeDiscussionOption"> | string + optionValue?: StringFilter<"ChallengeDiscussionOption"> | string + createdAt?: DateTimeFilter<"ChallengeDiscussionOption"> | Date | string + createdBy?: StringFilter<"ChallengeDiscussionOption"> | string + updatedAt?: DateTimeFilter<"ChallengeDiscussionOption"> | Date | string + updatedBy?: StringFilter<"ChallengeDiscussionOption"> | string + } + + export type ChallengeDiscussionCreateWithoutOptionsInput = { + id?: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutDiscussionsInput + } + + export type ChallengeDiscussionUncheckedCreateWithoutOptionsInput = { + id?: string + challengeId: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionCreateOrConnectWithoutOptionsInput = { + where: ChallengeDiscussionWhereUniqueInput + create: XOR + } + + export type ChallengeDiscussionUpsertWithoutOptionsInput = { + update: XOR + create: XOR + where?: ChallengeDiscussionWhereInput + } + + export type ChallengeDiscussionUpdateToOneWithWhereWithoutOptionsInput = { + where?: ChallengeDiscussionWhereInput + data: XOR + } + + export type ChallengeDiscussionUpdateWithoutOptionsInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutDiscussionsNestedInput + } + + export type ChallengeDiscussionUncheckedUpdateWithoutOptionsInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeCreateWithoutConstraintRecordInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutConstraintRecordInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutConstraintRecordInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutConstraintRecordInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutConstraintRecordInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutConstraintRecordInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutConstraintRecordInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengePhaseCreateWithoutPhaseInput = { + id?: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + constraints?: ChallengePhaseConstraintCreateNestedManyWithoutChallengePhaseInput + challenge: ChallengeCreateNestedOneWithoutPhasesInput + } + + export type ChallengePhaseUncheckedCreateWithoutPhaseInput = { + id?: string + challengeId: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + constraints?: ChallengePhaseConstraintUncheckedCreateNestedManyWithoutChallengePhaseInput + } + + export type ChallengePhaseCreateOrConnectWithoutPhaseInput = { + where: ChallengePhaseWhereUniqueInput + create: XOR + } + + export type ChallengePhaseCreateManyPhaseInputEnvelope = { + data: ChallengePhaseCreateManyPhaseInput | ChallengePhaseCreateManyPhaseInput[] + skipDuplicates?: boolean + } + + export type ChallengeReviewerCreateWithoutPhaseInput = { + id?: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutReviewersInput + } + + export type ChallengeReviewerUncheckedCreateWithoutPhaseInput = { + id?: string + challengeId: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeReviewerCreateOrConnectWithoutPhaseInput = { + where: ChallengeReviewerWhereUniqueInput + create: XOR + } + + export type ChallengeReviewerCreateManyPhaseInputEnvelope = { + data: ChallengeReviewerCreateManyPhaseInput | ChallengeReviewerCreateManyPhaseInput[] + skipDuplicates?: boolean + } + + export type DefaultChallengeReviewerCreateWithoutPhaseInput = { + id?: string + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengeType: ChallengeTypeCreateNestedOneWithoutDefaultReviewersInput + challengeTrack: ChallengeTrackCreateNestedOneWithoutDefaultReviewersInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutDefaultChallengeReviewerInput + } + + export type DefaultChallengeReviewerUncheckedCreateWithoutPhaseInput = { + id?: string + typeId: string + trackId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateOrConnectWithoutPhaseInput = { + where: DefaultChallengeReviewerWhereUniqueInput + create: XOR + } + + export type DefaultChallengeReviewerCreateManyPhaseInputEnvelope = { + data: DefaultChallengeReviewerCreateManyPhaseInput | DefaultChallengeReviewerCreateManyPhaseInput[] + skipDuplicates?: boolean + } + + export type ChallengePhaseUpsertWithWhereUniqueWithoutPhaseInput = { + where: ChallengePhaseWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengePhaseUpdateWithWhereUniqueWithoutPhaseInput = { + where: ChallengePhaseWhereUniqueInput + data: XOR + } + + export type ChallengePhaseUpdateManyWithWhereWithoutPhaseInput = { + where: ChallengePhaseScalarWhereInput + data: XOR + } + + export type ChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput = { + where: ChallengeReviewerWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput = { + where: ChallengeReviewerWhereUniqueInput + data: XOR + } + + export type ChallengeReviewerUpdateManyWithWhereWithoutPhaseInput = { + where: ChallengeReviewerScalarWhereInput + data: XOR + } + + export type DefaultChallengeReviewerUpsertWithWhereUniqueWithoutPhaseInput = { + where: DefaultChallengeReviewerWhereUniqueInput + update: XOR + create: XOR + } + + export type DefaultChallengeReviewerUpdateWithWhereUniqueWithoutPhaseInput = { + where: DefaultChallengeReviewerWhereUniqueInput + data: XOR + } + + export type DefaultChallengeReviewerUpdateManyWithWhereWithoutPhaseInput = { + where: DefaultChallengeReviewerScalarWhereInput + data: XOR + } + + export type ChallengePhaseConstraintCreateWithoutChallengePhaseInput = { + id?: string + name: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseConstraintUncheckedCreateWithoutChallengePhaseInput = { + id?: string + name: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseConstraintCreateOrConnectWithoutChallengePhaseInput = { + where: ChallengePhaseConstraintWhereUniqueInput + create: XOR + } + + export type ChallengePhaseConstraintCreateManyChallengePhaseInputEnvelope = { + data: ChallengePhaseConstraintCreateManyChallengePhaseInput | ChallengePhaseConstraintCreateManyChallengePhaseInput[] + skipDuplicates?: boolean + } + + export type ChallengeCreateWithoutPhasesInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutPhasesInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutPhasesInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type PhaseCreateWithoutChallengePhasesInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + ChallengeReviewer?: ChallengeReviewerCreateNestedManyWithoutPhaseInput + DefaultChallengeReviewer?: DefaultChallengeReviewerCreateNestedManyWithoutPhaseInput + } + + export type PhaseUncheckedCreateWithoutChallengePhasesInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + ChallengeReviewer?: ChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput + } + + export type PhaseCreateOrConnectWithoutChallengePhasesInput = { + where: PhaseWhereUniqueInput + create: XOR + } + + export type ChallengePhaseConstraintUpsertWithWhereUniqueWithoutChallengePhaseInput = { + where: ChallengePhaseConstraintWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengePhaseConstraintUpdateWithWhereUniqueWithoutChallengePhaseInput = { + where: ChallengePhaseConstraintWhereUniqueInput + data: XOR + } + + export type ChallengePhaseConstraintUpdateManyWithWhereWithoutChallengePhaseInput = { + where: ChallengePhaseConstraintScalarWhereInput + data: XOR + } + + export type ChallengePhaseConstraintScalarWhereInput = { + AND?: ChallengePhaseConstraintScalarWhereInput | ChallengePhaseConstraintScalarWhereInput[] + OR?: ChallengePhaseConstraintScalarWhereInput[] + NOT?: ChallengePhaseConstraintScalarWhereInput | ChallengePhaseConstraintScalarWhereInput[] + id?: StringFilter<"ChallengePhaseConstraint"> | string + challengePhaseId?: StringFilter<"ChallengePhaseConstraint"> | string + name?: StringFilter<"ChallengePhaseConstraint"> | string + value?: IntFilter<"ChallengePhaseConstraint"> | number + createdAt?: DateTimeFilter<"ChallengePhaseConstraint"> | Date | string + createdBy?: StringFilter<"ChallengePhaseConstraint"> | string + updatedAt?: DateTimeFilter<"ChallengePhaseConstraint"> | Date | string + updatedBy?: StringFilter<"ChallengePhaseConstraint"> | string + } + + export type ChallengeUpsertWithoutPhasesInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutPhasesInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutPhasesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutPhasesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type PhaseUpsertWithoutChallengePhasesInput = { + update: XOR + create: XOR + where?: PhaseWhereInput + } + + export type PhaseUpdateToOneWithWhereWithoutChallengePhasesInput = { + where?: PhaseWhereInput + data: XOR + } + + export type PhaseUpdateWithoutChallengePhasesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + ChallengeReviewer?: ChallengeReviewerUpdateManyWithoutPhaseNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUpdateManyWithoutPhaseNestedInput + } + + export type PhaseUncheckedUpdateWithoutChallengePhasesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + ChallengeReviewer?: ChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput + } + + export type ChallengePhaseCreateWithoutConstraintsInput = { + id?: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenge: ChallengeCreateNestedOneWithoutPhasesInput + phase: PhaseCreateNestedOneWithoutChallengePhasesInput + } + + export type ChallengePhaseUncheckedCreateWithoutConstraintsInput = { + id?: string + challengeId: string + phaseId: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseCreateOrConnectWithoutConstraintsInput = { + where: ChallengePhaseWhereUniqueInput + create: XOR + } + + export type ChallengePhaseUpsertWithoutConstraintsInput = { + update: XOR + create: XOR + where?: ChallengePhaseWhereInput + } + + export type ChallengePhaseUpdateToOneWithWhereWithoutConstraintsInput = { + where?: ChallengePhaseWhereInput + data: XOR + } + + export type ChallengePhaseUpdateWithoutConstraintsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutPhasesNestedInput + phase?: PhaseUpdateOneRequiredWithoutChallengePhasesNestedInput + } + + export type ChallengePhaseUncheckedUpdateWithoutConstraintsInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PrizeCreateWithoutPrizeSetInput = { + id?: string + description?: string | null + type: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type PrizeUncheckedCreateWithoutPrizeSetInput = { + id?: string + description?: string | null + type: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type PrizeCreateOrConnectWithoutPrizeSetInput = { + where: PrizeWhereUniqueInput + create: XOR + } + + export type PrizeCreateManyPrizeSetInputEnvelope = { + data: PrizeCreateManyPrizeSetInput | PrizeCreateManyPrizeSetInput[] + skipDuplicates?: boolean + } + + export type ChallengeCreateWithoutPrizeSetsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutPrizeSetsInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutPrizeSetsInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type PrizeUpsertWithWhereUniqueWithoutPrizeSetInput = { + where: PrizeWhereUniqueInput + update: XOR + create: XOR + } + + export type PrizeUpdateWithWhereUniqueWithoutPrizeSetInput = { + where: PrizeWhereUniqueInput + data: XOR + } + + export type PrizeUpdateManyWithWhereWithoutPrizeSetInput = { + where: PrizeScalarWhereInput + data: XOR + } + + export type PrizeScalarWhereInput = { + AND?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + OR?: PrizeScalarWhereInput[] + NOT?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + id?: StringFilter<"Prize"> | string + description?: StringNullableFilter<"Prize"> | string | null + prizeSetId?: StringFilter<"Prize"> | string + type?: StringFilter<"Prize"> | string + value?: FloatFilter<"Prize"> | number + createdAt?: DateTimeFilter<"Prize"> | Date | string + createdBy?: StringFilter<"Prize"> | string + updatedAt?: DateTimeFilter<"Prize"> | Date | string + updatedBy?: StringFilter<"Prize"> | string + } + + export type ChallengeUpsertWithoutPrizeSetsInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutPrizeSetsInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutPrizeSetsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutPrizeSetsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeCreateWithoutReviewersInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + timelineTemplate?: TimelineTemplateCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutReviewersInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutReviewersInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type PhaseCreateWithoutChallengeReviewerInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengePhases?: ChallengePhaseCreateNestedManyWithoutPhaseInput + DefaultChallengeReviewer?: DefaultChallengeReviewerCreateNestedManyWithoutPhaseInput + } + + export type PhaseUncheckedCreateWithoutChallengeReviewerInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengePhases?: ChallengePhaseUncheckedCreateNestedManyWithoutPhaseInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput + } + + export type PhaseCreateOrConnectWithoutChallengeReviewerInput = { + where: PhaseWhereUniqueInput + create: XOR + } + + export type ChallengeUpsertWithoutReviewersInput = { + update: XOR + create: XOR + where?: ChallengeWhereInput + } + + export type ChallengeUpdateToOneWithWhereWithoutReviewersInput = { + where?: ChallengeWhereInput + data: XOR + } + + export type ChallengeUpdateWithoutReviewersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutReviewersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type PhaseUpsertWithoutChallengeReviewerInput = { + update: XOR + create: XOR + where?: PhaseWhereInput + } + + export type PhaseUpdateToOneWithWhereWithoutChallengeReviewerInput = { + where?: PhaseWhereInput + data: XOR + } + + export type PhaseUpdateWithoutChallengeReviewerInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengePhases?: ChallengePhaseUpdateManyWithoutPhaseNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUpdateManyWithoutPhaseNestedInput + } + + export type PhaseUncheckedUpdateWithoutChallengeReviewerInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengePhases?: ChallengePhaseUncheckedUpdateManyWithoutPhaseNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput + } + + export type ChallengeTypeCreateWithoutDefaultReviewersInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeCreateNestedManyWithoutTypeInput + timelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTypeInput + } + + export type ChallengeTypeUncheckedCreateWithoutDefaultReviewersInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + isTask?: boolean + abbreviation: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeUncheckedCreateNestedManyWithoutTypeInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTypeInput + } + + export type ChallengeTypeCreateOrConnectWithoutDefaultReviewersInput = { + where: ChallengeTypeWhereUniqueInput + create: XOR + } + + export type ChallengeTrackCreateWithoutDefaultReviewersInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeCreateNestedManyWithoutTrackInput + timelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTrackInput + } + + export type ChallengeTrackUncheckedCreateWithoutDefaultReviewersInput = { + id?: string + name: string + description?: string | null + isActive: boolean + abbreviation: string + legacyId?: number | null + track?: $Enums.ChallengeTrackEnum | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challenges?: ChallengeUncheckedCreateNestedManyWithoutTrackInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTrackInput + } + + export type ChallengeTrackCreateOrConnectWithoutDefaultReviewersInput = { + where: ChallengeTrackWhereUniqueInput + create: XOR + } + + export type TimelineTemplateCreateWithoutDefaultChallengeReviewerInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseCreateNestedManyWithoutTimelineTemplateInput + challengeTimelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateUncheckedCreateWithoutDefaultChallengeReviewerInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + phases?: TimelineTemplatePhaseUncheckedCreateNestedManyWithoutTimelineTemplateInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeUncheckedCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateCreateOrConnectWithoutDefaultChallengeReviewerInput = { + where: TimelineTemplateWhereUniqueInput + create: XOR + } + + export type PhaseCreateWithoutDefaultChallengeReviewerInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengePhases?: ChallengePhaseCreateNestedManyWithoutPhaseInput + ChallengeReviewer?: ChallengeReviewerCreateNestedManyWithoutPhaseInput + } + + export type PhaseUncheckedCreateWithoutDefaultChallengeReviewerInput = { + id?: string + name: string + description?: string | null + isOpen: boolean + duration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengePhases?: ChallengePhaseUncheckedCreateNestedManyWithoutPhaseInput + ChallengeReviewer?: ChallengeReviewerUncheckedCreateNestedManyWithoutPhaseInput + } + + export type PhaseCreateOrConnectWithoutDefaultChallengeReviewerInput = { + where: PhaseWhereUniqueInput + create: XOR + } + + export type ChallengeTypeUpsertWithoutDefaultReviewersInput = { + update: XOR + create: XOR + where?: ChallengeTypeWhereInput + } + + export type ChallengeTypeUpdateToOneWithWhereWithoutDefaultReviewersInput = { + where?: ChallengeTypeWhereInput + data: XOR + } + + export type ChallengeTypeUpdateWithoutDefaultReviewersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUpdateManyWithoutTypeNestedInput + timelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTypeNestedInput + } + + export type ChallengeTypeUncheckedUpdateWithoutDefaultReviewersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + isTask?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUncheckedUpdateManyWithoutTypeNestedInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTypeNestedInput + } + + export type ChallengeTrackUpsertWithoutDefaultReviewersInput = { + update: XOR + create: XOR + where?: ChallengeTrackWhereInput + } + + export type ChallengeTrackUpdateToOneWithWhereWithoutDefaultReviewersInput = { + where?: ChallengeTrackWhereInput + data: XOR + } + + export type ChallengeTrackUpdateWithoutDefaultReviewersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUpdateManyWithoutTrackNestedInput + timelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTrackNestedInput + } + + export type ChallengeTrackUncheckedUpdateWithoutDefaultReviewersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + abbreviation?: StringFieldUpdateOperationsInput | string + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + track?: NullableEnumChallengeTrackEnumFieldUpdateOperationsInput | $Enums.ChallengeTrackEnum | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenges?: ChallengeUncheckedUpdateManyWithoutTrackNestedInput + timelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTrackNestedInput + } + + export type TimelineTemplateUpsertWithoutDefaultChallengeReviewerInput = { + update: XOR + create: XOR + where?: TimelineTemplateWhereInput + } + + export type TimelineTemplateUpdateToOneWithWhereWithoutDefaultChallengeReviewerInput = { + where?: TimelineTemplateWhereInput + data: XOR + } + + export type TimelineTemplateUpdateWithoutDefaultChallengeReviewerInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUpdateManyWithoutTimelineTemplateNestedInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUpdateManyWithoutTimelineTemplateNestedInput + } + + export type TimelineTemplateUncheckedUpdateWithoutDefaultChallengeReviewerInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phases?: TimelineTemplatePhaseUncheckedUpdateManyWithoutTimelineTemplateNestedInput + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUncheckedUpdateManyWithoutTimelineTemplateNestedInput + } + + export type PhaseUpsertWithoutDefaultChallengeReviewerInput = { + update: XOR + create: XOR + where?: PhaseWhereInput + } + + export type PhaseUpdateToOneWithWhereWithoutDefaultChallengeReviewerInput = { + where?: PhaseWhereInput + data: XOR + } + + export type PhaseUpdateWithoutDefaultChallengeReviewerInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengePhases?: ChallengePhaseUpdateManyWithoutPhaseNestedInput + ChallengeReviewer?: ChallengeReviewerUpdateManyWithoutPhaseNestedInput + } + + export type PhaseUncheckedUpdateWithoutDefaultChallengeReviewerInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: BoolFieldUpdateOperationsInput | boolean + duration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengePhases?: ChallengePhaseUncheckedUpdateManyWithoutPhaseNestedInput + ChallengeReviewer?: ChallengeReviewerUncheckedUpdateManyWithoutPhaseNestedInput + } + + export type TimelineTemplatePhaseCreateWithoutTimelineTemplateInput = { + id?: string + phaseId: string + predecessor?: string | null + defaultDuration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type TimelineTemplatePhaseUncheckedCreateWithoutTimelineTemplateInput = { + id?: string + phaseId: string + predecessor?: string | null + defaultDuration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type TimelineTemplatePhaseCreateOrConnectWithoutTimelineTemplateInput = { + where: TimelineTemplatePhaseWhereUniqueInput + create: XOR + } + + export type TimelineTemplatePhaseCreateManyTimelineTemplateInputEnvelope = { + data: TimelineTemplatePhaseCreateManyTimelineTemplateInput | TimelineTemplatePhaseCreateManyTimelineTemplateInput[] + skipDuplicates?: boolean + } + + export type ChallengeTimelineTemplateCreateWithoutTimelineTemplateInput = { + id?: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + track: ChallengeTrackCreateNestedOneWithoutTimelineTemplatesInput + type: ChallengeTypeCreateNestedOneWithoutTimelineTemplatesInput + } + + export type ChallengeTimelineTemplateUncheckedCreateWithoutTimelineTemplateInput = { + id?: string + typeId: string + trackId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateCreateOrConnectWithoutTimelineTemplateInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + create: XOR + } + + export type ChallengeTimelineTemplateCreateManyTimelineTemplateInputEnvelope = { + data: ChallengeTimelineTemplateCreateManyTimelineTemplateInput | ChallengeTimelineTemplateCreateManyTimelineTemplateInput[] + skipDuplicates?: boolean + } + + export type ChallengeCreateWithoutTimelineTemplateInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintCreateNestedOneWithoutChallengeInput + events?: ChallengeEventCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerCreateNestedManyWithoutChallengeInput + attachments?: AttachmentCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessCreateNestedManyWithoutChallengeInput + type: ChallengeTypeCreateNestedOneWithoutChallengesInput + track: ChallengeTrackCreateNestedOneWithoutChallengesInput + } + + export type ChallengeUncheckedCreateWithoutTimelineTemplateInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + billingRecord?: ChallengeBillingUncheckedCreateNestedOneWithoutChallengeInput + legacyRecord?: ChallengeLegacyUncheckedCreateNestedOneWithoutChallengeInput + constraintRecord?: ChallengeConstraintUncheckedCreateNestedOneWithoutChallengeInput + events?: ChallengeEventUncheckedCreateNestedManyWithoutChallengeInput + discussions?: ChallengeDiscussionUncheckedCreateNestedManyWithoutChallengeInput + metadata?: ChallengeMetadataUncheckedCreateNestedManyWithoutChallengeInput + phases?: ChallengePhaseUncheckedCreateNestedManyWithoutChallengeInput + prizeSets?: ChallengePrizeSetUncheckedCreateNestedManyWithoutChallengeInput + reviewers?: ChallengeReviewerUncheckedCreateNestedManyWithoutChallengeInput + winners?: ChallengeWinnerUncheckedCreateNestedManyWithoutChallengeInput + attachments?: AttachmentUncheckedCreateNestedManyWithoutChallengeInput + terms?: ChallengeTermUncheckedCreateNestedManyWithoutChallengeInput + skills?: ChallengeSkillUncheckedCreateNestedManyWithoutChallengeInput + auditLogs?: AuditLogUncheckedCreateNestedManyWithoutChallengeInput + memberAccesses?: MemberChallengeAccessUncheckedCreateNestedManyWithoutChallengeInput + } + + export type ChallengeCreateOrConnectWithoutTimelineTemplateInput = { + where: ChallengeWhereUniqueInput + create: XOR + } + + export type ChallengeCreateManyTimelineTemplateInputEnvelope = { + data: ChallengeCreateManyTimelineTemplateInput | ChallengeCreateManyTimelineTemplateInput[] + skipDuplicates?: boolean + } + + export type DefaultChallengeReviewerCreateWithoutTimelineTemplateInput = { + id?: string + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengeType: ChallengeTypeCreateNestedOneWithoutDefaultReviewersInput + challengeTrack: ChallengeTrackCreateNestedOneWithoutDefaultReviewersInput + phase?: PhaseCreateNestedOneWithoutDefaultChallengeReviewerInput + } + + export type DefaultChallengeReviewerUncheckedCreateWithoutTimelineTemplateInput = { + id?: string + typeId: string + trackId: string + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateOrConnectWithoutTimelineTemplateInput = { + where: DefaultChallengeReviewerWhereUniqueInput + create: XOR + } + + export type DefaultChallengeReviewerCreateManyTimelineTemplateInputEnvelope = { + data: DefaultChallengeReviewerCreateManyTimelineTemplateInput | DefaultChallengeReviewerCreateManyTimelineTemplateInput[] + skipDuplicates?: boolean + } + + export type TimelineTemplatePhaseUpsertWithWhereUniqueWithoutTimelineTemplateInput = { + where: TimelineTemplatePhaseWhereUniqueInput + update: XOR + create: XOR + } + + export type TimelineTemplatePhaseUpdateWithWhereUniqueWithoutTimelineTemplateInput = { + where: TimelineTemplatePhaseWhereUniqueInput + data: XOR + } + + export type TimelineTemplatePhaseUpdateManyWithWhereWithoutTimelineTemplateInput = { + where: TimelineTemplatePhaseScalarWhereInput + data: XOR + } + + export type TimelineTemplatePhaseScalarWhereInput = { + AND?: TimelineTemplatePhaseScalarWhereInput | TimelineTemplatePhaseScalarWhereInput[] + OR?: TimelineTemplatePhaseScalarWhereInput[] + NOT?: TimelineTemplatePhaseScalarWhereInput | TimelineTemplatePhaseScalarWhereInput[] + id?: StringFilter<"TimelineTemplatePhase"> | string + timelineTemplateId?: StringFilter<"TimelineTemplatePhase"> | string + phaseId?: StringFilter<"TimelineTemplatePhase"> | string + predecessor?: StringNullableFilter<"TimelineTemplatePhase"> | string | null + defaultDuration?: IntFilter<"TimelineTemplatePhase"> | number + createdAt?: DateTimeFilter<"TimelineTemplatePhase"> | Date | string + createdBy?: StringFilter<"TimelineTemplatePhase"> | string + updatedAt?: DateTimeFilter<"TimelineTemplatePhase"> | Date | string + updatedBy?: StringFilter<"TimelineTemplatePhase"> | string + } + + export type ChallengeTimelineTemplateUpsertWithWhereUniqueWithoutTimelineTemplateInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeTimelineTemplateUpdateWithWhereUniqueWithoutTimelineTemplateInput = { + where: ChallengeTimelineTemplateWhereUniqueInput + data: XOR + } + + export type ChallengeTimelineTemplateUpdateManyWithWhereWithoutTimelineTemplateInput = { + where: ChallengeTimelineTemplateScalarWhereInput + data: XOR + } + + export type ChallengeUpsertWithWhereUniqueWithoutTimelineTemplateInput = { + where: ChallengeWhereUniqueInput + update: XOR + create: XOR + } + + export type ChallengeUpdateWithWhereUniqueWithoutTimelineTemplateInput = { + where: ChallengeWhereUniqueInput + data: XOR + } + + export type ChallengeUpdateManyWithWhereWithoutTimelineTemplateInput = { + where: ChallengeScalarWhereInput + data: XOR + } + + export type DefaultChallengeReviewerUpsertWithWhereUniqueWithoutTimelineTemplateInput = { + where: DefaultChallengeReviewerWhereUniqueInput + update: XOR + create: XOR + } + + export type DefaultChallengeReviewerUpdateWithWhereUniqueWithoutTimelineTemplateInput = { + where: DefaultChallengeReviewerWhereUniqueInput + data: XOR + } + + export type DefaultChallengeReviewerUpdateManyWithWhereWithoutTimelineTemplateInput = { + where: DefaultChallengeReviewerScalarWhereInput + data: XOR + } + + export type TimelineTemplateCreateWithoutPhasesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengeTimelineTemplates?: ChallengeTimelineTemplateCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateUncheckedCreateWithoutPhasesInput = { + id?: string + name: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedCreateNestedManyWithoutTimelineTemplateInput + challenges?: ChallengeUncheckedCreateNestedManyWithoutTimelineTemplateInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedCreateNestedManyWithoutTimelineTemplateInput + } + + export type TimelineTemplateCreateOrConnectWithoutPhasesInput = { + where: TimelineTemplateWhereUniqueInput + create: XOR + } + + export type TimelineTemplateUpsertWithoutPhasesInput = { + update: XOR + create: XOR + where?: TimelineTemplateWhereInput + } + + export type TimelineTemplateUpdateToOneWithWhereWithoutPhasesInput = { + where?: TimelineTemplateWhereInput + data: XOR + } + + export type TimelineTemplateUpdateWithoutPhasesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengeTimelineTemplates?: ChallengeTimelineTemplateUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUpdateManyWithoutTimelineTemplateNestedInput + } + + export type TimelineTemplateUncheckedUpdateWithoutPhasesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengeTimelineTemplates?: ChallengeTimelineTemplateUncheckedUpdateManyWithoutTimelineTemplateNestedInput + challenges?: ChallengeUncheckedUpdateManyWithoutTimelineTemplateNestedInput + DefaultChallengeReviewer?: DefaultChallengeReviewerUncheckedUpdateManyWithoutTimelineTemplateNestedInput + } + + export type ChallengeEventCreateManyChallengeInput = { + id?: string + eventId: number + name?: string | null + key?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionCreateManyChallengeInput = { + id?: string + discussionId?: string | null + name: string + type: $Enums.DiscussionTypeEnum + provider: string + url?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeMetadataCreateManyChallengeInput = { + id?: string + name: string + value: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseCreateManyChallengeInput = { + id?: string + phaseId: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePrizeSetCreateManyChallengeInput = { + id?: string + type: $Enums.PrizeSetTypeEnum + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeReviewerCreateManyChallengeInput = { + id?: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + phaseId: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeWinnerCreateManyChallengeInput = { + id?: string + userId: number + handle: string + placement: number + type: $Enums.PrizeSetTypeEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type AttachmentCreateManyChallengeInput = { + id?: string + name: string + fileSize: number + url: string + description?: string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTermCreateManyChallengeInput = { + id?: string + termId: string + roleId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeSkillCreateManyChallengeInput = { + id?: string + skillId: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type AuditLogCreateManyChallengeInput = { + id?: string + fieldName: string + oldValue?: string | null + newValue?: string | null + createdAt?: Date | string + createdBy: string + memberId?: string | null + } + + export type ChallengeEventUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + eventId?: IntFieldUpdateOperationsInput | number + name?: NullableStringFieldUpdateOperationsInput | string | null + key?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeEventUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + eventId?: IntFieldUpdateOperationsInput | number + name?: NullableStringFieldUpdateOperationsInput | string | null + key?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeEventUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + eventId?: IntFieldUpdateOperationsInput | number + name?: NullableStringFieldUpdateOperationsInput | string | null + key?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + options?: ChallengeDiscussionOptionUpdateManyWithoutDiscussionNestedInput + } + + export type ChallengeDiscussionUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + options?: ChallengeDiscussionOptionUncheckedUpdateManyWithoutDiscussionNestedInput + } + + export type ChallengeDiscussionUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + discussionId?: NullableStringFieldUpdateOperationsInput | string | null + name?: StringFieldUpdateOperationsInput | string + type?: EnumDiscussionTypeEnumFieldUpdateOperationsInput | $Enums.DiscussionTypeEnum + provider?: StringFieldUpdateOperationsInput | string + url?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeMetadataUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeMetadataUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeMetadataUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + constraints?: ChallengePhaseConstraintUpdateManyWithoutChallengePhaseNestedInput + phase?: PhaseUpdateOneRequiredWithoutChallengePhasesNestedInput + } + + export type ChallengePhaseUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + constraints?: ChallengePhaseConstraintUncheckedUpdateManyWithoutChallengePhaseNestedInput + } + + export type ChallengePhaseUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePrizeSetUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + prizes?: PrizeUpdateManyWithoutPrizeSetNestedInput + } + + export type ChallengePrizeSetUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + prizes?: PrizeUncheckedUpdateManyWithoutPrizeSetNestedInput + } + + export type ChallengePrizeSetUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeReviewerUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + phase?: PhaseUpdateOneRequiredWithoutChallengeReviewerNestedInput + } + + export type ChallengeReviewerUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseId?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeReviewerUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseId?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeWinnerUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: IntFieldUpdateOperationsInput | number + handle?: StringFieldUpdateOperationsInput | string + placement?: IntFieldUpdateOperationsInput | number + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeWinnerUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: IntFieldUpdateOperationsInput | number + handle?: StringFieldUpdateOperationsInput | string + placement?: IntFieldUpdateOperationsInput | number + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeWinnerUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: IntFieldUpdateOperationsInput | number + handle?: StringFieldUpdateOperationsInput | string + placement?: IntFieldUpdateOperationsInput | number + type?: EnumPrizeSetTypeEnumFieldUpdateOperationsInput | $Enums.PrizeSetTypeEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type AttachmentUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + fileSize?: IntFieldUpdateOperationsInput | number + url?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type AttachmentUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + fileSize?: IntFieldUpdateOperationsInput | number + url?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type AttachmentUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + fileSize?: IntFieldUpdateOperationsInput | number + url?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTermUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + termId?: StringFieldUpdateOperationsInput | string + roleId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTermUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + termId?: StringFieldUpdateOperationsInput | string + roleId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTermUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + termId?: StringFieldUpdateOperationsInput | string + roleId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeSkillUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + skillId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeSkillUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + skillId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeSkillUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + skillId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type AuditLogUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + fieldName?: StringFieldUpdateOperationsInput | string + oldValue?: NullableStringFieldUpdateOperationsInput | string | null + newValue?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + memberId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AuditLogUncheckedUpdateWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + fieldName?: StringFieldUpdateOperationsInput | string + oldValue?: NullableStringFieldUpdateOperationsInput | string | null + newValue?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + memberId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AuditLogUncheckedUpdateManyWithoutChallengeInput = { + id?: StringFieldUpdateOperationsInput | string + fieldName?: StringFieldUpdateOperationsInput | string + oldValue?: NullableStringFieldUpdateOperationsInput | string | null + newValue?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + memberId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type MemberChallengeAccessUpdateWithoutChallengeInput = { + memberId?: StringFieldUpdateOperationsInput | string + } + + export type MemberChallengeAccessUncheckedUpdateWithoutChallengeInput = { + memberId?: StringFieldUpdateOperationsInput | string + } + + export type MemberChallengeAccessUpdateManyMutationInput = { + memberId?: StringFieldUpdateOperationsInput | string + } + + export type MemberChallengeAccessUncheckedUpdateManyWithoutChallengeInput = { + memberId?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeCreateManyTypeInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + trackId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateCreateManyTypeInput = { + id?: string + trackId: string + timelineTemplateId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateManyChallengeTypeInput = { + id?: string + trackId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeUpdateWithoutTypeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutTypeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeUncheckedUpdateManyWithoutTypeInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateUpdateWithoutTypeInput = { + id?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplate?: TimelineTemplateUpdateOneRequiredWithoutChallengeTimelineTemplatesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutTimelineTemplatesNestedInput + } + + export type ChallengeTimelineTemplateUncheckedUpdateWithoutTypeInput = { + id?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateUncheckedUpdateManyWithoutTypeInput = { + id?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUpdateWithoutChallengeTypeInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengeTrack?: ChallengeTrackUpdateOneRequiredWithoutDefaultReviewersNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutDefaultChallengeReviewerNestedInput + phase?: PhaseUpdateOneWithoutDefaultChallengeReviewerNestedInput + } + + export type DefaultChallengeReviewerUncheckedUpdateWithoutChallengeTypeInput = { + id?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTypeInput = { + id?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeCreateManyTrackInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + timelineTemplateId?: string | null + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateCreateManyTrackInput = { + id?: string + typeId: string + timelineTemplateId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateManyChallengeTrackInput = { + id?: string + typeId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeUpdateWithoutTrackInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutTrackInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeUncheckedUpdateManyWithoutTrackInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateUpdateWithoutTrackInput = { + id?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + timelineTemplate?: TimelineTemplateUpdateOneRequiredWithoutChallengeTimelineTemplatesNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutTimelineTemplatesNestedInput + } + + export type ChallengeTimelineTemplateUncheckedUpdateWithoutTrackInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateUncheckedUpdateManyWithoutTrackInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUpdateWithoutChallengeTrackInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengeType?: ChallengeTypeUpdateOneRequiredWithoutDefaultReviewersNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutDefaultChallengeReviewerNestedInput + phase?: PhaseUpdateOneWithoutDefaultChallengeReviewerNestedInput + } + + export type DefaultChallengeReviewerUncheckedUpdateWithoutChallengeTrackInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutChallengeTrackInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionOptionCreateManyDiscussionInput = { + id?: string + optionKey: string + optionValue: string + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeDiscussionOptionUpdateWithoutDiscussionInput = { + id?: StringFieldUpdateOperationsInput | string + optionKey?: StringFieldUpdateOperationsInput | string + optionValue?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionOptionUncheckedUpdateWithoutDiscussionInput = { + id?: StringFieldUpdateOperationsInput | string + optionKey?: StringFieldUpdateOperationsInput | string + optionValue?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeDiscussionOptionUncheckedUpdateManyWithoutDiscussionInput = { + id?: StringFieldUpdateOperationsInput | string + optionKey?: StringFieldUpdateOperationsInput | string + optionValue?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseCreateManyPhaseInput = { + id?: string + challengeId: string + name: string + description?: string | null + isOpen?: boolean | null + predecessor?: string | null + duration?: number | null + scheduledStartDate?: Date | string | null + scheduledEndDate?: Date | string | null + actualStartDate?: Date | string | null + actualEndDate?: Date | string | null + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeReviewerCreateManyPhaseInput = { + id?: string + challengeId: string + scorecardId: string + isMemberReview: boolean + memberReviewerCount?: number | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + type?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateManyPhaseInput = { + id?: string + typeId: string + trackId: string + timelineTemplateId?: string | null + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseUpdateWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + constraints?: ChallengePhaseConstraintUpdateManyWithoutChallengePhaseNestedInput + challenge?: ChallengeUpdateOneRequiredWithoutPhasesNestedInput + } + + export type ChallengePhaseUncheckedUpdateWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + constraints?: ChallengePhaseConstraintUncheckedUpdateManyWithoutChallengePhaseNestedInput + } + + export type ChallengePhaseUncheckedUpdateManyWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isOpen?: NullableBoolFieldUpdateOperationsInput | boolean | null + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + duration?: NullableIntFieldUpdateOperationsInput | number | null + scheduledStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + scheduledEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + actualEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeReviewerUpdateWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challenge?: ChallengeUpdateOneRequiredWithoutReviewersNestedInput + } + + export type ChallengeReviewerUncheckedUpdateWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeReviewerUncheckedUpdateManyWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + challengeId?: StringFieldUpdateOperationsInput | string + scorecardId?: StringFieldUpdateOperationsInput | string + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + type?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUpdateWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengeType?: ChallengeTypeUpdateOneRequiredWithoutDefaultReviewersNestedInput + challengeTrack?: ChallengeTrackUpdateOneRequiredWithoutDefaultReviewersNestedInput + timelineTemplate?: TimelineTemplateUpdateOneWithoutDefaultChallengeReviewerNestedInput + } + + export type DefaultChallengeReviewerUncheckedUpdateWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutPhaseInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + timelineTemplateId?: NullableStringFieldUpdateOperationsInput | string | null + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseConstraintCreateManyChallengePhaseInput = { + id?: string + name: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengePhaseConstraintUpdateWithoutChallengePhaseInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseConstraintUncheckedUpdateWithoutChallengePhaseInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengePhaseConstraintUncheckedUpdateManyWithoutChallengePhaseInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + value?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PrizeCreateManyPrizeSetInput = { + id?: string + description?: string | null + type: string + value: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type PrizeUpdateWithoutPrizeSetInput = { + id?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + type?: StringFieldUpdateOperationsInput | string + value?: FloatFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PrizeUncheckedUpdateWithoutPrizeSetInput = { + id?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + type?: StringFieldUpdateOperationsInput | string + value?: FloatFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type PrizeUncheckedUpdateManyWithoutPrizeSetInput = { + id?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + type?: StringFieldUpdateOperationsInput | string + value?: FloatFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplatePhaseCreateManyTimelineTemplateInput = { + id?: string + phaseId: string + predecessor?: string | null + defaultDuration: number + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeTimelineTemplateCreateManyTimelineTemplateInput = { + id?: string + typeId: string + trackId: string + isDefault?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type ChallengeCreateManyTimelineTemplateInput = { + id?: string + name: string + description?: string | null + privateDescription?: string | null + challengeSource?: string | null + descriptionFormat?: string | null + projectId?: number | null + typeId: string + trackId: string + overviewTotalPrizes?: number | null + numOfRegistrants?: number + numOfSubmissions?: number + numOfCheckpointSubmissions?: number + currentPhaseNames?: ChallengeCreatecurrentPhaseNamesInput | string[] + wiproAllowed?: boolean + tags?: ChallengeCreatetagsInput | string[] + groups?: ChallengeCreategroupsInput | string[] + taskIsTask?: boolean + taskIsAssigned?: boolean + taskMemberId?: string | null + submissionStartDate?: Date | string | null + submissionEndDate?: Date | string | null + registrationStartDate?: Date | string | null + registrationEndDate?: Date | string | null + startDate?: Date | string | null + endDate?: Date | string | null + legacyId?: number | null + status?: $Enums.ChallengeStatusEnum + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type DefaultChallengeReviewerCreateManyTimelineTemplateInput = { + id?: string + typeId: string + trackId: string + scorecardId?: string | null + isMemberReview: boolean + memberReviewerCount?: number | null + phaseName: string + phaseId?: string | null + fixedAmount?: number | null + baseCoefficient?: number | null + incrementalCoefficient?: number | null + opportunityType?: $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: string | null + shouldOpenOpportunity?: boolean + createdAt?: Date | string + createdBy: string + updatedAt?: Date | string + updatedBy: string + } + + export type TimelineTemplatePhaseUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + defaultDuration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplatePhaseUncheckedUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + defaultDuration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type TimelineTemplatePhaseUncheckedUpdateManyWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + phaseId?: StringFieldUpdateOperationsInput | string + predecessor?: NullableStringFieldUpdateOperationsInput | string | null + defaultDuration?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + track?: ChallengeTrackUpdateOneRequiredWithoutTimelineTemplatesNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutTimelineTemplatesNestedInput + } + + export type ChallengeTimelineTemplateUncheckedUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeTimelineTemplateUncheckedUpdateManyWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type ChallengeUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUpdateManyWithoutChallengeNestedInput + type?: ChallengeTypeUpdateOneRequiredWithoutChallengesNestedInput + track?: ChallengeTrackUpdateOneRequiredWithoutChallengesNestedInput + } + + export type ChallengeUncheckedUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + billingRecord?: ChallengeBillingUncheckedUpdateOneWithoutChallengeNestedInput + legacyRecord?: ChallengeLegacyUncheckedUpdateOneWithoutChallengeNestedInput + constraintRecord?: ChallengeConstraintUncheckedUpdateOneWithoutChallengeNestedInput + events?: ChallengeEventUncheckedUpdateManyWithoutChallengeNestedInput + discussions?: ChallengeDiscussionUncheckedUpdateManyWithoutChallengeNestedInput + metadata?: ChallengeMetadataUncheckedUpdateManyWithoutChallengeNestedInput + phases?: ChallengePhaseUncheckedUpdateManyWithoutChallengeNestedInput + prizeSets?: ChallengePrizeSetUncheckedUpdateManyWithoutChallengeNestedInput + reviewers?: ChallengeReviewerUncheckedUpdateManyWithoutChallengeNestedInput + winners?: ChallengeWinnerUncheckedUpdateManyWithoutChallengeNestedInput + attachments?: AttachmentUncheckedUpdateManyWithoutChallengeNestedInput + terms?: ChallengeTermUncheckedUpdateManyWithoutChallengeNestedInput + skills?: ChallengeSkillUncheckedUpdateManyWithoutChallengeNestedInput + auditLogs?: AuditLogUncheckedUpdateManyWithoutChallengeNestedInput + memberAccesses?: MemberChallengeAccessUncheckedUpdateManyWithoutChallengeNestedInput + } + + export type ChallengeUncheckedUpdateManyWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + privateDescription?: NullableStringFieldUpdateOperationsInput | string | null + challengeSource?: NullableStringFieldUpdateOperationsInput | string | null + descriptionFormat?: NullableStringFieldUpdateOperationsInput | string | null + projectId?: NullableIntFieldUpdateOperationsInput | number | null + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + overviewTotalPrizes?: NullableFloatFieldUpdateOperationsInput | number | null + numOfRegistrants?: IntFieldUpdateOperationsInput | number + numOfSubmissions?: IntFieldUpdateOperationsInput | number + numOfCheckpointSubmissions?: IntFieldUpdateOperationsInput | number + currentPhaseNames?: ChallengeUpdatecurrentPhaseNamesInput | string[] + wiproAllowed?: BoolFieldUpdateOperationsInput | boolean + tags?: ChallengeUpdatetagsInput | string[] + groups?: ChallengeUpdategroupsInput | string[] + taskIsTask?: BoolFieldUpdateOperationsInput | boolean + taskIsAssigned?: BoolFieldUpdateOperationsInput | boolean + taskMemberId?: NullableStringFieldUpdateOperationsInput | string | null + submissionStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + submissionEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationStartDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + registrationEndDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + startDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + legacyId?: NullableIntFieldUpdateOperationsInput | number | null + status?: EnumChallengeStatusEnumFieldUpdateOperationsInput | $Enums.ChallengeStatusEnum + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + challengeType?: ChallengeTypeUpdateOneRequiredWithoutDefaultReviewersNestedInput + challengeTrack?: ChallengeTrackUpdateOneRequiredWithoutDefaultReviewersNestedInput + phase?: PhaseUpdateOneWithoutDefaultChallengeReviewerNestedInput + } + + export type DefaultChallengeReviewerUncheckedUpdateWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + export type DefaultChallengeReviewerUncheckedUpdateManyWithoutTimelineTemplateInput = { + id?: StringFieldUpdateOperationsInput | string + typeId?: StringFieldUpdateOperationsInput | string + trackId?: StringFieldUpdateOperationsInput | string + scorecardId?: NullableStringFieldUpdateOperationsInput | string | null + isMemberReview?: BoolFieldUpdateOperationsInput | boolean + memberReviewerCount?: NullableIntFieldUpdateOperationsInput | number | null + phaseName?: StringFieldUpdateOperationsInput | string + phaseId?: NullableStringFieldUpdateOperationsInput | string | null + fixedAmount?: NullableFloatFieldUpdateOperationsInput | number | null + baseCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + incrementalCoefficient?: NullableFloatFieldUpdateOperationsInput | number | null + opportunityType?: NullableEnumReviewOpportunityTypeEnumFieldUpdateOperationsInput | $Enums.ReviewOpportunityTypeEnum | null + aiWorkflowId?: NullableStringFieldUpdateOperationsInput | string | null + shouldOpenOpportunity?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdBy?: StringFieldUpdateOperationsInput | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: StringFieldUpdateOperationsInput | string + } + + + + /** + * Batch Payload for updateMany & deleteMany & createMany + */ + + export type BatchPayload = { + count: number + } + + /** + * DMMF + */ + export const dmmf: runtime.BaseDMMF +} \ No newline at end of file diff --git a/packages/challenge-prisma-client/index.js b/packages/challenge-prisma-client/index.js new file mode 100644 index 0000000..a95ca16 --- /dev/null +++ b/packages/challenge-prisma-client/index.js @@ -0,0 +1,896 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime, + createParam, +} = require('./runtime/library.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.0 + * Query Engine version: 2ba551f319ab1df4bc874a89965d8b3641056773 + */ +Prisma.prismaVersion = { + client: "6.19.0", + engine: "2ba551f319ab1df4bc874a89965d8b3641056773" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + const path = require('path') + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.ChallengeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + projectId: 'projectId', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + overviewTotalPrizes: 'overviewTotalPrizes', + numOfRegistrants: 'numOfRegistrants', + numOfSubmissions: 'numOfSubmissions', + numOfCheckpointSubmissions: 'numOfCheckpointSubmissions', + currentPhaseNames: 'currentPhaseNames', + wiproAllowed: 'wiproAllowed', + tags: 'tags', + groups: 'groups', + taskIsTask: 'taskIsTask', + taskIsAssigned: 'taskIsAssigned', + taskMemberId: 'taskMemberId', + submissionStartDate: 'submissionStartDate', + submissionEndDate: 'submissionEndDate', + registrationStartDate: 'registrationStartDate', + registrationEndDate: 'registrationEndDate', + startDate: 'startDate', + endDate: 'endDate', + legacyId: 'legacyId', + status: 'status', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + isTask: 'isTask', + abbreviation: 'abbreviation', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + abbreviation: 'abbreviation', + legacyId: 'legacyId', + track: 'track', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + isDefault: 'isDefault', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + fileSize: 'fileSize', + url: 'url', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + userId: 'userId', + handle: 'handle', + placement: 'placement', + type: 'type', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingScalarFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + markup: 'markup', + clientBillingRate: 'clientBillingRate', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyScalarFieldEnum = { + id: 'id', + reviewType: 'reviewType', + confidentialityType: 'confidentialityType', + forumId: 'forumId', + directProjectId: 'directProjectId', + screeningScorecardId: 'screeningScorecardId', + reviewScorecardId: 'reviewScorecardId', + isTask: 'isTask', + useSchedulingAPI: 'useSchedulingAPI', + pureV5Task: 'pureV5Task', + pureV5: 'pureV5', + selfService: 'selfService', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + legacySystemId: 'legacySystemId', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + eventId: 'eventId', + name: 'name', + key: 'key', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + type: 'type', + provider: 'provider', + url: 'url', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionScalarFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isOpen: 'isOpen', + duration: 'duration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + isOpen: 'isOpen', + predecessor: 'predecessor', + duration: 'duration', + scheduledStartDate: 'scheduledStartDate', + scheduledEndDate: 'scheduledEndDate', + actualStartDate: 'actualStartDate', + actualEndDate: 'actualEndDate', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintScalarFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + type: 'type', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + type: 'type', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseName: 'phaseName', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + opportunityType: 'opportunityType', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseScalarFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + defaultDuration: 'defaultDuration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessScalarFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.ChallengeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + currentPhaseNames: 'currentPhaseNames', + tags: 'tags', + groups: 'groups', + taskMemberId: 'taskMemberId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + url: 'url', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeOrderByRelevanceFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + handle: 'handle', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingOrderByRelevanceFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyOrderByRelevanceFieldEnum = { + id: 'id', + confidentialityType: 'confidentialityType', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + key: 'key', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + provider: 'provider', + url: 'url', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionOrderByRelevanceFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + phaseName: 'phaseName', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseOrderByRelevanceFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessOrderByRelevanceFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; +exports.ChallengeTrackEnum = exports.$Enums.ChallengeTrackEnum = { + DESIGN: 'DESIGN', + DATA_SCIENCE: 'DATA_SCIENCE', + DEVELOPMENT: 'DEVELOPMENT', + QUALITY_ASSURANCE: 'QUALITY_ASSURANCE' +}; + +exports.ReviewTypeEnum = exports.$Enums.ReviewTypeEnum = { + COMMUNITY: 'COMMUNITY', + INTERNAL: 'INTERNAL', + SYSTEM: 'SYSTEM', + PROVISIONAL: 'PROVISIONAL', + EXAMPLE: 'EXAMPLE' +}; + +exports.DiscussionTypeEnum = exports.$Enums.DiscussionTypeEnum = { + CHALLENGE: 'CHALLENGE' +}; + +exports.ChallengeStatusEnum = exports.$Enums.ChallengeStatusEnum = { + NEW: 'NEW', + DRAFT: 'DRAFT', + APPROVED: 'APPROVED', + ACTIVE: 'ACTIVE', + COMPLETED: 'COMPLETED', + DELETED: 'DELETED', + CANCELLED: 'CANCELLED', + CANCELLED_FAILED_REVIEW: 'CANCELLED_FAILED_REVIEW', + CANCELLED_FAILED_SCREENING: 'CANCELLED_FAILED_SCREENING', + CANCELLED_ZERO_SUBMISSIONS: 'CANCELLED_ZERO_SUBMISSIONS', + CANCELLED_WINNER_UNRESPONSIVE: 'CANCELLED_WINNER_UNRESPONSIVE', + CANCELLED_CLIENT_REQUEST: 'CANCELLED_CLIENT_REQUEST', + CANCELLED_REQUIREMENTS_INFEASIBLE: 'CANCELLED_REQUIREMENTS_INFEASIBLE', + CANCELLED_ZERO_REGISTRATIONS: 'CANCELLED_ZERO_REGISTRATIONS', + CANCELLED_PAYMENT_FAILED: 'CANCELLED_PAYMENT_FAILED' +}; + +exports.PrizeSetTypeEnum = exports.$Enums.PrizeSetTypeEnum = { + PLACEMENT: 'PLACEMENT', + COPILOT: 'COPILOT', + REVIEWER: 'REVIEWER', + CHECKPOINT: 'CHECKPOINT' +}; + +exports.ReviewOpportunityTypeEnum = exports.$Enums.ReviewOpportunityTypeEnum = { + REGULAR_REVIEW: 'REGULAR_REVIEW', + COMPONENT_DEV_REVIEW: 'COMPONENT_DEV_REVIEW', + SPEC_REVIEW: 'SPEC_REVIEW', + ITERATIVE_REVIEW: 'ITERATIVE_REVIEW', + SCENARIOS_REVIEW: 'SCENARIOS_REVIEW' +}; + +exports.Prisma.ModelName = { + Challenge: 'Challenge', + ChallengeType: 'ChallengeType', + ChallengeTrack: 'ChallengeTrack', + ChallengeTimelineTemplate: 'ChallengeTimelineTemplate', + AuditLog: 'AuditLog', + Attachment: 'Attachment', + ChallengeMetadata: 'ChallengeMetadata', + Prize: 'Prize', + ChallengeWinner: 'ChallengeWinner', + ChallengeTerm: 'ChallengeTerm', + ChallengeSkill: 'ChallengeSkill', + ChallengeBilling: 'ChallengeBilling', + ChallengeLegacy: 'ChallengeLegacy', + ChallengeEvent: 'ChallengeEvent', + ChallengeDiscussion: 'ChallengeDiscussion', + ChallengeDiscussionOption: 'ChallengeDiscussionOption', + ChallengeConstraint: 'ChallengeConstraint', + Phase: 'Phase', + ChallengePhase: 'ChallengePhase', + ChallengePhaseConstraint: 'ChallengePhaseConstraint', + ChallengePrizeSet: 'ChallengePrizeSet', + ChallengeReviewer: 'ChallengeReviewer', + DefaultChallengeReviewer: 'DefaultChallengeReviewer', + TimelineTemplate: 'TimelineTemplate', + TimelineTemplatePhase: 'TimelineTemplatePhase', + MemberChallengeAccess: 'MemberChallengeAccess' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "externalClient", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "/home/vasea/work/topcoder/challenge-api-v6/packages/challenge-prisma-client", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x", + "native": true + }, + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x" + } + ], + "previewFeatures": [ + "fullTextSearchPostgres", + "postgresqlExtensions", + "views" + ], + "sourceFilePath": "/home/vasea/work/topcoder/challenge-api-v6/prisma/schema.prisma", + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": null, + "schemaEnvPath": "../../.env" + }, + "relativePath": "../../prisma", + "clientVersion": "6.19.0", + "engineVersion": "2ba551f319ab1df4bc874a89965d8b3641056773", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "datasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n previewFeatures = [\"fullTextSearchPostgres\", \"postgresqlExtensions\", \"views\"]\n}\n\ngenerator externalClient {\n provider = \"prisma-client-js\"\n output = \"../packages/challenge-prisma-client\"\n previewFeatures = [\"fullTextSearchPostgres\", \"postgresqlExtensions\", \"views\"]\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\n// Enum for allowed challenge track values (matches app-constants)\nenum ChallengeTrackEnum {\n DESIGN\n DATA_SCIENCE\n DEVELOPMENT\n QUALITY_ASSURANCE\n}\n\nenum ReviewTypeEnum {\n COMMUNITY\n INTERNAL\n SYSTEM\n PROVISIONAL\n EXAMPLE\n}\n\nenum DiscussionTypeEnum {\n CHALLENGE\n}\n\nenum ChallengeStatusEnum {\n NEW\n DRAFT\n APPROVED\n ACTIVE\n COMPLETED\n DELETED\n CANCELLED\n CANCELLED_FAILED_REVIEW\n CANCELLED_FAILED_SCREENING\n CANCELLED_ZERO_SUBMISSIONS\n CANCELLED_WINNER_UNRESPONSIVE\n CANCELLED_CLIENT_REQUEST\n CANCELLED_REQUIREMENTS_INFEASIBLE\n CANCELLED_ZERO_REGISTRATIONS\n CANCELLED_PAYMENT_FAILED\n}\n\nenum PrizeSetTypeEnum {\n PLACEMENT\n COPILOT\n REVIEWER\n CHECKPOINT\n}\n\n// Enum for review opportunity types on reviewers\nenum ReviewOpportunityTypeEnum {\n REGULAR_REVIEW\n COMPONENT_DEV_REVIEW\n SPEC_REVIEW\n ITERATIVE_REVIEW\n SCENARIOS_REVIEW\n}\n\n//////////////////////////////////////////\n// Main Challenge model\n//////////////////////////////////////////\n\nmodel Challenge {\n id String @id @default(uuid())\n name String\n description String?\n privateDescription String?\n challengeSource String?\n descriptionFormat String?\n projectId Int? // frequently queried field\n typeId String\n trackId String // FK for relation in ChallengeTrack\n timelineTemplateId String? // now used as foreign key to ChallengeTimelineTemplate\n overviewTotalPrizes Float? // stored from overview.totalPrizes\n numOfRegistrants Int @default(0)\n numOfSubmissions Int @default(0)\n numOfCheckpointSubmissions Int @default(0)\n currentPhaseNames String[] // current phase names\n\n wiproAllowed Boolean @default(false)\n\n // simple arrays for tags and groups (PostgreSQL native array type)\n tags String[]\n groups String[]\n\n // Task information (flattened from challenge.task)\n taskIsTask Boolean @default(false)\n taskIsAssigned Boolean @default(false)\n taskMemberId String?\n\n // Dates for challenge lifecycle\n submissionStartDate DateTime?\n submissionEndDate DateTime?\n registrationStartDate DateTime?\n registrationEndDate DateTime?\n startDate DateTime?\n endDate DateTime?\n\n // Normalized billing and legacy information (one-to-one)\n billingRecord ChallengeBilling?\n legacyId Int? // Legacy system ID for searching\n legacyRecord ChallengeLegacy? @relation(\"ChallengeLegacyRelation\")\n\n // Additional fields from createChallenge schema\n status ChallengeStatusEnum @default(NEW) // new challenges default to status \"New\"\n // Normalized top‑level constraints (e.g. allowedRegistrants) for a challenge\n constraintRecord ChallengeConstraint?\n\n // Additional normalized relations from createChallenge\n events ChallengeEvent[]\n discussions ChallengeDiscussion[]\n\n // Existing relations (one-to-many) for challenge metadata, phases, prize sets, winners, attachments,\n // terms and skills\n metadata ChallengeMetadata[]\n phases ChallengePhase[]\n prizeSets ChallengePrizeSet[]\n reviewers ChallengeReviewer[]\n winners ChallengeWinner[]\n attachments Attachment[]\n terms ChallengeTerm[]\n skills ChallengeSkill[]\n auditLogs AuditLog[]\n memberAccesses MemberChallengeAccess[]\n\n // Relation to ChallengeType (FK: typeId)\n type ChallengeType @relation(fields: [typeId], references: [id])\n // Relation to ChallengeTrack (FK: trackId)\n track ChallengeTrack @relation(fields: [trackId], references: [id])\n\n timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id])\n\n // Auditing fields (present in every table)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([projectId])\n @@index([status]) // index added for optimized search by status\n @@index([createdAt])\n @@index([updatedAt])\n @@index([typeId])\n @@index([trackId])\n @@index([groups], type: Gin, map: \"challenge_groups_gin_idx\")\n @@index([submissionStartDate])\n @@index([submissionEndDate])\n @@index([registrationStartDate])\n @@index([registrationEndDate])\n @@index([startDate])\n @@index([endDate])\n @@index([status, startDate])\n @@index([trackId, typeId, status])\n @@index([status, typeId, trackId, createdAt(sort: Desc)], map: \"challenge_status_type_track_created_at_idx\")\n @@index([legacyId])\n @@index([projectId, status])\n}\n\n//////////////////////////////////////////\n// MemberChallengeAccess view – member/challenge pairs from resources schema\n//////////////////////////////////////////\n\nview MemberChallengeAccess {\n challengeId String\n memberId String\n\n challenge Challenge @relation(fields: [challengeId], references: [id])\n\n @@map(\"MemberChallengeAccess\")\n}\n\n//////////////////////////////////////////\n// ChallengeType model\n//////////////////////////////////////////\n\nmodel ChallengeType {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean @default(true)\n isTask Boolean @default(false)\n abbreviation String\n\n challenges Challenge[]\n timelineTemplates ChallengeTimelineTemplate[]\n // Default reviewer configurations associated with this type\n defaultReviewers DefaultChallengeReviewer[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([abbreviation])\n}\n\n//////////////////////////////////////////\n// ChallengeTrack model\n//////////////////////////////////////////\n\nmodel ChallengeTrack {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean\n abbreviation String\n legacyId Int? // numeric legacy system id (if provided)\n track ChallengeTrackEnum? // enum value from ChallengeTrackEnum\n challenges Challenge[]\n // Opposite relation for ChallengeTimelineTemplate\n timelineTemplates ChallengeTimelineTemplate[]\n // Default reviewer configurations associated with this track\n defaultReviewers DefaultChallengeReviewer[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([legacyId])\n}\n\n//////////////////////////////////////////\n// ChallengeTimelineTemplate model\n//////////////////////////////////////////\n\nmodel ChallengeTimelineTemplate {\n id String @id @default(uuid())\n typeId String\n trackId String\n timelineTemplateId String // now required per Swagger spec\n\n // Link to the TimelineTemplate model via timelineTemplateId.\n timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id])\n // Link to the ChallengeTrack model via trackId.\n track ChallengeTrack @relation(fields: [trackId], references: [id])\n // Link to the ChallengeType model via typeId.\n type ChallengeType @relation(fields: [typeId], references: [id])\n\n isDefault Boolean @default(false)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Composite index to support searches/updates by typeId, trackId and timelineTemplateId.\n @@index([typeId, trackId, timelineTemplateId])\n}\n\n//////////////////////////////////////////\n// AuditLog model – tracks field changes\n//////////////////////////////////////////\n\nmodel AuditLog {\n id String @id @default(uuid())\n challengeId String? // optional association with a challenge\n fieldName String\n oldValue String?\n newValue String?\n createdAt DateTime @default(now())\n createdBy String\n memberId String?\n\n // Relation field to connect AuditLog to Challenge.\n challenge Challenge? @relation(fields: [challengeId], references: [id])\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// Attachment model – for challenge attachments\n//////////////////////////////////////////\n\nmodel Attachment {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n name String\n fileSize Int\n url String\n description String?\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeMetadata model – key/value metadata\n//////////////////////////////////////////\n\nmodel ChallengeMetadata {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n name String // name of the metadata\n value String // value stored as string for flexibility\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// Prize model – individual prize in a prize set\n//////////////////////////////////////////\n\nmodel Prize {\n id String @id @default(uuid())\n description String?\n prizeSet ChallengePrizeSet @relation(fields: [prizeSetId], references: [id], onDelete: Cascade)\n prizeSetId String\n type String // e.g. \"USD\", \"POINT\" (could also be converted to enum later)\n value Float\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeWinner model – record winners for a challenge\n//////////////////////////////////////////\n\nmodel ChallengeWinner {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n userId Int\n handle String\n placement Int\n type PrizeSetTypeEnum\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, type, placement])\n}\n\n//////////////////////////////////////////\n// ChallengeTerm model – association of challenge and terms\n//////////////////////////////////////////\n\nmodel ChallengeTerm {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n termId String // Terms API id\n roleId String // UUID for the associated role\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeSkill model – linking challenges with skills\n//////////////////////////////////////////\n\nmodel ChallengeSkill {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n skillId String // Request provided skillId\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeBilling model – normalized billing info\n//////////////////////////////////////////\n\nmodel ChallengeBilling {\n id String @id @default(uuid())\n billingAccountId String?\n markup Float? // in range [0, 100]\n clientBillingRate Float? // in range [0, 100]. Supporting range on postgres is an open issue with prisma https://github.com/prisma/prisma/issues/3287.\n challengeId String @unique\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeLegacy model – normalized legacy info\n//////////////////////////////////////////\n\nmodel ChallengeLegacy {\n id String @id @default(uuid())\n reviewType ReviewTypeEnum @default(INTERNAL)\n confidentialityType String @default(\"public\")\n forumId Int?\n directProjectId Int?\n screeningScorecardId Int?\n reviewScorecardId Int?\n isTask Boolean @default(false)\n useSchedulingAPI Boolean @default(false)\n pureV5Task Boolean @default(false)\n pureV5 Boolean @default(false)\n selfService Boolean @default(false)\n selfServiceCopilot String?\n track String? // as provided in the legacy object\n subTrack String? // as provided in the legacy object\n legacySystemId Int? // represents the external \"legacyId\"\n challengeId String @unique\n challenge Challenge @relation(\"ChallengeLegacyRelation\", fields: [challengeId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeEvent model – normalized challenge events\n//////////////////////////////////////////\n\nmodel ChallengeEvent {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n eventId Int\n name String?\n key String?\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// ChallengeDiscussion and associated options – normalized discussion channels\n//////////////////////////////////////////\n\nmodel ChallengeDiscussion {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n discussionId String?\n name String\n type DiscussionTypeEnum // updated to use enum\n provider String\n url String?\n options ChallengeDiscussionOption[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\nmodel ChallengeDiscussionOption {\n id String @id @default(uuid())\n discussion ChallengeDiscussion @relation(fields: [discussionId], references: [id], onDelete: Cascade)\n discussionId String\n optionKey String\n optionValue String\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeConstraint model – top-level challenge constraints (e.g. allowed registrants)\n//////////////////////////////////////////\n\nmodel ChallengeConstraint {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String @unique\n allowedRegistrants String[] @default([])\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePhase – to capture per-phase info from create/update challenge operations\n// Each phase is linked with a challenge and holds a duration and any custom constraints.\n//////////////////////////////////////////\n\nmodel Phase {\n id String @id @default(uuid())\n name String\n description String?\n isOpen Boolean\n duration Int\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Inverse relation for associated challenge phases\n challengePhases ChallengePhase[]\n ChallengeReviewer ChallengeReviewer[]\n DefaultChallengeReviewer DefaultChallengeReviewer[]\n\n @@unique([name])\n}\n\nmodel ChallengePhase {\n id String @id @default(uuid())\n challengeId String\n phaseId String // foreign key to Phase\n\n name String // phase name\n description String? // description\n isOpen Boolean? @default(false) // if this phase is open\n predecessor String? // predecessor of this phase\n duration Int? // duration in seconds\n scheduledStartDate DateTime? // when the phase is scheduled to start\n scheduledEndDate DateTime?\n actualStartDate DateTime?\n actualEndDate DateTime? // when the phase actually ended\n constraints ChallengePhaseConstraint[]\n\n // Relation fields\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n phase Phase @relation(fields: [phaseId], references: [id])\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, isOpen])\n @@index([challengeId, name])\n @@index([challengeId, isOpen, scheduledEndDate, actualEndDate], map: \"challenge_phase_challenge_open_end_idx\")\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePhaseConstraint – to capture custom constraints for each phase\n//////////////////////////////////////////\n\nmodel ChallengePhaseConstraint {\n id String @id @default(uuid())\n challengePhaseId String\n name String // the name/key of the constraint\n value Int // numeric value of the constraint (can be changed to Float if needed)\n\n // Relation to the phase\n challengePhase ChallengePhase @relation(fields: [challengePhaseId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengePhaseId])\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePrizeSet – to group prizes for a challenge\n//////////////////////////////////////////\n\nmodel ChallengePrizeSet {\n id String @id @default(uuid())\n challengeId String\n type PrizeSetTypeEnum // using enum instead of string\n description String?\n prizes Prize[]\n\n // Relation to the challenge\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, type])\n}\n\n//////////////////////////////////////////\n// ChallengeReviewer model – reviewers for a challenge, both AI and member\n//////////////////////////////////////////\n\nmodel ChallengeReviewer {\n id String @id @default(uuid())\n challengeId String\n\n // Reviewer configuration\n scorecardId String\n isMemberReview Boolean\n memberReviewerCount Int?\n phaseId String\n fixedAmount Float? @default(0)\n baseCoefficient Float?\n incrementalCoefficient Float?\n type ReviewOpportunityTypeEnum?\n aiWorkflowId String? @db.VarChar(14)\n shouldOpenOpportunity Boolean @default(true)\n\n // Relation to the challenge\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n // Relation to the phase\n phase Phase @relation(fields: [phaseId], references: [id])\n\n // Auditing fields\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([phaseId])\n @@index([challengeId, phaseId])\n}\n\n//////////////////////////////////////////\n// DefaultChallengeReviewer model – default reviewers by type and track\n//////////////////////////////////////////\n\nmodel DefaultChallengeReviewer {\n id String @id @default(uuid())\n typeId String\n trackId String\n timelineTemplateId String?\n // Reviewer configuration (mirrors ChallengeReviewer)\n scorecardId String?\n isMemberReview Boolean\n memberReviewerCount Int?\n phaseName String\n // Optional explicit link to Phase for better fidelity\n phaseId String?\n fixedAmount Float? @default(0)\n baseCoefficient Float?\n incrementalCoefficient Float?\n opportunityType ReviewOpportunityTypeEnum?\n aiWorkflowId String? @db.VarChar(14)\n shouldOpenOpportunity Boolean @default(true)\n\n // Relations\n challengeType ChallengeType @relation(fields: [typeId], references: [id])\n challengeTrack ChallengeTrack @relation(fields: [trackId], references: [id])\n timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id])\n // Relation to Phase (optional for backward compatibility with phaseName)\n phase Phase? @relation(fields: [phaseId], references: [id])\n\n // Auditing fields\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([typeId, trackId])\n @@index([typeId, trackId, timelineTemplateId])\n @@index([phaseId])\n}\n\n//////////////////////////////////////////\n// TimelineTemplate model – defines timeline templates\n//////////////////////////////////////////\nmodel TimelineTemplate {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean @default(true)\n phases TimelineTemplatePhase[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Opposite relation field, linking back to ChallengeTimelineTemplate.\n challengeTimelineTemplates ChallengeTimelineTemplate[]\n\n // Opposite relation field for Challenge.\n challenges Challenge[]\n DefaultChallengeReviewer DefaultChallengeReviewer[]\n\n @@unique([name])\n}\n\n//////////////////////////////////////////\n// TimelineTemplatePhase model – phases associated with a timeline template\n//////////////////////////////////////////\nmodel TimelineTemplatePhase {\n id String @id @default(uuid())\n timelineTemplateId String\n phaseId String // identifier for the phase\n predecessor String? // optional predecessor phase id\n defaultDuration Int // duration (in minutes, hours, etc.) as per business rules\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id], onDelete: Cascade)\n\n @@index([timelineTemplateId])\n @@index([timelineTemplateId, phaseId])\n}\n", + "inlineSchemaHash": "17c28fcc4b007a9aff216a8e4ea828c947e6b6f77bcddf8feade92f99a3a060b", + "copyEngine": true +} + +const fs = require('fs') + +config.dirname = __dirname +if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { + const alternativePaths = [ + "packages/challenge-prisma-client", + "challenge-prisma-client", + ] + + const alternativePath = alternativePaths.find((altPath) => { + return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) + }) ?? alternativePaths[0] + + config.dirname = path.join(process.cwd(), alternativePath) + config.isBundled = true +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Challenge\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"privateDescription\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeSource\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"descriptionFormat\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"projectId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"typeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"overviewTotalPrizes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"numOfRegistrants\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"numOfSubmissions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"numOfCheckpointSubmissions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currentPhaseNames\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wiproAllowed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tags\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"groups\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"taskIsTask\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"taskIsAssigned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"taskMemberId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"submissionStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"submissionEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"registrationStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"registrationEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"startDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"billingRecord\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeBilling\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeBilling\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacyId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacyRecord\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeLegacy\",\"nativeType\":null,\"relationName\":\"ChallengeLegacyRelation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ChallengeStatusEnum\",\"nativeType\":null,\"default\":\"NEW\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"constraintRecord\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeConstraint\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeConstraint\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeEvent\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeDiscussion\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeDiscussion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeMetadata\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeMetadata\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phases\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhase\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeSets\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePrizeSet\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePrizeSet\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reviewers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeReviewer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winners\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeWinner\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeWinner\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attachments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Attachment\",\"nativeType\":null,\"relationName\":\"AttachmentToChallenge\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"terms\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTerm\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTerm\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"skills\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeSkill\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeSkill\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"auditLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AuditLog\",\"nativeType\":null,\"relationName\":\"AuditLogToChallenge\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberAccesses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemberChallengeAccess\",\"nativeType\":null,\"relationName\":\"ChallengeToMemberChallengeAccess\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeType\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeType\",\"relationFromFields\":[\"typeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrack\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTrack\",\"relationFromFields\":[\"trackId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeToTimelineTemplate\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeType\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isTask\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultReviewers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeTypeToDefaultChallengeReviewer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeTrack\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacyId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrackEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTrack\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeTrack\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultReviewers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeTrackToDefaultChallengeReviewer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeTimelineTemplate\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"typeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToTimelineTemplate\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrack\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeTrack\",\"relationFromFields\":[\"trackId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeType\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToChallengeType\",\"relationFromFields\":[\"typeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AuditLog\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fieldName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oldValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"newValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"AuditLogToChallenge\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Attachment\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"AttachmentToChallenge\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fileSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeMetadata\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeMetadata\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Prize\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeSet\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePrizeSet\",\"nativeType\":null,\"relationName\":\"ChallengePrizeSetToPrize\",\"relationFromFields\":[\"prizeSetId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeSetId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeWinner\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeWinner\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"handle\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"placement\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PrizeSetTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeTerm\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeTerm\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"termId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeSkill\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeSkill\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"skillId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeBilling\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"billingAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"markup\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"clientBillingRate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeBilling\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeLegacy\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reviewType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ReviewTypeEnum\",\"nativeType\":null,\"default\":\"INTERNAL\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confidentialityType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"public\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"forumId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"directProjectId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"screeningScorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reviewScorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isTask\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"useSchedulingAPI\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pureV5Task\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pureV5\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"selfService\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"selfServiceCopilot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"track\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subTrack\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"legacySystemId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeLegacyRelation\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeEvent\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeEvent\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eventId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeDiscussion\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeDiscussion\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DiscussionTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"options\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeDiscussionOption\",\"nativeType\":null,\"relationName\":\"ChallengeDiscussionToChallengeDiscussionOption\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeDiscussionOption\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussion\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeDiscussion\",\"nativeType\":null,\"relationName\":\"ChallengeDiscussionToChallengeDiscussionOption\",\"relationFromFields\":[\"discussionId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discussionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"optionKey\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"optionValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeConstraint\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeConstraint\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allowedRegistrants\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Phase\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isOpen\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"duration\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengePhases\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhase\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToPhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ChallengeReviewer\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeReviewer\",\"nativeType\":null,\"relationName\":\"ChallengeReviewerToPhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"DefaultChallengeReviewer\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToPhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"name\"]}],\"isGenerated\":false},\"ChallengePhase\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isOpen\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"predecessor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"duration\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scheduledStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scheduledEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actualStartDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actualEndDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"constraints\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhaseConstraint\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToChallengePhaseConstraint\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePhase\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Phase\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToPhase\",\"relationFromFields\":[\"phaseId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengePhaseConstraint\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengePhaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengePhase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengePhase\",\"nativeType\":null,\"relationName\":\"ChallengePhaseToChallengePhaseConstraint\",\"relationFromFields\":[\"challengePhaseId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengePrizeSet\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PrizeSetTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"nativeType\":null,\"relationName\":\"ChallengePrizeSetToPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengePrizeSet\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ChallengeReviewer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMemberReview\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberReviewerCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fixedAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"baseCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"incrementalCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ReviewOpportunityTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiWorkflowId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"14\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shouldOpenOpportunity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToChallengeReviewer\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Phase\",\"nativeType\":null,\"relationName\":\"ChallengeReviewerToPhase\",\"relationFromFields\":[\"phaseId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DefaultChallengeReviewer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"typeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scorecardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMemberReview\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberReviewerCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fixedAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"baseCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"incrementalCoefficient\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opportunityType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ReviewOpportunityTypeEnum\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiWorkflowId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"14\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shouldOpenOpportunity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeType\",\"nativeType\":null,\"relationName\":\"ChallengeTypeToDefaultChallengeReviewer\",\"relationFromFields\":[\"typeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeTrack\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTrack\",\"nativeType\":null,\"relationName\":\"ChallengeTrackToDefaultChallengeReviewer\",\"relationFromFields\":[\"trackId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToTimelineTemplate\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phase\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Phase\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToPhase\",\"relationFromFields\":[\"phaseId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TimelineTemplate\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phases\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplatePhase\",\"nativeType\":null,\"relationName\":\"TimelineTemplateToTimelineTemplatePhase\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challengeTimelineTemplates\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChallengeTimelineTemplate\",\"nativeType\":null,\"relationName\":\"ChallengeTimelineTemplateToTimelineTemplate\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToTimelineTemplate\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"DefaultChallengeReviewer\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DefaultChallengeReviewer\",\"nativeType\":null,\"relationName\":\"DefaultChallengeReviewerToTimelineTemplate\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"name\"]}],\"isGenerated\":false,\"documentation\":\"///////////////////////////////////////\\\\n///////////////////////////////////////\"},\"TimelineTemplatePhase\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"predecessor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultDuration\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TimelineTemplate\",\"nativeType\":null,\"relationName\":\"TimelineTemplateToTimelineTemplatePhase\",\"relationFromFields\":[\"timelineTemplateId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"///////////////////////////////////////\\\\n///////////////////////////////////////\"},\"MemberChallengeAccess\":{\"dbName\":\"MemberChallengeAccess\",\"schema\":null,\"fields\":[{\"name\":\"challengeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"challenge\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Challenge\",\"nativeType\":null,\"relationName\":\"ChallengeToMemberChallengeAccess\",\"relationFromFields\":[\"challengeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"ChallengeTrackEnum\":{\"values\":[{\"name\":\"DESIGN\",\"dbName\":null},{\"name\":\"DATA_SCIENCE\",\"dbName\":null},{\"name\":\"DEVELOPMENT\",\"dbName\":null},{\"name\":\"QUALITY_ASSURANCE\",\"dbName\":null}],\"dbName\":null},\"ReviewTypeEnum\":{\"values\":[{\"name\":\"COMMUNITY\",\"dbName\":null},{\"name\":\"INTERNAL\",\"dbName\":null},{\"name\":\"SYSTEM\",\"dbName\":null},{\"name\":\"PROVISIONAL\",\"dbName\":null},{\"name\":\"EXAMPLE\",\"dbName\":null}],\"dbName\":null},\"DiscussionTypeEnum\":{\"values\":[{\"name\":\"CHALLENGE\",\"dbName\":null}],\"dbName\":null},\"ChallengeStatusEnum\":{\"values\":[{\"name\":\"NEW\",\"dbName\":null},{\"name\":\"DRAFT\",\"dbName\":null},{\"name\":\"APPROVED\",\"dbName\":null},{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"COMPLETED\",\"dbName\":null},{\"name\":\"DELETED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null},{\"name\":\"CANCELLED_FAILED_REVIEW\",\"dbName\":null},{\"name\":\"CANCELLED_FAILED_SCREENING\",\"dbName\":null},{\"name\":\"CANCELLED_ZERO_SUBMISSIONS\",\"dbName\":null},{\"name\":\"CANCELLED_WINNER_UNRESPONSIVE\",\"dbName\":null},{\"name\":\"CANCELLED_CLIENT_REQUEST\",\"dbName\":null},{\"name\":\"CANCELLED_REQUIREMENTS_INFEASIBLE\",\"dbName\":null},{\"name\":\"CANCELLED_ZERO_REGISTRATIONS\",\"dbName\":null},{\"name\":\"CANCELLED_PAYMENT_FAILED\",\"dbName\":null}],\"dbName\":null},\"PrizeSetTypeEnum\":{\"values\":[{\"name\":\"PLACEMENT\",\"dbName\":null},{\"name\":\"COPILOT\",\"dbName\":null},{\"name\":\"REVIEWER\",\"dbName\":null},{\"name\":\"CHECKPOINT\",\"dbName\":null}],\"dbName\":null},\"ReviewOpportunityTypeEnum\":{\"values\":[{\"name\":\"REGULAR_REVIEW\",\"dbName\":null},{\"name\":\"COMPONENT_DEV_REVIEW\",\"dbName\":null},{\"name\":\"SPEC_REVIEW\",\"dbName\":null},{\"name\":\"ITERATIVE_REVIEW\",\"dbName\":null},{\"name\":\"SCENARIOS_REVIEW\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined +config.compilerWasm = undefined + + +const { warnEnvConflicts } = require('./runtime/library.js') + +warnEnvConflicts({ + rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), + schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) +}) + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + +// file annotations for bundling tools to include these files +path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node"); +path.join(process.cwd(), "packages/challenge-prisma-client/libquery_engine-debian-openssl-3.0.x.so.node") +// file annotations for bundling tools to include these files +path.join(__dirname, "schema.prisma"); +path.join(process.cwd(), "packages/challenge-prisma-client/schema.prisma") diff --git a/packages/challenge-prisma-client/libquery_engine-debian-openssl-3.0.x.so.node b/packages/challenge-prisma-client/libquery_engine-debian-openssl-3.0.x.so.node new file mode 100755 index 0000000..ed0a9c2 Binary files /dev/null and b/packages/challenge-prisma-client/libquery_engine-debian-openssl-3.0.x.so.node differ diff --git a/packages/challenge-prisma-client/package.json b/packages/challenge-prisma-client/package.json new file mode 100644 index 0000000..e277a2b --- /dev/null +++ b/packages/challenge-prisma-client/package.json @@ -0,0 +1,183 @@ +{ + "name": "prisma-client-a51c6f6f7db00d6e1e696c2e9b5621d5947d92bcf356e3d4fabfb49c368a7591", + "main": "index.js", + "types": "index.d.ts", + "browser": "default.js", + "exports": { + "./client": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./package.json": "./package.json", + ".": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./edge": { + "types": "./edge.d.ts", + "require": "./edge.js", + "import": "./edge.js", + "default": "./edge.js" + }, + "./react-native": { + "types": "./react-native.d.ts", + "require": "./react-native.js", + "import": "./react-native.js", + "default": "./react-native.js" + }, + "./extension": { + "types": "./extension.d.ts", + "require": "./extension.js", + "import": "./extension.js", + "default": "./extension.js" + }, + "./index-browser": { + "types": "./index.d.ts", + "require": "./index-browser.js", + "import": "./index-browser.js", + "default": "./index-browser.js" + }, + "./index": { + "types": "./index.d.ts", + "require": "./index.js", + "import": "./index.js", + "default": "./index.js" + }, + "./wasm": { + "types": "./wasm.d.ts", + "require": "./wasm.js", + "import": "./wasm.mjs", + "default": "./wasm.mjs" + }, + "./runtime/client": { + "types": "./runtime/client.d.ts", + "node": { + "require": "./runtime/client.js", + "default": "./runtime/client.js" + }, + "require": "./runtime/client.js", + "import": "./runtime/client.mjs", + "default": "./runtime/client.mjs" + }, + "./runtime/library": { + "types": "./runtime/library.d.ts", + "require": "./runtime/library.js", + "import": "./runtime/library.mjs", + "default": "./runtime/library.mjs" + }, + "./runtime/binary": { + "types": "./runtime/binary.d.ts", + "require": "./runtime/binary.js", + "import": "./runtime/binary.mjs", + "default": "./runtime/binary.mjs" + }, + "./runtime/wasm-engine-edge": { + "types": "./runtime/wasm-engine-edge.d.ts", + "require": "./runtime/wasm-engine-edge.js", + "import": "./runtime/wasm-engine-edge.mjs", + "default": "./runtime/wasm-engine-edge.mjs" + }, + "./runtime/wasm-compiler-edge": { + "types": "./runtime/wasm-compiler-edge.d.ts", + "require": "./runtime/wasm-compiler-edge.js", + "import": "./runtime/wasm-compiler-edge.mjs", + "default": "./runtime/wasm-compiler-edge.mjs" + }, + "./runtime/edge": { + "types": "./runtime/edge.d.ts", + "require": "./runtime/edge.js", + "import": "./runtime/edge-esm.js", + "default": "./runtime/edge-esm.js" + }, + "./runtime/react-native": { + "types": "./runtime/react-native.d.ts", + "require": "./runtime/react-native.js", + "import": "./runtime/react-native.js", + "default": "./runtime/react-native.js" + }, + "./runtime/index-browser": { + "types": "./runtime/index-browser.d.ts", + "require": "./runtime/index-browser.js", + "import": "./runtime/index-browser.mjs", + "default": "./runtime/index-browser.mjs" + }, + "./generator-build": { + "require": "./generator-build/index.js", + "import": "./generator-build/index.js", + "default": "./generator-build/index.js" + }, + "./sql": { + "require": { + "types": "./sql.d.ts", + "node": "./sql.js", + "default": "./sql.js" + }, + "import": { + "types": "./sql.d.ts", + "node": "./sql.mjs", + "default": "./sql.mjs" + }, + "default": "./sql.js" + }, + "./*": "./*" + }, + "version": "6.19.0", + "sideEffects": false, + "imports": { + "#wasm-engine-loader": { + "edge-light": "./wasm-edge-light-loader.mjs", + "workerd": "./wasm-worker-loader.mjs", + "worker": "./wasm-worker-loader.mjs", + "default": "./wasm-worker-loader.mjs" + }, + "#main-entry-point": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + } + } +} \ No newline at end of file diff --git a/packages/challenge-prisma-client/query_engine_bg.js b/packages/challenge-prisma-client/query_engine_bg.js new file mode 100644 index 0000000..5faf0a5 --- /dev/null +++ b/packages/challenge-prisma-client/query_engine_bg.js @@ -0,0 +1,2 @@ +"use strict";var F=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var U=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var n in t)F(e,n,{get:t[n],enumerable:!0})},N=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!U.call(e,o)&&o!==n&&F(e,o,{get:()=>t[o],enumerable:!(r=j(t,o))||r.enumerable});return e};var C=e=>N(F({},"__esModule",{value:!0}),e);var kt={};L(kt,{QueryEngine:()=>k,__wbg_Error_e83987f665cf5504:()=>J,__wbg_Number_bb48ca12f395cd08:()=>X,__wbg_String_8f0eb39a4a4c2f66:()=>Y,__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd:()=>K,__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68:()=>Z,__wbg___wbindgen_debug_string_df47ffb5e35e6763:()=>ee,__wbg___wbindgen_in_bb933bd9e1b3bc0f:()=>te,__wbg___wbindgen_is_bigint_cb320707dcd35f0b:()=>ne,__wbg___wbindgen_is_function_ee8a6c5833c90377:()=>re,__wbg___wbindgen_is_object_c818261d21f283a4:()=>_e,__wbg___wbindgen_is_string_fbb76cb2940daafd:()=>oe,__wbg___wbindgen_is_undefined_2d472862bd29a478:()=>ce,__wbg___wbindgen_jsval_eq_6b13ab83478b1c50:()=>ie,__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147:()=>ue,__wbg___wbindgen_number_get_a20bf9b85341449d:()=>se,__wbg___wbindgen_string_get_e4f06c90489ad01b:()=>be,__wbg___wbindgen_throw_b855445ff6a94295:()=>fe,__wbg__wbg_cb_unref_2454a539ea5790d9:()=>ae,__wbg_call_525440f72fbfc0ea:()=>ge,__wbg_call_e762c39fa8ea36bf:()=>le,__wbg_crypto_805be4ce92f1e370:()=>de,__wbg_done_2042aa2670fb1db1:()=>we,__wbg_entries_e171b586f8f6bdbf:()=>pe,__wbg_exec_fdeec61d47617356:()=>xe,__wbg_getRandomValues_f6a868620c8bab49:()=>ye,__wbg_getTime_14776bfb48a1bff9:()=>me,__wbg_get_7bed016f185add81:()=>he,__wbg_get_ece95cf6585650d9:()=>Te,__wbg_get_efcb449f58ec27c2:()=>Ae,__wbg_get_with_ref_key_1dc361bd10053bfe:()=>Se,__wbg_has_787fafc980c3ccdb:()=>Fe,__wbg_instanceof_ArrayBuffer_70beb1189ca63b38:()=>Ie,__wbg_instanceof_Map_8579b5e2ab5437c7:()=>qe,__wbg_instanceof_Promise_001fdd42afa1b7ef:()=>Ee,__wbg_instanceof_Uint8Array_20c8e73002f7af98:()=>ke,__wbg_isArray_96e0af9891d0945d:()=>Oe,__wbg_isSafeInteger_d216eda7911dde36:()=>Me,__wbg_iterator_e5822695327a3c39:()=>ve,__wbg_keys_b4d27b02ad14f4be:()=>De,__wbg_length_69bca3cb64fc8748:()=>Re,__wbg_length_cdd215e10d9dd507:()=>je,__wbg_msCrypto_2ac4d17c4748234a:()=>Be,__wbg_new_0_f9740686d739025c:()=>Ue,__wbg_new_1acc0b6eea89d040:()=>Le,__wbg_new_23fa8b12a239f036:()=>Ne,__wbg_new_3c3d849046688a66:()=>Ce,__wbg_new_5a79be3ab53b8aa5:()=>$e,__wbg_new_68651c719dcda04e:()=>Ve,__wbg_new_e17d9f43105b08be:()=>We,__wbg_new_from_slice_92f4d78ca282a2d2:()=>ze,__wbg_new_no_args_ee98eee5275000a4:()=>Pe,__wbg_new_with_length_01aa0dc35aa13543:()=>Ge,__wbg_next_020810e0ae8ebcb0:()=>Qe,__wbg_next_2c826fe5dfec6b6a:()=>He,__wbg_node_ecc8306b9857f33d:()=>Je,__wbg_now_793306c526e2e3b6:()=>Xe,__wbg_now_7fd00a794a07d388:()=>Ye,__wbg_now_b3f7572f6ef3d3a9:()=>Ke,__wbg_process_5cff2739921be718:()=>Ze,__wbg_prototypesetcall_2a6620b6922694b2:()=>et,__wbg_push_df81a39d04db858c:()=>tt,__wbg_queueMicrotask_5a8a9131f3f0b37b:()=>nt,__wbg_queueMicrotask_6d79674585219521:()=>rt,__wbg_randomFillSync_d3c85af7e31cf1f8:()=>_t,__wbg_require_0c566c6f2eef6c79:()=>ot,__wbg_resolve_caf97c30b83f7053:()=>ct,__wbg_setTimeout_5d6a1d4fc51ea450:()=>it,__wbg_set_3f1d0b984ed272ed:()=>ut,__wbg_set_907fb406c34a251d:()=>st,__wbg_set_c213c871859d6500:()=>bt,__wbg_set_c2abbebe8b9ebee1:()=>ft,__wbg_set_wasm:()=>$,__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e:()=>at,__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac:()=>gt,__wbg_static_accessor_SELF_6fdf4b64710cc91b:()=>lt,__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2:()=>dt,__wbg_subarray_480600f3d6a9f26c:()=>wt,__wbg_then_4f46f6544e6b4a28:()=>pt,__wbg_then_70d05cf780a18d77:()=>xt,__wbg_valueOf_9eee4828c11458ca:()=>yt,__wbg_value_692627309814bb8c:()=>mt,__wbg_versions_a8e5a362e1f16442:()=>ht,__wbindgen_cast_2241b6af4c4b2941:()=>Tt,__wbindgen_cast_4625c577ab2ec9ee:()=>At,__wbindgen_cast_7bf296c42657ff30:()=>St,__wbindgen_cast_9ae0607507abb057:()=>Ft,__wbindgen_cast_cb9088102bce6b30:()=>It,__wbindgen_cast_d6cd19b81560fd6e:()=>qt,__wbindgen_init_externref_table:()=>Et,debug_panic:()=>G,getBuildTimeInfo:()=>P});module.exports=C(kt);var T=()=>{};T.prototype=T;let _;function $(e){_=e}let A=null;function y(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(_.memory.buffer)),A}let S=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});S.decode();const V=2146435072;let I=0;function W(e,t){return I+=t,I>=V&&(S=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),S.decode(),I=t),S.decode(y().subarray(e,e+t))}function w(e,t){return e=e>>>0,W(e,t)}let s=0;const m=new TextEncoder;"encodeInto"in m||(m.encodeInto=function(e,t){const n=m.encode(e);return t.set(n),{read:e.length,written:n.length}});function b(e,t,n){if(n===void 0){const u=m.encode(e),f=t(u.length,1)>>>0;return y().subarray(f,f+u.length).set(u),s=u.length,f}let r=e.length,o=t(r,1)>>>0;const i=y();let c=0;for(;c127)break;i[o+c]=u}if(c!==r){c!==0&&(e=e.slice(c)),o=n(o,r,r=c+e.length*3,1)>>>0;const u=y().subarray(o+c,o+r),f=m.encodeInto(e,u);c+=f.written,o=n(o,r,c,1)>>>0}return s=c,o}let p=null;function l(){return(p===null||p.buffer.detached===!0||p.buffer.detached===void 0&&p.buffer!==_.memory.buffer)&&(p=new DataView(_.memory.buffer)),p}function a(e){return e==null}function q(e){const t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){const o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){const o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){const o=e.length;let i="[";o>0&&(i+=q(e[0]));for(let c=1;c1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message} +${e.stack}`:r}function x(e){const t=_.__externref_table_alloc();return _.__wbindgen_externrefs.set(t,e),t}function g(e,t){try{return e.apply(this,t)}catch(n){const r=x(n);_.__wbindgen_exn_store(r)}}function E(e,t){return e=e>>>0,y().subarray(e/1,e/1+t)}const O=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));function z(e,t,n,r){const o={a:e,b:t,cnt:1,dtor:n},i=(...c)=>{o.cnt++;const u=o.a;o.a=0;try{return r(u,o.b,...c)}finally{o.a=u,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,O.unregister(o))},O.register(i,o,o),i}function M(e){const t=_.__wbindgen_externrefs.get(e);return _.__externref_table_dealloc(e),t}function P(){return _.getBuildTimeInfo()}function G(e){var t=a(e)?0:b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=s;const r=_.debug_panic(t,n);if(r[1])throw M(r[0])}function Q(e,t,n){_.wasm_bindgen__convert__closures_____invoke__ha235f3ea55a06a09(e,t,n)}function H(e,t,n,r){_.wasm_bindgen__convert__closures_____invoke__h1a2f20be69ab8911(e,t,n,r)}const v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>_.__wbg_queryengine_free(e>>>0,1));class k{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,v.unregister(this),t}free(){const t=this.__destroy_into_raw();_.__wbg_queryengine_free(t,0)}disconnect(t,n){const r=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),o=s,i=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),c=s;return _.queryengine_disconnect(this.__wbg_ptr,r,o,i,c)}startTransaction(t,n,r){const o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=s,c=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=s,f=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),d=s;return _.queryengine_startTransaction(this.__wbg_ptr,o,i,c,u,f,d)}commitTransaction(t,n,r){const o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=s,c=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=s,f=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),d=s;return _.queryengine_commitTransaction(this.__wbg_ptr,o,i,c,u,f,d)}rollbackTransaction(t,n,r){const o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=s,c=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=s,f=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),d=s;return _.queryengine_rollbackTransaction(this.__wbg_ptr,o,i,c,u,f,d)}constructor(t,n,r){const o=_.queryengine_new(t,n,r);if(o[2])throw M(o[1]);return this.__wbg_ptr=o[0]>>>0,v.register(this,this.__wbg_ptr,this),this}query(t,n,r,o){const i=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),c=s,u=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),f=s;var d=a(r)?0:b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),h=s;const D=b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),R=s;return _.queryengine_query(this.__wbg_ptr,i,c,u,f,d,h,D,R)}trace(t){const n=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=s;return _.queryengine_trace(this.__wbg_ptr,n,r)}connect(t,n){const r=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),o=s,i=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),c=s;return _.queryengine_connect(this.__wbg_ptr,r,o,i,c)}metrics(t){const n=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=s;return _.queryengine_metrics(this.__wbg_ptr,n,r)}}Symbol.dispose&&(k.prototype[Symbol.dispose]=k.prototype.free);function J(e,t){return Error(w(e,t))}function X(e){return Number(e)}function Y(e,t){const n=String(t),r=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),o=s;l().setInt32(e+4*1,o,!0),l().setInt32(e+4*0,r,!0)}function K(e,t){const n=t,r=typeof n=="bigint"?n:void 0;l().setBigInt64(e+8*1,a(r)?BigInt(0):r,!0),l().setInt32(e+4*0,!a(r),!0)}function Z(e){const t=e,n=typeof t=="boolean"?t:void 0;return a(n)?16777215:n?1:0}function ee(e,t){const n=q(t),r=b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),o=s;l().setInt32(e+4*1,o,!0),l().setInt32(e+4*0,r,!0)}function te(e,t){return e in t}function ne(e){return typeof e=="bigint"}function re(e){return typeof e=="function"}function _e(e){const t=e;return typeof t=="object"&&t!==null}function oe(e){return typeof e=="string"}function ce(e){return e===void 0}function ie(e,t){return e===t}function ue(e,t){return e==t}function se(e,t){const n=t,r=typeof n=="number"?n:void 0;l().setFloat64(e+8*1,a(r)?0:r,!0),l().setInt32(e+4*0,!a(r),!0)}function be(e,t){const n=t,r=typeof n=="string"?n:void 0;var o=a(r)?0:b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),i=s;l().setInt32(e+4*1,i,!0),l().setInt32(e+4*0,o,!0)}function fe(e,t){throw new Error(w(e,t))}function ae(e){e._wbg_cb_unref()}function ge(){return g(function(e,t,n){return e.call(t,n)},arguments)}function le(){return g(function(e,t){return e.call(t)},arguments)}function de(e){return e.crypto}function we(e){return e.done}function pe(e){return Object.entries(e)}function xe(e,t,n){const r=e.exec(w(t,n));return a(r)?0:x(r)}function ye(){return g(function(e,t){e.getRandomValues(t)},arguments)}function me(e){return e.getTime()}function he(e,t){return e[t>>>0]}function Te(){return g(function(e,t){return e[t]},arguments)}function Ae(){return g(function(e,t){return Reflect.get(e,t)},arguments)}function Se(e,t){return e[t]}function Fe(){return g(function(e,t){return Reflect.has(e,t)},arguments)}function Ie(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t}function qe(e){let t;try{t=e instanceof Map}catch{t=!1}return t}function Ee(e){let t;try{t=e instanceof Promise}catch{t=!1}return t}function ke(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t}function Oe(e){return Array.isArray(e)}function Me(e){return Number.isSafeInteger(e)}function ve(){return Symbol.iterator}function De(e){return Object.keys(e)}function Re(e){return e.length}function je(e){return e.length}function Be(e){return e.msCrypto}function Ue(){return new Date}function Le(){return new Object}function Ne(e,t,n,r){return new RegExp(w(e,t),w(n,r))}function Ce(e,t){try{var n={a:e,b:t},r=(i,c)=>{const u=n.a;n.a=0;try{return H(u,n.b,i,c)}finally{n.a=u}};return new Promise(r)}finally{n.a=n.b=0}}function $e(e){return new Uint8Array(e)}function Ve(){return new Map}function We(){return new Array}function ze(e,t){return new Uint8Array(E(e,t))}function Pe(e,t){return new T(w(e,t))}function Ge(e){return new Uint8Array(e>>>0)}function Qe(){return g(function(e){return e.next()},arguments)}function He(e){return e.next}function Je(e){return e.node}function Xe(){return Date.now()}function Ye(e){return e.now()}function Ke(){return g(function(){return Date.now()},arguments)}function Ze(e){return e.process}function et(e,t,n){Uint8Array.prototype.set.call(E(e,t),n)}function tt(e,t){return e.push(t)}function nt(e){return e.queueMicrotask}function rt(e){queueMicrotask(e)}function _t(){return g(function(e,t){e.randomFillSync(t)},arguments)}function ot(){return g(function(){return module.require},arguments)}function ct(e){return Promise.resolve(e)}function it(e,t){return setTimeout(e,t>>>0)}function ut(e,t,n){e[t]=n}function st(e,t,n){return e.set(t,n)}function bt(e,t,n){e[t>>>0]=n}function ft(){return g(function(e,t,n){return Reflect.set(e,t,n)},arguments)}function at(){const e=typeof global>"u"?null:global;return a(e)?0:x(e)}function gt(){const e=typeof globalThis>"u"?null:globalThis;return a(e)?0:x(e)}function lt(){const e=typeof self>"u"?null:self;return a(e)?0:x(e)}function dt(){const e=typeof window>"u"?null:window;return a(e)?0:x(e)}function wt(e,t,n){return e.subarray(t>>>0,n>>>0)}function pt(e,t){return e.then(t)}function xt(e,t,n){return e.then(t,n)}function yt(e){return e.valueOf()}function mt(e){return e.value}function ht(e){return e.versions}function Tt(e,t){return w(e,t)}function At(e){return BigInt.asUintN(64,e)}function St(e,t){return z(e,t,_.wasm_bindgen__closure__destroy__hf9ae564cf31e91c2,Q)}function Ft(e){return e}function It(e,t){return E(e,t)}function qt(e){return e}function Et(){const e=_.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}0&&(module.exports={QueryEngine,__wbg_Error_e83987f665cf5504,__wbg_Number_bb48ca12f395cd08,__wbg_String_8f0eb39a4a4c2f66,__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd,__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68,__wbg___wbindgen_debug_string_df47ffb5e35e6763,__wbg___wbindgen_in_bb933bd9e1b3bc0f,__wbg___wbindgen_is_bigint_cb320707dcd35f0b,__wbg___wbindgen_is_function_ee8a6c5833c90377,__wbg___wbindgen_is_object_c818261d21f283a4,__wbg___wbindgen_is_string_fbb76cb2940daafd,__wbg___wbindgen_is_undefined_2d472862bd29a478,__wbg___wbindgen_jsval_eq_6b13ab83478b1c50,__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147,__wbg___wbindgen_number_get_a20bf9b85341449d,__wbg___wbindgen_string_get_e4f06c90489ad01b,__wbg___wbindgen_throw_b855445ff6a94295,__wbg__wbg_cb_unref_2454a539ea5790d9,__wbg_call_525440f72fbfc0ea,__wbg_call_e762c39fa8ea36bf,__wbg_crypto_805be4ce92f1e370,__wbg_done_2042aa2670fb1db1,__wbg_entries_e171b586f8f6bdbf,__wbg_exec_fdeec61d47617356,__wbg_getRandomValues_f6a868620c8bab49,__wbg_getTime_14776bfb48a1bff9,__wbg_get_7bed016f185add81,__wbg_get_ece95cf6585650d9,__wbg_get_efcb449f58ec27c2,__wbg_get_with_ref_key_1dc361bd10053bfe,__wbg_has_787fafc980c3ccdb,__wbg_instanceof_ArrayBuffer_70beb1189ca63b38,__wbg_instanceof_Map_8579b5e2ab5437c7,__wbg_instanceof_Promise_001fdd42afa1b7ef,__wbg_instanceof_Uint8Array_20c8e73002f7af98,__wbg_isArray_96e0af9891d0945d,__wbg_isSafeInteger_d216eda7911dde36,__wbg_iterator_e5822695327a3c39,__wbg_keys_b4d27b02ad14f4be,__wbg_length_69bca3cb64fc8748,__wbg_length_cdd215e10d9dd507,__wbg_msCrypto_2ac4d17c4748234a,__wbg_new_0_f9740686d739025c,__wbg_new_1acc0b6eea89d040,__wbg_new_23fa8b12a239f036,__wbg_new_3c3d849046688a66,__wbg_new_5a79be3ab53b8aa5,__wbg_new_68651c719dcda04e,__wbg_new_e17d9f43105b08be,__wbg_new_from_slice_92f4d78ca282a2d2,__wbg_new_no_args_ee98eee5275000a4,__wbg_new_with_length_01aa0dc35aa13543,__wbg_next_020810e0ae8ebcb0,__wbg_next_2c826fe5dfec6b6a,__wbg_node_ecc8306b9857f33d,__wbg_now_793306c526e2e3b6,__wbg_now_7fd00a794a07d388,__wbg_now_b3f7572f6ef3d3a9,__wbg_process_5cff2739921be718,__wbg_prototypesetcall_2a6620b6922694b2,__wbg_push_df81a39d04db858c,__wbg_queueMicrotask_5a8a9131f3f0b37b,__wbg_queueMicrotask_6d79674585219521,__wbg_randomFillSync_d3c85af7e31cf1f8,__wbg_require_0c566c6f2eef6c79,__wbg_resolve_caf97c30b83f7053,__wbg_setTimeout_5d6a1d4fc51ea450,__wbg_set_3f1d0b984ed272ed,__wbg_set_907fb406c34a251d,__wbg_set_c213c871859d6500,__wbg_set_c2abbebe8b9ebee1,__wbg_set_wasm,__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e,__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac,__wbg_static_accessor_SELF_6fdf4b64710cc91b,__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2,__wbg_subarray_480600f3d6a9f26c,__wbg_then_4f46f6544e6b4a28,__wbg_then_70d05cf780a18d77,__wbg_valueOf_9eee4828c11458ca,__wbg_value_692627309814bb8c,__wbg_versions_a8e5a362e1f16442,__wbindgen_cast_2241b6af4c4b2941,__wbindgen_cast_4625c577ab2ec9ee,__wbindgen_cast_7bf296c42657ff30,__wbindgen_cast_9ae0607507abb057,__wbindgen_cast_cb9088102bce6b30,__wbindgen_cast_d6cd19b81560fd6e,__wbindgen_init_externref_table,debug_panic,getBuildTimeInfo}); diff --git a/packages/challenge-prisma-client/query_engine_bg.wasm b/packages/challenge-prisma-client/query_engine_bg.wasm new file mode 100644 index 0000000..ae035bc Binary files /dev/null and b/packages/challenge-prisma-client/query_engine_bg.wasm differ diff --git a/packages/challenge-prisma-client/runtime/edge-esm.js b/packages/challenge-prisma-client/runtime/edge-esm.js new file mode 100644 index 0000000..a382dc1 --- /dev/null +++ b/packages/challenge-prisma-client/runtime/edge-esm.js @@ -0,0 +1,35 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +var ca=Object.create;var rn=Object.defineProperty;var pa=Object.getOwnPropertyDescriptor;var ma=Object.getOwnPropertyNames;var fa=Object.getPrototypeOf,da=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),or=(e,t)=>{for(var r in t)rn(e,r,{get:t[r],enumerable:!0})},ga=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ma(t))!da.call(e,i)&&i!==r&&rn(e,i,{get:()=>t[i],enumerable:!(n=pa(t,i))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?ca(fa(e)):{},ga(t||!e||!e.__esModule?rn(r,"default",{value:e,enumerable:!0}):r,e));var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var Ti=Je(ze=>{"use strict";f();u();c();p();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ha=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=S.indexOf("=");M===-1&&(M=C);var F=M===C?0:4-M%4;return[M,F]}function l(S){var C=a(S),M=C[0],F=C[1];return(M+F)*3/4-F}function d(S,C,M){return(C+M)*3/4-M}function g(S){var C,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,oe=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=C>>8&255,O[L++]=C&255;return B===2&&(C=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=C&255),B===1&&(C=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=C>>8&255,O[L++]=C&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,C,M){for(var F,B=[],O=C;Ooe?oe:L+O));return F===1?(C=S[M-1],B.push(t[C>>2]+t[C<<4&63]+"==")):F===2&&(C=(S[M-2]<<8)+S[M-1],B.push(t[C>>10]+t[C>>4&63]+t[C<<2&63]+"=")),B.join("")}}),ya=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:s-1,C=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=C,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=C,a/=256,g-=8);t[n+S-C]|=M*128}}),nn=ha(),We=ya(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=va;ze.INSPECT_MAX_BYTES=50;var sr=2147483647;ze.kMaxLength=sr;A.TYPED_ARRAY_SUPPORT=wa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function wa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>sr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return an(e)}return pi(e,t,r)}A.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return ba(e,t);if(ArrayBuffer.isView(e))return xa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return fi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Pa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function mi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ea(e,t,r){return mi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Ea(e,t,r)};function an(e){return mi(e),xe(e<0?0:ln(e)|0)}A.allocUnsafe=function(e){return an(e)};A.allocUnsafeSlow=function(e){return an(e)};function ba(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=di(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function on(e){let t=e.length<0?0:ln(e.length)|0,r=xe(t);for(let n=0;n=sr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+sr.toString(16)+" bytes");return e|0}function va(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function di(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return sn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:sn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=di;function Ta(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return _a(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return Da(this,t,r);case"latin1":case"binary":return Ma(this,t,r);case"base64":return Oa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Na(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Le(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(A.prototype[si]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,cn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Aa(this,e,t,r);case"utf8":case"utf-8":return Ra(this,e,t,r);case"ascii":case"latin1":case"binary":return Ca(this,e,t,r);case"base64":return Sa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ia(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Oa(e,t,r){return t===0&&r===e.length?nn.fromByteArray(e):nn.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,d,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return ka(n)}var li=4096;function ka(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Re(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Re(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Re(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Re(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Fa(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ke.ERR_OUT_OF_RANGE("value",a,e)}Fa(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var La=/[^+/0-9A-Za-z-_]/g;function Ua(e){if(e=e.split("=")[0],e=e.trim().replace(La,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function sn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ba(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return nn.toByteArray(Ua(e))}function ar(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function cn(e){return e!==e}var Va=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?$a:e}function $a(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Qe(Ti())});function Wa(){return!1}function fn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Ha(){return fn()}function za(){return[]}function Ya(e){e(null,[])}function Za(){return""}function Xa(){return""}function el(){}function tl(){}function rl(){}function nl(){}function il(){}function ol(){}function sl(){}function al(){}function ll(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function ul(e,t){t(null,fn())}var cl,pl,ji,Gi=fe(()=>{"use strict";f();u();c();p();m();cl={},pl={existsSync:Wa,lstatSync:fn,stat:ul,statSync:Ha,readdirSync:za,readdir:Ya,readlinkSync:Za,realpathSync:Xa,chmodSync:el,renameSync:tl,mkdirSync:rl,rmdirSync:nl,rmSync:il,unlinkSync:ol,watchFile:sl,unwatchFile:al,watch:ll,promises:cl},ji=pl});var Ji=Je((mf,ml)=>{ml.exports={name:"@prisma/internals",version:"6.19.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-engine-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function dl(...e){return e.join("/")}function gl(...e){return e.join("/")}function hl(e){let t=Qi(e),r=Ki(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Qi(e){let t=e.split("/");return t[t.length-1]}function Ki(e){return e.split("/").slice(0,-1).join("/")}function wl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Wi,yl,El,bl,pr,Hi=fe(()=>{"use strict";f();u();c();p();m();Wi="/",yl=":";El={sep:Wi},bl={basename:Qi,delimiter:yl,dirname:Ki,join:gl,normalize:wl,parse:hl,posix:El,resolve:dl,sep:Wi},pr=bl});var gn=Je((kf,vl)=>{vl.exports={name:"@prisma/engines-version",version:"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"2ba551f319ab1df4bc874a89965d8b3641056773"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var zi=Je(mr=>{"use strict";f();u();c();p();m();Object.defineProperty(mr,"__esModule",{value:!0});mr.enginesVersion=void 0;mr.enginesVersion=gn().prisma.enginesVersion});var Xi=Je((Gf,Zi)=>{"use strict";f();u();c();p();m();Zi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Sn=Je((jy,Eo)=>{"use strict";f();u();c();p();m();Eo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var Ao=fe(()=>{"use strict";f();u();c();p();m()});var Vr,Qo=fe(()=>{"use strict";f();u();c();p();m();Vr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});f();u();c();p();m();var Ci={};or(Ci,{defineExtension:()=>Ai,getExtensionContext:()=>Ri});f();u();c();p();m();f();u();c();p();m();function Ai(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Ri(e){return e}var Ii={};or(Ii,{validator:()=>Si});f();u();c();p();m();f();u();c();p();m();function Si(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var pn,Oi,ki,Di,Mi=!0;typeof y<"u"&&({FORCE_COLOR:pn,NODE_DISABLE_COLORS:Oi,NO_COLOR:ki,TERM:Di}=y.env||{},Mi=y.stdout&&y.stdout.isTTY);var ja={enabled:!Oi&&ki==null&&Di!=="dumb"&&(pn!=null&&pn!=="0"||Mi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!ja.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var bm=j(0,0),lr=j(1,22),ur=j(2,22),xm=j(3,23),_i=j(4,24),Pm=j(7,27),vm=j(8,28),Tm=j(9,29),Am=j(30,39),Ye=j(31,39),Ni=j(32,39),Fi=j(33,39),Li=j(34,39),Rm=j(35,39),Ui=j(36,39),Cm=j(37,39),Bi=j(90,39),Sm=j(90,39),Im=j(40,49),Om=j(41,49),km=j(42,49),Dm=j(43,49),Mm=j(44,49),_m=j(45,49),Nm=j(46,49),Fm=j(47,49);f();u();c();p();m();var Ga=100,qi=["green","yellow","blue","magenta","cyan","red"],cr=[],Vi=Date.now(),Ja=0,mn=typeof y<"u"?y.env:{};globalThis.DEBUG??=mn.DEBUG??"";globalThis.DEBUG_COLORS??=mn.DEBUG_COLORS?mn.DEBUG_COLORS==="true":!0;var Pt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Qa(e){let t={color:qi[Ja++%qi.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&cr.push([o,...n]),cr.length>Ga&&cr.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ka(g)),d=`+${Date.now()-Vi}ms`;Vi=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Z=new Proxy(Qa,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function Ka(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function $i(){cr.length=0}f();u();c();p();m();f();u();c();p();m();var fl=Ji(),dn=fl.version;f();u();c();p();m();function Ze(e){let t=xl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Pl())}function xl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Pl(){return"library"}f();u();c();p();m();var Yi="prisma+postgres",fr=`${Yi}:`;function dr(e){return e?.toString().startsWith(`${fr}//`)??!1}function hn(e){if(!dr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Tt={};or(Tt,{error:()=>Rl,info:()=>Al,log:()=>Tl,query:()=>Cl,should:()=>eo,tags:()=>vt,warn:()=>yn});f();u();c();p();m();var vt={error:Ye("prisma:error"),warn:Fi("prisma:warn"),info:Ui("prisma:info"),query:Li("prisma:query")},eo={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Tl(...e){console.log(...e)}function yn(e,...t){eo.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function Al(e,...t){console.info(`${vt.info} ${e}`,...t)}function Rl(e,...t){console.error(`${vt.error} ${e}`,...t)}function Cl(e,...t){console.log(`${vt.query} ${e}`,...t)}f();u();c();p();m();function Ue(e,t){throw new Error(t)}f();u();c();p();m();f();u();c();p();m();function wn({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var Sl=wn();function En(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Sl,"")}f();u();c();p();m();function bn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function gr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function xn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{to.has(e)||(to.add(e),yn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(se,"PrismaClientKnownRequestError");f();u();c();p();m();var Ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Ce,"PrismaClientRustPanicError");f();u();c();p();m();var ae=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ae,"PrismaClientUnknownRequestError");f();u();c();p();m();var ee=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(ee,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Se(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function no(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function At(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function Il(e){return{models:Pn(e.models),enums:Pn(e.enums),types:Pn(e.types)}}function Pn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function yr(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,De=1e9,vn="0123456789abcdef",br="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Tn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},ao,Pe,_=!0,vr="[DecimalError] ",ke=vr+"Invalid argument: ",lo=vr+"Precision limit exceeded",uo=vr+"crypto unavailable",co="[object Decimal]",X=Math.floor,K=Math.pow,Ol=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,kl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Dl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,po=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Ml=9007199254740991,_l=br.length-1,An=xr.length-1,R={toStringTag:co};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};R.ceil=function(){return k(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Nl(n,yo(n,r)),n.precision=e,n.rounding=t,k(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=K(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),d=l.plus(g),n=V(d.plus(g).times(a),d.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,k(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return V(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return k(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Ar(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Ar(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=An)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=An)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+I,s=Oe(d,a),n=t?Pr(g,a+10):Oe(e,a),l=V(s,n,a,1),Rt(l.d,i=h,T))do if(a+=10,s=Oe(d,a),n=t?Pr(g,a+10):Oe(e,a),l=V(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Rt(l.d,i+=10,T));return _=!0,k(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=X(e.e/D),g=X(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Tr(d,n),_?k(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ke+e);return r.d?(t=mo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ll(n,yo(n,r)),n.precision=e,n.rounding=t,k(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=X(g.e/D)+X(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Tr(o,r),_?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Cn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,De),t===void 0?t=n.rounding:ne(t,0,8),k(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(ne(e,0,De),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(ne(e,0,De),t===void 0?t=o.rounding:ne(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,C=I.constructor;if(!S)return new C(I);if(d=r=new C(1),n=l=new C(0),t=new C(n),o=t.e=mo(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new C(e),!a.isInt()||a.lt(d))throw Error(ke+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new C(z(S)),g=C.precision,C.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],C.precision=g,_=!0,T};R.toHexadecimal=R.toHex=function(e,t){return Cn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Cn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=X(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Ml)return i=fo(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Rn(e.times(Oe(a,n+r)),n),i.d&&(i=k(i,n+5,1),Rt(i.d,n,o)&&(t=n+10,i=k(Rn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,De),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,De),t===void 0?t=n.rounding:ne(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return k(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(ke+e)}function Rt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==K(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==K(10,t-3)-1,s}function wr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Nl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Ar(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var d,g,h,T,I,S,C,M,F,B,O,L,oe,J,Xr,rr,bt,en,ce,nr,ir=n.constructor,tn=n.s==i.s?1:-1,Y=n.d,$=i.d;if(!Y||!Y[0]||!$||!$[0])return new ir(!n.s||!i.s||(Y?$&&Y[0]==$[0]:!$)?NaN:Y&&Y[0]==0||!$?tn*0:tn/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=X(n.e/I)-X(i.e/I)),ce=$.length,bt=Y.length,F=new ir(tn),B=F.d=[],h=0;$[h]==(Y[h]||0);h++);if($[h]>(Y[h]||0)&&g--,o==null?(J=o=ir.precision,s=ir.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Y=e(Y,T,l),ce=$.length,bt=Y.length),rr=ce,O=Y.slice(0,ce),L=O.length;L=l/2&&++en;do T=0,d=t($,O,ce,L),d<0?(oe=O[0],ce!=L&&(oe=oe*l+(O[1]||0)),T=oe/en|0,T>1?(T>=l&&(T=l-1),C=e($,T,l),M=C.length,L=O.length,d=t(C,O,M,L),d==1&&(T--,r(C,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function Tr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Pr(e,t,r){if(t>_l)throw _=!0,r&&(e.precision=r),Error(lo);return k(new e(br),t,1,!0)}function he(e,t,r){if(t>An)throw Error(lo);return k(new e(xr),t,r,!0)}function mo(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function fo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),oo(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),oo(t.d,s)}return _=!0,o}function io(e){return e.d[e.d.length-1]&1}function go(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Rt(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,C=e,M=C.d,F=C.constructor,B=F.rounding,O=F.precision;if(C.s<0||!M||!M[0]||!C.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:C.s!=1?NaN:M?0:C);if(t==null?(_=!1,g=O):g=t,F.precision=g+=S,r=z(M),n=r.charAt(0),Math.abs(o=C.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(e),r=z(C.d),n=r.charAt(0),I++;o=C.e,n>1?(C=new F("0."+r),o++):C=new F(n+"."+r.slice(1))}else return d=Pr(F,g+2,O).times(o+""),C=Oe(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(C,O,B,_=!0):C;for(h=C,l=s=C=V(C.minus(1),C.plus(1),g,1),T=k(C.times(C),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),z(d.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Pr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Rt(l.d,g-S,B,a))F.precision=g+=S,d=s=C=V(h.minus(1),h.plus(1),g,1),T=k(C.times(C),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function ho(e){return String(e.s*e.s/0)}function Er(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),po.test(t))return Er(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(kl.test(t))r=16,t=t.toLowerCase();else if(Ol.test(t))r=2;else if(Dl.test(t))r=8;else throw Error(ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=fo(n,new n(r),o,o*2)),d=wr(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Tr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):ve.pow(2,l))),_=!0,e)}function Ll(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Ar(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,d++}return _=!0,s.d.length=h+1,s}function Ar(e,t){for(var r=e;--t;)r*=e;return r}function yo(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=io(r)?n?2:3:n?4:1,t;Pe=io(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Cn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(ne(r,1,De),n===void 0?n=I.rounding:ne(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=ho(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=wr(ye(T),10,i),T.e=T.d.length),h=wr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=ao),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=wr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Ul(e){return new this(e).abs()}function Bl(e){return new this(e).acos()}function ql(e){return new this(e).acosh()}function Vl(e,t){return new this(e).plus(t)}function $l(e){return new this(e).asin()}function jl(e){return new this(e).asinh()}function Gl(e){return new this(e).atan()}function Jl(e){return new this(e).atanh()}function Ql(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function Kl(e){return new this(e).cbrt()}function Wl(e){return k(e=new this(e),e.e+1,2)}function Hl(e,t,r){return new this(e).clamp(t,r)}function zl(e){if(!e||typeof e!="object")throw Error(vr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,De,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(ke+r+": "+n);if(r="crypto",i&&(this[r]=Tn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(uo);else this[r]=!1;else throw Error(ke+r+": "+n);return this}function Yl(e){return new this(e).cos()}function Zl(e){return new this(e).cosh()}function wo(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,so(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(uo);else for(;o=10;i/=10)n++;nCt,datamodelEnumToSchemaEnum:()=>vu});f();u();c();p();m();f();u();c();p();m();function vu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var Ct=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(Ct||{});var Tu=Qe(Xi());var Au={red:Ye,gray:Bi,dim:ur,bold:lr,underline:_i,highlightSource:e=>e.highlight()},Ru={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Cu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Su({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Iu(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Iu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Cr(e){let t=e.showColors?Au:Ru,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Cu(e),Su(r,t)}f();u();c();p();m();var Co=Qe(Sn());f();u();c();p();m();function Po(e,t,r){let n=vo(e),i=Ou(n),o=Du(i);o?Sr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function vo(e){return e.errors.flatMap(t=>t.kind==="Union"?vo(t):[t])}function Ou(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ku(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ku(e,t){return[...new Set(e.concat(t))]}function Du(e){return xn(e,(t,r)=>{let n=bo(t),i=bo(r);return n!==i?n-i:xo(t)-xo(r)})}function bo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function xo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();u();c();p();m();f();u();c();p();m();Ao();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};To();f();u();c();p();m();f();u();c();p();m();var Ir=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var Or=e=>e,kr={bold:Or,red:Or,green:Or,dim:Or,enabled:!1},Ro={bold:lr,red:Ye,green:Ni,dim:ur,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();u();c();p();m();var _e=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends _e{items=[];addItem(t){return this.items.push(new Ir(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends _e{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var St=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Sr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Mu(e,t);break;case"IncludeOnScalar":_u(e,t);break;case"EmptySelection":Nu(e,t,r);break;case"UnknownSelectionField":Bu(e,t);break;case"InvalidSelectionValue":qu(e,t);break;case"UnknownArgument":Vu(e,t);break;case"UnknownInputField":$u(e,t);break;case"RequiredArgumentMissing":ju(e,t);break;case"InvalidArgumentType":Gu(e,t);break;case"InvalidArgumentValue":Ju(e,t);break;case"ValueTooLarge":Qu(e,t);break;case"SomeFieldsMissing":Ku(e,t);break;case"TooManyFieldsGiven":Wu(e,t);break;case"Union":Po(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Mu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function _u(e,t){let[r,n]=at(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${It(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Nu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Fu(e,t,i);return}if(n.hasField("select")){Lu(e,t);return}}if(r?.[Se(e.outputType.name)]){Uu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Fu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Lu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Oo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${It(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Uu(e,t){let r=new St;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Bu(e,t){let r=ko(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Oo(n,e.outputType);break;case"include":Hu(n,e.outputType);break;case"omit":zu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(It(n)),i.join(" ")})}function qu(e,t){let r=ko(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Vu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Yu(n,e.arguments)),t.addErrorMessage(i=>So(i,r,e.arguments.map(o=>o.name)))}function $u(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Do(o,e.inputType)}t.addErrorMessage(o=>So(o,n,e.inputType.fields.map(s=>s.name)))}function So(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Xu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(It(e)),n.join(" ")}function ju(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new St,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(Io).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Io(e){return e.kind==="list"?`${Io(e.elementType)}[]`:e.name}function Gu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Dr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ju(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Dr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Qu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Ku(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Do(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Dr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(It(i)),o.join(" ")})}function Wu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Dr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Oo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Hu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function zu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function Yu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function ko(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Do(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function It({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Dr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Zu=3;function Xu(e,t){let r=1/0,n;for(let i of t){let o=(0,Co.default)(e,i);o>Zu||o`}};function lt(e){return e instanceof Ot}f();u();c();p();m();var Mr=Symbol(),On=new WeakMap,Te=class{constructor(t){t===Mr?On.set(this,`Prisma.${this._getName()}`):On.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return On.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Dt=class extends kt{#e};Dn(Dt,"DbNull");var Mt=class extends kt{#e};Dn(Mt,"JsonNull");var _t=class extends kt{#e};Dn(_t,"AnyNull");var kn={classes:{DbNull:Dt,JsonNull:Mt,AnyNull:_t},instances:{DbNull:new Dt(Mr),JsonNull:new Mt(Mr),AnyNull:new _t(Mr)}};function Dn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var Mo=": ",_r=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Mo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Mo).write(this.value)}};var Mn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function ut(e){return new Mn(_o(e))}function _o(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new _r(r,No(n));t.addField(i)}return t}function No(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(rt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=yr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Te?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Se(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ec(e):typeof e=="object"?_o(e):new H(Object.prototype.toString.call(e))}function ec(e){let t=new ot;for(let r of e)t.addItem(No(r));return t}function Nr(e,t){let r=t==="pretty"?Ro:kr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Sr(h,a,s);let{message:l,args:d}=Nr(a,r),g=Cr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new ee(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function Lo(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:tc({...e,...Fo(t.name,e,t.result.$allModels),...Fo(t.name,e,t.result[n])})}function tc(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return gr(e,n=>({...n,needs:r(n.name,new Set)}))}function Fo(e,t,r){return r?gr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:rc(t,o,i)})):{}}function rc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Uo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Bo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Lr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=At(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=At(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Lo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Lr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Lr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();u();c();p();m();var Ur=class{constructor(t){this.name=t}};function qo(e){return e instanceof Ur}function nc(e){return new Ur(e)}f();u();c();p();m();f();u();c();p();m();var Vo=Symbol(),Nt=class{constructor(t){if(t!==Vo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?_n:t}},_n=new Nt(Vo);function be(e){return e instanceof Nt}var ic={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},$o="explicitly `undefined` values are not allowed";function Fn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new Nn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:ic[t],query:Ft(r,h)}}function Ft({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Go(r,n),selection:oc(e,t,i,n)}}function oc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),uc(e,n)):sc(n,t,r)}function sc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ac(n,t,e),lc(n,r,e),n}function ac(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Ln(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ft(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ft(i,o)}}function lc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Bo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Ln(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function uc(e,t){let r={},n=t.getComputedFields(),i=Uo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Ln(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ft({},a):r[o]=!0;continue}r[o]=Ft(s,a)}}return r}function jo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(yr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(qo(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return cc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(pc(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==kn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(mc(e))return e.toJSON();if(typeof e=="object")return Go(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Go(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=jo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:$o}))}return r}function cc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Se(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ue(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function Jo(e){if(!e._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Lt=class{_client;constructor(t){this._client=t}prometheus(t){return Jo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Jo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function fc(e,t){let r=At(()=>dc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function dc(e){return{datamodel:{models:Un(e.models),enums:Un(e.enums),types:Un(e.types)}}}function Un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var Bn=new WeakMap,Br="$$PrismaTypedSql",Ut=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function gc(e){return(...t)=>new Ut(e,t)}function qr(e){return e!=null&&e[Br]===Br}f();u();c();p();m();var ua=Qe(gn());f();u();c();p();m();Qo();Gi();Hi();f();u();c();p();m();var ue=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();u();c();p();m();f();u();c();p();m();var $r={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>$r,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ho=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=wc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=zo(Reflect.ownKeys(o),r),a=zo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...$r,...l?.getPropertyDescriptor(s)}:$r:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ho]=function(){let o={...this};return delete o[Ho],o},i}function wc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function zo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function pt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function Yo(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:kr}).write(t).toString()}f();u();c();p();m();var Ec="P2037";function Jr({error:e,user_facing_error:t},r,n){return t.error_code?new se(bc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function bc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Ec&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var qn=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new qn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Zo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function mt(e={}){let t=Pc(e);return Object.entries(t).reduce((n,[i,o])=>(Zo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Pc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Xo(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:mt})(e)}f();u();c();p();m();function vc(e={}){let{select:t,...r}=e;return typeof t=="object"?mt({...r,_count:t}):mt({...r,_count:{_all:!0}})}function Tc(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function es(e,t){return t({action:"count",unpacker:Tc(e),argsMapper:vc})(e)}f();u();c();p();m();function Ac(e={}){let t=mt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Rc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ts(e,t){return t({action:"groupBy",unpacker:Rc(e),argsMapper:Ac})(e)}function rs(e,t,r){if(t==="aggregate")return n=>Xo(n,r);if(t==="count")return n=>es(n,r);if(t==="groupBy")return n=>ts(n,r)}f();u();c();p();m();function ns(e,t){let r=t.fields.filter(i=>!i.relationName),n=no(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ot(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var is=e=>Array.isArray(e)?e:e.split("."),Vn=(e,t)=>is(t).reduce((r,n)=>r&&r[n],e),os=(e,t,r)=>is(t).reduceRight((n,i,o,s)=>Object.assign({},Vn(e,s.slice(0,o)),{[i]:n}),r);function Cc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Sc(e,t,r){return t===void 0?e??{}:os(t,r,e||!0)}function $n(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Ne(e._errorFormat),g=Cc(n,i),h=Sc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Ic(e,t);return new Proxy(T,{get(S,C){if(!I.includes(C))return S[C];let F=[a[C].type,r,C],B=[g,h];return $n(e,...F,...B)},...jr([...I,...Object.getOwnPropertyNames(T)])})}}function Ic(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Oc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],kc=["aggregate","count","groupBy"];function jn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Dc(e,t),_c(e,t),Bt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Dc(e,t){let r=Ee(t),n=Object.keys(Ct).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return Oc.includes(o)?$n(e,t,s):Mc(i)?rs(e,i,s):s({})}}}function Mc(e){return kc.includes(e)}function _c(e,t){return Be(te("fields",()=>{let r=e._runtimeDataModel.models[t];return ns(t,r)}))}f();u();c();p();m();function ss(e){return e.replace(/^./,t=>t.toUpperCase())}var Gn=Symbol();function qt(e){let t=[Nc(e),Fc(e),te(Gn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Bt(r)),me(e,t)}function Nc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Fc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Be({getKeys(){return n},getPropertyValue(i){let o=ss(i);if(e._runtimeDataModel.models[o]!==void 0)return jn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return jn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function as(e){return e[Gn]?e[Gn]:e}function ls(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return qt(t)}f();u();c();p();m();f();u();c();p();m();function us({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let d=l.needs.filter(g=>n[g]);d.length>0&&a.push(pt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(pt(d))}Lc(e,l.needs)&&s.push(Uc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Lc(e,t){return t.every(r=>bn(e,r))}function Uc(e,t){return Be(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Kr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let d=typeof s=="object"?s:{};t[o]=Kr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function ps({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Kr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return us({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Bc=["$connect","$disconnect","$on","$transaction","$extends"],ms=Bc;function fs(e){if(e instanceof ue)return qc(e);if(qr(e))return Vc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:fs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(o,l),a.args=s,gs(e,a,r,n+1)}})})}function hs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return gs(e,t,s)}function ys(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ws(r,n,0,e):e(r)}}function ws(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(i,l),ws(a,t,r+1,n)}})}var ds=e=>e;function Es(e=ds,t=ds){return r=>e(t(r))}f();u();c();p();m();var bs=Z("prisma:client"),xs={Vercel:"vercel","Netlify CI":"netlify"};function Ps({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(bs("checkPlatformCaching:postinstall",e),bs("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in xs){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${xs[t]}-build`;throw console.error(i),new Q(i,r)}}f();u();c();p();m();function vs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function Ts(e,t){throw new Error(t)}function $c(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function jc(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function $t(e){return e===null?e:Array.isArray(e)?e.map($t):typeof e=="object"?$c(e)?Gc(e):e.constructor!==null&&e.constructor.name!=="Object"?e:jc(e,$t):e}function Gc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Ts(t,"Unknown tagged value")}}var As="6.19.0";f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Qc=()=>globalThis.process?.release?.name==="node",Kc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Wc=()=>!!globalThis.Deno,Hc=()=>typeof globalThis.Netlify=="object",zc=()=>typeof globalThis.EdgeRuntime=="object",Yc=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Zc(){return[[Hc,"netlify"],[zc,"edge-light"],[Yc,"workerd"],[Wc,"deno"],[Kc,"bun"],[Qc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Xc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Jn(){let e=Zc();return{id:e,prettyName:Xc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Jn().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Wr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Wr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var qe=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N(qe,"InvalidDatasourceError");function Rs(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=hn(i)?"http:":"https:";y.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(l="http:");let d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Cs=Qe(zi()),Hr=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Cs.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function ep(e){return e[0]*1e3+e[1]/1e6}function Qn(e){return new Date(ep(e))}f();u();c();p();m();f();u();c();p();m();var dt=class extends ie{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(dt,"ForcedRetryError");f();u();c();p();m();var Ve=class extends ie{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(Ve,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ie{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var $e=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N($e,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Kn="This request could not be understood by the server",jt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Kn,U(t,!1)),n&&(this.code=n)}};N(jt,"BadRequestError");f();u();c();p();m();var Gt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Gt,"HealthcheckTimeoutError");f();u();c();p();m();var Jt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Jt,"EngineStartupError");f();u();c();p();m();var Qt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Qt,"EngineVersionNotSupportedError");f();u();c();p();m();var Wn="Request timed out",Kt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Wn){super(r,U(t,!1))}};N(Kt,"GatewayTimeoutError");f();u();c();p();m();var tp="Interactive transaction error",Wt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=tp){super(r,U(t,!1))}};N(Wt,"InteractiveTransactionError");f();u();c();p();m();var rp="Request parameters are invalid",Ht=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=rp){super(r,U(t,!1))}};N(Ht,"InvalidRequestError");f();u();c();p();m();var Hn="Requested resource does not exist",zt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Hn){super(r,U(t,!1))}};N(zt,"NotFoundError");f();u();c();p();m();var zn="Unknown server error",gt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||zn,U(t,!0)),this.logs=n}};N(gt,"ServerError");f();u();c();p();m();var Yn="Unauthorized, check your connection string",Yt=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=Yn){super(r,U(t,!1))}};N(Yt,"UnauthorizedError");f();u();c();p();m();var Zn="Usage exceeded, retry again later",Zt=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=Zn){super(r,U(t,!0))}};N(Zt,"UsageExceededError");async function np(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Xt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await np(e);if(n.type==="QueryEngineError")throw new se(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new gt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new $e(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Gt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Wt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ht(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,ht(Yn,n));if(e.status===404)return new zt(r,ht(Hn,n));if(e.status===429)throw new Zt(r,ht(Zn,n));if(e.status===504)throw new Kt(r,ht(Wn,n));if(e.status>=500)throw new gt(r,ht(zn,n));if(e.status>=400)throw new jt(r,ht(Kn,n))}function ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function Ss(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();u();c();p();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Is(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Ae[s]+Ae[a]+Ae[l]+Ae[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[l]+"="),r}f();u();c();p();m();function Os(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();u();c();p();m();var ks={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var er=class extends ie{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,U(r,!0))}};N(er,"RequestError");async function je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new er(a,{clientVersion:n,cause:s})}}var op=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ds=Z("prisma:client:dataproxyEngine");async function sp(e,t){let r=ks["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&op.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=ap(`<=${a}.${l}.${d}`),h=await je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Ds("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Ms(e,t){let r=await sp(e,t);return Ds("version",r),r}function ap(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var _s=3,tr=Z("prisma:client:dataproxyEngine"),yt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Os(t),this.config=t,this.env=t.env,this.inlineSchema=Is(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Hr({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Ms(this.host,this.config),tr("host",this.host),tr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":tr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Qn(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Qn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||tr("schema response status",r.status);let n=await Xt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Gr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||tr("graphql response status",a.status),await this.handleError(await Xt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Xt(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Xt(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Rs({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=_s)throw i instanceof dt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${_s} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Ss(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof $e)throw await this.uploadSchema(),new dt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Jr(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function Ns({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=C=>{i.push({_tag:"warning",value:C})},a=C=>{let M=C.join(` +`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=dr(e),g=!!t,h=l||d;!g&&r&&h&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):h?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(C){return C.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function Fs({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Ns({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)hr(...h.value);if(!n){let h=o.errors[0];throw new ee(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new yt(t):(i.driverAdapters,i.accelerate,new yt(t))}f();u();c();p();m();function Ls({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var Us=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Bs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function wt(e){try{return qs(e,"fast")}catch{return qs(e,"slow")}}function qs(e,t){return JSON.stringify(e.map(r=>$s(r,t)))}function $s(e,t){if(Array.isArray(e))return e.map(r=>$s(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Me.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(lp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?js(e):e}function lp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function js(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Vs);let t={};for(let r of Object.keys(e))t[r]=Vs(e[r]);return t}function Vs(e){return typeof e=="bigint"?e.toString():js(e)}var up=/^(\s*alter\s)/i,Gs=Z("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&up.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:wt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Bs(r),i={values:wt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Gs(`prisma.${e}(${n}, ${i.values})`):Gs(`prisma.${e}(${n})`),{query:n,parameters:i}},Js={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ue(t,r)}},Qs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();u();c();p();m();function ti(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Ks(r(s)):Ks(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Ks(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();u();c();p();m();var cp=dn.split(".")[0],pp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${cp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??pp}};function Ws(){return new ri}f();u();c();p();m();function Hs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();u();c();p();m();function zs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();u();c();p();m();f();u();c();p();m();function zr(e){return typeof e.batchRequestIdx=="number"}f();u();c();p();m();function Ys(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}f();u();c();p();m();var mp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ii(e){return mp[e]}f();u();c();p();m();var Yr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function oi(e){let t=[],r=fp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),d=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:gp(o),containsWrite:d,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(I){return I}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Zs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Ys(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(dp(t),hp(t,i))throw t;if(t instanceof se&&yp(t)){let d=Xs(t.meta);Fr({args:o,errors:[d],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Cr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let d=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:d,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ce(l,this.client._clientVersion);if(t instanceof ae)throw new ae(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Ce)throw new Ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?En(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(d=>d!=="select"&&d!=="include"),a=Vn(o,s),l=i==="queryRaw"?oi(a):$t(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function gp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Zs(e)};Ue(e,"Unknown transaction kind")}}function Zs(e){return{id:e.id,payload:e.payload}}function hp(e,t){return zr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function yp(e){return e.code==="P2009"||e.code==="P2012"}function Xs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Xs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();u();c();p();m();var ea=As;f();u();c();p();m();var oa=Qe(Sn());f();u();c();p();m();var q=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(q,"PrismaClientConstructorValidationError");var ta=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ra=["pretty","colorless","minimal"],na=["info","query","warn","error"],wp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Et(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ra.includes(e)){let t=Et(e,ra);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!na.includes(r)){let n=Et(r,na);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Et(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=bp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(d=>d.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(xp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Et(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function sa(e,t){for(let[r,n]of Object.entries(e)){if(!ta.includes(r)){let i=Et(r,ta);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}wp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Et(e,t){if(t.length===0||typeof e!="string")return"";let r=Ep(e,t);return r?` Did you mean "${r}"?`:""}function Ep(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,oa.default)(e,i)}));r.sort((i,o)=>i.distanceSe(n)===t);if(r)return e[r]}function xp(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Nr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();u();c();p();m();function aa(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=d=>{o||(o=!0,r(d))};for(let d=0;d{n[d]=g,a()},g=>{if(!zr(g)){l(g);return}g.batchRequestIdx===d?l(g):(i||(i=g),a())})})}var Fe=Z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Pp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},vp=Symbol.for("prisma.client.transaction.id"),Tp={id:0,nextId(){return++this.id}};function Ap(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ti();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Ps(e),n&&sa(n,e);let i=new Vr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=Ls(e),this._clientVersion=e.clientVersion??ea,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Ws();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&pr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&pr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},d=l.__internal??{},g=d.debug===!0;g&&Z.enable("prisma:client");let h=pr.resolve(e.dirname,e.relativePath);ji.existsSync(h)||(h=e.dirname),Fe("dirname",e.dirname),Fe("relativePath",e.relativePath),Fe("cwd",h);let T=d.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&zs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(I=>typeof I=="string"?I==="query":I.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:vs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ft,getBatchRequestPayload:Gr,prismaGraphQLToJSError:Jr,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:Z("prisma:client:accelerateEngine"),engineVersion:ua.version,clientVersion:e.clientVersion}},Fe("clientVersion",e.clientVersion),this._engine=Fs(e,this._engineConfig),this._requestHandler=new Zr(this,i),l.log)for(let I of l.log){let S=typeof I=="string"?I:I.emit==="stdout"?I.level:null;S&&this.$on(S,C=>{Tt.log(`${Tt.tags[S]??""}`,C.message||C.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{$i()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=la(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Us,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...la(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ee("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Tp.nextId(),s=Hs(n.length),a=n.map((l,d)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:d,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return aa(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let d={kind:"itx",...a};l=await n(this._createItxClient(d)),await this._engine.transaction("commit",o,a)}catch(d){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),d}return l}_createItxClient(n){return me(qt(me(as(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ti(n)),te(vp,()=>n.id)])),[pt(ms)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Pp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:d,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&d===!1&&delete T.transaction;let I=await hs(this,T);return T.model?ps({result:I,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):I};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:d,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:I}){try{n=d?d(n):n;let S={name:"serialize"},C=this._tracingHelper.runInChildSpan(S,()=>Fn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return Z.enabled("prisma:client")&&(Fe("Prisma Client call:"),Fe(`prisma.${i}(${Yo(n)})`),Fe("Generated request:"),Fe(JSON.stringify(C,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:C,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:I})}catch(S){throw S.clientVersion=this._clientVersion,S}}$metrics=new Lt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ls}return t}function la(e,t){return Rp(e)?[new ue(e,t),Js]:[e,Qs]}function Rp(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();u();c();p();m();var Cp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Sp(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Cp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();u();c();p();m();var export_warnEnvConflicts=void 0;export{Rr as DMMF,Z as Debug,Me as Decimal,Ci as Extensions,Lt as MetricsClient,Q as PrismaClientInitializationError,se as PrismaClientKnownRequestError,Ce as PrismaClientRustPanicError,ae as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,Ii as Public,ue as Sql,nc as createParam,fc as defineDmmfProperty,$t as deserializeJsonResponse,oi as deserializeRawResult,Il as dmmfToRuntimeDataModel,yc as empty,Ap as getPrismaClient,Jn as getRuntime,hc as join,Sp as makeStrictEnum,gc as makeTypedQueryFactory,kn as objectEnumValues,Ko as raw,Fn as serializeJsonQuery,_n as skip,Wo as sqltag,export_warnEnvConflicts as warnEnvConflicts,hr as warnOnce}; +//# sourceMappingURL=edge-esm.js.map diff --git a/packages/challenge-prisma-client/runtime/edge.js b/packages/challenge-prisma-client/runtime/edge.js new file mode 100644 index 0000000..d2be464 --- /dev/null +++ b/packages/challenge-prisma-client/runtime/edge.js @@ -0,0 +1,35 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var ba=Object.create;var lr=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)lr(e,r,{get:t[r],enumerable:!0})},ci=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pa(t))!Ta.call(e,i)&&i!==r&&lr(e,i,{get:()=>t[i],enumerable:!(n=xa(t,i))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?ba(va(e)):{},ci(t||!e||!e.__esModule?lr(r,"default",{value:e,enumerable:!0}):r,e)),Aa=e=>ci(lr({},"__esModule",{value:!0}),e);var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var Ii=Je(ze=>{"use strict";f();u();c();p();m();var gi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ra=gi(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=S.indexOf("=");M===-1&&(M=C);var F=M===C?0:4-M%4;return[M,F]}function l(S){var C=a(S),M=C[0],F=C[1];return(M+F)*3/4-F}function d(S,C,M){return(C+M)*3/4-M}function g(S){var C,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,le=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=C>>8&255,O[L++]=C&255;return B===2&&(C=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=C&255),B===1&&(C=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=C>>8&255,O[L++]=C&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,C,M){for(var F,B=[],O=C;Ole?le:L+O));return F===1?(C=S[M-1],B.push(t[C>>2]+t[C<<4&63]+"==")):F===2&&(C=(S[M-2]<<8)+S[M-1],B.push(t[C>>10]+t[C>>4&63]+t[C<<2&63]+"=")),B.join("")}}),Ca=gi(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:s-1,C=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=C,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=C,a/=256,g-=8);t[n+S-C]|=M*128}}),un=Ra(),We=Ca(),pi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Ma;ze.INSPECT_MAX_BYTES=50;var ur=2147483647;ze.kMaxLength=ur;A.TYPED_ARRAY_SUPPORT=Sa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Sa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return mn(e)}return hi(e,t,r)}A.poolSize=8192;function hi(e,t,r){if(typeof e=="string")return Oa(e,t);if(ArrayBuffer.isView(e))return ka(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return wi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Da(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return hi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function yi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ia(e,t,r){return yi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Ia(e,t,r)};function mn(e){return yi(e),xe(e<0?0:fn(e)|0)}A.allocUnsafe=function(e){return mn(e)};A.allocUnsafeSlow=function(e){return mn(e)};function Oa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Ei(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function cn(e){let t=e.length<0?0:fn(e.length)|0,r=xe(t);for(let n=0;n=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Ma(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function Ei(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return pn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Si(e).length;default:if(i)return n?-1:pn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=Ei;function _a(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ga(this,t,r);case"utf8":case"utf-8":return xi(this,t,r);case"ascii":return $a(this,t,r);case"latin1":case"binary":return ja(this,t,r);case"base64":return qa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ja(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Le(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};pi&&(A.prototype[pi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,gn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:mi(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):mi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function mi(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Na(this,e,t,r);case"utf8":case"utf-8":return Fa(this,e,t,r);case"ascii":case"latin1":case"binary":return La(this,e,t,r);case"base64":return Ua(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ba(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function qa(e,t,r){return t===0&&r===e.length?un.fromByteArray(e):un.fromByteArray(e.slice(t,r))}function xi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,d,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Va(n)}var fi=4096;function Va(e){let t=e.length;if(t<=fi)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Pi(e,t,r,n,i){Ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function vi(e,t,r,n,i){Ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Se(function(e,t=0){return Pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Se(function(e,t=0){return vi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Se(function(e,t=0){return Pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Se(function(e,t=0){return vi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ti(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ai(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ai(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ai(this,e,t,!1,r)};function Ri(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ri(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ri(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=di(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=di(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function di(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Qa(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function Ci(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ke.ERR_OUT_OF_RANGE("value",a,e)}Qa(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ka=/[^+/0-9A-Za-z-_]/g;function Wa(e){if(e=e.split("=")[0],e=e.trim().replace(Ka,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function pn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ha(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Si(e){return un.toByteArray(Wa(e))}function cr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function gn(e){return e!==e}var Ya=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Se(e){return typeof BigInt>"u"?Za:e}function Za(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Qe(Ii())});function il(){return!1}function bn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ol(){return bn()}function sl(){return[]}function al(e){e(null,[])}function ll(){return""}function ul(){return""}function cl(){}function pl(){}function ml(){}function fl(){}function dl(){}function gl(){}function hl(){}function yl(){}function wl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function El(e,t){t(null,bn())}var bl,xl,Qi,Ki=fe(()=>{"use strict";f();u();c();p();m();bl={},xl={existsSync:il,lstatSync:bn,stat:El,statSync:ol,readdirSync:sl,readdir:al,readlinkSync:ll,realpathSync:ul,chmodSync:cl,renameSync:pl,mkdirSync:ml,rmdirSync:fl,rmSync:dl,unlinkSync:gl,watchFile:hl,unwatchFile:yl,watch:wl,promises:bl},Qi=xl});var Wi=Je((df,Pl)=>{Pl.exports={name:"@prisma/internals",version:"6.19.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-engine-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Tl(...e){return e.join("/")}function Al(...e){return e.join("/")}function Rl(e){let t=Hi(e),r=zi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Hi(e){let t=e.split("/");return t[t.length-1]}function zi(e){return e.split("/").slice(0,-1).join("/")}function Sl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Yi,Cl,Il,Ol,dr,Zi=fe(()=>{"use strict";f();u();c();p();m();Yi="/",Cl=":";Il={sep:Yi},Ol={basename:Hi,delimiter:Cl,dirname:zi,join:Al,normalize:Sl,parse:Rl,posix:Il,resolve:Tl,sep:Yi},dr=Ol});var Pn=Je((Mf,Ml)=>{Ml.exports={name:"@prisma/engines-version",version:"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"2ba551f319ab1df4bc874a89965d8b3641056773"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Xi=Je(gr=>{"use strict";f();u();c();p();m();Object.defineProperty(gr,"__esModule",{value:!0});gr.enginesVersion=void 0;gr.enginesVersion=Pn().prisma.enginesVersion});var ro=Je((Qf,to)=>{"use strict";f();u();c();p();m();to.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Nn=Je((Jy,vo)=>{"use strict";f();u();c();p();m();vo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var Io=fe(()=>{"use strict";f();u();c();p();m()});var Jr,Xo=fe(()=>{"use strict";f();u();c();p();m();Jr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var kp={};vt(kp,{DMMF:()=>Dt,Debug:()=>z,Decimal:()=>Ae,Extensions:()=>hn,MetricsClient:()=>pt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>Pe,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>X,Public:()=>yn,Sql:()=>se,createParam:()=>Jo,defineDmmfProperty:()=>Yo,deserializeJsonResponse:()=>dt,deserializeRawResult:()=>nn,dmmfToRuntimeDataModel:()=>ao,empty:()=>ts,getPrismaClient:()=>ya,getRuntime:()=>Zr,join:()=>es,makeStrictEnum:()=>wa,makeTypedQueryFactory:()=>Zo,objectEnumValues:()=>Nr,raw:()=>Gn,serializeJsonQuery:()=>$r,skip:()=>Vr,sqltag:()=>Jn,warnEnvConflicts:()=>void 0,warnOnce:()=>St});module.exports=Aa(kp);f();u();c();p();m();var hn={};vt(hn,{defineExtension:()=>Oi,getExtensionContext:()=>ki});f();u();c();p();m();f();u();c();p();m();function Oi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function ki(e){return e}var yn={};vt(yn,{validator:()=>Di});f();u();c();p();m();f();u();c();p();m();function Di(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var wn,Mi,_i,Ni,Fi=!0;typeof y<"u"&&({FORCE_COLOR:wn,NODE_DISABLE_COLORS:Mi,NO_COLOR:_i,TERM:Ni}=y.env||{},Fi=y.stdout&&y.stdout.isTTY);var Xa={enabled:!Mi&&_i==null&&Ni!=="dumb"&&(wn!=null&&wn!=="0"||Fi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Xa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Pm=j(0,0),pr=j(1,22),mr=j(2,22),vm=j(3,23),Li=j(4,24),Tm=j(7,27),Am=j(8,28),Rm=j(9,29),Cm=j(30,39),Ye=j(31,39),Ui=j(32,39),Bi=j(33,39),qi=j(34,39),Sm=j(35,39),Vi=j(36,39),Im=j(37,39),$i=j(90,39),Om=j(90,39),km=j(40,49),Dm=j(41,49),Mm=j(42,49),_m=j(43,49),Nm=j(44,49),Fm=j(45,49),Lm=j(46,49),Um=j(47,49);f();u();c();p();m();var el=100,ji=["green","yellow","blue","magenta","cyan","red"],fr=[],Gi=Date.now(),tl=0,En=typeof y<"u"?y.env:{};globalThis.DEBUG??=En.DEBUG??"";globalThis.DEBUG_COLORS??=En.DEBUG_COLORS?En.DEBUG_COLORS==="true":!0;var At={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function rl(e){let t={color:ji[tl++%ji.length],enabled:At.enabled(e),namespace:e,log:At.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&fr.push([o,...n]),fr.length>el&&fr.shift(),At.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:nl(g)),d=`+${Date.now()-Gi}ms`;Gi=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(rl,{get:(e,t)=>At[t],set:(e,t,r)=>At[t]=r});function nl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ji(){fr.length=0}f();u();c();p();m();f();u();c();p();m();var vl=Wi(),xn=vl.version;f();u();c();p();m();function Ze(e){let t=kl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Dl())}function kl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Dl(){return"library"}f();u();c();p();m();var eo="prisma+postgres",hr=`${eo}:`;function yr(e){return e?.toString().startsWith(`${hr}//`)??!1}function vn(e){if(!yr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Ct={};vt(Ct,{error:()=>Fl,info:()=>Nl,log:()=>_l,query:()=>Ll,should:()=>no,tags:()=>Rt,warn:()=>Tn});f();u();c();p();m();var Rt={error:Ye("prisma:error"),warn:Bi("prisma:warn"),info:Vi("prisma:info"),query:qi("prisma:query")},no={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function _l(...e){console.log(...e)}function Tn(e,...t){no.warn()&&console.warn(`${Rt.warn} ${e}`,...t)}function Nl(e,...t){console.info(`${Rt.info} ${e}`,...t)}function Fl(e,...t){console.error(`${Rt.error} ${e}`,...t)}function Ll(e,...t){console.log(`${Rt.query} ${e}`,...t)}f();u();c();p();m();function Ue(e,t){throw new Error(t)}f();u();c();p();m();f();u();c();p();m();function An({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var Ul=An();function Rn(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ul,"")}f();u();c();p();m();function Cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function wr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function Sn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{io.has(e)||(io.add(e),Tn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var ne=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(ne,"PrismaClientKnownRequestError");f();u();c();p();m();var Pe=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Pe,"PrismaClientRustPanicError");f();u();c();p();m();var ie=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ie,"PrismaClientUnknownRequestError");f();u();c();p();m();var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(X,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Ie(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function so(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function ao(e){return{models:In(e.models),enums:In(e.enums),types:In(e.types)}}function In(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Er(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,Me=1e9,On="0123456789abcdef",Pr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",vr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",kn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},po,ve,_=!0,Ar="[DecimalError] ",De=Ar+"Invalid argument: ",mo=Ar+"Precision limit exceeded",fo=Ar+"crypto unavailable",go="[object Decimal]",ee=Math.floor,K=Math.pow,Bl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ql=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Vl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ho=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,$l=9007199254740991,jl=Pr.length-1,Dn=vr.length-1,R={toStringTag:go};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};R.ceil=function(){return k(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Gl(n,xo(n,r)),n.precision=e,n.rounding=t,k(ve==2||ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=K(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),d=l.plus(g),n=V(d.plus(g).times(a),d.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,k(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return V(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return k(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Cr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Cr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=Dn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=Dn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+I,s=ke(d,a),n=t?Tr(g,a+10):ke(e,a),l=V(s,n,a,1),Ot(l.d,i=h,T))do if(a+=10,s=ke(d,a),n=t?Tr(g,a+10):ke(e,a),l=V(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ot(l.d,i+=10,T));return _=!0,k(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=ee(e.e/D),g=ee(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Rr(d,n),_?k(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=yo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ql(n,xo(n,r)),n.precision=e,n.rounding=t,k(ve>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(ve==2||ve==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=ee(g.e/D)+ee(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Rr(o,r),_?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return _n(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Me),t===void 0?t=n.rounding:oe(t,0,8),k(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(oe(e,0,Me),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(oe(e,0,Me),t===void 0?t=o.rounding:oe(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,C=I.constructor;if(!S)return new C(I);if(d=r=new C(1),n=l=new C(0),t=new C(n),o=t.e=yo(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new C(e),!a.isInt()||a.lt(d))throw Error(De+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new C(Y(S)),g=C.precision,C.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],C.precision=g,_=!0,T};R.toHexadecimal=R.toHex=function(e,t){return _n(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return _n(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=ee(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=$l)return i=wo(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Mn(e.times(ke(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ot(i.d,n,o)&&(t=n+10,i=k(Mn(e.times(ke(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Me),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Me),t===void 0?t=n.rounding:oe(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return k(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function Ot(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==K(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==K(10,t-3)-1,s}function br(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Gl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Cr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var d,g,h,T,I,S,C,M,F,B,O,L,le,J,sn,or,Pt,an,ce,sr,ar=n.constructor,ln=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new ar(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?ln*0:ln/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=ee(n.e/I)-ee(i.e/I)),ce=$.length,Pt=Z.length,F=new ar(ln),B=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=ar.precision,s=ar.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Z=e(Z,T,l),ce=$.length,Pt=Z.length),or=ce,O=Z.slice(0,ce),L=O.length;L=l/2&&++an;do T=0,d=t($,O,ce,L),d<0?(le=O[0],ce!=L&&(le=le*l+(O[1]||0)),T=le/an|0,T>1?(T>=l&&(T=l-1),C=e($,T,l),M=C.length,L=O.length,d=t(C,O,M,L),d==1&&(T--,r(C,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function Rr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Tr(e,t,r){if(t>jl)throw _=!0,r&&(e.precision=r),Error(mo);return k(new e(Pr),t,1,!0)}function he(e,t,r){if(t>Dn)throw Error(mo);return k(new e(vr),t,r,!0)}function yo(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function wo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),uo(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),uo(t.d,s)}return _=!0,o}function lo(e){return e.d[e.d.length-1]&1}function Eo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Ot(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,C=e,M=C.d,F=C.constructor,B=F.rounding,O=F.precision;if(C.s<0||!M||!M[0]||!C.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:C.s!=1?NaN:M?0:C);if(t==null?(_=!1,g=O):g=t,F.precision=g+=S,r=Y(M),n=r.charAt(0),Math.abs(o=C.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(e),r=Y(C.d),n=r.charAt(0),I++;o=C.e,n>1?(C=new F("0."+r),o++):C=new F(n+"."+r.slice(1))}else return d=Tr(F,g+2,O).times(o+""),C=ke(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(C,O,B,_=!0):C;for(h=C,l=s=C=V(C.minus(1),C.plus(1),g,1),T=k(C.times(C),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),Y(d.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Tr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ot(l.d,g-S,B,a))F.precision=g+=S,d=s=C=V(h.minus(1),h.plus(1),g,1),T=k(C.times(C),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function bo(e){return String(e.s*e.s/0)}function xr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ho.test(t))return xr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ql.test(t))r=16,t=t.toLowerCase();else if(Bl.test(t))r=2;else if(Vl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=wo(n,new n(r),o,o*2)),d=br(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Rr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):Te.pow(2,l))),_=!0,e)}function Ql(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Cr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,d++}return _=!0,s.d.length=h+1,s}function Cr(e,t){for(var r=e;--t;)r*=e;return r}function xo(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=n?4:1,t;if(r=t.divToInt(i),r.isZero())ve=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ve=lo(r)?n?2:3:n?4:1,t;ve=lo(r)?n?1:4:n?3:2}return t.minus(i).abs()}function _n(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(oe(r,1,Me),n===void 0?n=I.rounding:oe(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=bo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=br(ye(T),10,i),T.e=T.d.length),h=br(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=po),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=br(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Kl(e){return new this(e).abs()}function Wl(e){return new this(e).acos()}function Hl(e){return new this(e).acosh()}function zl(e,t){return new this(e).plus(t)}function Yl(e){return new this(e).asin()}function Zl(e){return new this(e).asinh()}function Xl(e){return new this(e).atan()}function eu(e){return new this(e).atanh()}function tu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function ru(e){return new this(e).cbrt()}function nu(e){return k(e=new this(e),e.e+1,2)}function iu(e,t,r){return new this(e).clamp(t,r)}function ou(e){if(!e||typeof e!="object")throw Error(Ar+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=kn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(fo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function su(e){return new this(e).cos()}function au(e){return new this(e).cosh()}function Po(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,co(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(fo);else for(;o=10;i/=10)n++;nkt,datamodelEnumToSchemaEnum:()=>Du});f();u();c();p();m();f();u();c();p();m();function Du(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var kt=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(kt||{});var Mu=Qe(ro());var _u={red:Ye,gray:$i,dim:mr,bold:pr,underline:Li,highlightSource:e=>e.highlight()},Nu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Fu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Lu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Uu(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Uu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Sr(e){let t=e.showColors?_u:Nu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Fu(e),Lu(r,t)}f();u();c();p();m();var ko=Qe(Nn());f();u();c();p();m();function Ro(e,t,r){let n=Co(e),i=Bu(n),o=Vu(i);o?Ir(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Co(e){return e.errors.flatMap(t=>t.kind==="Union"?Co(t):[t])}function Bu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:qu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function qu(e,t){return[...new Set(e.concat(t))]}function Vu(e){return Sn(e,(t,r)=>{let n=To(t),i=To(r);return n!==i?n-i:Ao(t)-Ao(r)})}function To(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ao(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var ue=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();u();c();p();m();f();u();c();p();m();Io();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};So();f();u();c();p();m();f();u();c();p();m();var Or=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var kr=e=>e,Dr={bold:kr,red:kr,green:kr,dim:kr,enabled:!1},Oo={bold:pr,red:Ye,green:Ui,dim:mr,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();u();c();p();m();var _e=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends _e{items=[];addItem(t){return this.items.push(new Or(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends _e{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var Mt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ir(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":$u(e,t);break;case"IncludeOnScalar":ju(e,t);break;case"EmptySelection":Gu(e,t,r);break;case"UnknownSelectionField":Wu(e,t);break;case"InvalidSelectionValue":Hu(e,t);break;case"UnknownArgument":zu(e,t);break;case"UnknownInputField":Yu(e,t);break;case"RequiredArgumentMissing":Zu(e,t);break;case"InvalidArgumentType":Xu(e,t);break;case"InvalidArgumentValue":ec(e,t);break;case"ValueTooLarge":tc(e,t);break;case"SomeFieldsMissing":rc(e,t);break;case"TooManyFieldsGiven":nc(e,t);break;case"Union":Ro(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function $u(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function ju(e,t){let[r,n]=at(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${_t(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Gu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Ju(e,t,i);return}if(n.hasField("select")){Qu(e,t);return}}if(r?.[Ie(e.outputType.name)]){Ku(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Ju(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ue(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Qu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),_o(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${_t(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ku(e,t){let r=new Mt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ue("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Wu(e,t){let r=No(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":_o(n,e.outputType);break;case"include":ic(n,e.outputType);break;case"omit":oc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(_t(n)),i.join(" ")})}function Hu(e,t){let r=No(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function zu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),sc(n,e.arguments)),t.addErrorMessage(i=>Do(i,r,e.arguments.map(o=>o.name)))}function Yu(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Fo(o,e.inputType)}t.addErrorMessage(o=>Do(o,n,e.inputType.fields.map(s=>s.name)))}function Do(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=lc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(_t(e)),n.join(" ")}function Zu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new Mt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(Mo).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Mo(e){return e.kind==="list"?`${Mo(e.elementType)}[]`:e.name}function Xu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Mr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function ec(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Mr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function tc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function rc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Fo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Mr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(_t(i)),o.join(" ")})}function nc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Mr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function _o(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function ic(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function oc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function sc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function No(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Fo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function _t({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Mr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var ac=3;function lc(e,t){let r=1/0,n;for(let i of t){let o=(0,ko.default)(e,i);o>ac||o`}};function lt(e){return e instanceof Nt}f();u();c();p();m();var _r=Symbol(),Ln=new WeakMap,Re=class{constructor(t){t===_r?Ln.set(this,`Prisma.${this._getName()}`):Ln.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ln.get(this)}},Ft=class extends Re{_getNamespace(){return"NullTypes"}},Lt=class extends Ft{#e};Un(Lt,"DbNull");var Ut=class extends Ft{#e};Un(Ut,"JsonNull");var Bt=class extends Ft{#e};Un(Bt,"AnyNull");var Nr={classes:{DbNull:Lt,JsonNull:Ut,AnyNull:Bt},instances:{DbNull:new Lt(_r),JsonNull:new Ut(_r),AnyNull:new Bt(_r)}};function Un(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var Lo=": ",Fr=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Lo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Lo).write(this.value)}};var Bn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function ut(e){return new Bn(Uo(e))}function Uo(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new Fr(r,Bo(n));t.addField(i)}return t}function Bo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(rt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Er(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Re?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Ie(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?uc(e):typeof e=="object"?Uo(e):new H(Object.prototype.toString.call(e))}function uc(e){let t=new ot;for(let r of e)t.addItem(Bo(r));return t}function Lr(e,t){let r=t==="pretty"?Oo:Dr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ur({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Ir(h,a,s);let{message:l,args:d}=Lr(a,r),g=Sr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new X(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function Vo(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:cc({...e,...qo(t.name,e,t.result.$allModels),...qo(t.name,e,t.result[n])})}function cc(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return wr(e,n=>({...n,needs:r(n.name,new Set)}))}function qo(e,t,r){return r?wr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:pc(t,o,i)})):{}}function pc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function $o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Br=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=It(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=It(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Vo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Br(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Br(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();u();c();p();m();var qr=class{constructor(t){this.name=t}};function Go(e){return e instanceof qr}function Jo(e){return new qr(e)}f();u();c();p();m();f();u();c();p();m();var Qo=Symbol(),qt=class{constructor(t){if(t!==Qo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Vr:t}},Vr=new qt(Qo);function be(e){return e instanceof qt}var mc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ko="explicitly `undefined` values are not allowed";function $r({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new qn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:mc[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ho(r,n),selection:fc(e,t,i,n)}}function fc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),yc(e,n)):dc(n,t,r)}function dc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&gc(n,t,e),hc(n,r,e),n}function gc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Vn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function hc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=jo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Vn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function yc(e,t){let r={},n=t.getComputedFields(),i=$o(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Vn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Wo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(Er(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Go(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return wc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Ec(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Re){if(e!==Nr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(bc(e))return e.toJSON();if(typeof e=="object")return Ho(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ho(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Wo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Ko}))}return r}function wc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ie(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ue(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function zo(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var pt=class{_client;constructor(t){this._client=t}prometheus(t){return zo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return zo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function Yo(e,t){let r=It(()=>xc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function xc(e){return{datamodel:{models:$n(e.models),enums:$n(e.enums),types:$n(e.types)}}}function $n(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var jn=new WeakMap,jr="$$PrismaTypedSql",$t=class{constructor(t,r){jn.set(this,{sql:t,values:r}),Object.defineProperty(this,jr,{value:jr})}get sql(){return jn.get(this).sql}get values(){return jn.get(this).values}};function Zo(e){return(...t)=>new $t(e,t)}function Gr(e){return e!=null&&e[jr]===jr}f();u();c();p();m();var ha=Qe(Pn());f();u();c();p();m();Xo();Ki();Zi();f();u();c();p();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();u();c();p();m();f();u();c();p();m();var Qr={enumerable:!0,configurable:!0,writable:!0};function Kr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Qr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var rs=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=Pc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=ns(Reflect.ownKeys(o),r),a=ns(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Qr,...l?.getPropertyDescriptor(s)}:Qr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[rs]=function(){let o={...this};return delete o[rs],o},i}function Pc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ns(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Wr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function is(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:Dr}).write(t).toString()}f();u();c();p();m();var vc="P2037";function Hr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(Tc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Tc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===vc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Qn=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Qn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var os={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ft(e={}){let t=Rc(e);return Object.entries(t).reduce((n,[i,o])=>(os[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Rc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function zr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ss(e,t){let r=zr(e);return t({action:"aggregate",unpacker:r,argsMapper:ft})(e)}f();u();c();p();m();function Cc(e={}){let{select:t,...r}=e;return typeof t=="object"?ft({...r,_count:t}):ft({...r,_count:{_all:!0}})}function Sc(e={}){return typeof e.select=="object"?t=>zr(e)(t)._count:t=>zr(e)(t)._count._all}function as(e,t){return t({action:"count",unpacker:Sc(e),argsMapper:Cc})(e)}f();u();c();p();m();function Ic(e={}){let t=ft(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Oc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ls(e,t){return t({action:"groupBy",unpacker:Oc(e),argsMapper:Ic})(e)}function us(e,t,r){if(t==="aggregate")return n=>ss(n,r);if(t==="count")return n=>as(n,r);if(t==="groupBy")return n=>ls(n,r)}f();u();c();p();m();function cs(e,t){let r=t.fields.filter(i=>!i.relationName),n=so(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Nt(e,o,s.type,s.isList,s.kind==="enum")},...Kr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var ps=e=>Array.isArray(e)?e:e.split("."),Kn=(e,t)=>ps(t).reduce((r,n)=>r&&r[n],e),ms=(e,t,r)=>ps(t).reduceRight((n,i,o,s)=>Object.assign({},Kn(e,s.slice(0,o)),{[i]:n}),r);function kc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Dc(e,t,r){return t===void 0?e??{}:ms(t,r,e||!0)}function Wn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Ne(e._errorFormat),g=kc(n,i),h=Dc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Mc(e,t);return new Proxy(T,{get(S,C){if(!I.includes(C))return S[C];let F=[a[C].type,r,C],B=[g,h];return Wn(e,...F,...B)},...Kr([...I,...Object.getOwnPropertyNames(T)])})}}function Mc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var _c=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Nc=["aggregate","count","groupBy"];function Hn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Fc(e,t),Uc(e,t),jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Fc(e,t){let r=Ee(t),n=Object.keys(kt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return _c.includes(o)?Wn(e,t,s):Lc(i)?us(e,i,s):s({})}}}function Lc(e){return Nc.includes(e)}function Uc(e,t){return Be(te("fields",()=>{let r=e._runtimeDataModel.models[t];return cs(t,r)}))}f();u();c();p();m();function fs(e){return e.replace(/^./,t=>t.toUpperCase())}var zn=Symbol();function Gt(e){let t=[Bc(e),qc(e),te(zn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(jt(r)),me(e,t)}function Bc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function qc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Be({getKeys(){return n},getPropertyValue(i){let o=fs(i);if(e._runtimeDataModel.models[o]!==void 0)return Hn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Hn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ds(e){return e[zn]?e[zn]:e}function gs(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Gt(t)}f();u();c();p();m();f();u();c();p();m();function hs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let d=l.needs.filter(g=>n[g]);d.length>0&&a.push(mt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(mt(d))}Vc(e,l.needs)&&s.push($c(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Vc(e,t){return t.every(r=>Cn(e,r))}function $c(e,t){return Be(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Yr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let d=typeof s=="object"?s:{};t[o]=Yr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function ws({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Yr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return hs({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var jc=["$connect","$disconnect","$on","$transaction","$extends"],Es=jc;function bs(e){if(e instanceof se)return Gc(e);if(Gr(e))return Jc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:bs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(o,l),a.args=s,Ps(e,a,r,n+1)}})})}function vs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Ps(e,t,s)}function Ts(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?As(r,n,0,e):e(r)}}function As(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(i,l),As(a,t,r+1,n)}})}var xs=e=>e;function Rs(e=xs,t=xs){return r=>e(t(r))}f();u();c();p();m();var Cs=z("prisma:client"),Ss={Vercel:"vercel","Netlify CI":"netlify"};function Is({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(Cs("checkPlatformCaching:postinstall",e),Cs("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in Ss){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${Ss[t]}-build`;throw console.error(i),new Q(i,r)}}f();u();c();p();m();function Os(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function ks(e,t){throw new Error(t)}function Qc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Kc(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function dt(e){return e===null?e:Array.isArray(e)?e.map(dt):typeof e=="object"?Qc(e)?Wc(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Kc(e,dt):e}function Wc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Te(t);case"Json":return JSON.parse(t);default:ks(t,"Unknown tagged value")}}var Ds="6.19.0";f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var zc=()=>globalThis.process?.release?.name==="node",Yc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Zc=()=>!!globalThis.Deno,Xc=()=>typeof globalThis.Netlify=="object",ep=()=>typeof globalThis.EdgeRuntime=="object",tp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function rp(){return[[Xc,"netlify"],[ep,"edge-light"],[tp,"workerd"],[Zc,"deno"],[Yc,"bun"],[zc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var np={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Zr(){let e=rp();return{id:e,prettyName:np[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Zr().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Xr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Xr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var qe=class extends ae{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N(qe,"InvalidDatasourceError");function Ms(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=gt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==hr)throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=vn(i)?"http:":"https:";y.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(l="http:");let d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var _s=Qe(Xi()),en=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":_s.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function ip(e){return e[0]*1e3+e[1]/1e6}function Yn(e){return new Date(ip(e))}f();u();c();p();m();f();u();c();p();m();var ht=class extends ae{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(ht,"ForcedRetryError");f();u();c();p();m();var Ve=class extends ae{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(Ve,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ae{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var $e=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N($e,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Zn="This request could not be understood by the server",Qt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Zn,U(t,!1)),n&&(this.code=n)}};N(Qt,"BadRequestError");f();u();c();p();m();var Kt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Kt,"HealthcheckTimeoutError");f();u();c();p();m();var Wt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Wt,"EngineStartupError");f();u();c();p();m();var Ht=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Ht,"EngineVersionNotSupportedError");f();u();c();p();m();var Xn="Request timed out",zt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Xn){super(r,U(t,!1))}};N(zt,"GatewayTimeoutError");f();u();c();p();m();var op="Interactive transaction error",Yt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=op){super(r,U(t,!1))}};N(Yt,"InteractiveTransactionError");f();u();c();p();m();var sp="Request parameters are invalid",Zt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=sp){super(r,U(t,!1))}};N(Zt,"InvalidRequestError");f();u();c();p();m();var ei="Requested resource does not exist",Xt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=ei){super(r,U(t,!1))}};N(Xt,"NotFoundError");f();u();c();p();m();var ti="Unknown server error",yt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ti,U(t,!0)),this.logs=n}};N(yt,"ServerError");f();u();c();p();m();var ri="Unauthorized, check your connection string",er=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=ri){super(r,U(t,!1))}};N(er,"UnauthorizedError");f();u();c();p();m();var ni="Usage exceeded, retry again later",tr=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=ni){super(r,U(t,!0))}};N(tr,"UsageExceededError");async function ap(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function rr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await ap(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new yt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new $e(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ht(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Wt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Yt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new er(r,wt(ri,n));if(e.status===404)return new Xt(r,wt(ei,n));if(e.status===429)throw new tr(r,wt(ni,n));if(e.status===504)throw new zt(r,wt(Xn,n));if(e.status>=500)throw new yt(r,wt(ti,n));if(e.status>=400)throw new Qt(r,wt(Zn,n))}function wt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function Ns(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();u();c();p();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Fs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}f();u();c();p();m();function Ls(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();u();c();p();m();var Us={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var nr=class extends ae{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,U(r,!0))}};N(nr,"RequestError");async function je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new nr(a,{clientVersion:n,cause:s})}}var up=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Bs=z("prisma:client:dataproxyEngine");async function cp(e,t){let r=Us["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&up.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=pp(`<=${a}.${l}.${d}`),h=await je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Bs("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function qs(e,t){let r=await cp(e,t);return Bs("version",r),r}function pp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Vs=3,ir=z("prisma:client:dataproxyEngine"),Et=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ls(t),this.config=t,this.env=t.env,this.inlineSchema=Fs(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new en({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await qs(this.host,this.config),ir("host",this.host),ir("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":ir(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Yn(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Yn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||ir("schema response status",r.status);let n=await rr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Wr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||ir("graphql response status",a.status),await this.handleError(await rr(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await rr(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await rr(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Ms({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ae)||!i.isRetryable)throw i;if(r>=Vs)throw i instanceof ht?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Vs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Ns(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof $e)throw await this.uploadSchema(),new ht({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Hr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function $s({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=C=>{i.push({_tag:"warning",value:C})},a=C=>{let M=C.join(` +`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=yr(e),g=!!t,h=l||d;!g&&r&&h&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):h?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(C){return C.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function js({copyEngine:e=!0},t){let r;try{r=gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=$s({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)St(...h.value);if(!n){let h=o.errors[0];throw new X(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new Et(t):(i.driverAdapters,i.accelerate,new Et(t))}f();u();c();p();m();function Gs({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var Js=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Qs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function bt(e){try{return Ks(e,"fast")}catch{return Ks(e,"slow")}}function Ks(e,t){return JSON.stringify(e.map(r=>Hs(r,t)))}function Hs(e,t){if(Array.isArray(e))return e.map(r=>Hs(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ae.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(mp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?zs(e):e}function mp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ws);let t={};for(let r of Object.keys(e))t[r]=Ws(e[r]);return t}function Ws(e){return typeof e=="bigint"?e.toString():zs(e)}var fp=/^(\s*alter\s)/i,Ys=z("prisma:client");function ii(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&fp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var oi=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Gr(r))n=r.sql,i={values:bt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:bt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:bt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:bt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Qs(r),i={values:bt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ys(`prisma.${e}(${n}, ${i.values})`):Ys(`prisma.${e}(${n})`),{query:n,parameters:i}},Zs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Xs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();u();c();p();m();function si(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=ea(r(s)):ea(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ea(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();u();c();p();m();var dp=xn.split(".")[0],gp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ai=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${dp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??gp}};function ta(){return new ai}f();u();c();p();m();function ra(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();u();c();p();m();function na(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();u();c();p();m();f();u();c();p();m();function tn(e){return typeof e.batchRequestIdx=="number"}f();u();c();p();m();function ia(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(li(e.query.arguments)),t.push(li(e.query.selection)),t.join("")}function li(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${li(n)})`:r}).join(" ")})`}f();u();c();p();m();var hp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ui(e){return hp[e]}f();u();c();p();m();var rn=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function nn(e){let t=[],r=yp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),d=n.some(h=>ui(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Ep(o),containsWrite:d,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(I){return I}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?oa(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ui(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ia(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(wp(t),bp(t,i))throw t;if(t instanceof ne&&xp(t)){let d=sa(t.meta);Ur({args:o,errors:[d],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Sr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let d=s?{modelName:s,...t.meta}:t.meta;throw new ne(l,{code:t.code,clientVersion:this.client._clientVersion,meta:d,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Pe(l,this.client._clientVersion);if(t instanceof ie)throw new ie(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Pe)throw new Pe(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?Rn(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(d=>d!=="select"&&d!=="include"),a=Kn(o,s),l=i==="queryRaw"?nn(a):dt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Ep(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oa(e)};Ue(e,"Unknown transaction kind")}}function oa(e){return{id:e.id,payload:e.payload}}function bp(e,t){return tn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function xp(e){return e.code==="P2009"||e.code==="P2012"}function sa(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(sa)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();u();c();p();m();var aa=Ds;f();u();c();p();m();var ma=Qe(Nn());f();u();c();p();m();var q=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(q,"PrismaClientConstructorValidationError");var la=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ua=["pretty","colorless","minimal"],ca=["info","query","warn","error"],Pp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ua.includes(e)){let t=xt(e,ua);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ca.includes(r)){let n=xt(r,ca);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=xt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Tp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(d=>d.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(Ap(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=xt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function fa(e,t){for(let[r,n]of Object.entries(e)){if(!la.includes(r)){let i=xt(r,la);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Pp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function xt(e,t){if(t.length===0||typeof e!="string")return"";let r=vp(e,t);return r?` Did you mean "${r}"?`:""}function vp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ma.default)(e,i)}));r.sort((i,o)=>i.distanceIe(n)===t);if(r)return e[r]}function Ap(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Lr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();u();c();p();m();function da(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=d=>{o||(o=!0,r(d))};for(let d=0;d{n[d]=g,a()},g=>{if(!tn(g)){l(g);return}g.batchRequestIdx===d?l(g):(i||(i=g),a())})})}var Fe=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Rp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Cp=Symbol.for("prisma.client.transaction.id"),Sp={id:0,nextId(){return++this.id}};function ya(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=si();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Is(e),n&&fa(n,e);let i=new Jr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=Gs(e),this._clientVersion=e.clientVersion??aa,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ta();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&dr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&dr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},d=l.__internal??{},g=d.debug===!0;g&&z.enable("prisma:client");let h=dr.resolve(e.dirname,e.relativePath);Qi.existsSync(h)||(h=e.dirname),Fe("dirname",e.dirname),Fe("relativePath",e.relativePath),Fe("cwd",h);let T=d.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&na(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(I=>typeof I=="string"?I==="query":I.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Os(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:gt,getBatchRequestPayload:Wr,prismaGraphQLToJSError:Hr,PrismaClientUnknownRequestError:ie,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:ne,debug:z("prisma:client:accelerateEngine"),engineVersion:ha.version,clientVersion:e.clientVersion}},Fe("clientVersion",e.clientVersion),this._engine=js(e,this._engineConfig),this._requestHandler=new on(this,i),l.log)for(let I of l.log){let S=typeof I=="string"?I:I.emit==="stdout"?I.level:null;S&&this.$on(S,C=>{Ct.log(`${Ct.tags[S]??""}`,C.message||C.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Gt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ji()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ga(n,i);return ii(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(ii(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Js,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ga(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Sp.nextId(),s=ra(n.length),a=n.map((l,d)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:d,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return da(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let d={kind:"itx",...a};l=await n(this._createItxClient(d)),await this._engine.transaction("commit",o,a)}catch(d){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),d}return l}_createItxClient(n){return me(Gt(me(ds(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>si(n)),te(Cp,()=>n.id)])),[mt(Es)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Rp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:d,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&d===!1&&delete T.transaction;let I=await vs(this,T);return T.model?ws({result:I,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):I};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:d,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:I}){try{n=d?d(n):n;let S={name:"serialize"},C=this._tracingHelper.runInChildSpan(S,()=>$r({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&(Fe("Prisma Client call:"),Fe(`prisma.${i}(${is(n)})`),Fe("Generated request:"),Fe(JSON.stringify(C,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:C,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:I})}catch(S){throw S.clientVersion=this._clientVersion,S}}$metrics=new pt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=gs}return t}function ga(e,t){return Ip(e)?[new se(e,t),Zs]:[e,Xs]}function Ip(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();u();c();p();m();var Op=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function wa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Op.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();u();c();p();m();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=edge.js.map diff --git a/packages/challenge-prisma-client/runtime/index-browser.d.ts b/packages/challenge-prisma-client/runtime/index-browser.d.ts new file mode 100644 index 0000000..0e96e4b --- /dev/null +++ b/packages/challenge-prisma-client/runtime/index-browser.d.ts @@ -0,0 +1,370 @@ +declare class AnyNull extends NullTypesEnumValue { + #private; +} + +declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +declare class DbNull extends NullTypesEnumValue { + #private; +} + +export declare function Decimal(n: Decimal.Value): Decimal; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: RuntimeName; + prettyName: string; + isEdge: boolean; +}; + +declare class JsonNull extends NullTypesEnumValue { + #private; +} + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +declare type Narrowable = string | number | bigint | boolean | []; + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * Base class for unique values of object-valued enums. + */ +declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +export { } diff --git a/packages/challenge-prisma-client/runtime/index-browser.js b/packages/challenge-prisma-client/runtime/index-browser.js new file mode 100644 index 0000000..086502f --- /dev/null +++ b/packages/challenge-prisma-client/runtime/index-browser.js @@ -0,0 +1,17 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var pe=Object.defineProperty;var Xe=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Qe=Object.prototype.hasOwnProperty;var Ye=e=>{throw TypeError(e)};var Oe=(e,n)=>{for(var i in n)pe(e,i,{get:n[i],enumerable:!0})},xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ke(n))!Qe.call(e,r)&&r!==i&&pe(e,r,{get:()=>n[r],enumerable:!(t=Xe(n,r))||t.enumerable});return e};var ze=e=>xe(pe({},"__esModule",{value:!0}),e);var ne=(e,n,i)=>n.has(e)?Ye("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,i);var ii={};Oe(ii,{Decimal:()=>Je,Public:()=>ge,getRuntime:()=>_e,makeStrictEnum:()=>qe,objectEnumValues:()=>Ae});module.exports=ze(ii);var ge={};Oe(ge,{validator:()=>Re});function Re(...e){return n=>n}var ie=Symbol(),me=new WeakMap,we=class{constructor(n){n===ie?me.set(this,"Prisma.".concat(this._getName())):me.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return me.get(this)}},G=class extends we{_getNamespace(){return"NullTypes"}},Ne,J=class extends G{constructor(){super(...arguments);ne(this,Ne)}};Ne=new WeakMap;ke(J,"DbNull");var ve,X=class extends G{constructor(){super(...arguments);ne(this,ve)}};ve=new WeakMap;ke(X,"JsonNull");var Ee,K=class extends G{constructor(){super(...arguments);ne(this,Ee)}};Ee=new WeakMap;ke(K,"AnyNull");var Ae={classes:{DbNull:J,JsonNull:X,AnyNull:K},instances:{DbNull:new J(ie),JsonNull:new X(ie),AnyNull:new K(ie)}};function ke(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var ye=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function qe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!ye.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var en=()=>{var e,n;return((n=(e=globalThis.process)==null?void 0:e.release)==null?void 0:n.name)==="node"},nn=()=>{var e,n;return!!globalThis.Bun||!!((n=(e=globalThis.process)==null?void 0:e.versions)!=null&&n.bun)},tn=()=>!!globalThis.Deno,rn=()=>typeof globalThis.Netlify=="object",sn=()=>typeof globalThis.EdgeRuntime=="object",on=()=>{var e;return((e=globalThis.navigator)==null?void 0:e.userAgent)==="Cloudflare-Workers"};function un(){var i;return(i=[[rn,"netlify"],[sn,"edge-light"],[on,"workerd"],[tn,"deno"],[nn,"bun"],[en,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0))!=null?i:""}var fn={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function _e(){let e=un();return{id:e,prettyName:fn[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var V=9e15,H=1e9,Se="0123456789abcdef",se="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",oe="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Me={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-V,maxE:V,crypto:!1},Le,Z,w=!0,fe="[DecimalError] ",$=fe+"Invalid argument: ",Ie=fe+"Precision limit exceeded",Ze=fe+"crypto unavailable",Ue="[object Decimal]",R=Math.floor,C=Math.pow,cn=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ln=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,an=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Be=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,dn=9007199254740991,hn=se.length-1,Ce=oe.length-1,h={toStringTag:Ue};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error($+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,c=s.s,f=e.s;if(!o||!u)return!c||!f?NaN:c!==f?c:o===u?0:!o^c<0?1:-1;if(!o[0]||!u[0])return o[0]?c:u[0]?-f:0;if(c!==f)return c;if(s.e!==e.e)return s.e>e.e^c<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^c<0?1:-1;return t===r?0:t>r^c<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=pn(t,We(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,c,f,l=this,a=l.constructor;if(!l.isFinite()||l.isZero())return new a(l);for(w=!1,s=l.s*C(l.s*l,1/3),!s||Math.abs(s)==1/0?(i=b(l.d),e=l.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=C(i,1/3),e=R((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=l.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,c=u.times(u).times(u),f=c.plus(l),t=k(f.plus(l).times(u),f.plus(c),o+2,1),b(u.d).slice(0,o)===(i=b(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(l))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(l));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-R(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return k(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(k(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/le(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=j(o,1,s.times(n),new o(1),!0);for(var c,f=e,l=new o(8);f--;)c=s.times(s),s=u.minus(c.times(l.minus(c.times(l))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=j(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/le(5,e)),r=j(s,2,r,r,!0);for(var o,u=new s(5),c=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(c.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,k(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e=this,n=e.constructor,i=e.abs().cmp(1),t=n.precision,r=n.rounding;return i!==-1?i===0?e.isNeg()?F(n,t,r):new n(0):new n(NaN):e.isZero()?F(n,t+4,r).times(.5):(n.precision=t+6,n.rounding=1,e=new n(1).minus(e).div(e.plus(1)).sqrt().atan(),n.precision=t,n.rounding=r,e.times(2))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=k(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=F(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,c,f=this,l=f.constructor,a=l.precision,d=l.rounding;if(f.isFinite()){if(f.isZero())return new l(f);if(f.abs().eq(1)&&a+4<=Ce)return o=F(l,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new l(NaN);if(a+4<=Ce)return o=F(l,a+4,d).times(.5),o.s=f.s,o}for(l.precision=u=a+10,l.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,c=f.times(f),o=new l(f),r=f;e!==-1;)if(r=r.times(c),s=o.minus(r.div(t+=2)),r=r.times(c),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,c,f=this,l=f.constructor,a=l.precision,d=l.rounding,g=5;if(e==null)e=new l(10),n=!0;else{if(e=new l(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new l(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new l(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?ue(l,u+10):B(e,u),c=k(o,t,u,1),Q(c.d,r=a,d))do if(u+=10,o=B(f,u),t=n?ue(l,u+10):B(e,u),c=k(o,t,u,1),!s){+b(c.d).slice(r+1,r+15)+1==1e14&&(c=p(c,a+1,0));break}while(Q(c.d,r+=10,d));return w=!0,p(c,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,c,f,l,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,c=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(c===3?-0:0);return w?p(e,u,c):e}if(i=R(e.e/m),l=R(g.e/m),f=f.slice(),s=l-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=l,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=l.length,o-r<0&&(r=o,i=l,l=f,f=i),n=0;r;)n=(f[--r]=f[r]+l[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ce(f,t),w?p(e,u,c):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=$e(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=mn(t,We(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,c=o.e,f=o.s,l=o.constructor;if(f!==1||!u||!u[0])return new l(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=b(u),(n.length+c)%2==0&&(n+="0"),f=Math.sqrt(n),c=R((c+1)/2)-(c<0||c%2),f==1/0?n="5e"+c:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),t=new l(n)):t=new l(f.toString()),i=(c=l.precision)+3;;)if(s=t,t=s.plus(k(o,s,i+2,1)).times(.5),b(s.d).slice(0,i)===(n=b(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,c+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,c+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,c,l.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=k(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,c,f,l=this,a=l.constructor,d=l.d,g=(e=new a(e)).d;if(e.s*=l.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=R(l.e/m)+R(e.e/m),c=d.length,f=g.length,c=0;){for(n=0,r=c+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ce(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return Pe(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(q(e,0,H),n===void 0?n=t.rounding:q(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=L(t,!0):(q(e,0,H),n===void 0?n=r.rounding:q(n,0,8),t=p(new r(t),e+1,n),i=L(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=L(r):(q(e,0,H),n===void 0?n=s.rounding:q(n,0,8),t=p(new s(r),e+r.e+1,n),i=L(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,c,f,l,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=c=new N(0),n=new N(t),s=n.e=$e(v)-g.e-1,o=s%m,n.d[0]=C(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error($+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(b(v)),l=N.precision,N.precision=s=v.length*m*2;a=k(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=c.plus(a.times(r)),c=r,r=n,n=u.minus(a.times(r)),u=r;return r=k(e.minus(i),t,0,1,1),c=c.plus(r.times(f)),i=i.plus(r.times(t)),c.s=f.s=g.s,d=k(f,t,s,1).minus(g).abs().cmp(k(c,i,s,1).minus(g).abs())<1?[f,t]:[c,i],N.precision=l,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return Pe(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:q(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=k(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return Pe(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,c=u.constructor,f=+(e=new c(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new c(C(+u,f));if(u=new c(u),u.eq(1))return u;if(t=c.precision,s=c.rounding,e.eq(1))return p(u,t,s);if(n=R(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=dn)return r=He(c,u,i,t),e.s<0?new c(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nc.maxE+1||n0?o/0:0):(w=!1,c.rounding=u.s=1,i=Math.min(12,(n+"").length),r=be(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),Q(r.d,t,s)&&(n=t+10,r=p(be(e.times(B(u,n+i)),n),n+5,1),+b(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,c.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=L(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(q(e,1,H),n===void 0?n=r.rounding:q(n,0,8),t=p(new r(t),e,n),i=L(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(q(e,1,H),n===void 0?n=t.rounding:q(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=L(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=L(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function b(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=C(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==C(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==C(10,n-3)-1,o}function te(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function pn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/le(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=j(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var k=function(){function e(t,r,s){var o,u=0,c=t.length;for(t=t.slice();c--;)o=t[c]*r+u,t[c]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,c;if(s!=o)c=s>o?1:-1;else for(u=c=0;ur[u]?1:-1;break}return c}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,c){var f,l,a,d,g,v,N,A,M,_,E,P,x,I,ae,z,W,de,T,y,ee=t.constructor,he=t.s==r.s?1:-1,O=t.d,S=r.d;if(!O||!O[0]||!S||!S[0])return new ee(!t.s||!r.s||(O?S&&O[0]==S[0]:!S)?NaN:O&&O[0]==0||!S?he*0:he/0);for(c?(g=1,l=t.e-r.e):(c=D,g=m,l=R(t.e/g)-R(r.e/g)),T=S.length,W=O.length,M=new ee(he),_=M.d=[],a=0;S[a]==(O[a]||0);a++);if(S[a]>(O[a]||0)&&l--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)_.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,S=S[0],I++;(a1&&(S=e(S,d,c),O=e(O,d,c),T=S.length,W=O.length),z=T,E=O.slice(0,T),P=E.length;P=c/2&&++de;do d=0,f=n(S,E,T,P),f<0?(x=E[0],T!=P&&(x=x*c+(E[1]||0)),d=x/de|0,d>1?(d>=c&&(d=c-1),N=e(S,d,c),A=N.length,P=E.length,f=n(N,E,A,P),f==1&&(d--,i(N,T=10;d/=10)a++;M.e=a+l*g-1,p(M,u?s+M.e+1:s,o,v)}return M}}();function p(e,n,i,t){var r,s,o,u,c,f,l,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,l=a[d=0],c=l/C(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);l=c=0,r=1,s%=m,o=s-m+1}else break e;else{for(l=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,c=o<0?0:l/C(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?l:l%C(10,r-o-1)),f=i<4?(c||t)&&(i==0||i==(e.s<0?3:2)):c>5||c==5&&(i==4||t||i==6&&(s>0?o>0?l/C(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=C(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=C(10,m-s),a[d]=o>0?(l/C(10,r-o)%C(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ce(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function ue(e,n,i){if(n>hn)throw w=!0,i&&(e.precision=i),Error(Ie);return p(new e(se),n,1,!0)}function F(e,n,i){if(n>Ce)throw Error(Ie);return p(new e(oe),n,i,!0)}function $e(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function He(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),De(s.d,o)&&(r=!0)),i=R(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),De(n.d,o)}return w=!0,s}function Te(e){return e.d[e.d.length-1]&1}function Ve(e,n,i){for(var t,r,s=new e(n[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,c=v):c=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(C(2,a))/Math.LN10*2+5|0,c+=t,i=s=o=new d(1),d.precision=c;;){if(s=p(s.times(e),c,1),i=i.times(++l),u=o.plus(k(s,i,c,1)),b(u.d).slice(0,c)===b(o.d).slice(0,c)){for(r=a;r--;)o=p(o.times(o),c,1);if(n==null)if(f<3&&Q(o.d,c-t,g,f))d.precision=c+=10,i=s=u=new d(1),l=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,c,f,l,a,d,g=1,v=10,N=e,A=N.d,M=N.constructor,_=M.rounding,E=M.precision;if(N.s<0||!A||!A[0]||!N.e&&A[0]==1&&A.length==1)return new M(A&&!A[0]?-1/0:N.s!=1?NaN:A?0:N);if(n==null?(w=!1,l=E):l=n,M.precision=l+=v,i=b(A),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=b(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new M("0."+i),s++):N=new M(t+"."+i.slice(1))}else return f=ue(M,l+2,E).times(s+""),N=B(new M(t+"."+i.slice(1)),l-v).plus(f),M.precision=E,n==null?p(N,E,_,w=!0):N;for(a=N,c=o=N=k(N.minus(1),N.plus(1),l,1),d=p(N.times(N),l,1),r=3;;){if(o=p(o.times(d),l,1),f=c.plus(k(o,new M(r),l,1)),b(f.d).slice(0,l)===b(c.d).slice(0,l))if(c=c.times(2),s!==0&&(c=c.plus(ue(M,l+2,E).times(s+""))),c=k(c,new M(g),l,1),n==null)if(Q(c.d,l-v,_,u))M.precision=l+=v,f=o=N=k(a.minus(1),a.plus(1),l,1),d=p(N.times(N),l,1),r=u=1;else return p(c,M.precision=E,_,w=!0);else return M.precision=E,c;c=f,r+=2}}function je(e){return String(e.s*e.s/0)}function re(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Be.test(n))return re(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(ln.test(n))i=16,n=n.toLowerCase();else if(cn.test(n))i=2;else if(an.test(n))i=8;else throw Error($+n);for(s=n.search(/p/i),s>0?(c=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=He(t,new t(i),s,s*2)),f=te(n,i,D),l=f.length-1,s=l;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ce(f,l),e.d=f,w=!1,o&&(e=k(e,r,u*4)),c&&(e=e.times(Math.abs(c)<54?C(2,c):Y.pow(2,c))),w=!0,e)}function mn(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:j(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/le(5,i)),n=j(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function j(e,n,i,t,r){var s,o,u,c,f=1,l=e.precision,a=Math.ceil(l/m);for(w=!1,c=i.times(i),u=new e(t);;){if(o=k(u.times(c),new e(n++*n++),l,1),u=r?t.plus(o):t.minus(o),t=k(o.times(c),new e(n++*n++),l,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function le(e,n){for(var i=e;--n;)i*=e;return i}function We(e,n){var i,t=n.s<0,r=F(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=Te(i)?t?2:3:t?4:1,n;Z=Te(i)?t?1:4:t?3:2}return n.minus(r).abs()}function Pe(e,n,i,t){var r,s,o,u,c,f,l,a,d,g=e.constructor,v=i!==void 0;if(v?(q(i,1,H),t===void 0?t=g.rounding:q(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())l=je(e);else{for(l=L(e),o=l.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(l=l.replace(".",""),d=new g(1),d.e=l.length-o,d.d=te(L(d),10,r),d.e=d.d.length),a=te(l,10,r),s=c=a.length;a[--c]==0;)a.pop();if(!a[0])l=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=k(e,d,i,t,0,r),a=e.d,s=e.e,f=Le),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(c=a.length;!a[c-1];--c);for(o=0,l="";o1)if(n==16||n==8){for(o=n==16?4:3,--c;c%o;c++)l+="0";for(a=te(l,r,n),c=a.length;!a[c-1];--c);for(o=1,l="1.";oc)for(s-=c;s--;)l+="0";else sn)return e.length=n,!0}function wn(e){return new this(e).abs()}function Nn(e){return new this(e).acos()}function vn(e){return new this(e).acosh()}function En(e,n){return new this(e).plus(n)}function kn(e){return new this(e).asin()}function Sn(e){return new this(e).asinh()}function Mn(e){return new this(e).atan()}function Cn(e){return new this(e).atanh()}function bn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=F(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?F(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=F(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(k(e,n,s,1)),n=F(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(k(e,n,s,1)),i}function Pn(e){return new this(e).cbrt()}function On(e){return p(e=new this(e),e.e+1,2)}function Rn(e,n,i){return new this(e).clamp(n,i)}function An(e){if(!e||typeof e!="object")throw Error(fe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,H,"rounding",0,8,"toExpNeg",-V,0,"toExpPos",0,V,"maxE",0,V,"minE",-V,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error($+i+": "+t);if(i="crypto",r&&(this[i]=Me[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(Ze);else this[i]=!1;else throw Error($+i+": "+t);return this}function qn(e){return new this(e).cos()}function _n(e){return new this(e).cosh()}function Ge(e){var n,i,t;function r(s){var o,u,c,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,Fe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(Ze);else for(;s=10;r/=10)t++;t + * MIT Licence + *) +*/ +//# sourceMappingURL=index-browser.js.map diff --git a/packages/challenge-prisma-client/runtime/library.d.ts b/packages/challenge-prisma-client/runtime/library.d.ts new file mode 100644 index 0000000..ffaec81 --- /dev/null +++ b/packages/challenge-prisma-client/runtime/library.d.ts @@ -0,0 +1,3982 @@ +/** + * @param this + */ +declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; + +declare type AccelerateEngineConfig = { + inlineSchema: EngineConfig['inlineSchema']; + inlineSchemaHash: EngineConfig['inlineSchemaHash']; + env: EngineConfig['env']; + generator?: { + previewFeatures: string[]; + }; + inlineDatasources: EngineConfig['inlineDatasources']; + overrideDatasources: EngineConfig['overrideDatasources']; + clientVersion: EngineConfig['clientVersion']; + engineVersion: EngineConfig['engineVersion']; + logEmitter: EngineConfig['logEmitter']; + logQueries?: EngineConfig['logQueries']; + logLevel?: EngineConfig['logLevel']; + tracingHelper: EngineConfig['tracingHelper']; + accelerateUtils?: AccelerateUtils; +}; + +/** + * A stripped down interface of `fetch` that `@prisma/extension-accelerate` + * relies on. It must be in sync with the corresponding definition in the + * Accelerate extension. + * + * This is the actual interface exposed by the extension. We can't use the + * custom fetch function provided by it as normal fetch because the API is + * different. Notably, `headers` must be an object and not a `Headers` + * instance, and `url` must be a `string` and not a `URL`. + * + * The return type is `Response` but we can't specify this in an exported type + * because it would end up referencing external types from `@types/node` or DOM + * which can fail typechecking depending on TypeScript configuration in a user's + * project. + */ +declare type AccelerateExtensionFetch = (url: string, options: { + body?: string; + method?: string; + headers: Record; +}) => Promise; + +declare type AccelerateExtensionFetchDecorator = (fetch: AccelerateExtensionFetch) => AccelerateExtensionFetch; + +declare type AccelerateUtils = EngineConfig['accelerateUtils']; + +export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; + +declare type ActiveConnectorType = Exclude; + +/** + * An interface that exposes some basic information about the + * adapter like its name and provider type. + */ +declare interface AdapterInfo { + readonly provider: Provider; + readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); +} + +export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; + +export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { + [P in K]: { + $allModels: infer AllModels; + }; +} ? { + [P in K]: Record; +} : {}; + +declare class AnyNull extends NullTypesEnumValue { + #private; +} + +export declare type ApplyOmit = Compute<{ + [K in keyof T as OmitValue extends true ? never : K]: T[K]; +}>; + +export declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +export declare type Args_3 = Args; + +declare type ArgScalarType = 'string' | 'int' | 'bigint' | 'float' | 'decimal' | 'boolean' | 'enum' | 'uuid' | 'json' | 'datetime' | 'bytes' | 'unknown'; + +declare type ArgType = { + scalarType: ArgScalarType; + dbType?: string; + arity: Arity; +}; + +declare type Arity = 'scalar' | 'list'; + +/** + * Attributes is a map from string to attribute values. + * + * Note: only the own enumerable keys are counted as valid attribute keys. + */ +declare interface Attributes { + [attributeKey: string]: AttributeValue | undefined; +} + +/** + * Attribute values may be any non-nullish primitive value except an object. + * + * null or undefined attribute values are invalid and will result in undefined behavior. + */ +declare type AttributeValue = string | number | boolean | Array | Array | Array; + +export declare type BaseDMMF = { + readonly datamodel: Omit; +}; + +declare type BatchArgs = { + queries: BatchQuery[]; + transaction?: { + isolationLevel?: IsolationLevel_2; + }; +}; + +declare type BatchInternalParams = { + requests: RequestParams[]; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type BatchQuery = { + model: string | undefined; + operation: string; + args: JsArgs | RawQueryArgs; +}; + +declare type BatchQueryEngineResult = QueryEngineResultData | Error; + +declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; + +declare type BatchQueryOptionsCbArgs = { + args: BatchArgs; + query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; + __internalParams: BatchInternalParams; +}; + +declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse; + +declare type BatchTransactionOptions = { + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare interface BinaryTargetsEnvValue { + fromEnvVar: string | null; + value: string; + native?: boolean; +} + +/** + * Equivalent to `Uint8Array` before TypeScript 5.7, and `Uint8Array` in TypeScript 5.7 and beyond. + */ +export declare type Bytes = ReturnType; + +export declare type Call = (F & { + params: P; +})['returns']; + +declare interface CallSite { + getLocation(): LocationInFile | null; +} + +export declare type Cast = A extends W ? A : W; + +declare type Client = ReturnType extends new () => infer T ? T : never; + +export declare type ClientArg = { + [MethodName in string]: unknown; +}; + +export declare type ClientArgs = { + client: ClientArg; +}; + +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +export declare type ClientOptionDef = undefined | { + [K in string]: any; +}; + +export declare type ClientOtherOps = { + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $queryRawTyped(query: TypedSql): PrismaPromise; + $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $runCommandRaw(command: InputJsonObject): PrismaPromise; +}; + +declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; + +declare const ColumnTypeEnum: { + readonly Int32: 0; + readonly Int64: 1; + readonly Float: 2; + readonly Double: 3; + readonly Numeric: 4; + readonly Boolean: 5; + readonly Character: 6; + readonly Text: 7; + readonly Date: 8; + readonly Time: 9; + readonly DateTime: 10; + readonly Json: 11; + readonly Enum: 12; + readonly Bytes: 13; + readonly Set: 14; + readonly Uuid: 15; + readonly Int32Array: 64; + readonly Int64Array: 65; + readonly FloatArray: 66; + readonly DoubleArray: 67; + readonly NumericArray: 68; + readonly BooleanArray: 69; + readonly CharacterArray: 70; + readonly TextArray: 71; + readonly DateArray: 72; + readonly TimeArray: 73; + readonly DateTimeArray: 74; + readonly JsonArray: 75; + readonly EnumArray: 76; + readonly BytesArray: 77; + readonly UuidArray: 78; + readonly UnknownNumber: 128; +}; + +declare type CompactedBatchResponse = { + type: 'compacted'; + plan: QueryPlanNode; + arguments: Record[]; + nestedSelection: string[]; + keys: string[]; + expectNonEmpty: boolean; +}; + +declare type CompilerWasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => Promise<{ + __wbg_set_wasm(exports: unknown): void; + QueryCompiler: QueryCompilerConstructor; + }>; + /** + * Loads the raw wasm module for the wasm compiler engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by ClientEngine + */ + getQueryCompilerWasmModule: () => Promise; +}; + +export declare type Compute = T extends Function ? T : { + [K in keyof T]: T[K]; +} & unknown; + +export declare type ComputeDeep = T extends Function ? T : { + [K in keyof T]: ComputeDeep; +} & unknown; + +declare type ComputedField = { + name: string; + needs: string[]; + compute: ResultArgsFieldCompute; +}; + +declare type ComputedFieldsMap = { + [fieldName: string]: ComputedField; +}; + +declare type ConnectionInfo = { + schemaName?: string; + maxBindValues?: number; + supportsRelationJoins: boolean; +}; + +declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb'; + +declare interface Context { + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} + +declare type Context_2 = T extends { + [K: symbol]: { + ctx: infer C; + }; +} ? C & T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +} : T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +}; + +export declare type Count = { + [K in keyof O]: Count; +} & {}; + +export declare function createParam(name: string): Param; + +declare class DataLoader { + private options; + batches: { + [key: string]: Job[]; + }; + private tickActive; + constructor(options: DataLoaderOptions); + request(request: T): Promise; + private dispatchBatches; + get [Symbol.toStringTag](): string; +} + +declare type DataLoaderOptions = { + singleLoader: (request: T) => Promise; + batchLoader: (request: T[]) => Promise; + batchBy: (request: T) => string | undefined; + batchOrder: (requestA: T, requestB: T) => number; +}; + +declare type Datamodel = ReadonlyDeep_2<{ + models: Model[]; + enums: DatamodelEnum[]; + types: Model[]; + indexes: Index[]; +}>; + +declare type DatamodelEnum = ReadonlyDeep_2<{ + name: string; + values: EnumValue[]; + dbName?: string | null; + documentation?: string; +}>; + +declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum; + +declare type DataRule = { + type: 'rowCountEq'; + args: number; +} | { + type: 'rowCountNeq'; + args: number; +} | { + type: 'affectedRowCountEq'; + args: number; +} | { + type: 'never'; +}; + +declare type Datasource = { + url?: string; +}; + +declare type Datasources = { + [name in string]: Datasource; +}; + +declare class DbNull extends NullTypesEnumValue { + #private; +} + +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; + +/** + * Create a new debug instance with the given namespace. + * + * @example + * ```ts + * import Debug from '@prisma/debug' + * const debug = Debug('prisma:client') + * debug('Hello World') + * ``` + */ +declare function debugCreate(namespace: string): ((...args: any[]) => void) & { + color: string; + enabled: boolean; + namespace: string; + log: (...args: string[]) => void; + extend: () => void; +}; + +export declare function Decimal(n: Decimal.Value): Decimal; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +/** + * Interface for any Decimal.js-like library + * Allows us to accept Decimal.js from different + * versions and some compatible alternatives + */ +export declare interface DecimalJsLike { + d: number[]; + e: number; + s: number; + toFixed(): string; +} + +export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; + +export declare type DefaultSelection = Args extends { + omit: infer LocalOmit; +} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; + +export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; + +declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; + +declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$extends"]; + +declare type Deprecation = ReadonlyDeep_2<{ + sinceVersion: string; + reason: string; + plannedRemovalVersion?: string; +}>; + +declare type DeserializedResponse = Array>; + +export declare function deserializeJsonResponse(result: unknown): unknown; + +export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; + +export declare type DevTypeMapDef = { + meta: { + modelProps: string; + }; + model: { + [Model in PropertyKey]: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; + }; + other: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; +}; + +export declare type DevTypeMapFnDef = { + args: any; + result: any; + payload: OperationPayload; +}; + +export declare namespace DMMF { + export { + datamodelEnumToSchemaEnum, + Document_2 as Document, + Mappings, + OtherOperationMappings, + DatamodelEnum, + SchemaEnum, + EnumValue, + Datamodel, + uniqueIndex, + PrimaryKey, + Model, + FieldKind, + FieldNamespace, + FieldLocation, + Field, + FieldDefault, + FieldDefaultScalar, + Index, + IndexType, + IndexField, + SortOrder, + Schema, + Query, + QueryOutput, + TypeRef, + InputTypeRef, + SchemaArg, + OutputType, + SchemaField, + OutputTypeRef, + Deprecation, + InputType, + FieldRefType, + FieldRefAllowType, + ModelMapping, + ModelAction + } +} + +declare namespace DMMF_2 { + export { + datamodelEnumToSchemaEnum, + Document_2 as Document, + Mappings, + OtherOperationMappings, + DatamodelEnum, + SchemaEnum, + EnumValue, + Datamodel, + uniqueIndex, + PrimaryKey, + Model, + FieldKind, + FieldNamespace, + FieldLocation, + Field, + FieldDefault, + FieldDefaultScalar, + Index, + IndexType, + IndexField, + SortOrder, + Schema, + Query, + QueryOutput, + TypeRef, + InputTypeRef, + SchemaArg, + OutputType, + SchemaField, + OutputTypeRef, + Deprecation, + InputType, + FieldRefType, + FieldRefAllowType, + ModelMapping, + ModelAction + } +} + +export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF_2.Datamodel): RuntimeDataModel; + +declare type Document_2 = ReadonlyDeep_2<{ + datamodel: Datamodel; + schema: Schema; + mappings: Mappings; +}>; + +/** + * A generic driver adapter factory that allows the user to instantiate a + * driver adapter. The query and result types are specific to the adapter. + */ +declare interface DriverAdapterFactory extends AdapterInfo { + /** + * Instantiate a driver adapter. + */ + connect(): Promise>; +} + +declare type DynamicArgType = ArgType | { + arity: 'tuple'; + elements: ArgType[]; +}; + +/** Client */ +export declare type DynamicClientExtensionArgs> = { + [P in keyof C_]: unknown; +} & { + [K: symbol]: { + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; + }; + }; +}; + +export declare type DynamicClientExtensionThis> = { + [P in keyof ExtArgs['client']]: Return; +} & { + [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; +} & { + [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; +} & { + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; +} & { + [K: symbol]: { + types: TypeMap['other']; + }; +}; + +export declare type DynamicClientExtensionThisBuiltin> = { + $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call>; + $transaction

[]>(arg: [...P], options?: { + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise>; + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { + maxWait?: number; + timeout?: number; + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise; + $disconnect(): Promise; + $connect(): Promise; +}; + +/** Model */ +export declare type DynamicModelExtensionArgs> = { + [K in keyof M_]: K extends '$allModels' ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: {}; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: { + ctx: DynamicModelExtensionThis, ExtArgs> & { + $parent: DynamicClientExtensionThis; + } & { + $name: ModelKey; + } & { + /** + * @deprecated Use `$name` instead. + */ + name: ModelKey; + }; + }; + } : never; +}; + +export declare type DynamicModelExtensionFluentApi = { + [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; +}; + +export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; + +export declare type DynamicModelExtensionFnResultBase = GetResult; + +export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; + +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult> : (args: Exact) => DynamicModelExtensionFnResult>; + +export declare type DynamicModelExtensionThis> = { + [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; +} & { + [P in Exclude]>]: DynamicModelExtensionOperationFn; +} & { + [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; +} & { + [K: symbol]: { + types: TypeMap['model'][M]; + }; +}; + +/** Query */ +export declare type DynamicQueryExtensionArgs = { + [K in keyof Q_]: K extends '$allOperations' ? (args: { + model?: string; + operation: string; + args: any; + query: (args: any) => PrismaPromise; + }) => Promise : K extends '$allModels' ? { + [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; + } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; +}; + +export declare type DynamicQueryExtensionCb = >(args: A) => Promise; + +export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { + args: DynamicQueryExtensionCbArgsArgs; + model: _0 extends 0 ? undefined : _1; + operation: _2; + query: >(args: A) => PrismaPromise; +} : never : never) & { + query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; +}; + +export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; + +/** Result */ +export declare type DynamicResultExtensionArgs = { + [K in keyof R_]: { + [P in keyof R_[K]]?: { + needs?: DynamicResultExtensionNeeds, R_[K][P]>; + compute(data: DynamicResultExtensionData, R_[K][P]>): any; + }; + }; +}; + +export declare type DynamicResultExtensionData = GetFindResult; + +export declare type DynamicResultExtensionNeeds = { + [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; +} & { + [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; +}; + +/** + * Placeholder value for "no text". + */ +export declare const empty: Sql; + +export declare type EmptyToUnknown = T; + +declare interface Engine { + /** The name of the engine. This is meant to be consumed externally */ + readonly name: string; + onBeforeExit(callback: () => Promise): void; + start(): Promise; + stop(): Promise; + version(forceRun?: boolean): Promise | string; + request(query: JsonQuery, options: RequestOptions): Promise>; + requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; + transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; + transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + metrics(options: MetricsOptionsJson): Promise; + metrics(options: MetricsOptionsPrometheus): Promise; + applyPendingMigrations(): Promise; +} + +declare interface EngineConfig { + cwd: string; + dirname: string; + enableDebugLogs?: boolean; + allowTriggerPanic?: boolean; + prismaPath?: string; + generator?: GeneratorConfig; + /** + * @remarks this field is used internally by Policy, do not rename or remove + */ + overrideDatasources: Datasources; + showColors?: boolean; + logQueries?: boolean; + logLevel?: 'info' | 'warn'; + env: Record; + flags?: string[]; + clientVersion: string; + engineVersion: string; + previewFeatures?: string[]; + engineEndpoint?: string; + activeProvider?: string; + logEmitter: LogEmitter; + transactionOptions: Transaction_2.Options; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. + * If set, this is only used in the library engine, and all queries would be performed through it, + * rather than Prisma's Rust drivers. + * @remarks only used by LibraryEngine.ts + */ + adapter?: SqlDriverAdapterFactory; + /** + * The contents of the schema encoded into a string + */ + inlineSchema: string; + /** + * The contents of the datasource url saved in a string + * @remarks only used by DataProxyEngine.ts + * @remarks this field is used internally by Policy, do not rename or remove + */ + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + /** + * The string hash that was produced for a given schema + * @remarks only used by DataProxyEngine.ts + */ + inlineSchemaHash: string; + /** + * The helper for interaction with OTEL tracing + * @remarks enabling is determined by the client and @prisma/instrumentation package + */ + tracingHelper: TracingHelper; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * Web Assembly module loading configuration + */ + engineWasm?: EngineWasmLoadingConfig; + compilerWasm?: CompilerWasmLoadingConfig; + /** + * Allows Accelerate to use runtime utilities from the client. These are + * necessary for the AccelerateEngine to function correctly. + */ + accelerateUtils?: { + resolveDatasourceUrl: typeof resolveDatasourceUrl; + getBatchRequestPayload: typeof getBatchRequestPayload; + prismaGraphQLToJSError: typeof prismaGraphQLToJSError; + PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; + PrismaClientInitializationError: typeof PrismaClientInitializationError; + PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; + debug: (...args: any[]) => void; + engineVersion: string; + clientVersion: string; + }; +} + +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineSpan = { + id: EngineSpanId; + parentId: string | null; + name: string; + startTime: HrTime; + endTime: HrTime; + kind: EngineSpanKind; + attributes?: Record; + links?: EngineSpanId[]; +}; + +declare type EngineSpanId = string; + +declare type EngineSpanKind = 'client' | 'internal'; + +declare type EngineWasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => Promise<{ + __wbg_set_wasm(exports: unknown): void; + QueryEngine: QueryEngineConstructor; + }>; + /** + * Loads the raw wasm module for the wasm query engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by LibraryEngine + */ + getQueryEngineWasmModule: () => Promise; +}; + +declare type EnumValue = ReadonlyDeep_2<{ + name: string; + dbName: string | null; +}>; + +declare type EnvPaths = { + rootEnvPath: string | null; + schemaEnvPath: string | undefined; +}; + +declare interface EnvValue { + fromEnvVar: null | string; + value: null | string; +} + +export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; + +declare type Error_2 = MappedError & { + originalCode?: string; + originalMessage?: string; +}; + +declare type ErrorCapturingFunction = T extends (...args: infer A) => Promise ? (...args: A) => Promise>> : T extends (...args: infer A) => infer R ? (...args: A) => Result_4> : T; + +declare type ErrorCapturingInterface = { + [K in keyof T]: ErrorCapturingFunction; +}; + +declare interface ErrorCapturingSqlDriverAdapter extends ErrorCapturingInterface { + readonly errorRegistry: ErrorRegistry; +} + +declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; + +declare type ErrorRecord = { + error: unknown; +}; + +declare interface ErrorRegistry { + consumeError(id: number): ErrorRecord | undefined; +} + +declare interface ErrorWithBatchIndex { + batchRequestIdx?: number; +} + +declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; + +export declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +/** + * Defines Exception. + * + * string or an object with one of (message or name or code) and optional stack + */ +declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; + +declare interface ExceptionWithCode { + code: string | number; + name?: string; + message?: string; + stack?: string; +} + +declare interface ExceptionWithMessage { + code?: string | number; + message: string; + name?: string; + stack?: string; +} + +declare interface ExceptionWithName { + code?: string | number; + message?: string; + name: string; + stack?: string; +} + +declare type ExtendedEventType = LogLevel | 'beforeExit'; + +declare type ExtendedSpanOptions = SpanOptions & { + /** The name of the span */ + name: string; + internal?: boolean; + /** Whether it propagates context (?=true) */ + active?: boolean; + /** The context to append the span to */ + context?: Context; +}; + +/** $extends, defineExtension */ +export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { + extArgs: ExtArgs; + , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + $extends: { + extArgs: Args; + }; + }) | { + name?: string; + query?: DynamicQueryExtensionArgs; + result?: DynamicResultExtensionArgs & R; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; + }): { + extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; + define: (client: any) => { + $extends: { + extArgs: Args; + }; + }; + }[Variant]; +} + +export declare type ExtensionArgs = Optional; + +declare namespace Extensions { + export { + defineExtension, + getExtensionContext + } +} +export { Extensions } + +declare namespace Extensions_2 { + export { + InternalArgs, + DefaultArgs, + GetPayloadResultExtensionKeys, + GetPayloadResultExtensionObject, + GetPayloadResult, + GetSelect, + GetOmit, + DynamicQueryExtensionArgs, + DynamicQueryExtensionCb, + DynamicQueryExtensionCbArgs, + DynamicQueryExtensionCbArgsArgs, + DynamicResultExtensionArgs, + DynamicResultExtensionNeeds, + DynamicResultExtensionData, + DynamicModelExtensionArgs, + DynamicModelExtensionThis, + DynamicModelExtensionOperationFn, + DynamicModelExtensionFnResult, + DynamicModelExtensionFnResultBase, + DynamicModelExtensionFluentApi, + DynamicModelExtensionFnResultNull, + DynamicClientExtensionArgs, + DynamicClientExtensionThis, + ClientBuiltInProp, + DynamicClientExtensionThisBuiltin, + ExtendsHook, + MergeExtArgs, + AllModelsToStringIndex, + TypeMapDef, + DevTypeMapDef, + DevTypeMapFnDef, + ClientOptionDef, + ClientOtherOps, + TypeMapCbDef, + ModelKey, + RequiredExtensionArgs as UserArgs + } +} + +export declare type ExtractGlobalOmit = Options extends { + omit: { + [K in ModelName]: infer GlobalOmit; + }; +} ? GlobalOmit : {}; + +declare type Field = ReadonlyDeep_2<{ + kind: FieldKind; + name: string; + isRequired: boolean; + isList: boolean; + isUnique: boolean; + isId: boolean; + isReadOnly: boolean; + isGenerated?: boolean; + isUpdatedAt?: boolean; + /** + * Describes the data type in the same the way it is defined in the Prisma schema: + * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName + */ + type: string; + /** + * Native database type, if specified. + * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`, + * `@db.Text` is encoded as `['Text', []]`. + */ + nativeType?: [string, string[]] | null; + dbName?: string | null; + hasDefaultValue: boolean; + default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; + relationFromFields?: string[]; + relationToFields?: string[]; + relationOnDelete?: string; + relationOnUpdate?: string; + relationName?: string; + documentation?: string; +}>; + +declare type FieldDefault = ReadonlyDeep_2<{ + name: string; + args: Array; +}>; + +declare type FieldDefaultScalar = string | boolean | number; + +declare type FieldInitializer = { + type: 'value'; + value: PrismaValue; +} | { + type: 'lastInsertId'; +}; + +declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; + +declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; + +declare type FieldNamespace = 'model' | 'prisma'; + +declare type FieldOperation = { + type: 'set'; + value: PrismaValue; +} | { + type: 'add'; + value: PrismaValue; +} | { + type: 'subtract'; + value: PrismaValue; +} | { + type: 'multiply'; + value: PrismaValue; +} | { + type: 'divide'; + value: PrismaValue; +}; + +/** + * A reference to a specific field of a specific model + */ +export declare interface FieldRef { + readonly modelName: Model; + readonly name: string; + readonly typeName: FieldType; + readonly isList: boolean; +} + +declare type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; + +declare type FieldRefType = ReadonlyDeep_2<{ + name: string; + allowTypes: FieldRefAllowType[]; + fields: SchemaArg[]; +}>; + +declare type FieldScalarType = { + type: 'string' | 'int' | 'bigint' | 'float' | 'boolean' | 'json' | 'object' | 'datetime' | 'decimal' | 'unsupported'; +} | { + type: 'enum'; + name: string; +} | { + type: 'bytes'; + encoding: 'array' | 'base64' | 'hex'; +}; + +declare type FieldType = { + arity: Arity; +} & FieldScalarType; + +declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; + +export declare interface Fn { + params: Params; + returns: Returns; +} + +declare type Fragment = { + type: 'stringChunk'; + chunk: string; +} | { + type: 'parameter'; +} | { + type: 'parameterTuple'; +} | { + type: 'parameterTupleList'; + itemPrefix: string; + itemSeparator: string; + itemSuffix: string; + groupSeparator: string; +}; + +declare interface GeneratorConfig { + name: string; + output: EnvValue | null; + isCustomOutput?: boolean; + provider: EnvValue; + config: { + /** `output` is a reserved name and will only be available directly at `generator.output` */ + output?: never; + /** `provider` is a reserved name and will only be available directly at `generator.provider` */ + provider?: never; + /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ + binaryTargets?: never; + /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ + previewFeatures?: never; + } & { + [key: string]: string | string[] | undefined; + }; + binaryTargets: BinaryTargetsEnvValue[]; + previewFeatures: string[]; + envPaths?: EnvPaths; + sourceFilePath: string; +} + +export declare type GetAggregateResult

= { + [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { + [J in keyof A[K] & string]: P['scalars'][J] | null; + }; +}; + +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + +export declare type GetBatchResult = { + count: number; +}; + +export declare type GetCountResult = A extends { + select: infer S; +} ? (S extends true ? number : Count) : number; + +declare function getExtensionContext(that: T): Context_2; + +export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { + select: infer S extends object; +} & Record | { + include: infer I extends object; +} & Record ? { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { + scalars: { + [k in K]: infer O; + }; + } ? O : K extends '_count' ? Count : never; +} & (A extends { + include: any; +} & Record ? DefaultSelection : unknown) : DefaultSelection; + +export declare type GetGroupByResult

= A extends { + by: string[]; +} ? Array & { + [K in A['by'][number]]: P['scalars'][K]; +}> : A extends { + by: string; +} ? Array & { + [K in A['by']]: P['scalars'][K]; +}> : {}[]; + +export declare type GetOmit = { + [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; +}; + +export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; + +export declare type GetPayloadResultExtensionKeys = KR; + +export declare type GetPayloadResultExtensionObject = { + [K in GetPayloadResultExtensionKeys]: R[K] extends () => { + compute: (...args: any) => infer C; + } ? C : never; +}; + +export declare function getPrismaClient(config: GetPrismaClientConfig): { + new (optionsArg?: PrismaClientOptions): { + _originalClient: any; + _runtimeDataModel: RuntimeDataModel; + _requestHandler: RequestHandler; + _connectionPromise?: Promise | undefined; + _disconnectionPromise?: Promise | undefined; + _engineConfig: EngineConfig; + _accelerateEngineConfig: AccelerateEngineConfig; + _clientVersion: string; + _errorFormat: ErrorFormat; + _tracingHelper: TracingHelper; + _previewFeatures: string[]; + _activeProvider: string; + _globalOmit?: GlobalOmitOptions | undefined; + _extensions: MergedExtensionsList; + /** + * @remarks This is used internally by Policy, do not rename or remove + */ + _engine: Engine; + /** + * A fully constructed/applied Client that references the parent + * PrismaClient. This is used for Client extensions only. + */ + _appliedParent: any; + _createPrismaPromise: PrismaPromiseFactory; + $on(eventType: E, callback: EventCallback): any; + $connect(): Promise; + /** + * Disconnect from the database + */ + $disconnect(): Promise; + /** + * Executes a raw query and always returns a number + */ + $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Executes a raw command only for MongoDB + * + * @param command + * @returns + */ + $runCommandRaw(command: Record): PrismaPromise_2; + /** + * Executes a raw query and returns selected data + */ + $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Counterpart to $queryRaw, that returns strongly typed results + * @param typedSql + */ + $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; + /** + * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Execute a batch of requests in a transaction + * @param requests + * @param options + */ + _transactionWithArray({ promises, options, }: { + promises: Array>; + options?: BatchTransactionOptions; + }): Promise; + /** + * Perform a long-running transaction + * @param callback + * @param options + * @returns + */ + _transactionWithCallback({ callback, options, }: { + callback: (client: Client) => Promise; + options?: Options; + }): Promise; + _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; + /** + * Execute queries within a transaction + * @param input a callback or a query list + * @param options to set timeouts (callback) + * @returns + */ + $transaction(input: any, options?: any): Promise; + /** + * Runs the middlewares over params before executing a request + * @param internalParams + * @returns + */ + _request(internalParams: InternalRequestParams): Promise; + _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; + $metrics: MetricsClient; + /** + * Shortcut for checking a preview flag + * @param feature preview flag + * @returns + */ + _hasPreviewFlag(feature: string): boolean; + $applyPendingMigrations(): Promise; + $extends: typeof $extends; + readonly [Symbol.toStringTag]: string; + }; +}; + +/** + * Config that is stored into the generated client. When the generated client is + * loaded, this same config is passed to {@link getPrismaClient} which creates a + * closure with that config around a non-instantiated [[PrismaClient]]. + */ +export declare type GetPrismaClientConfig = { + runtimeDataModel: RuntimeDataModel; + generator?: GeneratorConfig; + relativeEnvPaths?: { + rootEnvPath?: string | null; + schemaEnvPath?: string | null; + }; + relativePath: string; + dirname: string; + clientVersion: string; + engineVersion: string; + datasourceNames: string[]; + activeProvider: ActiveConnectorType; + /** + * The contents of the schema encoded into a string + * @remarks only used for the purpose of data proxy + */ + inlineSchema: string; + /** + * A special env object just for the data proxy edge runtime. + * Allows bundlers to inject their own env variables (Vercel). + * Allows platforms to declare global variables as env (Workers). + * @remarks only used for the purpose of data proxy + */ + injectableEdgeEnv?: () => LoadedEnv; + /** + * The contents of the datasource url saved in a string. + * This can either be an env var name or connection string. + * It is needed by the client to connect to the Data Proxy. + * @remarks only used for the purpose of data proxy + */ + inlineDatasources: { + [name in string]: { + url: EnvValue; + }; + }; + /** + * The string hash that was produced for a given schema + * @remarks only used for the purpose of data proxy + */ + inlineSchemaHash: string; + /** + * A marker to indicate that the client was not generated via `prisma + * generate` but was generated via `generate --postinstall` script instead. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + postinstall?: boolean; + /** + * Information about the CI where the Prisma Client has been generated. The + * name of the CI environment is stored at generation time because CI + * information is not always available at runtime. Moreover, the edge client + * has no notion of environment variables, so this works around that. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + ciName?: string; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * A boolean that is `false` when the client was generated with --no-engine. At + * runtime, this means the client will be bound to be using the Data Proxy. + */ + copyEngine?: boolean; + /** + * Optional wasm loading configuration + */ + engineWasm?: EngineWasmLoadingConfig; + compilerWasm?: CompilerWasmLoadingConfig; +}; + +export declare type GetResult = { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; + createMany: GetBatchResult; + createManyAndReturn: GetFindResult[]; + update: GetFindResult; + updateMany: GetBatchResult; + updateManyAndReturn: GetFindResult[]; + upsert: GetFindResult; + delete: GetFindResult; + deleteMany: GetBatchResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; + $queryRaw: unknown; + $queryRawTyped: unknown; + $executeRaw: number; + $queryRawUnsafe: unknown; + $executeRawUnsafe: number; + $runCommandRaw: JsonObject; + findRaw: JsonObject; + aggregateRaw: JsonObject; +}[OperationName]; + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: RuntimeName; + prettyName: string; + isEdge: boolean; +}; + +export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { + [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; +}; + +declare type GlobalOmitOptions = { + [modelName: string]: { + [fieldName: string]: boolean; + }; +}; + +declare type HandleErrorParams = { + args: JsArgs; + error: any; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + modelName?: string; + globalOmit?: GlobalOmitOptions; +}; + +declare type HrTime = [number, number]; + +/** + * Defines High-Resolution Time. + * + * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. + * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. + * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. + * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: + * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. + * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: + * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. + * This is represented in HrTime format as [1609504210, 150000000]. + */ +declare type HrTime_2 = [number, number]; + +declare type Index = ReadonlyDeep_2<{ + model: string; + type: IndexType; + isDefinedOnField: boolean; + name?: string; + dbName?: string; + algorithm?: string; + clustered?: boolean; + fields: IndexField[]; +}>; + +declare type IndexField = ReadonlyDeep_2<{ + name: string; + sortOrder?: SortOrder; + length?: number; + operatorClass?: string; +}>; + +declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; + +declare type InMemoryOps = { + pagination: Pagination | null; + distinct: string[] | null; + reverse: boolean; + linkingFields: string[] | null; + nested: Record; +}; + +/** + * Matches a JSON array. + * Unlike \`JsonArray\`, readonly arrays are assignable to this type. + */ +export declare interface InputJsonArray extends ReadonlyArray { +} + +/** + * Matches a JSON object. + * Unlike \`JsonObject\`, this type allows undefined and read-only properties. + */ +export declare type InputJsonObject = { + readonly [Key in string]?: InputJsonValue | null; +}; + +/** + * Matches any valid value that can be used as an input for operations like + * create and update as the value of a JSON field. Unlike \`JsonValue\`, this + * type allows read-only arrays and read-only object properties and disallows + * \`null\` at the top level. + * + * \`null\` cannot be used as the value of a JSON field because its meaning + * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or + * \`Prisma.DbNull\` to clear the JSON value and set the field to the database + * NULL value instead. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values + */ +export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { + toJSON(): unknown; +}; + +declare type InputType = ReadonlyDeep_2<{ + name: string; + constraints: { + maxNumFields: number | null; + minNumFields: number | null; + fields?: string[]; + }; + meta?: { + source?: string; + grouping?: string; + }; + fields: SchemaArg[]; +}>; + +declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; + +declare type InteractiveTransactionInfo = { + /** + * Transaction ID returned by the query engine. + */ + id: string; + /** + * Arbitrary payload the meaning of which depends on the `Engine` implementation. + * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. + * In `LibraryEngine` and `BinaryEngine` it is currently not used. + */ + payload: Payload; +}; + +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; + +export declare type InternalArgs = { + result: { + [K in keyof R]: { + [P in keyof R[K]]: () => R[K][P]; + }; + }; + model: { + [K in keyof M]: { + [P in keyof M[K]]: () => M[K][P]; + }; + }; + query: { + [K in keyof Q]: { + [P in keyof Q[K]]: () => Q[K][P]; + }; + }; + client: { + [K in keyof C]: () => C[K]; + }; +}; + +declare type InternalRequestParams = { + /** + * The original client method being called. + * Even though the rootField / operation can be changed, + * this method stays as it is, as it's what the user's + * code looks like + */ + clientMethod: string; + /** + * Name of js model that triggered the request. Might be used + * for warnings or error messages + */ + jsModelName?: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + unpacker?: Unpacker; + otelParentCtx?: Context; + /** Used to "desugar" a user input into an "expanded" one */ + argsMapper?: (args?: UserArgs_2) => UserArgs_2; + /** Used to convert args for middleware and back */ + middlewareArgsMapper?: MiddlewareArgsMapper; + /** Used for Accelerate client extension via Data Proxy */ + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +} & Omit; + +declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE'; + +declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable'; + +declare function isSkip(value: unknown): value is Skip; + +export declare function isTypedSql(value: unknown): value is UnknownTypedSql; + +export declare type ITXClientDenyList = (typeof denylist)[number]; + +export declare const itxClientDenyList: readonly (string | symbol)[]; + +declare interface Job { + resolve: (data: any) => void; + reject: (data: any) => void; + request: any; +} + +/** + * Create a SQL query for a list of values. + */ +export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; + +declare type JoinExpression = { + child: QueryPlanNode; + on: [left: string, right: string][]; + parentField: string; + isRelationUnique: boolean; +}; + +export declare type JsArgs = { + select?: Selection_2; + include?: Selection_2; + omit?: Omission; + [argName: string]: JsInputValue; +}; + +export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { + [key: string]: JsInputValue; +}; + +declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { + [key: string]: JsonArgumentValue; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON array. + */ +export declare interface JsonArray extends Array { +} + +export declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: IsolationLevel_2; + }; +}; + +export declare interface JsonConvertible { + toJSON(): unknown; +} + +declare type JsonFieldSelection = { + arguments?: Record | RawTaggedValue; + selection: JsonSelectionSet; +}; + +declare class JsonNull extends NullTypesEnumValue { + #private; +} + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON object. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + */ +export declare type JsonObject = { + [Key in string]?: JsonValue; +}; + +export declare type JsonQuery = { + modelName?: string; + action: JsonQueryAction; + query: JsonFieldSelection; +}; + +declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; + +declare type JsonSelectionSet = { + $scalars?: boolean; + $composites?: boolean; +} & { + [fieldName: string]: boolean | JsonFieldSelection; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches any valid JSON value. + */ +export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; + +export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { + [key: string]: JsOutputValue; +}; + +export declare type JsPromise = Promise & {}; + +declare type KnownErrorParams = { + code: string; + clientVersion: string; + meta?: Record; + batchRequestIdx?: number; +}; + +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +declare interface Link { + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; + /** A set of {@link SpanAttributes} on the link. */ + attributes?: SpanAttributes; + /** Count of attributes of the link that were dropped due to collection limits */ + droppedAttributesCount?: number; +} + +declare type LoadedEnv = { + message?: string; + parsed: { + [x: string]: string; + }; +} | undefined; + +declare type LocationInFile = { + fileName: string; + lineNumber: number | null; + columnNumber: number | null; +}; + +declare type LogDefinition = { + level: LogLevel; + emit: 'stdout' | 'event'; +}; + +/** + * Typings for the events we emit. + * + * @remarks + * If this is updated, our edge runtime shim needs to be updated as well. + */ +declare type LogEmitter = { + on(event: E, listener: (event: EngineEvent) => void): LogEmitter; + emit(event: QueryEventType, payload: QueryEvent): boolean; + emit(event: LogEventType, payload: LogEvent): boolean; +}; + +declare type LogEvent = { + timestamp: Date; + message: string; + target: string; +}; + +declare type LogEventType = 'info' | 'warn' | 'error'; + +declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; + +declare type MappedError = { + kind: 'GenericJs'; + id: number; +} | { + kind: 'UnsupportedNativeDataType'; + type: string; +} | { + kind: 'InvalidIsolationLevel'; + level: string; +} | { + kind: 'LengthMismatch'; + column?: string; +} | { + kind: 'UniqueConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'NullConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'ForeignKeyConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'DatabaseNotReachable'; + host?: string; + port?: number; +} | { + kind: 'DatabaseDoesNotExist'; + db?: string; +} | { + kind: 'DatabaseAlreadyExists'; + db?: string; +} | { + kind: 'DatabaseAccessDenied'; + db?: string; +} | { + kind: 'ConnectionClosed'; +} | { + kind: 'TlsConnectionError'; + reason: string; +} | { + kind: 'AuthenticationFailed'; + user?: string; +} | { + kind: 'TransactionWriteConflict'; +} | { + kind: 'TableDoesNotExist'; + table?: string; +} | { + kind: 'ColumnNotFound'; + column?: string; +} | { + kind: 'TooManyConnections'; + cause: string; +} | { + kind: 'ValueOutOfRange'; + cause: string; +} | { + kind: 'MissingFullTextSearchIndex'; +} | { + kind: 'SocketTimeout'; +} | { + kind: 'InconsistentColumnData'; + cause: string; +} | { + kind: 'TransactionAlreadyClosed'; + cause: string; +} | { + kind: 'postgres'; + code: string; + severity: string; + message: string; + detail: string | undefined; + column: string | undefined; + hint: string | undefined; +} | { + kind: 'mysql'; + code: number; + message: string; + state: string; +} | { + kind: 'sqlite'; + /** + * Sqlite extended error code: https://www.sqlite.org/rescode.html + */ + extendedCode: number; + message: string; +} | { + kind: 'mssql'; + code: number; + message: string; +}; + +declare type Mappings = ReadonlyDeep_2<{ + modelOperations: ModelMapping[]; + otherOperations: { + read: string[]; + write: string[]; + }; +}>; + +/** + * Class that holds the list of all extensions, applied to particular instance, + * as well as resolved versions of the components that need to apply on + * different levels. Main idea of this class: avoid re-resolving as much of the + * stuff as possible when new extensions are added while also delaying the + * resolve until the point it is actually needed. For example, computed fields + * of the model won't be resolved unless the model is actually queried. Neither + * adding extensions with `client` component only cause other components to + * recompute. + */ +declare class MergedExtensionsList { + private head?; + private constructor(); + static empty(): MergedExtensionsList; + static single(extension: ExtensionArgs): MergedExtensionsList; + isEmpty(): boolean; + append(extension: ExtensionArgs): MergedExtensionsList; + getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; + getAllClientExtensions(): ClientArg | undefined; + getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; + getAllQueryCallbacks(jsModelName: string, operation: string): any; + getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; +} + +export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; + +export declare type Metric = { + key: string; + value: T; + labels: Record; + description: string; +}; + +export declare type MetricHistogram = { + buckets: MetricHistogramBucket[]; + sum: number; + count: number; +}; + +export declare type MetricHistogramBucket = [maxValue: number, count: number]; + +export declare type Metrics = { + counters: Metric[]; + gauges: Metric[]; + histograms: Metric[]; +}; + +export declare class MetricsClient { + private _client; + constructor(client: Client); + /** + * Returns all metrics gathered up to this point in prometheus format. + * Result of this call can be exposed directly to prometheus scraping endpoint + * + * @param options + * @returns + */ + prometheus(options?: MetricsOptions): Promise; + /** + * Returns all metrics gathered up to this point in prometheus format. + * + * @param options + * @returns + */ + json(options?: MetricsOptions): Promise; +} + +declare type MetricsOptions = { + /** + * Labels to add to every metrics in key-value format + */ + globalLabels?: Record; +}; + +declare type MetricsOptionsCommon = { + globalLabels?: Record; +}; + +declare type MetricsOptionsJson = { + format: 'json'; +} & MetricsOptionsCommon; + +declare type MetricsOptionsPrometheus = { + format: 'prometheus'; +} & MetricsOptionsCommon; + +declare type MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; + middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; +}; + +declare type Model = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + schema: string | null; + fields: Field[]; + uniqueFields: string[][]; + uniqueIndexes: uniqueIndex[]; + documentation?: string; + primaryKey: PrimaryKey | null; + isGenerated?: boolean; +}>; + +declare enum ModelAction { + findUnique = "findUnique", + findUniqueOrThrow = "findUniqueOrThrow", + findFirst = "findFirst", + findFirstOrThrow = "findFirstOrThrow", + findMany = "findMany", + create = "create", + createMany = "createMany", + createManyAndReturn = "createManyAndReturn", + update = "update", + updateMany = "updateMany", + updateManyAndReturn = "updateManyAndReturn", + upsert = "upsert", + delete = "delete", + deleteMany = "deleteMany", + groupBy = "groupBy", + count = "count",// TODO: count does not actually exist in DMMF + aggregate = "aggregate", + findRaw = "findRaw", + aggregateRaw = "aggregateRaw" +} + +export declare type ModelArg = { + [MethodName in string]: unknown; +}; + +export declare type ModelArgs = { + model: { + [ModelName in string]: ModelArg; + }; +}; + +export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; + +declare type ModelMapping = ReadonlyDeep_2<{ + model: string; + plural: string; + findUnique?: string | null; + findUniqueOrThrow?: string | null; + findFirst?: string | null; + findFirstOrThrow?: string | null; + findMany?: string | null; + create?: string | null; + createMany?: string | null; + createManyAndReturn?: string | null; + update?: string | null; + updateMany?: string | null; + updateManyAndReturn?: string | null; + upsert?: string | null; + delete?: string | null; + deleteMany?: string | null; + aggregate?: string | null; + groupBy?: string | null; + count?: string | null; + findRaw?: string | null; + aggregateRaw?: string | null; +}>; + +export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; + +export declare type ModelQueryOptionsCbArgs = { + model: string; + operation: string; + args: JsArgs; + query: (args: JsArgs) => Promise; +}; + +declare type MultiBatchResponse = { + type: 'multi'; + plans: QueryPlanNode[]; +}; + +export declare type NameArgs = { + name?: string; +}; + +export declare type Narrow = { + [K in keyof A]: A[K] extends Function ? A[K] : Narrow; +} | (A extends Narrowable ? A : never); + +export declare type Narrowable = string | number | bigint | boolean | []; + +export declare type NeverToUnknown = [T] extends [never] ? unknown : T; + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * Base class for unique values of object-valued enums. + */ +export declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-better-sqlite3", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-mssql", "@prisma/adapter-mariadb"]; + +export declare type Omission = Record; + +declare type Omit_2 = { + [P in keyof T as P extends K ? never : P]: T[P]; +}; +export { Omit_2 as Omit } + +export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; + +export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +export declare type OperationPayload = { + name: string; + scalars: { + [ScalarName in string]: unknown; + }; + objects: { + [ObjectName in string]: unknown; + }; + composites: { + [CompositeName in string]: unknown; + }; +}; + +export declare type Optional = { + [P in K & keyof O]?: O[P]; +} & { + [P in Exclude]: O[P]; +}; + +export declare type OptionalFlat = { + [K in keyof T]?: T[K]; +}; + +export declare type OptionalKeys = { + [K in keyof O]-?: {} extends Pick_2 ? K : never; +}[keyof O]; + +declare type Options = { + /** Timeout for starting the transaction */ + maxWait?: number; + /** Timeout for the transaction body */ + timeout?: number; + /** Transaction isolation level */ + isolationLevel?: IsolationLevel_2; +}; + +declare type Options_2 = { + clientVersion: string; +}; + +export declare type Or = { + 0: { + 0: 0; + 1: 1; + }; + 1: { + 0: 1; + 1: 1; + }; +}[A][B]; + +declare type OtherOperationMappings = ReadonlyDeep_2<{ + read: string[]; + write: string[]; +}>; + +declare type OutputType = ReadonlyDeep_2<{ + name: string; + fields: SchemaField[]; +}>; + +declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; + +declare type Pagination = { + cursor: Record | null; + take: number | null; + skip: number | null; +}; + +export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>; + +export declare type Param = { + readonly name: $Value; +}; + +export declare type PatchFlat = O1 & Omit_2; + +export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; + +export declare type Payload = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? T[symbol]['types']['payload'] : any; + +export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { + [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; +}; + +declare type Pick_2 = { + [P in keyof T as P extends K ? P : never]: T[P]; +}; +export { Pick_2 as Pick } + +declare interface PlaceholderFormat { + prefix: string; + hasNumbering: boolean; +} + +declare type PrimaryKey = ReadonlyDeep_2<{ + name: string | null; + fields: string[]; +}>; + +export declare class PrismaClientInitializationError extends Error { + clientVersion: string; + errorCode?: string; + retryable?: boolean; + constructor(message: string, clientVersion: string, errorCode?: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { + code: string; + meta?: Record; + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare type PrismaClientOptions = { + /** + * Overwrites the primary datasource url from your schema.prisma file + */ + datasourceUrl?: string; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. + */ + adapter?: SqlDriverAdapterFactory | null; + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources; + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; + /** + * @example + * \`\`\` + * // Defaults to stdout + * log: ['query', 'info', 'warn'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * ] + * \`\`\` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: Array; + omit?: GlobalOmitOptions; + /** + * @internal + * You probably don't want to use this. \`__internal\` is used by internal tooling. + */ + __internal?: { + debug?: boolean; + engine?: { + cwd?: string; + binaryPath?: string; + endpoint?: string; + allowTriggerPanic?: boolean; + }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; + }; +}; + +export declare class PrismaClientRustPanicError extends Error { + clientVersion: string; + constructor(message: string, clientVersion: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientValidationError extends Error { + name: string; + clientVersion: string; + constructor(message: string, { clientVersion }: Options_2); + get [Symbol.toStringTag](): string; +} + +declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; + +declare type PrismaOperationSpec = { + args: TArgs; + action: TAction; + model: string; +}; + +export declare interface PrismaPromise extends Promise { + [Symbol.toStringTag]: 'PrismaPromise'; +} + +/** + * Prisma's `Promise` that is backwards-compatible. All additions on top of the + * original `Promise` are optional so that it can be backwards-compatible. + * @see [[createPrismaPromise]] + */ +declare interface PrismaPromise_2 = any> extends Promise { + get spec(): TSpec; + /** + * Extension of the original `.then` function + * @param onfulfilled same as regular promises + * @param onrejected same as regular promises + * @param transaction transaction options + */ + then(onfulfilled?: (value: TResult) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.catch` function + * @param onrejected same as regular promises + * @param transaction transaction options + */ + catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.finally` function + * @param onfinally same as regular promises + * @param transaction transaction options + */ + finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Called when executing a batch of regular tx + * @param transaction transaction options for batch tx + */ + requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; +} + +declare type PrismaPromiseBatchTransaction = { + kind: 'batch'; + id: number; + isolationLevel?: IsolationLevel_2; + index: number; + lock: PromiseLike; +}; + +declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise; + +/** + * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which + * is essentially a proxy for `Promise`. All the transaction-compatible client + * methods return one, this allows for pre-preparing queries without executing + * them until `.then` is called. It's the foundation of Prisma's query batching. + * @param callback that will be wrapped within our promise implementation + * @see [[PrismaPromise]] + * @returns + */ +declare type PrismaPromiseFactory = >(callback: PrismaPromiseCallback, op?: T) => PrismaPromise_2; + +declare type PrismaPromiseInteractiveTransaction = { + kind: 'itx'; + id: string; + payload: PayloadType; +}; + +declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; + +declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record | PrismaValuePlaceholder | PrismaValueGenerator; + +declare type PrismaValueGenerator = { + prisma__type: 'generatorCall'; + prisma__value: { + name: string; + args: PrismaValue[]; + }; +}; + +declare type PrismaValuePlaceholder = { + prisma__type: 'param'; + prisma__value: { + name: string; + type: string; + }; +}; + +export declare const PrivateResultType: unique symbol; + +declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver'; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare namespace Public_2 { + export { + Args, + Result, + Payload, + PrismaPromise, + Operation, + Exact + } +} + +declare type Query = ReadonlyDeep_2<{ + name: string; + args: SchemaArg[]; + output: QueryOutput; +}>; + +declare interface Queryable extends AdapterInfo { + /** + * Execute a query and return its result. + */ + queryRaw(params: Query): Promise; + /** + * Execute a query and return the number of affected rows. + */ + executeRaw(params: Query): Promise; +} + +declare type QueryCompiler = { + compile(request: string): {}; + compileBatch(batchRequest: string): BatchResponse; + free(): void; +}; + +declare interface QueryCompilerConstructor { + new (options: QueryCompilerOptions): QueryCompiler; +} + +declare type QueryCompilerOptions = { + datamodel: string; + provider: Provider; + connectionInfo: ConnectionInfo; +}; + +declare type QueryEngineBatchGraphQLRequest = { + batch: QueryEngineRequest[]; + transaction?: boolean; + isolationLevel?: IsolationLevel_2; +}; + +declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; + +declare type QueryEngineConfig = { + datamodel: string; + configDir: string; + logQueries: boolean; + ignoreEnvVarErrors: boolean; + datasourceOverrides: Record; + env: Record; + logLevel: QueryEngineLogLevel; + engineProtocol: QueryEngineProtocol; + enableTracing: boolean; +}; + +declare interface QueryEngineConstructor { + new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlDriverAdapter): QueryEngineInstance; +} + +declare type QueryEngineInstance = { + connect(headers: string, requestId: string): Promise; + disconnect(headers: string, requestId: string): Promise; + /** + * Frees any resources allocated by the engine's WASM instance. This method is automatically created by WASM bindgen. + * Noop for other engines. + */ + free?(): void; + /** + * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` + * @param headersStr JSON.stringified `QueryEngineRequestHeaders` + */ + query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise; + sdlSchema?(): Promise; + startTransaction(options: string, traceHeaders: string, requestId: string): Promise; + commitTransaction(id: string, traceHeaders: string, requestId: string): Promise; + rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise; + metrics?(options: string): Promise; + applyPendingMigrations?(): Promise; + trace(requestId: string): Promise; +}; + +declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; + +declare type QueryEngineProtocol = 'graphql' | 'json'; + +declare type QueryEngineRequest = { + query: string; + variables: Object; +}; + +declare type QueryEngineResultData = { + data: T; +}; + +declare type QueryEvent = { + timestamp: Date; + query: string; + params: string; + duration: number; + target: string; +}; + +declare type QueryEventType = 'query'; + +declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown'; + +declare type QueryMiddlewareParams = { + /** The model this is executed on */ + model?: string; + /** The action that is being handled */ + action: Action; + /** TODO what is this */ + dataPath: string[]; + /** TODO what is this */ + runInTransaction: boolean; + args?: UserArgs_2; +}; + +export declare type QueryOptions = { + query: { + [ModelName in string]: { + [ModelAction in string]: ModelQueryOptionsCb; + } | QueryOptionsCb; + }; +}; + +export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; + +export declare type QueryOptionsCbArgs = { + model?: string; + operation: string; + args: JsArgs | RawQueryArgs; + query: (args: JsArgs | RawQueryArgs) => Promise; +}; + +declare type QueryOutput = ReadonlyDeep_2<{ + name: string; + isRequired: boolean; + isList: boolean; +}>; + +declare type QueryPlanBinding = { + name: string; + expr: QueryPlanNode; +}; + +declare type QueryPlanDbQuery = { + type: 'rawSql'; + sql: string; + args: PrismaValue[]; + argTypes: ArgType[]; +} | { + type: 'templateSql'; + fragments: Fragment[]; + placeholderFormat: PlaceholderFormat; + args: PrismaValue[]; + argTypes: DynamicArgType[]; + chunkable: boolean; +}; + +declare type QueryPlanNode = { + type: 'value'; + args: PrismaValue; +} | { + type: 'seq'; + args: QueryPlanNode[]; +} | { + type: 'get'; + args: { + name: string; + }; +} | { + type: 'let'; + args: { + bindings: QueryPlanBinding[]; + expr: QueryPlanNode; + }; +} | { + type: 'getFirstNonEmpty'; + args: { + names: string[]; + }; +} | { + type: 'query'; + args: QueryPlanDbQuery; +} | { + type: 'execute'; + args: QueryPlanDbQuery; +} | { + type: 'reverse'; + args: QueryPlanNode; +} | { + type: 'sum'; + args: QueryPlanNode[]; +} | { + type: 'concat'; + args: QueryPlanNode[]; +} | { + type: 'unique'; + args: QueryPlanNode; +} | { + type: 'required'; + args: QueryPlanNode; +} | { + type: 'join'; + args: { + parent: QueryPlanNode; + children: JoinExpression[]; + }; +} | { + type: 'mapField'; + args: { + field: string; + records: QueryPlanNode; + }; +} | { + type: 'transaction'; + args: QueryPlanNode; +} | { + type: 'dataMap'; + args: { + expr: QueryPlanNode; + structure: ResultNode; + enums: Record>; + }; +} | { + type: 'validate'; + args: { + expr: QueryPlanNode; + rules: DataRule[]; + } & ValidationError; +} | { + type: 'if'; + args: { + value: QueryPlanNode; + rule: DataRule; + then: QueryPlanNode; + else: QueryPlanNode; + }; +} | { + type: 'unit'; +} | { + type: 'diff'; + args: { + from: QueryPlanNode; + to: QueryPlanNode; + fields: string[]; + }; +} | { + type: 'initializeRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'mapRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'process'; + args: { + expr: QueryPlanNode; + operations: InMemoryOps; + }; +}; + +/** + * Create raw SQL statement. + */ +export declare function raw(value: string): Sql; + +export declare type RawParameters = { + __prismaRawParameters__: true; + values: string; +}; + +export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; + +declare type RawResponse = { + columns: string[]; + types: QueryIntrospectionBuiltinType[]; + rows: unknown[][]; +}; + +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + +/** + * Supported value or SQL instance. + */ +export declare type RawValue = Value | Sql; + +export declare type ReadonlyDeep = { + readonly [K in keyof T]: ReadonlyDeep; +}; + +declare type ReadonlyDeep_2 = { + +readonly [K in keyof O]: ReadonlyDeep_2; +}; + +declare type Record_2 = { + [P in T]: U; +}; +export { Record_2 as Record } + +export declare type RenameAndNestPayloadKeys

= { + [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; +}; + +declare type RequestBatchOptions = { + transaction?: TransactionOptions_2; + traceparent?: string; + numTry?: number; + containsWrite: boolean; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare interface RequestError { + error: string; + user_facing_error: { + is_panic: boolean; + message: string; + meta?: Record; + error_code?: string; + batch_request_idx?: number; + }; +} + +declare class RequestHandler { + client: Client; + dataloader: DataLoader; + private logEmitter?; + constructor(client: Client, logEmitter?: LogEmitter); + request(params: RequestParams): Promise; + mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData): any; + /** + * Handles the error and logs it, logging the error is done synchronously waiting for the event + * handlers to finish. + */ + handleAndLogRequestError(params: HandleErrorParams): never; + handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; + sanitizeMessage(message: any): any; + unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; + get [Symbol.toStringTag](): string; +} + +declare type RequestOptions = { + traceparent?: string; + numTry?: number; + interactiveTransaction?: InteractiveTransactionOptions; + isWrite: boolean; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type RequestParams = { + modelName?: string; + action: Action; + protocolQuery: JsonQuery; + dataPath: string[]; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + extensions: MergedExtensionsList; + args?: any; + headers?: Record; + unpacker?: Unpacker; + otelParentCtx?: Context; + otelChildCtx?: Context; + globalOmit?: GlobalOmitOptions; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; +export { RequiredExtensionArgs } +export { RequiredExtensionArgs as UserArgs } + +export declare type RequiredKeys = { + [K in keyof O]-?: {} extends Pick_2 ? never : K; +}[keyof O]; + +declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + overrideDatasources: Datasources; + env: Record; + clientVersion: string; +}): string; + +export declare type Result = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? GetResult : GetResult<{ + composites: {}; + objects: {}; + scalars: {}; + name: ''; +}, {}, F>; + +export declare type Result_2 = Result; + +declare namespace Result_3 { + export { + Count, + GetFindResult, + SelectablePayloadFields, + SelectField, + DefaultSelection, + UnwrapPayload, + ApplyOmit, + OmitValue, + GetCountResult, + Aggregate, + GetAggregateResult, + GetBatchResult, + GetGroupByResult, + GetResult, + ExtractGlobalOmit + } +} + +declare type Result_4 = { + map(fn: (value: T) => U): Result_4; + flatMap(fn: (value: T) => Result_4): Result_4; +} & ({ + readonly ok: true; + readonly value: T; +} | { + readonly ok: false; + readonly error: Error_2; +}); + +export declare type ResultArg = { + [FieldName in string]: ResultFieldDefinition; +}; + +export declare type ResultArgs = { + result: { + [ModelName in string]: ResultArg; + }; +}; + +export declare type ResultArgsFieldCompute = (model: any) => unknown; + +export declare type ResultFieldDefinition = { + needs?: { + [FieldName in string]: boolean; + }; + compute: ResultArgsFieldCompute; +}; + +declare type ResultNode = { + type: 'affectedRows'; +} | { + type: 'object'; + fields: Record; + serializedName: string | null; + skipNulls: boolean; +} | { + type: 'field'; + dbName: string; + fieldType: FieldType; +}; + +export declare type Return = T extends (...args: any[]) => infer R ? R : T; + +export declare type RuntimeDataModel = { + readonly models: Record; + readonly enums: Record; + readonly types: Record; +}; + +declare type RuntimeEnum = Omit; + +declare type RuntimeModel = Omit; + +declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; + +declare type Schema = ReadonlyDeep_2<{ + rootQueryType?: string; + rootMutationType?: string; + inputObjectTypes: { + model?: InputType[]; + prisma?: InputType[]; + }; + outputObjectTypes: { + model: OutputType[]; + prisma: OutputType[]; + }; + enumTypes: { + model?: SchemaEnum[]; + prisma: SchemaEnum[]; + }; + fieldRefTypes: { + prisma?: FieldRefType[]; + }; +}>; + +declare type SchemaArg = ReadonlyDeep_2<{ + name: string; + comment?: string; + isNullable: boolean; + isRequired: boolean; + inputTypes: InputTypeRef[]; + requiresOtherFields?: string[]; + deprecation?: Deprecation; +}>; + +declare type SchemaEnum = ReadonlyDeep_2<{ + name: string; + values: string[]; +}>; + +declare type SchemaField = ReadonlyDeep_2<{ + name: string; + isNullable?: boolean; + outputType: OutputTypeRef; + args: SchemaArg[]; + deprecation?: Deprecation; + documentation?: string; +}>; + +export declare type Select = T extends U ? T : never; + +export declare type SelectablePayloadFields = { + objects: { + [k in K]: O; + }; +} | { + composites: { + [k in K]: O; + }; +}; + +export declare type SelectField

, K extends PropertyKey> = P extends { + objects: Record; +} ? P['objects'][K] : P extends { + composites: Record; +} ? P['composites'][K] : never; + +declare type Selection_2 = Record; +export { Selection_2 as Selection } + +export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; + +declare type SerializeParams = { + runtimeDataModel: RuntimeDataModel; + modelName?: string; + action: Action; + args?: JsArgs; + extensions?: MergedExtensionsList; + callsite?: CallSite; + clientMethod: string; + clientVersion: string; + errorFormat: ErrorFormat; + previewFeatures: string[]; + globalOmit?: GlobalOmitOptions; +}; + +declare class Skip { + constructor(param?: symbol); + ifUndefined(value: T | undefined): T | Skip; +} + +export declare const skip: Skip; + +declare type SortOrder = 'asc' | 'desc'; + +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +declare interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + spanContext(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. Setting a value null or + * undefined is invalid and will result in undefined behavior. + */ + setAttribute(key: string, value: SpanAttributeValue): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + * null or undefined attribute values + * are invalid and will result in undefined behavior. + */ + setAttributes(attributes: SpanAttributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; + /** + * Adds a single link to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param link the link to add. + */ + addLink(link: Link): this; + /** + * Adds multiple links to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param links the links to add. + */ + addLinks(links: Link[]): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the SpanStatus to set. + */ + setStatus(status: SpanStatus): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; + /** + * Sets exception as a span event + * @param exception the exception the only accepted values are string or Error + * @param [time] the time to set as Span's event time. If not provided, + * use the current time. + */ + recordException(exception: Exception, time?: TimeInput): void; +} + +/** + * @deprecated please use {@link Attributes} + */ +declare type SpanAttributes = Attributes; + +/** + * @deprecated please use {@link AttributeValue} + */ +declare type SpanAttributeValue = AttributeValue; + +declare type SpanCallback = (span?: Span, context?: Context) => R; + +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link Baggage}. + */ +declare interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * see {@link TraceFlags} for valid flag values. + */ + traceFlags: number; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} + +declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} + +/** + * Options needed for span creation + */ +declare interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A span's attributes */ + attributes?: SpanAttributes; + /** {@link Link}s span to other spans */ + links?: Link[]; + /** A manually specified start time for the created `Span` object. */ + startTime?: TimeInput; + /** The new span should be a root span. (Ignore parent from context). */ + root?: boolean; +} + +declare interface SpanStatus { + /** The status code of this message. */ + code: SpanStatusCode; + /** A developer-facing error message. */ + message?: string; +} + +/** + * An enumeration of status codes. + */ +declare enum SpanStatusCode { + /** + * The default status. + */ + UNSET = 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK = 1, + /** + * The operation contains an error. + */ + ERROR = 2 +} + +/** + * A SQL instance can be nested within each other to build SQL strings. + */ +export declare class Sql { + readonly values: Value[]; + readonly strings: string[]; + constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); + get sql(): string; + get statement(): string; + get text(): string; + inspect(): { + sql: string; + statement: string; + text: string; + values: unknown[]; + }; +} + +declare interface SqlDriverAdapter extends SqlQueryable { + /** + * Execute multiple SQL statements separated by semicolon. + */ + executeScript(script: string): Promise; + /** + * Start new transaction. + */ + startTransaction(isolationLevel?: IsolationLevel): Promise; + /** + * Optional method that returns extra connection info + */ + getConnectionInfo?(): ConnectionInfo; + /** + * Dispose of the connection and release any resources. + */ + dispose(): Promise; +} + +export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory { + connect(): Promise; +} + +declare type SqlQuery = { + sql: string; + args: Array; + argTypes: Array; +}; + +declare interface SqlQueryable extends Queryable { +} + +declare interface SqlResultSet { + /** + * List of column types appearing in a database query, in the same order as `columnNames`. + * They are used within the Query Engine to convert values from JS to Quaint values. + */ + columnTypes: Array; + /** + * List of column names appearing in a database query, in the same order as `columnTypes`. + */ + columnNames: Array; + /** + * List of rows retrieved from a database query. + * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. + */ + rows: Array>; + /** + * The last ID of an `INSERT` statement, if any. + * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. + */ + lastInsertId?: string; +} + +/** + * Create a SQL object from a template string. + */ +export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; + +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +declare type TimeInput = HrTime_2 | number | Date; + +export declare type ToTuple = T extends any[] ? T : [T]; + +declare interface TraceState { + /** + * Create a new TraceState which inherits from this TraceState and has the + * given key set. + * The new entry will always be added in the front of the list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): TraceState; + /** + * Return a new TraceState which inherits from this TraceState but does not + * contain the given key. + * + * @param key the key for the TraceState entry to be removed. + */ + unset(key: string): TraceState; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} + +declare interface TracingHelper { + isEnabled(): boolean; + getTraceParent(context?: Context): string; + dispatchEngineSpans(spans: EngineSpan[]): void; + getActiveContext(): Context | undefined; + runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; +} + +declare interface Transaction extends AdapterInfo, SqlQueryable { + /** + * Transaction options. + */ + readonly options: TransactionOptions; + /** + * Commit the transaction. + */ + commit(): Promise; + /** + * Roll back the transaction. + */ + rollback(): Promise; +} + +declare namespace Transaction_2 { + export { + Options, + IsolationLevel_2 as IsolationLevel, + InteractiveTransactionInfo, + TransactionHeaders + } +} + +declare type TransactionHeaders = { + traceparent?: string; +}; + +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { + kind: 'itx'; + options: InteractiveTransactionOptions; +} | { + kind: 'batch'; + options: BatchTransactionOptions; +}; + +export declare class TypedSql { + [PrivateResultType]: Result; + constructor(sql: string, values: Values); + get sql(): string; + get values(): Values; +} + +export declare type TypeMapCbDef = Fn<{ + extArgs: InternalArgs; +}, TypeMapDef>; + +/** Shared */ +export declare type TypeMapDef = Record; + +declare type TypeRef = { + isList: boolean; + type: string; + location: AllowedLocations; + namespace?: FieldNamespace; +}; + +declare namespace Types { + export { + Result_3 as Result, + Extensions_2 as Extensions, + Utils, + Public_2 as Public, + isSkip, + Skip, + skip, + UnknownTypedSql, + OperationPayload as Payload + } +} +export { Types } + +declare type uniqueIndex = ReadonlyDeep_2<{ + name: string; + fields: string[]; +}>; + +declare type UnknownErrorParams = { + clientVersion: string; + batchRequestIdx?: number; +}; + +export declare type UnknownTypedSql = TypedSql; + +declare type Unpacker = (data: any) => any; + +export declare type UnwrapPayload

= {} extends P ? unknown : { + [K in keyof P]: P[K] extends { + scalars: infer S; + composites: infer C; + }[] ? Array> : P[K] extends { + scalars: infer S; + composites: infer C; + } | null ? S & UnwrapPayload | Select : never; +}; + +export declare type UnwrapPromise

= P extends Promise ? R : P; + +export declare type UnwrapTuple = { + [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; +}; + +/** + * Input that flows from the user into the Client. + */ +declare type UserArgs_2 = any; + +declare namespace Utils { + export { + EmptyToUnknown, + NeverToUnknown, + PatchFlat, + Omit_2 as Omit, + Pick_2 as Pick, + ComputeDeep, + Compute, + OptionalFlat, + ReadonlyDeep, + Narrowable, + Narrow, + Exact, + Cast, + Record_2 as Record, + UnwrapPromise, + UnwrapTuple, + Path, + Fn, + Call, + RequiredKeys, + OptionalKeys, + Optional, + Return, + ToTuple, + RenameAndNestPayloadKeys, + PayloadToResult, + Select, + Equals, + Or, + JsPromise + } +} + +declare type ValidationError = { + error_identifier: 'RELATION_VIOLATION'; + context: { + relation: string; + modelA: string; + modelB: string; + }; +} | { + error_identifier: 'MISSING_RELATED_RECORD'; + context: { + model: string; + relation: string; + relationType: string; + operation: string; + neededFor?: string; + }; +} | { + error_identifier: 'MISSING_RECORD'; + context: { + operation: string; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_INPUT'; + context: { + expectedRows: number; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_OUTPUT'; + context: { + expectedRows: number; + relation: string; + relationType: string; + }; +} | { + error_identifier: 'RECORDS_NOT_CONNECTED'; + context: { + relation: string; + parent: string; + child: string; + }; +}; + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +/** + * Values supported by SQL engine. + */ +export declare type Value = unknown; + +export declare function warnEnvConflicts(envPaths: any): void; + +export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; + +export { } diff --git a/packages/challenge-prisma-client/runtime/library.js b/packages/challenge-prisma-client/runtime/library.js new file mode 100644 index 0000000..4972249 --- /dev/null +++ b/packages/challenge-prisma-client/runtime/library.js @@ -0,0 +1,147 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var yu=Object.create;var jt=Object.defineProperty;var bu=Object.getOwnPropertyDescriptor;var Eu=Object.getOwnPropertyNames;var wu=Object.getPrototypeOf,xu=Object.prototype.hasOwnProperty;var Do=(e,r)=>()=>(e&&(r=e(e=0)),r);var ue=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),tr=(e,r)=>{for(var t in r)jt(e,t,{get:r[t],enumerable:!0})},Oo=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Eu(r))!xu.call(e,i)&&i!==t&&jt(e,i,{get:()=>r[i],enumerable:!(n=bu(r,i))||n.enumerable});return e};var O=(e,r,t)=>(t=e!=null?yu(wu(e)):{},Oo(r||!e||!e.__esModule?jt(t,"default",{value:e,enumerable:!0}):t,e)),vu=e=>Oo(jt({},"__esModule",{value:!0}),e);var hi=ue((_g,is)=>{"use strict";is.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Fc=require("node:os"),os=require("node:tty"),de=hi(),{env:G}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Qe=1:G.FORCE_COLOR==="false"?Qe=0:Qe=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function yi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function bi(e,r){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=Fc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function Mc(e){let r=bi(e,e&&e.isTTY);return yi(r)}ss.exports={supportsColor:Mc,stdout:yi(bi(!0,os.isatty(1))),stderr:yi(bi(!0,os.isatty(2)))}});var cs=ue((Lg,us)=>{"use strict";var $c=as(),br=hi();function ls(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function Ei(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(br("no-hyperlink")||br("no-hyperlinks")||br("hyperlink=false")||br("hyperlink=never"))return!1;if(br("hyperlink=true")||br("hyperlink=always")||n)return!0;if(!$c.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=ls(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=ls(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}us.exports={supportsHyperlink:Ei,stdout:Ei(process.stdout),stderr:Ei(process.stderr)}});var ps=ue((Kg,qc)=>{qc.exports={name:"@prisma/internals",version:"6.19.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-engine-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Ti=ue((gh,Qc)=>{Qc.exports={name:"@prisma/engines-version",version:"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"2ba551f319ab1df4bc874a89965d8b3641056773"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var on=ue(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.enginesVersion=void 0;nn.enginesVersion=Ti().prisma.enginesVersion});var hs=ue((Ih,gs)=>{"use strict";gs.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var Di=ue((kh,Es)=>{"use strict";Es.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var vs=ue((jh,tp)=>{tp.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var As=ue((Bh,_e)=>{"use strict";var Fi=require("node:fs"),Mi=require("node:path"),np=require("node:os"),ip=require("node:crypto"),op=vs(),Ts=op.version,sp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function ap(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` +`);let n;for(;(n=sp.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` +`),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function lp(e){let r=Rs(e),t=B.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Ss(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return B.parse(o)}function up(e){console.log(`[dotenv@${Ts}][WARN] ${e}`)}function ot(e){console.log(`[dotenv@${Ts}][DEBUG] ${e}`)}function Ss(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function cp(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Rs(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)Fi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=Mi.resolve(process.cwd(),".env.vault");return Fi.existsSync(r)?r:null}function Ps(e){return e[0]==="~"?Mi.join(np.homedir(),e.slice(1)):e}function pp(e){!!(e&&e.debug)&&ot("Loading env from encrypted .env.vault");let t=B._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),B.populate(n,t,e),{parsed:t}}function dp(e){let r=Mi.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&ot("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[Ps(e.path)];else{i=[];for(let l of e.path)i.push(Ps(l))}let o,s={};for(let l of i)try{let u=B.parse(Fi.readFileSync(l,{encoding:t}));B.populate(s,u,e)}catch(u){n&&ot(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),B.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function mp(e){if(Ss(e).length===0)return B.configDotenv(e);let r=Rs(e);return r?B._configVault(e):(up(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),B.configDotenv(e))}function fp(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=ip.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function gp(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&ot(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var B={configDotenv:dp,_configVault:pp,_parseVault:lp,config:mp,decrypt:fp,parse:ap,populate:gp};_e.exports.configDotenv=B.configDotenv;_e.exports._configVault=B._configVault;_e.exports._parseVault=B._parseVault;_e.exports.config=B.config;_e.exports.decrypt=B.decrypt;_e.exports.parse=B.parse;_e.exports.populate=B.populate;_e.exports=B});var Os=ue((Kh,cn)=>{"use strict";cn.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}t.searchParams.set(i,o)}}return t.toString()};cn.exports.default=cn.exports});var Ki=ue((vb,ea)=>{"use strict";ea.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict"});var sa=Do(()=>{"use strict"});var jf={};tr(jf,{DMMF:()=>ct,Debug:()=>N,Decimal:()=>Fe,Extensions:()=>ni,MetricsClient:()=>Lr,PrismaClientInitializationError:()=>P,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>ae,PrismaClientUnknownRequestError:()=>V,PrismaClientValidationError:()=>Z,Public:()=>ii,Sql:()=>ie,createParam:()=>va,defineDmmfProperty:()=>Ca,deserializeJsonResponse:()=>Vr,deserializeRawResult:()=>Xn,dmmfToRuntimeDataModel:()=>Ns,empty:()=>Oa,getPrismaClient:()=>fu,getRuntime:()=>Kn,join:()=>Da,makeStrictEnum:()=>gu,makeTypedQueryFactory:()=>Ia,objectEnumValues:()=>On,raw:()=>no,serializeJsonQuery:()=>$n,skip:()=>Mn,sqltag:()=>io,warnEnvConflicts:()=>hu,warnOnce:()=>at});module.exports=vu(jf);var ni={};tr(ni,{defineExtension:()=>ko,getExtensionContext:()=>_o});function ko(e){return typeof e=="function"?e:r=>r.$extends(e)}function _o(e){return e}var ii={};tr(ii,{validator:()=>No});function No(...e){return r=>r}var Bt={};tr(Bt,{$:()=>qo,bgBlack:()=>ku,bgBlue:()=>Fu,bgCyan:()=>$u,bgGreen:()=>Nu,bgMagenta:()=>Mu,bgRed:()=>_u,bgWhite:()=>qu,bgYellow:()=>Lu,black:()=>Cu,blue:()=>nr,bold:()=>W,cyan:()=>De,dim:()=>Ce,gray:()=>Hr,green:()=>qe,grey:()=>Ou,hidden:()=>Ru,inverse:()=>Su,italic:()=>Tu,magenta:()=>Iu,red:()=>ce,reset:()=>Pu,strikethrough:()=>Au,underline:()=>Y,white:()=>Du,yellow:()=>Ie});var oi,Lo,Fo,Mo,$o=!0;typeof process<"u"&&({FORCE_COLOR:oi,NODE_DISABLE_COLORS:Lo,NO_COLOR:Fo,TERM:Mo}=process.env||{},$o=process.stdout&&process.stdout.isTTY);var qo={enabled:!Lo&&Fo==null&&Mo!=="dumb"&&(oi!=null&&oi!=="0"||$o)};function F(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!qo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Pu=F(0,0),W=F(1,22),Ce=F(2,22),Tu=F(3,23),Y=F(4,24),Su=F(7,27),Ru=F(8,28),Au=F(9,29),Cu=F(30,39),ce=F(31,39),qe=F(32,39),Ie=F(33,39),nr=F(34,39),Iu=F(35,39),De=F(36,39),Du=F(37,39),Hr=F(90,39),Ou=F(90,39),ku=F(40,49),_u=F(41,49),Nu=F(42,49),Lu=F(43,49),Fu=F(44,49),Mu=F(45,49),$u=F(46,49),qu=F(47,49);var Vu=100,Vo=["green","yellow","blue","magenta","cyan","red"],Yr=[],jo=Date.now(),ju=0,si=typeof process<"u"?process.env:{};globalThis.DEBUG??=si.DEBUG??"";globalThis.DEBUG_COLORS??=si.DEBUG_COLORS?si.DEBUG_COLORS==="true":!0;var zr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Bu(e){let r={color:Vo[ju++%Vo.length],enabled:zr.enabled(e),namespace:e,log:zr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Yr.push([o,...n]),Yr.length>Vu&&Yr.shift(),zr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Uu(c)),u=`+${Date.now()-jo}ms`;jo=Date.now(),globalThis.DEBUG_COLORS?a(Bt[s](W(o)),...l,Bt[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var N=new Proxy(Bu,{get:(e,r)=>zr[r],set:(e,r,t)=>zr[r]=t});function Uu(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function Bo(e=7500){let r=Yr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return r.length!!(e&&typeof e=="object"),Qt=e=>e&&!!e[Oe],Ee=(e,r,t)=>{if(Qt(e)){let n=e[Oe](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if(ui(e)){if(!ui(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Qt(a)&&a[Gu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.lengthEe(u,s[c],t))&&i.every((u,c)=>Ee(u,a[c],t))&&(o.length===0||Ee(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>Ee(s,r[a],t))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in r||Qt(o=i)&&o[Oe]().matcherType==="optional")&&Ee(i,r[n],t);var o})}return Object.is(r,e)},Ge=e=>{var r,t,n;return ui(e)?Qt(e)?(r=(t=(n=e[Oe]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?Zr(e,Ge):Zr(Object.values(e),Ge):[]},Zr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function pe(e){return Object.assign(e,{optional:()=>Qu(e),and:r=>q(e,r),or:r=>Wu(e,r),select:r=>r===void 0?Qo(e):Qo(r,e)})}function Qu(e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:Ee(e,r,n),selections:t}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function q(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Zr(e,Ge),matcherType:"and"})})}function Wu(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return Zr(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Zr(e,Ge),matcherType:"or"})})}function A(e){return{[Oe]:()=>({match:r=>({matched:!!e(r)})})}}function Qo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[Oe]:()=>({match:n=>{let i={[r??Wt]:n};return{matched:t===void 0||Ee(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??Wt].concat(t===void 0?[]:Ge(t))})})}function ye(e){return typeof e=="number"}function Ve(e){return typeof e=="string"}function je(e){return typeof e=="bigint"}var eg=pe(A(function(e){return!0}));var Be=e=>Object.assign(pe(e),{startsWith:r=>{return Be(q(e,(t=r,A(n=>Ve(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Be(q(e,(t=r,A(n=>Ve(n)&&n.endsWith(t)))));var t},minLength:r=>Be(q(e,(t=>A(n=>Ve(n)&&n.length>=t))(r))),length:r=>Be(q(e,(t=>A(n=>Ve(n)&&n.length===t))(r))),maxLength:r=>Be(q(e,(t=>A(n=>Ve(n)&&n.length<=t))(r))),includes:r=>{return Be(q(e,(t=r,A(n=>Ve(n)&&n.includes(t)))));var t},regex:r=>{return Be(q(e,(t=r,A(n=>Ve(n)&&!!n.match(t)))));var t}}),rg=Be(A(Ve)),be=e=>Object.assign(pe(e),{between:(r,t)=>be(q(e,((n,i)=>A(o=>ye(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(q(e,(t=>A(n=>ye(n)&&nbe(q(e,(t=>A(n=>ye(n)&&n>t))(r))),lte:r=>be(q(e,(t=>A(n=>ye(n)&&n<=t))(r))),gte:r=>be(q(e,(t=>A(n=>ye(n)&&n>=t))(r))),int:()=>be(q(e,A(r=>ye(r)&&Number.isInteger(r)))),finite:()=>be(q(e,A(r=>ye(r)&&Number.isFinite(r)))),positive:()=>be(q(e,A(r=>ye(r)&&r>0))),negative:()=>be(q(e,A(r=>ye(r)&&r<0)))}),tg=be(A(ye)),Ue=e=>Object.assign(pe(e),{between:(r,t)=>Ue(q(e,((n,i)=>A(o=>je(o)&&n<=o&&i>=o))(r,t))),lt:r=>Ue(q(e,(t=>A(n=>je(n)&&nUe(q(e,(t=>A(n=>je(n)&&n>t))(r))),lte:r=>Ue(q(e,(t=>A(n=>je(n)&&n<=t))(r))),gte:r=>Ue(q(e,(t=>A(n=>je(n)&&n>=t))(r))),positive:()=>Ue(q(e,A(r=>je(r)&&r>0))),negative:()=>Ue(q(e,A(r=>je(r)&&r<0)))}),ng=Ue(A(je)),ig=pe(A(function(e){return typeof e=="boolean"})),og=pe(A(function(e){return typeof e=="symbol"})),sg=pe(A(function(e){return e==null})),ag=pe(A(function(e){return e!=null}));var ci=class extends Error{constructor(r){let t;try{t=JSON.stringify(r)}catch{t=r}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=r}},pi={matched:!1,value:void 0};function hr(e){return new di(e,pi)}var di=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?pi:{matched:!0,value:t(o?Wt in s?s[Wt]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:pi)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new ci(this.input)}run(){return this.exhaustive()}returnType(){return this}};var Ho=require("node:util");var Ju={warn:Ie("prisma:warn")},Ku={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Jt(e,...r){Ku.warn()&&console.warn(`${Ju.warn} ${e}`,...r)}var Hu=(0,Ho.promisify)(Ko.default.exec),ee=gr("prisma:get-platform"),Yu=["1.0.x","1.1.x","3.0.x"];async function Yo(){let e=Ht.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Yt("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await Zu(),n=await sc(),i=ec({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await rc(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function zu(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=hr({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ee(`Found distro info: +${JSON.stringify(a,null,2)}`),a}async function Zu(){let e="/etc/os-release";try{let r=await mi.default.readFile(e,{encoding:"utf-8"});return zu(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Xu(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return zo(t)}}function Wo(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return zo(t)}}function zo(e){let r=(()=>{if(Xo(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(Yu.includes(r))return r}function ec(e){return hr(e).with({familyDistro:"musl"},()=>(ee('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(ee('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ee('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(ee(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function rc(e){let r='grep -v "libssl.so.0"',t=await Jo(e);if(t){ee(`Found libssl.so file using platform-specific paths: ${t}`);let o=Wo(t);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ee('Falling back to "ldconfig" and other generic paths');let n=await Yt(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await Jo(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ee(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Wo(n);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Yt("openssl version -v");if(i){ee(`Found openssl binary with version: ${i}`);let o=Xu(i);if(ee(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ee("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Jo(e){for(let r of e){let t=await tc(r);if(t)return t}}async function tc(e){try{return(await mi.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function ir(){let{binaryTarget:e}=await Zo();return e}function nc(e){return e.binaryTarget!==void 0}async function fi(){let{memoized:e,...r}=await Zo();return r}var Kt={};async function Zo(){if(nc(Kt))return Promise.resolve({...Kt,memoized:!0});let e=await Yo(),r=ic(e);return Kt={...e,binaryTarget:r},{...Kt,memoized:!1}}function ic(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&Jt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=hr({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Jt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". +${c}`)}let u="debian";if(r==="linux"&&o===void 0&&ee(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||Xo(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Jt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function oc(e){try{return await e()}catch{return}}function Yt(e){return oc(async()=>{let r=await Hu(e);return ee(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function sc(){return typeof Ht.default.machine=="function"?Ht.default.machine():(await Yt("uname -m"))?.trim()}function Xo(e){return e.startsWith("1.")}var Xt={};tr(Xt,{beep:()=>kc,clearScreen:()=>Cc,clearTerminal:()=>Ic,cursorBackward:()=>mc,cursorDown:()=>pc,cursorForward:()=>dc,cursorGetPosition:()=>hc,cursorHide:()=>Ec,cursorLeft:()=>ts,cursorMove:()=>cc,cursorNextLine:()=>yc,cursorPrevLine:()=>bc,cursorRestorePosition:()=>gc,cursorSavePosition:()=>fc,cursorShow:()=>wc,cursorTo:()=>uc,cursorUp:()=>rs,enterAlternativeScreen:()=>Dc,eraseDown:()=>Tc,eraseEndLine:()=>vc,eraseLine:()=>ns,eraseLines:()=>xc,eraseScreen:()=>gi,eraseStartLine:()=>Pc,eraseUp:()=>Sc,exitAlternativeScreen:()=>Oc,iTerm:()=>Lc,image:()=>Nc,link:()=>_c,scrollDown:()=>Ac,scrollUp:()=>Rc});var Zt=O(require("node:process"),1);var zt=globalThis.window?.document!==void 0,gg=globalThis.process?.versions?.node!==void 0,hg=globalThis.process?.versions?.bun!==void 0,yg=globalThis.Deno?.version?.deno!==void 0,bg=globalThis.process?.versions?.electron!==void 0,Eg=globalThis.navigator?.userAgent?.includes("jsdom")===!0,wg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,xg=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,vg=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Pg=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,Xr=globalThis.navigator?.userAgentData?.platform,Tg=Xr==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Sg=Xr==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",Rg=Xr==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Ag=Xr==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),Cg=Xr==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var C="\x1B[",rt="\x1B]",yr="\x07",et=";",es=!zt&&Zt.default.env.TERM_PROGRAM==="Apple_Terminal",ac=!zt&&Zt.default.platform==="win32",lc=zt?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:Zt.default.cwd,uc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?C+(e+1)+"G":C+(r+1)+et+(e+1)+"H"},cc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=C+-e+"D":e>0&&(t+=C+e+"C"),r<0?t+=C+-r+"A":r>0&&(t+=C+r+"B"),t},rs=(e=1)=>C+e+"A",pc=(e=1)=>C+e+"B",dc=(e=1)=>C+e+"C",mc=(e=1)=>C+e+"D",ts=C+"G",fc=es?"\x1B7":C+"s",gc=es?"\x1B8":C+"u",hc=C+"6n",yc=C+"E",bc=C+"F",Ec=C+"?25l",wc=C+"?25h",xc=e=>{let r="";for(let t=0;t[rt,"8",et,et,r,yr,e,rt,"8",et,et,yr].join(""),Nc=(e,r={})=>{let t=`${rt}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+yr},Lc={setCwd:(e=lc())=>`${rt}50;CurrentDir=${e}${yr}`,annotation(e,r={}){let t=`${rt}1337;`,n=r.x!==void 0,i=r.y!==void 0;if((n||i)&&!(n&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+yr}};var en=O(cs(),1);function or(e,r,{target:t="stdout",...n}={}){return en.default[t]?Xt.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`}or.isSupported=en.default.stdout;or.stderr=(e,r,t={})=>or(e,r,{target:"stderr",...t});or.stderr.isSupported=en.default.stderr;function wi(e){return or(e,e,{fallback:Y})}var Vc=ps(),xi=Vc.version;function Er(e){let r=jc();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Bc())}function jc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Bc(){return"library"}function vi(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function rn(e){return{ok:!0,value:e,map(r){return rn(r(e))},flatMap(r){return r(e)}}}function sr(e){return{ok:!1,error:e,map(){return sr(e)},flatMap(){return sr(e)}}}var ds=N("driver-adapter-utils"),Pi=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var tn=(e,r=new Pi)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:ke(r,e.queryRaw.bind(e)),executeRaw:ke(r,e.executeRaw.bind(e)),executeScript:ke(r,e.executeScript.bind(e)),dispose:ke(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await ke(r,e.startTransaction.bind(e))(...n)).map(o=>Uc(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Gc(r,e.getConnectionInfo.bind(e))),t},Uc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:ke(e,r.queryRaw.bind(r)),executeRaw:ke(e,r.executeRaw.bind(r)),commit:ke(e,r.commit.bind(r)),rollback:ke(e,r.rollback.bind(r))});function ke(e,r){return async(...t)=>{try{return rn(await r(...t))}catch(n){if(ds("[error@wrapAsync]",n),vi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}function Gc(e,r){return(...t)=>{try{return rn(r(...t))}catch(n){if(ds("[error@wrapSync]",n),vi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}var Wc=O(on());var M=O(require("node:path")),Jc=O(on()),wh=N("prisma:engines");function ms(){return M.default.join(__dirname,"../")}var xh="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Si=O(require("node:fs")),fs=gr("chmodPlusX");function Ri(e){if(process.platform==="win32")return;let r=Si.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){fs(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);fs(`Have to call chmodPlusX on ${e}`),Si.default.chmodSync(e,n)}function Ai(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${wi("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ce(e.id)}\`).`,s=hr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${t("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} +${s} + +Details: ${r.message}`}var ys=O(hs(),1);function Ci(e){let r=(0,ys.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}var bs="prisma+postgres",sn=`${bs}:`;function an(e){return e?.toString().startsWith(`${sn}//`)??!1}function Ii(e){if(!an(e))return!1;let{host:r}=new URL(e);return r.includes("localhost")||r.includes("127.0.0.1")||r.includes("[::1]")}var ws=O(Di());function ki(e){return String(new Oi(e))}var Oi=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Kc(r.binaryTargets)}));return`generator ${r.name} { +${(0,ws.default)(Hc(n),2)} +}`}};function Kc(e){let r;if(e.length>0){let t=e.find(n=>n.fromEnvVar!==null);t?r=`env("${t.fromEnvVar}")`:r=e.map(n=>n.native?"native":n.value)}else r=void 0;return r}function Hc(e){let r=Object.keys(e).reduce((t,n)=>Math.max(t,n.length),0);return Object.entries(e).map(([t,n])=>`${t.padEnd(r)} = ${Yc(n)}`).join(` +`)}function Yc(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var nt={};tr(nt,{error:()=>Xc,info:()=>Zc,log:()=>zc,query:()=>ep,should:()=>xs,tags:()=>tt,warn:()=>_i});var tt={error:ce("prisma:error"),warn:Ie("prisma:warn"),info:De("prisma:info"),query:nr("prisma:query")},xs={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function zc(...e){console.log(...e)}function _i(e,...r){xs.warn()&&console.warn(`${tt.warn} ${e}`,...r)}function Zc(e,...r){console.info(`${tt.info} ${e}`,...r)}function Xc(e,...r){console.error(`${tt.error} ${e}`,...r)}function ep(e,...r){console.log(`${tt.query} ${e}`,...r)}function ln(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function ar(e,r){throw new Error(r)}function Ni({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var rp=Ni();function wr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(rp,"")}var it=O(require("node:path"));function Li(e){return it.default.sep===it.default.posix.sep?e:e.split(it.default.sep).join(it.default.posix.sep)}var qi=O(As()),un=O(require("node:fs"));var xr=O(require("node:path"));function Cs(e){let r=e.ignoreProcessEnv?{}:process.env,t=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var $i=gr("prisma:tryLoadEnv");function st({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=Is(e);t.conflictCheck!=="none"&&hp(n,r,t.conflictCheck);let i=null;return Ds(n?.path,r)||(i=Is(r)),!n&&!i&&$i("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` +`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function hp(e,r,t){let n=e?.dotenvResult.parsed,i=!Ds(e?.path,r);if(n&&r&&i&&un.default.existsSync(r)){let o=qi.default.parse(un.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=xr.default.relative(process.cwd(),e.path),l=xr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${Y(a)} and ${Y(l)} +Conflicting env vars: +${s.map(c=>` ${W(c)}`).join(` +`)} + +We suggest to move the contents of ${Y(l)} to ${Y(a)} to consolidate your env vars. +`;throw new Error(u)}else if(t==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${Y(a)} and ${Y(l)} +Env vars from ${Y(l)} overwrite the ones from ${Y(a)} + `;console.warn(`${Ie("warn(prisma)")} ${u}`)}}}}function Is(e){if(yp(e)){$i(`Environment variables loaded from ${e}`);let r=qi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Cs(r),message:Ce(`Environment variables loaded from ${xr.default.relative(process.cwd(),e)}`),path:e}}else $i(`Environment variables not found at ${e}`);return null}function Ds(e,r){return e&&r&&xr.default.resolve(e)===xr.default.resolve(r)}function yp(e){return!!(e&&un.default.existsSync(e))}function Vi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function pn(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function ji(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{ks.has(e)||(ks.add(e),_i(r,...t))};var P=class e extends Error{clientVersion;errorCode;retryable;constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};x(P,"PrismaClientInitializationError");var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};x(z,"PrismaClientKnownRequestError");var ae=class extends Error{clientVersion;constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};x(ae,"PrismaClientRustPanicError");var V=class extends Error{clientVersion;batchRequestIdx;constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};x(V,"PrismaClientUnknownRequestError");var Z=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(r,{clientVersion:t}){super(r),this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};x(Z,"PrismaClientValidationError");var we=class{_map=new Map;get(r){return this._map.get(r)?.value}set(r,t){this._map.set(r,{value:t})}getOrCreate(r,t){let n=this._map.get(r);if(n)return n.value;let i=t();return this.set(r,i),i}};function We(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function _s(e,r){let t={};for(let n of e){let i=n[r];t[i]=n}return t}function lt(e){let r;return{get(){return r||(r={value:e()}),r.value}}}function Ns(e){return{models:Bi(e.models),enums:Bi(e.enums),types:Bi(e.types)}}function Bi(e){let r={};for(let{name:t,...n}of e)r[t]=n;return r}function vr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function mn(e){return e.toString()!=="Invalid Date"}var Pr=9e15,Ye=1e9,Ui="0123456789abcdef",hn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",yn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Pr,maxE:Pr,crypto:!1},$s,Ne,w=!0,En="[DecimalError] ",He=En+"Invalid argument: ",qs=En+"Precision limit exceeded",Vs=En+"crypto unavailable",js="[object Decimal]",X=Math.floor,U=Math.pow,bp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ep=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,wp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Bs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,E=7,xp=9007199254740991,vp=hn.length-1,Qi=yn.length-1,m={toStringTag:js};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(He+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Pp(n,Js(n,t)),n.precision=e,n.rounding=r,y(Ne==2||Ne==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(w=!1,o=c.s*U(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=J(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=U(t,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=L(u.plus(c).times(a),u.plus(l),s+2,1),J(a.d).slice(0,s)===(t=J(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return w=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-X(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return L(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(L(r,new t(e),0,1,1),t.precision,t.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/xn(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=Tr(s,1,o.times(r),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Tr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/xn(5,e)),i=Tr(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,L(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e=this,r=e.constructor,t=e.abs().cmp(1),n=r.precision,i=r.rounding;return t!==-1?t===0?e.isNeg()?xe(r,n,i):new r(0):new r(NaN):e.isZero()?xe(r,n+4,i).times(.5):(r.precision=n+6,r.rounding=1,e=new r(1).minus(e).div(e.plus(1)).sqrt().atan(),r.precision=n,r.rounding=i,e.times(2))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,w=!1,t=t.times(t).minus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,w=!1,t=t.times(t).plus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=L(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=xe(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Qi)return s=xe(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Qi)return s=xe(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(w=!1,r=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(w=!1,a=p+f,s=Ke(u,a),n=r?bn(c,a+10):Ke(e,a),l=L(s,n,a,1),ut(l.d,i=p,d))do if(a+=10,s=Ke(u,a),n=r?bn(c,a+10):Ke(e,a),l=L(s,n,a,1),!o){+J(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(ut(l.d,i+=10,d));return w=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d?e.s=-e.s:e=new h(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=h.precision,l=h.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new h(f);else return new h(l===3?-0:0);return w?y(e,a,l):e}if(t=X(e.e/E),c=X(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/fe|0,u[i]%=fe;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=wn(u,n),w?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(He+e);return t.d?(r=Us(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Sp(n,Js(n,t)),n.precision=e,n.rounding=r,y(Ne>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(w=!1,u=Math.sqrt(+s),u==0||u==1/0?(r=J(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=X((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(L(s,o,t+2,1)).times(.5),J(o.d).slice(0,t)===(r=J(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=L(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Ne==2||Ne==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(t=X(c.e/E)+X(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%fe|0,r=a/fe|0;o[i]=(o[i]+r)%fe|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=wn(o,t),w?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ji(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(ne(e,0,Ye),r===void 0?r=n.rounding:ne(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,!0):(ne(e,0,Ye),r===void 0?r=i.rounding:ne(r,0,8),n=y(new i(n),e+1,r),t=ve(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=ve(i):(ne(e,0,Ye),r===void 0?r=o.rounding:ne(r,0,8),n=y(new o(i),e+i.e+1,r),t=ve(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.d,g=f.constructor;if(!h)return new g(f);if(u=t=new g(1),n=l=new g(0),r=new g(n),o=r.e=Us(h)-f.e-1,s=o%E,r.d[0]=U(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(He+a);e=a.gt(r)?o>0?r:u:a}for(w=!1,a=new g(J(h)),c=g.precision,g.precision=o=h.length*E*2;p=L(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=L(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=L(u,n,o,1).minus(f).abs().cmp(L(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ji(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:ne(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(w=!1,t=L(t,e,0,r,1).times(e),w=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ji(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(U(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(r=X(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=xp)return i=Gs(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(w=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=Wi(e.times(Ke(a,n+t)),n),i.d&&(i=y(i,n+5,1),ut(i.d,n,o)&&(r=n+10,i=y(Wi(e.times(Ke(a,r+t)),r),r+5,1),+J(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Ye),r===void 0?r=i.rounding:ne(r,0,8),n=y(new i(n),e,r),t=ve(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(ne(e,1,Ye),r===void 0?r=n.rounding:ne(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function J(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(He+e)}function ut(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=U(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==U(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==U(10,r-3)-1,s}function fn(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Pp(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/xn(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=Tr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var L=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function r(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function t(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,h,g,I,T,S,b,D,me,se,Kr,j,te,Ae,K,fr,Vt=n.constructor,ti=n.s==i.s?1:-1,H=n.d,k=i.d;if(!H||!H[0]||!k||!k[0])return new Vt(!n.s||!i.s||(H?k&&H[0]==k[0]:!k)?NaN:H&&H[0]==0||!k?ti*0:ti/0);for(l?(f=1,c=n.e-i.e):(l=fe,f=E,c=X(n.e/f)-X(i.e/f)),K=k.length,te=H.length,T=new Vt(ti),S=T.d=[],p=0;k[p]==(H[p]||0);p++);if(k[p]>(H[p]||0)&&c--,o==null?(se=o=Vt.precision,s=Vt.rounding):a?se=o+(n.e-i.e)+1:se=o,se<0)S.push(1),h=!0;else{if(se=se/f+2|0,p=0,K==1){for(d=0,k=k[0],se++;(p1&&(k=e(k,d,l),H=e(H,d,l),K=k.length,te=H.length),j=K,b=H.slice(0,K),D=b.length;D=l/2&&++Ae;do d=0,u=r(k,b,K,D),u<0?(me=b[0],K!=D&&(me=me*l+(b[1]||0)),d=me/Ae|0,d>1?(d>=l&&(d=l-1),g=e(k,d,l),I=g.length,D=b.length,u=r(g,b,I,D),u==1&&(d--,t(g,K=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,h)}return T}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/U(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/U(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%U(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/U(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=U(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=U(10,E-o),p[d]=s>0?(c/U(10,i-s)%U(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==fe&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=fe)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return w&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Je(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Je(-i-1)+o,t&&(n=t-s)>0&&(o+=Je(n))):i>=s?(o+=Je(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+Je(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Je(n))),o}function wn(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function bn(e,r,t){if(r>vp)throw w=!0,t&&(e.precision=t),Error(qs);return y(new e(hn),r,1,!0)}function xe(e,r,t){if(r>Qi)throw Error(qs);return y(new e(yn),r,t,!0)}function Us(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Je(e){for(var r="";e--;)r+="0";return r}function Gs(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(w=!1;;){if(t%2&&(o=o.times(r),Fs(o.d,s)&&(i=!0)),t=X(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),Fs(r.d,s)}return w=!0,o}function Ls(e){return e.d[e.d.length-1]&1}function Qs(e,r,t){for(var n,i,o=new e(r[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(w=!1,l=h):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(U(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(L(o,t,l,1)),J(a.d).slice(0,l)===J(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&&ut(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=h,f,w=!0);else return d.precision=h,s}s=a}}function Ke(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,h=10,g=e,I=g.d,T=g.constructor,S=T.rounding,b=T.precision;if(g.s<0||!I||!I[0]||!g.e&&I[0]==1&&I.length==1)return new T(I&&!I[0]?-1/0:g.s!=1?NaN:I?0:g);if(r==null?(w=!1,c=b):c=r,T.precision=c+=h,t=J(I),n=t.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)g=g.times(e),t=J(g.d),n=t.charAt(0),f++;o=g.e,n>1?(g=new T("0."+t),o++):g=new T(n+"."+t.slice(1))}else return u=bn(T,c+2,b).times(o+""),g=Ke(new T(n+"."+t.slice(1)),c-h).plus(u),T.precision=b,r==null?y(g,b,S,w=!0):g;for(p=g,l=s=g=L(g.minus(1),g.plus(1),c,1),d=y(g.times(g),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(L(s,new T(i),c,1)),J(u.d).slice(0,c)===J(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(bn(T,c+2,b).times(o+""))),l=L(l,new T(f),c,1),r==null)if(ut(l.d,c-h,S,a))T.precision=c+=h,u=s=g=L(p.minus(1),p.plus(1),c,1),d=y(g.times(g),c,1),i=a=1;else return y(l,T.precision=b,S,w=!0);else return T.precision=b,l;l=u,i+=2}}function Ws(e){return String(e.s*e.s/0)}function gn(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),Bs.test(r))return gn(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ep.test(r))t=16,r=r.toLowerCase();else if(bp.test(r))t=2;else if(wp.test(r))t=8;else throw Error(He+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=Gs(n,new n(t),o,o*2)),u=fn(r,t,fe),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=wn(u,c),e.d=u,w=!1,s&&(e=L(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?U(2,l):Le.pow(2,l))),w=!0,e)}function Sp(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:Tr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/xn(5,t)),r=Tr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function Tr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(w=!1,l=t.times(t),a=new e(n);;){if(s=L(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=L(s.times(l),new e(r++*r++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return w=!0,s.d.length=p+1,s}function xn(e,r){for(var t=e;--r;)t*=e;return t}function Js(e,r){var t,n=r.s<0,i=xe(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Ne=n?4:1,r;if(t=r.divToInt(i),t.isZero())Ne=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Ne=Ls(t)?n?2:3:n?4:1,r;Ne=Ls(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ji(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,h=t!==void 0;if(h?(ne(t,1,Ye),n===void 0?n=f.rounding:ne(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=Ws(e);else{for(c=ve(e),s=c.indexOf("."),h?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=fn(ve(d),10,i),d.e=d.d.length),p=fn(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=L(e,d,t,n,0,i),p=e.d,o=e.e,u=$s),s=p[t],a=i/2,u=u||p[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=fn(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function Rp(e){return new this(e).abs()}function Ap(e){return new this(e).acos()}function Cp(e){return new this(e).acosh()}function Ip(e,r){return new this(e).plus(r)}function Dp(e){return new this(e).asin()}function Op(e){return new this(e).asinh()}function kp(e){return new this(e).atan()}function _p(e){return new this(e).atanh()}function Np(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=xe(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?xe(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=xe(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(L(e,r,o,1)),r=xe(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(L(e,r,o,1)),t}function Lp(e){return new this(e).cbrt()}function Fp(e){return y(e=new this(e),e.e+1,2)}function Mp(e,r,t){return new this(e).clamp(r,t)}function $p(e){if(!e||typeof e!="object")throw Error(En+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ye,"rounding",0,8,"toExpNeg",-Pr,0,"toExpPos",0,Pr,"maxE",0,Pr,"minE",-Pr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(He+t+": "+n);if(t="crypto",i&&(this[t]=Gi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Vs);else this[t]=!1;else throw Error(He+t+": "+n);return this}function qp(e){return new this(e).cos()}function Vp(e){return new this(e).cosh()}function Ks(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Ms(o)){u.s=o.s,w?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;w?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Vs);else for(;o=10;i/=10)n++;nRr,datamodelEnumToSchemaEnum:()=>pd});function pd(e){return{name:e.name,values:e.values.map(r=>r.name)}}var Rr=(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.updateManyAndReturn="updateManyAndReturn",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw",b))(Rr||{});var Xs=O(Di());var Zs=O(require("node:fs"));var Hs={keyword:De,entity:De,value:e=>W(nr(e)),punctuation:nr,directive:De,function:De,variable:e=>W(nr(e)),string:e=>W(qe(e)),boolean:Ie,number:De,comment:Hr};var dd=e=>e,vn={},md=0,v={manual:vn.Prism&&vn.Prism.manual,disableWorkerMessageHandler:vn.Prism&&vn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ge){let r=e;return new ge(r.type,v.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ge)continue;if(me&&j!=r.length-1){S.lastIndex=te;var p=S.exec(e);if(!p)break;var c=p.index+(D?p[1].length:0),d=p.index+p[0].length,a=j,l=te;for(let k=r.length;a=l&&(++j,te=l);if(r[j]instanceof ge)continue;u=a-j,Ae=e.slice(te,l),p.index-=te}else{S.lastIndex=0;var p=S.exec(Ae),u=1}if(!p){if(o)break;continue}D&&(se=p[1]?p[1].length:0);var c=p.index+se,p=p[0].slice(se),d=c+p.length,f=Ae.slice(0,c),h=Ae.slice(d);let K=[j,u];f&&(++j,te+=f.length,K.push(f));let fr=new ge(g,b?v.tokenize(p,b):p,Kr,p,me);if(K.push(fr),h&&K.push(h),Array.prototype.splice.apply(r,K),u!=1&&v.matchGrammar(e,r,t,j,te,!0,g),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return v.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=v.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ge};v.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};v.languages.javascript=v.languages.extend("clike",{"class-name":[v.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});v.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;v.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:v.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:v.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:v.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:v.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});v.languages.markup&&v.languages.markup.tag.addInlined("script","javascript");v.languages.js=v.languages.javascript;v.languages.typescript=v.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});v.languages.ts=v.languages.typescript;function ge(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ge.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ge.stringify(t,r)}).join(""):fd(e.type)(e.content)};function fd(e){return Hs[e]||dd}function Ys(e){return gd(e,v.languages.javascript)}function gd(e,r){return v.tokenize(e,r).map(n=>ge.stringify(n)).join("")}function zs(e){return Ci(e)}var Pn=class e{firstLineNumber;lines;static read(r){let t;try{t=Zs.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` +`);return new e(r,zs(n).split(` +`))}highlight(){let r=Ys(this.toString());return new e(this.firstLineNumber,r.split(` +`))}toString(){return this.lines.join(` +`)}};var hd={red:ce,gray:Hr,dim:Ce,bold:W,underline:Y,highlightSource:e=>e.highlight()},yd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function bd({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function Ed({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=bd({message:r,originalMethod:t,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=Pn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=xd(c),d=wd(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,h=>h.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((h,g)=>o.gray(String(g).padStart(f))+" "+h).mapLines(h=>o.dim(h)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let h=p+f+1;h+=2,s.callArguments=(0,Xs.default)(i,h).slice(h)}}return s}function wd(e){let r=Object.keys(Rr).join("|"),n=new RegExp(String.raw`\.(${r})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function xd(e){let r=0;for(let t=0;t"Unknown error")}function ia(e){return e.errors.flatMap(r=>r.kind==="Union"?ia(r):[r])}function Td(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:Sd(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function Sd(e,r){return[...new Set(e.concat(r))]}function Rd(e){return ji(e,(r,t)=>{let n=ra(r),i=ra(t);return n!==i?n-i:ta(r)-ta(t)})}function ra(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function ta(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var le=class{constructor(r,t){this.name=r;this.value=t}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};sa();var Ar=class{constructor(r=0,t){this.context=t;this.currentIndent=r}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t,n=(i,o)=>o.write(i)){let i=t.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};oa();var Rn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var An=e=>e,Cn={bold:An,red:An,green:An,dim:An,enabled:!1},aa={bold:W,red:ce,green:qe,dim:Ce,enabled:!0},Cr={write(e){e.writeLine(",")}};var Pe=class{constructor(r){this.contents=r}isUnderlined=!1;color=r=>r;underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Ir=class extends ze{items=[];addItem(r){return this.items.push(new Rn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(t=>t.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let t=new Pe("[]");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithItems(r){let{colors:t}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Cr,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(t.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Dr=class e extends ze{fields={};suggestions=[];addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[t,...n]=r,i=this.getField(t);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Ir&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let t=this;for(let n of r){if(!(t instanceof e))return;let i=t.getSubSelectionValue(n);if(!i)return;t=i}return t}getDeepSelectionParent(r){let t=this.getSelectionParent();if(!t)return;let n=t;for(let i of r){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let t=this.getField("include")?.value.asObject();if(t)return{kind:"include",value:t}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(n=>n.getPrintWidth()))+2}write(r){let t=Object.values(this.fields);if(t.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,t)}asObject(){return this}writeEmpty(r){let t=new Pe("{}");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithContents(r,t){r.writeLine("{").withIndent(()=>{r.writeJoined(Cr,[...t,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var Q=class extends ze{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Pe(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var pt=class{fields=[];addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Cr,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Sn(e,r,t){switch(e.kind){case"MutuallyExclusiveFields":Ad(e,r);break;case"IncludeOnScalar":Cd(e,r);break;case"EmptySelection":Id(e,r,t);break;case"UnknownSelectionField":_d(e,r);break;case"InvalidSelectionValue":Nd(e,r);break;case"UnknownArgument":Ld(e,r);break;case"UnknownInputField":Fd(e,r);break;case"RequiredArgumentMissing":Md(e,r);break;case"InvalidArgumentType":$d(e,r);break;case"InvalidArgumentValue":qd(e,r);break;case"ValueTooLarge":Vd(e,r);break;case"SomeFieldsMissing":jd(e,r);break;case"TooManyFieldsGiven":Bd(e,r);break;case"Union":na(e,r,t);break;default:throw new Error("not implemented: "+e.kind)}}function Ad(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Cd(e,r){let[t,n]=Or(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${dt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Id(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Dd(e,r,i);return}if(n.hasField("select")){Od(e,r);return}}if(t?.[We(e.outputType.name)]){kd(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Dd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new le(n.name,"false"));r.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Od(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),pa(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function kd(e,r){let t=new pt;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new le("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=Or(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Dr;l.addSuggestion(n),a.value=l}}r.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function _d(e,r){let t=da(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":pa(n,e.outputType);break;case"include":Ud(n,e.outputType);break;case"omit":Gd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(dt(n)),i.join(" ")})}function Nd(e,r){let t=da(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function Ld(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),Qd(n,e.arguments)),r.addErrorMessage(i=>ua(i,t,e.arguments.map(o=>o.name)))}function Fd(e,r){let[t,n]=Or(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ma(o,e.inputType)}r.addErrorMessage(o=>ua(o,n,e.inputType.fields.map(s=>s.name)))}function ua(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=Jd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(dt(e)),n.join(" ")}function Md(e,r){let t;r.addErrorMessage(l=>t?.value instanceof Q&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Or(e.argumentPath),s=new pt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(t=a.getField(o),t&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(ca).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=Or(e.dependentArgumentPath);r.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function ca(e){return e.kind==="list"?`${ca(e.elementType)}[]`:e.name}function $d(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=In("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function qd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=In("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Vd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof Q&&(i=s.text)}r.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``),s.join(" ")})}function jd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ma(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${In("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(dt(i)),o.join(" ")})}function Bd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${In("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function pa(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new le(t.name,"true"))}function Ud(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new le(t.name,"true"))}function Gd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new le(t.name,"true"))}function Qd(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new le(t.name,t.typeNames.join(" | ")))}function da(e,r){let[t,n]=Or(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ma(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new le(t.name,t.typeNames.join(" | ")))}function Or(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function dt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function In(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Wd=3;function Jd(e,r){let t=1/0,n;for(let i of r){let o=(0,la.default)(e,i);o>Wd||o`}};function kr(e){return e instanceof mt}var Dn=Symbol(),Yi=new WeakMap,Me=class{constructor(r){r===Dn?Yi.set(this,`Prisma.${this._getName()}`):Yi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Yi.get(this)}},ft=class extends Me{_getNamespace(){return"NullTypes"}},gt=class extends ft{#e};zi(gt,"DbNull");var ht=class extends ft{#e};zi(ht,"JsonNull");var yt=class extends ft{#e};zi(yt,"AnyNull");var On={classes:{DbNull:gt,JsonNull:ht,AnyNull:yt},instances:{DbNull:new gt(Dn),JsonNull:new ht(Dn),AnyNull:new yt(Dn)}};function zi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var fa=": ",kn=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+fa.length}write(r){let t=new Pe(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(fa).write(this.value)}};var Zi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` +`)}};function _r(e){return new Zi(ga(e))}function ga(e){let r=new Dr;for(let[t,n]of Object.entries(e)){let i=new kn(t,ha(n));r.addField(i)}return r}function ha(e){if(typeof e=="string")return new Q(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new Q(String(e));if(typeof e=="bigint")return new Q(`${e}n`);if(e===null)return new Q("null");if(e===void 0)return new Q("undefined");if(Sr(e))return new Q(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new Q(`Buffer.alloc(${e.byteLength})`):new Q(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=mn(e)?e.toISOString():"Invalid Date";return new Q(`new Date("${r}")`)}return e instanceof Me?new Q(`Prisma.${e._getName()}`):kr(e)?new Q(`prisma.${We(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Kd(e):typeof e=="object"?ga(e):new Q(Object.prototype.toString.call(e))}function Kd(e){let r=new Ir;for(let t of e)r.addItem(ha(t));return r}function _n(e,r){let t=r==="pretty"?aa:Cn,n=e.renderAllMessages(t),i=new Ar(0,{colors:t}).write(e).toString();return{message:n,args:i}}function Nn({args:e,errors:r,errorFormat:t,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=_r(e);for(let p of r)Sn(p,a,s);let{message:l,args:u}=_n(a,t),c=Tn({message:l,callsite:n,originalMethod:i,showColors:t==="pretty",callArguments:u});throw new Z(c,{clientVersion:o})}function Te(e){return e.replace(/^./,r=>r.toLowerCase())}function ba(e,r,t){let n=Te(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Hd({...e,...ya(r.name,e,r.result.$allModels),...ya(r.name,e,r.result[n])})}function Hd(e){let r=new we,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return pn(e,n=>({...n,needs:t(n.name,new Set)}))}function ya(e,r,t){return t?pn(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Yd(r,o,i)})):{}}function Yd(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function Ea(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function wa(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var Ln=class{constructor(r,t){this.extension=r;this.previous=t}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=lt(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r});getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>ba(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Te(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Nr=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new Ln(r))}isEmpty(){return this.head===void 0}append(r){return new e(new Ln(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Fn=class{constructor(r){this.name=r}};function xa(e){return e instanceof Fn}function va(e){return new Fn(e)}var Pa=Symbol(),bt=class{constructor(r){if(r!==Pa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(r){return r===void 0?Mn:r}},Mn=new bt(Pa);function Se(e){return e instanceof bt}var zd={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ta="explicitly `undefined` values are not allowed";function $n({modelName:e,action:r,args:t,runtimeDataModel:n,extensions:i=Nr.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Xi({runtimeDataModel:n,modelName:e,action:r,rootArgs:t,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:zd[r],query:Et(t,p)}}function Et({select:e,include:r,...t}={},n){let i=t.omit;return delete t.omit,{arguments:Ra(t,n),selection:Zd(e,r,i,n)}}function Zd(e,r,t,n){return e?(r?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):t&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),tm(e,n)):Xd(n,r,t)}function Xd(e,r,t){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),r&&em(n,r,e),rm(n,t,e),n}function em(e,r,t){for(let[n,i]of Object.entries(r)){if(Se(i))continue;let o=t.nestSelection(n);if(eo(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=t.findField(n);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(n),outputType:t.getOutputTypeDescription()}),s){e[n]=Et(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Et(i,o)}}function rm(e,r,t){let n=t.getComputedFields(),i={...t.getGlobalOmit(),...r},o=wa(i,n);for(let[s,a]of Object.entries(o)){if(Se(a))continue;eo(a,t.nestSelection(s));let l=t.findField(s);n?.[s]&&!l||(e[s]=!a)}}function tm(e,r){let t={},n=r.getComputedFields(),i=Ea(e,n);for(let[o,s]of Object.entries(i)){if(Se(s))continue;let a=r.nestSelection(o);eo(s,a);let l=r.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Se(s)){t[o]=!1;continue}if(s===!0){l?.kind==="object"?t[o]=Et({},a):t[o]=!0;continue}t[o]=Et(s,a)}}return t}function Sa(e,r){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(vr(e)){if(mn(e))return{$type:"DateTime",value:e.toISOString()};r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(xa(e))return{$type:"Param",value:e.name};if(kr(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return nm(e,r);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(t,n,i).toString("base64")}}if(im(e))return e.values;if(Sr(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==On.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(om(e))return e.toJSON();if(typeof e=="object")return Ra(e,r);r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ra(e,r){if(e.$type)return{$type:"Raw",value:e};let t={};for(let n in e){let i=e[n],o=r.nestArgument(n);Se(i)||(i!==void 0?t[n]=Sa(i,o):r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:r.getSelectionPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:Ta}))}return t}function nm(e,r){let t=[];for(let n=0;n({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.modelOrType?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[We(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:ar(this.params.action,"Unknown action")}}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};function Aa(e){if(!e._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Lr=class{_client;constructor(r){this._client=r}prometheus(r){return Aa(this._client),this._client._engine.metrics({format:"prometheus",...r})}json(r){return Aa(this._client),this._client._engine.metrics({format:"json",...r})}};function Ca(e,r){let t=lt(()=>sm(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function sm(e){return{datamodel:{models:ro(e.models),enums:ro(e.enums),types:ro(e.types)}}}function ro(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var to=new WeakMap,qn="$$PrismaTypedSql",wt=class{constructor(r,t){to.set(this,{sql:r,values:t}),Object.defineProperty(this,qn,{value:qn})}get sql(){return to.get(this).sql}get values(){return to.get(this).values}};function Ia(e){return(...r)=>new wt(e,r)}function Vn(e){return e!=null&&e[qn]===qn}var cu=O(Ti());var pu=require("node:async_hooks"),du=require("node:events"),mu=O(require("node:fs")),ri=O(require("node:path"));var ie=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var jn={enumerable:!0,configurable:!0,writable:!0};function Bn(e){let r=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>jn,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var ka=Symbol.for("nodejs.util.inspect.custom");function he(e,r){let t=am(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=_a(Reflect.ownKeys(o),t),a=_a(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=t.get(s);return l?l.getPropertyDescriptor?{...jn,...l?.getPropertyDescriptor(s)}:jn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ka]=function(){let o={...this};return delete o[ka],o},i}function am(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function _a(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function Fr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Mr(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}function Na(e){if(e===void 0)return"";let r=_r(e);return new Ar(0,{colors:Cn}).write(r).toString()}var lm="P2037";function $r({error:e,user_facing_error:r},t,n){return r.error_code?new z(um(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new V(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function um(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===lm&&(t+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var vt="";function La(e){var r=e.split(` +`);return r.reduce(function(t,n){var i=dm(n)||fm(n)||ym(n)||xm(n)||Em(n);return i&&t.push(i),t},[])}var cm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,pm=/\((\S*)(?::(\d+))(?::(\d+))\)/;function dm(e){var r=cm.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=pm.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||vt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var mm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function fm(e){var r=mm.exec(e);return r?{file:r[2],methodName:r[1]||vt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var gm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,hm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ym(e){var r=gm.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=hm.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||vt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var bm=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Em(e){var r=bm.exec(e);return r?{file:r[3],methodName:r[1]||vt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var wm=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function xm(e){var r=wm.exec(e);return r?{file:r[2],methodName:r[1]||vt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var oo=class{getLocation(){return null}},so=class{_error;constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=La(r).find(i=>{if(!i.file)return!1;let o=Li(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new oo:new so}var Fa={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function qr(e={}){let r=Pm(e);return Object.entries(r).reduce((n,[i,o])=>(Fa[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Pm(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Un(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function Ma(e,r){let t=Un(e);return r({action:"aggregate",unpacker:t,argsMapper:qr})(e)}function Tm(e={}){let{select:r,...t}=e;return typeof r=="object"?qr({...t,_count:r}):qr({...t,_count:{_all:!0}})}function Sm(e={}){return typeof e.select=="object"?r=>Un(e)(r)._count:r=>Un(e)(r)._count._all}function $a(e,r){return r({action:"count",unpacker:Sm(e),argsMapper:Tm})(e)}function Rm(e={}){let r=qr(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function Am(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function qa(e,r){return r({action:"groupBy",unpacker:Am(e),argsMapper:Rm})(e)}function Va(e,r,t){if(r==="aggregate")return n=>Ma(n,t);if(r==="count")return n=>$a(n,t);if(r==="groupBy")return n=>qa(n,t)}function ja(e,r){let t=r.fields.filter(i=>!i.relationName),n=_s(t,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new mt(e,o,s.type,s.isList,s.kind==="enum")},...Bn(Object.keys(n))})}var Ba=e=>Array.isArray(e)?e:e.split("."),ao=(e,r)=>Ba(r).reduce((t,n)=>t&&t[n],e),Ua=(e,r,t)=>Ba(r).reduceRight((n,i,o,s)=>Object.assign({},ao(e,s.slice(0,o)),{[i]:n}),t);function Cm(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function Im(e,r,t){return r===void 0?e??{}:Ua(r,t,e||!0)}function lo(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=Cm(n,i),p=Im(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Dm(e,r);return new Proxy(d,{get(h,g){if(!f.includes(g))return h[g];let T=[a[g].type,t,g],S=[c,p];return lo(e,...T,...S)},...Bn([...f,...Object.getOwnPropertyNames(d)])})}}function Dm(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Om=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],km=["aggregate","count","groupBy"];function uo(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[_m(e,r),Lm(e,r),xt(t),re("name",()=>r),re("$name",()=>r),re("$parent",()=>e._appliedParent)];return he({},n)}function _m(e,r){let t=Te(r),n=Object.keys(Rr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:c,callsite:u};return e._request({...p,...a})},{action:o,args:l,model:r})};return Om.includes(o)?lo(e,r,s):Nm(i)?Va(e,i,s):s({})}}}function Nm(e){return km.includes(e)}function Lm(e,r){return lr(re("fields",()=>{let t=e._runtimeDataModel.models[r];return ja(r,t)}))}function Ga(e){return e.replace(/^./,r=>r.toUpperCase())}var co=Symbol();function Pt(e){let r=[Fm(e),Mm(e),re(co,()=>e),re("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(xt(t)),he(e,r)}function Fm(e){let r=Object.getPrototypeOf(e._originalClient),t=[...new Set(Object.getOwnPropertyNames(r))];return{getKeys(){return t},getPropertyValue(n){return e[n]}}}function Mm(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Te),n=[...new Set(r.concat(t))];return lr({getKeys(){return n},getPropertyValue(i){let o=Ga(i);if(e._runtimeDataModel.models[o]!==void 0)return uo(e,o);if(e._runtimeDataModel.models[i]!==void 0)return uo(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Qa(e){return e[co]?e[co]:e}function Wa(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Pt(r)}function Ja({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(Fr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(Fr(u))}$m(e,l.needs)&&s.push(qm(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function $m(e,r){return r.every(t=>Vi(e,t))}function qm(e,r){return lr(re(e.name,()=>e.compute(r)))}function Gn({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=Gn({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Ha({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:Gn({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Te(l);return Ja({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}var Vm=["$connect","$disconnect","$on","$transaction","$extends"],Ya=Vm;function za(e){if(e instanceof ie)return jm(e);if(Vn(e))return Bm(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:za(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=nl(o,l),a.args=s,Xa(e,a,t,n+1)}})})}function el(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return Xa(e,r,s)}function rl(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?tl(t,n,0,e):e(t)}}function tl(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=nl(i,l),tl(a,r,t+1,n)}})}var Za=e=>e;function nl(e=Za,r=Za){return t=>e(r(t))}var il=N("prisma:client"),ol={Vercel:"vercel","Netlify CI":"netlify"};function sl({postinstall:e,ciName:r,clientVersion:t,generator:n}){if(il("checkPlatformCaching:postinstall",e),il("checkPlatformCaching:ciName",r),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&r&&r in ol){let i=`Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${ol[r]}-build`;throw console.error(i),new P(i,t)}}function al(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var dl=O(require("node:fs")),St=O(require("node:path"));function Qn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: + +${Um(e)}`}function Um(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return ki({...r,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function er(e){let{searchedLocations:r}=e;return`The following locations have been searched: +${[...new Set(r)].map(i=>` ${i}`).join(` +`)}`}function ll(e){let{runtimeBinaryTarget:r}=e;return`${Xe(e)} + +This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${r}". +${Qn(e)} + +${er(e)}`}function Wn(e){return`We would appreciate if you could take the time to share some information with us. +Please help us by answering a few questions: https://pris.ly/${e}`}function Jn(e){let{errorStack:r}=e;return r?.match(/\/\.next|\/next@|\/next\//)?` + +We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function ul(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} + +This is likely caused by a bundler that has not copied "${r}" next to the resulting bundle. +Ensure that "${r}" has been copied next to the bundle or in "${e.expectedLocation}". + +${Wn("engine-not-found-bundler-investigation")} + +${er(e)}`}function cl(e){let{runtimeBinaryTarget:r,generatorBinaryTargets:t}=e,n=t.find(i=>i.native);return`${Xe(e)} + +This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${r}". +${Qn(e)} + +${er(e)}`}function pl(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} + +This is likely caused by tooling that has not copied "${r}" to the deployment folder. +Ensure that you ran \`prisma generate\` and that "${r}" has been copied to "${e.expectedLocation}". + +${Wn("engine-not-found-tooling-investigation")} + +${er(e)}`}var Gm=N("prisma:client:engines:resolveEnginePath"),Qm=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function ml(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await Wm(e,r);if(Gm("enginePath",n),n!==void 0&&e==="binary"&&Ri(n),n!==void 0)return r.prismaPath=n;let o=await ir(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(Qm())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:fl(e,o),expectedLocation:St.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=cl(c):l?p=ll(c):u?p=ul(c):p=pl(c),new P(p,r.clientVersion)}async function Wm(e,r){let t=await ir(),n=[],i=[r.dirname,St.default.resolve(__dirname,".."),r.generator?.output?.value??__dirname,St.default.resolve(__dirname,"../../../.prisma/client"),"/tmp/prisma-engines",r.cwd];__filename.includes("resolveEnginePath")&&i.push(ms());for(let o of i){let s=fl(e,t),a=St.default.join(o,s);if(n.push(o),dl.default.existsSync(a))return{enginePath:a,searchedLocations:n}}return{enginePath:void 0,searchedLocations:n}}function fl(e,r){return e==="library"?Gt(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}function gl(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function hl(e){return e.split(` +`).map(r=>r.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}var yl=O(Os());function bl({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,yl.default)({user:r,repo:t,template:n,title:e,body:i})}function El({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=Bo(6e3-(s?.length??0)),l=hl(wr(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",c=wr(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${process.version?.padEnd(19)}| +| OS | ${r?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${u} + +## Logs +\`\`\` +${l} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?gl(s):""} +\`\`\` +`),p=bl({title:t,body:c});return`${t} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${Y(p)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}function wl(e,r){throw new Error(r)}function Jm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Km(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function Vr(e){return e===null?e:Array.isArray(e)?e.map(Vr):typeof e=="object"?Jm(e)?Hm(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Km(e,Vr):e}function Hm({$type:e,value:r}){switch(e){case"BigInt":return BigInt(r);case"Bytes":{let{buffer:t,byteOffset:n,byteLength:i}=Buffer.from(r,"base64");return new Uint8Array(t,n,i)}case"DateTime":return new Date(r);case"Decimal":return new Le(r);case"Json":return JSON.parse(r);default:wl(r,"Unknown tagged value")}}var xl="6.19.0";var zm=()=>globalThis.process?.release?.name==="node",Zm=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Xm=()=>!!globalThis.Deno,ef=()=>typeof globalThis.Netlify=="object",rf=()=>typeof globalThis.EdgeRuntime=="object",tf=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function nf(){return[[ef,"netlify"],[rf,"edge-light"],[tf,"workerd"],[Xm,"deno"],[Zm,"bun"],[zm,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0)??""}var of={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Kn(){let e=nf();return{id:e,prettyName:of[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function jr({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new P(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new P("error: Missing URL environment variable, value, or override.",n);return i}var Hn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var oe=class extends Hn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function R(e,r){return{...e,isRetryable:r}}var ur=class extends oe{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,R(t,!1))}};x(ur,"InvalidDatasourceError");function vl(e){let r={clientVersion:e.clientVersion},t=Object.keys(e.inlineDatasources)[0],n=jr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof process<"u"?process.env:{}}}),i;try{i=new URL(n)}catch{throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==sn)throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,r);let a=s.get("api_key");if(a===null||a.length<1)throw new ur(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);let l=Ii(i)?"http:":"https:";process.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(l="http:");let u=new URL(i.href.replace(o,l));return{apiKey:a,url:u}}var Pl=O(on()),Yn=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,transactionId:t}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Pl.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-Transaction-Id"]=t);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}};function sf(e){return e[0]*1e3+e[1]/1e6}function po(e){return new Date(sf(e))}var Br=class extends oe{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",R(r,!0))}};x(Br,"ForcedRetryError");var cr=class extends oe{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,R(t,!1))}};x(cr,"NotImplementedYetError");var $=class extends oe{response;constructor(r,t){super(r,t),this.response=t.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var pr=class extends ${name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",R(r,!0))}};x(pr,"SchemaMissingError");var mo="This request could not be understood by the server",Rt=class extends ${name="BadRequestError";code="P5000";constructor(r,t,n){super(t||mo,R(r,!1)),n&&(this.code=n)}};x(Rt,"BadRequestError");var At=class extends ${name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",R(r,!0)),this.logs=t}};x(At,"HealthcheckTimeoutError");var Ct=class extends ${name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,R(r,!0)),this.logs=n}};x(Ct,"EngineStartupError");var It=class extends ${name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",R(r,!1))}};x(It,"EngineVersionNotSupportedError");var fo="Request timed out",Dt=class extends ${name="GatewayTimeoutError";code="P5009";constructor(r,t=fo){super(t,R(r,!1))}};x(Dt,"GatewayTimeoutError");var af="Interactive transaction error",Ot=class extends ${name="InteractiveTransactionError";code="P5015";constructor(r,t=af){super(t,R(r,!1))}};x(Ot,"InteractiveTransactionError");var lf="Request parameters are invalid",kt=class extends ${name="InvalidRequestError";code="P5011";constructor(r,t=lf){super(t,R(r,!1))}};x(kt,"InvalidRequestError");var go="Requested resource does not exist",_t=class extends ${name="NotFoundError";code="P5003";constructor(r,t=go){super(t,R(r,!1))}};x(_t,"NotFoundError");var ho="Unknown server error",Ur=class extends ${name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||ho,R(r,!0)),this.logs=n}};x(Ur,"ServerError");var yo="Unauthorized, check your connection string",Nt=class extends ${name="UnauthorizedError";code="P5007";constructor(r,t=yo){super(t,R(r,!1))}};x(Nt,"UnauthorizedError");var bo="Usage exceeded, retry again later",Lt=class extends ${name="UsageExceededError";code="P5008";constructor(r,t=bo){super(t,R(r,!0))}};x(Lt,"UsageExceededError");async function uf(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Ft(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await uf(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ur(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new pr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new It(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Ct(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new P(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new At(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ot(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new kt(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Nt(t,Gr(yo,n));if(e.status===404)return new _t(t,Gr(go,n));if(e.status===429)throw new Lt(t,Gr(bo,n));if(e.status===504)throw new Dt(t,Gr(fo,n));if(e.status>=500)throw new Ur(t,Gr(ho,n));if(e.status>=400)throw new Rt(t,Gr(mo,n))}function Gr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Tl(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Sl(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function Rl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new P("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}var Al={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Mt=class extends oe{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service: +${r}`,R(t,!0))}};x(Mt,"RequestError");async function dr(e,r,t=n=>n){let{clientVersion:n,...i}=r,o=t(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Mt(a,{clientVersion:n,cause:s})}}var pf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Cl=N("prisma:client:dataproxyEngine");async function df(e,r){let t=Al["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&pf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=mf(`<=${a}.${l}.${u}`),p=await dr(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();Cl("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),h}return f.version}throw new cr("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Il(e,r){let t=await df(e,r);return Cl("version",t),t}function mf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Dl=3,$t=N("prisma:client:dataproxyEngine"),qt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(r){Rl(r),this.config=r,this.env=r.env,this.inlineSchema=Sl(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:r,url:t}=this.getURLAndAPIKey();this.host=t.host,this.protocol=t.protocol,this.headerBuilder=new Yn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Il(this.host,this.config),$t("host",this.host),$t("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"trace":$t(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:po(t.timestamp),message:t.attributes.message??"",target:t.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:po(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target??"BinaryEngine"});break}default:t.level}}),r?.traces?.length&&this.tracingHelper.dispatchEngineSpans(r.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await dr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||$t("schema response status",t.status);let n=await Ft(t,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Mr(r,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:r,traceparent:t,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,transactionId:i?.id}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||$t("graphql response status",a.status),await this.handleError(await Ft(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await dr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Ft(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${r}`;o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Ft(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}getURLAndAPIKey(){return vl({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new cr("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof oe)||!i.isRetryable)throw i;if(t>=Dl)throw i instanceof Br?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${Dl} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Tl(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof pr)throw await this.uploadSchema(),new Br({clientVersion:this.clientVersion,cause:r});if(r)throw r}convertProtocolErrorsToClientError(r){return r.length===1?$r(r[0],this.config.clientVersion,this.config.activeProvider):new V(JSON.stringify(r),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ol(e){if(e?.kind==="itx")return e.options.id}var wo=O(require("node:os")),kl=O(require("node:path"));var Eo=Symbol("PrismaLibraryEngineCache");function ff(){let e=globalThis;return e[Eo]===void 0&&(e[Eo]={}),e[Eo]}function gf(e){let r=ff();if(r[e]!==void 0)return r[e];let t=kl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=wo.default.constants.dlopen.RTLD_LAZY|wo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var _l={async loadLibrary(e){let r=await fi(),t=await ml("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>gf(t))}catch(n){let i=Ai({e:n,platformInfo:r,id:t});throw new P(i,e.clientVersion)}}};var xo,Nl={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new P(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Kn().prettyName})`,r);if(n===void 0)throw new P("WASM engine was unexpectedly `undefined`",r);xo===void 0&&(xo=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new P("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await xo;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var hf="P2036",Re=N("prisma:client:libraryEngine");function yf(e){return e.item_type==="query"&&"query"in e}function bf(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var Ll=[...li,"native"],Ef=0xffffffffffffffffn,vo=1n;function wf(){let e=vo++;return vo>Ef&&(vo=1n),e}var Qr=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(r,t){this.libraryLoader=t??_l,r.engineWasm!==void 0&&(this.libraryLoader=t??Nl),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,this.tracingHelper=r.tracingHelper,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(r){return{applyPendingMigrations:r.applyPendingMigrations?.bind(r),commitTransaction:this.withRequestId(r.commitTransaction.bind(r)),connect:this.withRequestId(r.connect.bind(r)),disconnect:this.withRequestId(r.disconnect.bind(r)),metrics:r.metrics?.bind(r),query:this.withRequestId(r.query.bind(r)),rollbackTransaction:this.withRequestId(r.rollbackTransaction.bind(r)),sdlSchema:r.sdlSchema?.bind(r),startTransaction:this.withRequestId(r.startTransaction.bind(r)),trace:r.trace.bind(r),free:r.free?.bind(r)}}withRequestId(r){return async(...t)=>{let n=wf().toString();try{return await r(...t,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(t),s;if(r==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(n.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(xf(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new V(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;ai(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await this.tracingHelper.runInChildSpan("detect_platform",()=>ir());if(!Ll.includes(r))throw new P(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(r))}. Possible binaryTargets: ${qe(Ll.join(", "))} or a path to the query engine library. +You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new V("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new V("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(tn));let t=await this.adapterPromise;t&&Re("Using driver adapter: %O",t),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{r.deref()?.logger(n)},t))}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new P(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);t&&(t.level=t?.level.toLowerCase()??"unknown",yf(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):bf(t)?this.loggerRustPanic=new ae(Po(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path}))}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Re("library starting");try{let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(tn)),await this.adapterPromise,Re("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new P(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let r=async()=>{await new Promise(n=>setImmediate(n)),Re("library stopping");let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:t,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new V(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof P)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ae(Po(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new V(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Re("requestBatch");let i=Mr(r,t);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ol(t));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new V(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r,t){if(r.user_facing_error.is_panic)return new ae(Po(this,r.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(r.user_facing_error,t);return n?n.error:$r(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r,t){if(r.error_code===hf&&t){let n=r.meta?.id;ln(typeof n=="number","Malformed external JS error received from the engine");let i=t.consumeError(n);return ln(i,"External error with reported id was not registered"),i}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function xf(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Po(e,r){return El({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Fl({url:e,adapter:r,copyEngine:t,targetBuildType:n}){let i=[],o=[],s=g=>{i.push({_tag:"warning",value:g})},a=g=>{let I=g.join(` +`);o.push({_tag:"error",value:I})},l=!!e?.startsWith("prisma://"),u=an(e),c=!!r,p=l||u;!c&&t&&p&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let d=p||!t;c&&(d||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):p?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):t||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let f={accelerate:d,ppg:u,driverAdapters:c};function h(g){return g.length>0}return h(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:f}:{ok:!0,diagnostics:{warnings:i},isUsing:f}}function Ml({copyEngine:e=!0},r){let t;try{t=jr({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Fl({url:t,adapter:r.adapter,copyEngine:e,targetBuildType:"library"});for(let p of o.warnings)at(...p.value);if(!n){let p=o.errors[0];throw new Z(p.value,{clientVersion:r.clientVersion})}let s=Er(r.generator),a=s==="library",l=s==="binary",u=s==="client",c=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new qt(r):(i.driverAdapters,a?new Qr(r):(i.accelerate,new Qr(r)))}function $l({generator:e}){return e?.previewFeatures??[]}var ql=e=>({command:e});var Vl=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function Wr(e){try{return jl(e,"fast")}catch{return jl(e,"slow")}}function jl(e,r){return JSON.stringify(e.map(t=>Ul(t,r)))}function Ul(e,r){if(Array.isArray(e))return e.map(t=>Ul(t,r));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(vr(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Fe.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(vf(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(t,n,i).toString("base64")}}return typeof e=="object"&&r==="slow"?Gl(e):e}function vf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Gl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Bl);let r={};for(let t of Object.keys(e))r[t]=Bl(e[t]);return r}function Bl(e){return typeof e=="bigint"?e.toString():Gl(e)}var Pf=/^(\s*alter\s)/i,Ql=N("prisma:client");function To(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&Pf.exec(r))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var So=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(Vn(t))n=t.sql,i={values:Wr(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Wr(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Wr(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Wr(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Vl(t),i={values:Wr(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Ql(`prisma.${e}(${n}, ${i.values})`):Ql(`prisma.${e}(${n})`),{query:n,parameters:i}},Wl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new ie(r,t)}},Jl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Ro(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Kl(t(s)):Kl(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Kl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Tf=xi.split(".")[0],Sf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},Ao=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${Tf}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??Sf}};function Hl(){return new Ao}function Yl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function zl(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}function zn(e){return typeof e.batchRequestIdx=="number"}function Zl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(Co(e.query.arguments)),r.push(Co(e.query.selection)),r.join("")}function Co(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${Co(n)})`:t}).join(" ")})`}var Rf={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Io(e){return Rf[e]}var Zn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;imr("bigint",t));case"bytes-array":return r.map(t=>mr("bytes",t));case"decimal-array":return r.map(t=>mr("decimal",t));case"datetime-array":return r.map(t=>mr("datetime",t));case"date-array":return r.map(t=>mr("date",t));case"time-array":return r.map(t=>mr("time",t));default:return r}}function Xn(e){let r=[],t=Af(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Io(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:If(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Xl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Io(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Zl(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Cf(r),Df(r,i))throw r;if(r instanceof z&&Of(r)){let u=eu(r.meta);Nn({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=Tn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new ae(l,this.client._clientVersion);if(r instanceof V)throw new V(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof P)throw new P(l,this.client._clientVersion);if(r instanceof ae)throw new ae(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?wr(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=ao(o,s),l=i==="queryRaw"?Xn(a):Vr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function If(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Xl(e)};ar(e,"Unknown transaction kind")}}function Xl(e){return{id:e.id,payload:e.payload}}function Df(e,r){return zn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Of(e){return e.code==="P2009"||e.code==="P2012"}function eu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(eu)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var ru=xl;var su=O(Ki());var _=class extends Error{constructor(r){super(r+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};x(_,"PrismaClientConstructorValidationError");var tu=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],nu=["pretty","colorless","minimal"],iu=["info","query","warn","error"],kf={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Jr(t,r)||` Available datasources: ${r.join(", ")}`;throw new _(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new _(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,r)=>{if(!e&&Er(r.generator)==="client")throw new _('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(Er(r.generator)==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!nu.includes(e)){let r=Jr(e,nu);throw new _(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function r(t){if(typeof t=="string"&&!iu.includes(t)){let n=Jr(t,iu);throw new _(`Invalid log level "${t}" provided to PrismaClient constructor.${n}`)}}for(let t of e){r(t);let n={level:r,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Jr(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[i,o]of Object.entries(t))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let r=e.maxWait;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new _(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,r)=>{if(typeof e!="object")throw new _('"omit" option is expected to be an object.');if(e===null)throw new _('"omit" option can not be `null`');let t=[];for(let[n,i]of Object.entries(e)){let o=Nf(n,r.runtimeDataModel);if(!o){t.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){t.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){t.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&t.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(t.length>0)throw new _(Lf(e,t))},__internal:e=>{if(!e)return;let r=["debug","engine","configOverride"];if(typeof e!="object")throw new _(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!r.includes(t)){let n=Jr(t,r);throw new _(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function au(e,r){for(let[t,n]of Object.entries(e)){if(!tu.includes(t)){let i=Jr(t,tu);throw new _(`Unknown property ${t} provided to PrismaClient constructor.${i}`)}kf[t](n,r)}if(e.datasourceUrl&&e.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Jr(e,r){if(r.length===0||typeof e!="string")return"";let t=_f(e,r);return t?` Did you mean "${t}"?`:""}function _f(e,r){if(r.length===0)return null;let t=r.map(i=>({value:i,distance:(0,su.default)(e,i)}));t.sort((i,o)=>i.distanceWe(n)===r);if(t)return e[t]}function Lf(e,r){let t=_r(e);for(let o of r)switch(o.kind){case"UnknownModel":t.arguments.getField(o.modelKey)?.markAsError(),t.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":t.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=_n(t,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}function lu(e){return e.length===0?Promise.resolve([]):new Promise((r,t)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!zn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var rr=N("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Ff={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Mf=Symbol.for("prisma.client.transaction.id"),$f={id:0,nextId(){return++this.id}};function fu(e){class r{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Ro();constructor(n){e=n?.__internal?.configOverride?.(e)??e,sl(e),n&&au(n,e);let i=new du.EventEmitter().on("error",()=>{});this._extensions=Nr.empty(),this._previewFeatures=$l(e),this._clientVersion=e.clientVersion??ru,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Hl();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&ri.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new P(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new P("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&o&&st(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&N.enable("prisma:client");let p=ri.default.resolve(e.dirname,e.relativePath);mu.default.existsSync(p)||(p=e.dirname),rr("dirname",e.dirname),rr("relativePath",e.relativePath),rr("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&zl(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:al(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:jr,getBatchRequestPayload:Mr,prismaGraphQLToJSError:$r,PrismaClientUnknownRequestError:V,PrismaClientInitializationError:P,PrismaClientKnownRequestError:z,debug:N("prisma:client:accelerateEngine"),engineVersion:cu.version,clientVersion:e.clientVersion}},rr("clientVersion",e.clientVersion),this._engine=Ml(e,this._engineConfig),this._requestHandler=new ei(this,i),l.log)for(let f of l.log){let h=typeof f=="string"?f:f.emit==="stdout"?f.level:null;h&&this.$on(h,g=>{nt.log(`${nt.tags[h]??""}`,g.message||g.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Uo()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:So({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=uu(n,i);return To(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(To(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:ql,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:So({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...uu(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=$f.nextId(),s=Yl(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return lu(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return he(Pt(he(Qa(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Ro(n)),re(Mf,()=>n.id)])),[Fr(Ya)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Ff,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:c,...p}=l,d={...n,...p};c&&(d.args=i.middlewareArgsToRequestArgs(c)),n.transaction!==void 0&&u===!1&&delete d.transaction;let f=await el(this,d);return d.model?Ha({result:f,modelName:d.model,args:d.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):f};return this._tracingHelper.runInChildSpan(s.operation,()=>new pu.AsyncResource("prisma-client-request").runInAsyncScope(()=>a(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let h={name:"serialize"},g=this._tracingHelper.runInChildSpan(h,()=>$n({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return N.enabled("prisma:client")&&(rr("Prisma Client call:"),rr(`prisma.${i}(${Na(n)})`),rr("Generated request:"),rr(JSON.stringify(g,null,2)+` +`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:g,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(h){throw h.clientVersion=this._clientVersion,h}}$metrics=new Lr(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Wa}return r}function uu(e,r){return qf(e)?[new ie(e,r),Wl]:[e,Jl]}function qf(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Vf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function gu(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!Vf.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function hu(e){st(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +/*! Bundled license information: + +decimal.js/decimal.mjs: + (*! + * decimal.js v10.5.0 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2025 Michael Mclaughlin + * MIT Licence + *) +*/ +//# sourceMappingURL=library.js.map diff --git a/packages/challenge-prisma-client/runtime/react-native.js b/packages/challenge-prisma-client/runtime/react-native.js new file mode 100644 index 0000000..1c053d7 --- /dev/null +++ b/packages/challenge-prisma-client/runtime/react-native.js @@ -0,0 +1,84 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var ha=Object.create;var rr=Object.defineProperty;var ya=Object.getOwnPropertyDescriptor;var wa=Object.getOwnPropertyNames;var ba=Object.getPrototypeOf,Ea=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xe=(e,t)=>{for(var r in t)rr(e,r,{get:t[r],enumerable:!0})},ni=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wa(t))!Ea.call(e,i)&&i!==r&&rr(e,i,{get:()=>t[i],enumerable:!(n=ya(t,i))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?ha(ba(e)):{},ni(t||!e||!e.__esModule?rr(r,"default",{value:e,enumerable:!0}):r,e)),xa=e=>ni(rr({},"__esModule",{value:!0}),e);var y,x,c=he(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=y});var P,p=he(()=>{"use strict";P=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=he(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=he(()=>{"use strict";b=class{value;constructor(t){this.value=t}deref(){return this.value}}});var Pi=Ve(nt=>{"use strict";m();c();p();d();f();var li=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pa=li(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=O;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var F=C.indexOf("=");F===-1&&(F=S);var _=F===S?0:4-F%4;return[F,_]}function l(C){var S=a(C),F=S[0],_=S[1];return(F+_)*3/4-_}function u(C,S,F){return(S+F)*3/4-F}function g(C){var S,F=a(C),_=F[0],L=F[1],k=new n(u(C,_,L)),q=0,Y=L>0?_-4:_,$;for($=0;$>16&255,k[q++]=S>>8&255,k[q++]=S&255;return L===2&&(S=r[C.charCodeAt($)]<<2|r[C.charCodeAt($+1)]>>4,k[q++]=S&255),L===1&&(S=r[C.charCodeAt($)]<<10|r[C.charCodeAt($+1)]<<4|r[C.charCodeAt($+2)]>>2,k[q++]=S>>8&255,k[q++]=S&255),k}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function T(C,S,F){for(var _,L=[],k=S;kY?Y:q+k));return _===1?(S=C[F-1],L.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(C[F-2]<<8)+C[F-1],L.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),L.join("")}}),va=li(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,T=n?o-1:0,O=n?-1:1,C=t[r+T];for(T+=O,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=O,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=O,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,O=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,S=i?1:-1,F=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+T>=1?r+=O/u:r+=O*Math.pow(2,1-T),r*u>=2&&(a++,u/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*u-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=S,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=S,a/=256,g-=8);t[n+C-S]|=F*128}}),Xr=Pa(),tt=va(),ii=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=A;nt.SlowBuffer=Oa;nt.INSPECT_MAX_BYTES=50;var nr=2147483647;nt.kMaxLength=nr;A.TYPED_ARRAY_SUPPORT=Ta();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ta(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function Ce(e){if(e>nr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return rn(e)}return ui(e,t,r)}A.poolSize=8192;function ui(e,t,r){if(typeof e=="string")return Ca(e,t);if(ArrayBuffer.isView(e))return Sa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return pi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Ra(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return ui(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function ci(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Aa(e,t,r){return ci(e),e<=0?Ce(e):t!==void 0?typeof r=="string"?Ce(e).fill(t,r):Ce(e).fill(t):Ce(e)}A.alloc=function(e,t,r){return Aa(e,t,r)};function rn(e){return ci(e),Ce(e<0?0:nn(e)|0)}A.allocUnsafe=function(e){return rn(e)};A.allocUnsafeSlow=function(e){return rn(e)};function Ca(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=di(e,t)|0,n=Ce(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function en(e){let t=e.length<0?0:nn(e.length)|0,r=Ce(t);for(let n=0;n=nr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+nr.toString(16)+" bytes");return e|0}function Oa(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(ye(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function di(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return tn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return xi(e).length;default:if(i)return n?-1:tn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=di;function ka(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return ja(this,t,r);case"utf8":case"utf-8":return mi(this,t,r);case"ascii":return qa(this,t,r);case"latin1":case"binary":return Ba(this,t,r);case"base64":return La(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ua(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};ii&&(A.prototype[ii]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,sn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:oi(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):oi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function oi(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ia(this,e,t,r);case"utf8":case"utf-8":return Fa(this,e,t,r);case"ascii":case"latin1":case"binary":return Ma(this,e,t,r);case"base64":return _a(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function La(e,t,r){return t===0&&r===e.length?Xr.fromByteArray(e):Xr.fromByteArray(e.slice(t,r))}function mi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Na(n)}var si=4096;function Na(e){let t=e.length;if(t<=si)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=_e(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=_e(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),tt.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),tt.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function gi(e,t,r,n,i){Ei(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function hi(e,t,r,n,i){Ei(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=_e(function(e,t=0){return gi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=_e(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=_e(function(e,t=0){return gi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=_e(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function wi(e,t,r,n,i){return t=+t,r=r>>>0,i||yi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return wi(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return wi(this,e,t,!1,r)};function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||yi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return bi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ai(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ai(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ai(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function $a(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Ct(t,e.length-(r+1))}function Ei(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new et.ERR_OUT_OF_RANGE("value",a,e)}$a(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function Ct(e,t,r){throw Math.floor(e)!==e?(rt(e,r),new et.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Va=/[^+/0-9A-Za-z-_]/g;function Qa(e){if(e=e.split("=")[0],e=e.trim().replace(Va,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function tn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ja(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function xi(e){return Xr.toByteArray(Qa(e))}function ir(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function sn(e){return e!==e}var Wa=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function _e(e){return typeof BigInt>"u"?Ka:e}function Ka(){throw new Error("BigInt not supported")}});var w,m=he(()=>{"use strict";w=Qe(Pi())});function hl(){return!1}function pn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function yl(){return pn()}function wl(){return[]}function bl(e){e(null,[])}function El(){return""}function xl(){return""}function Pl(){}function vl(){}function Tl(){}function Al(){}function Cl(){}function Sl(){}function Rl(){}function Ol(){}function kl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Il(e,t){t(null,pn())}var Fl,Ml,sr,dn=he(()=>{"use strict";m();c();p();d();f();Fl={},Ml={existsSync:hl,lstatSync:pn,stat:Il,statSync:yl,readdirSync:wl,readdir:bl,readlinkSync:El,realpathSync:xl,chmodSync:Pl,renameSync:vl,mkdirSync:Tl,rmdirSync:Al,rmSync:Cl,unlinkSync:Sl,watchFile:Rl,unwatchFile:Ol,watch:kl,promises:Fl},sr=Ml});var Di=Ve((If,_l)=>{_l.exports={name:"@prisma/internals",version:"6.19.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-engine-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Ll(...e){return e.join("/")}function Nl(...e){return e.join("/")}function ql(e){let t=Li(e),r=Ni(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Li(e){let t=e.split("/");return t[t.length-1]}function Ni(e){return e.split("/").slice(0,-1).join("/")}function jl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var qi,Bl,Ul,$l,Re,gn=he(()=>{"use strict";m();c();p();d();f();qi="/",Bl=":";Ul={sep:qi},$l={basename:Li,delimiter:Bl,dirname:Ni,join:Nl,normalize:jl,parse:ql,posix:Ul,resolve:Ll,sep:qi},Re=$l});var Ui=Ve((Dm,ji)=>{"use strict";m();c();p();d();f();ji.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Gi=Ve((Xm,Ji)=>{"use strict";m();c();p();d();f();Ji.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ki=Ve((Vg,cr)=>{"use strict";m();c();p();d();f();cr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};cr.exports.default=cr.exports});var In=Ve((o0,wo)=>{"use strict";m();c();p();d();f();wo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";m();c();p();d();f()});var To=he(()=>{"use strict";m();c();p();d();f()});var Ko=Ve((Ov,Uc)=>{Uc.exports={name:"@prisma/engines-version",version:"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"2ba551f319ab1df4bc874a89965d8b3641056773"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var jr,zo=he(()=>{"use strict";m();c();p();d();f();jr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var ad={};Xe(ad,{DMMF:()=>Bt,Debug:()=>z,Decimal:()=>Fe,Extensions:()=>an,MetricsClient:()=>bt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>se,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>G,PrismaClientValidationError:()=>te,Public:()=>ln,Sql:()=>le,createParam:()=>jo,defineDmmfProperty:()=>Go,deserializeJsonResponse:()=>Pt,deserializeRawResult:()=>Hr,dmmfToRuntimeDataModel:()=>Zi,empty:()=>Yo,getPrismaClient:()=>fa,getRuntime:()=>Ds,join:()=>Ho,makeStrictEnum:()=>ma,makeTypedQueryFactory:()=>Wo,objectEnumValues:()=>kr,raw:()=>jn,serializeJsonQuery:()=>Nr,skip:()=>Lr,sqltag:()=>Un,warnEnvConflicts:()=>void 0,warnOnce:()=>Lt});module.exports=xa(ad);m();c();p();d();f();var an={};Xe(an,{defineExtension:()=>vi,getExtensionContext:()=>Ti});m();c();p();d();f();m();c();p();d();f();function vi(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function Ti(e){return e}var ln={};Xe(ln,{validator:()=>Ai});m();c();p();d();f();m();c();p();d();f();function Ai(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var or={};Xe(or,{$:()=>ki,bgBlack:()=>il,bgBlue:()=>ll,bgCyan:()=>cl,bgGreen:()=>sl,bgMagenta:()=>ul,bgRed:()=>ol,bgWhite:()=>pl,bgYellow:()=>al,black:()=>el,blue:()=>We,bold:()=>de,cyan:()=>Se,dim:()=>St,gray:()=>It,green:()=>Ot,grey:()=>nl,hidden:()=>Za,inverse:()=>Ya,italic:()=>Ha,magenta:()=>tl,red:()=>Ge,reset:()=>za,strikethrough:()=>Xa,underline:()=>Rt,white:()=>rl,yellow:()=>kt});m();c();p();d();f();var un,Ci,Si,Ri,Oi=!0;typeof y<"u"&&({FORCE_COLOR:un,NODE_DISABLE_COLORS:Ci,NO_COLOR:Si,TERM:Ri}=y.env||{},Oi=y.stdout&&y.stdout.isTTY);var ki={enabled:!Ci&&Si==null&&Ri!=="dumb"&&(un!=null&&un!=="0"||Oi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!ki.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var za=V(0,0),de=V(1,22),St=V(2,22),Ha=V(3,23),Rt=V(4,24),Ya=V(7,27),Za=V(8,28),Xa=V(9,29),el=V(30,39),Ge=V(31,39),Ot=V(32,39),kt=V(33,39),We=V(34,39),tl=V(35,39),Se=V(36,39),rl=V(37,39),It=V(90,39),nl=V(90,39),il=V(40,49),ol=V(41,49),sl=V(42,49),al=V(43,49),ll=V(44,49),ul=V(45,49),cl=V(46,49),pl=V(47,49);m();c();p();d();f();var dl=100,Ii=["green","yellow","blue","magenta","cyan","red"],Ft=[],Fi=Date.now(),fl=0,cn=typeof y<"u"?y.env:{};globalThis.DEBUG??=cn.DEBUG??"";globalThis.DEBUG_COLORS??=cn.DEBUG_COLORS?cn.DEBUG_COLORS==="true":!0;var Mt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function ml(e){let t={color:Ii[fl++%Ii.length],enabled:Mt.enabled(e),namespace:e,log:Mt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Ft.push([o,...n]),Ft.length>dl&&Ft.shift(),Mt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:gl(g)),u=`+${Date.now()-Fi}ms`;Fi=Date.now(),globalThis.DEBUG_COLORS?a(or[s](de(o)),...l,or[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(ml,{get:(e,t)=>Mt[t],set:(e,t,r)=>Mt[t]=r});function gl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Mi(e=7500){let t=Ft.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:Oe(t,e.queryRaw.bind(e)),executeRaw:Oe(t,e.executeRaw.bind(e)),executeScript:Oe(t,e.executeScript.bind(e)),dispose:Oe(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Oe(t,e.startTransaction.bind(e))(...n)).map(o=>Jl(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=Gl(t,e.getConnectionInfo.bind(e))),r},Jl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Oe(e,t.queryRaw.bind(t)),executeRaw:Oe(e,t.executeRaw.bind(t)),commit:Oe(e,t.commit.bind(t)),rollback:Oe(e,t.rollback.bind(t))});function Oe(e,t){return async(...r)=>{try{return ar(await t(...r))}catch(n){if(Bi("[error@wrapAsync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}function Gl(e,t){return(...r)=>{try{return ar(t(...r))}catch(n){if(Bi("[error@wrapSync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}m();c();p();d();f();var $i=Qe(Ui(),1);function wn(e){let t=(0,$i.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}m();c();p();d();f();var Vi="prisma+postgres",Qi=`${Vi}:`;function bn(e){return e?.toString().startsWith(`${Qi}//`)??!1}var Dt={};Xe(Dt,{error:()=>zl,info:()=>Kl,log:()=>Wl,query:()=>Hl,should:()=>Wi,tags:()=>_t,warn:()=>En});m();c();p();d();f();var _t={error:Ge("prisma:error"),warn:kt("prisma:warn"),info:Se("prisma:info"),query:We("prisma:query")},Wi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Wl(...e){console.log(...e)}function En(e,...t){Wi.warn()&&console.warn(`${_t.warn} ${e}`,...t)}function Kl(e,...t){console.info(`${_t.info} ${e}`,...t)}function zl(e,...t){console.error(`${_t.error} ${e}`,...t)}function Hl(e,...t){console.log(`${_t.query} ${e}`,...t)}m();c();p();d();f();function ur(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();d();f();function ze(e,t){throw new Error(t)}m();c();p();d();f();m();c();p();d();f();function xn({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var Yl=xn();function ot(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Yl,"")}m();c();p();d();f();gn();function Pn(e){return Re.sep===Re.posix.sep?e:e.split(Re.sep).join(Re.posix.sep)}m();c();p();d();f();function vn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();function pr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();d();f();function Tn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{zi.has(e)||(zi.add(e),En(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};ue(Q,"PrismaClientInitializationError");m();c();p();d();f();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};ue(se,"PrismaClientKnownRequestError");m();c();p();d();f();var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};ue(ce,"PrismaClientRustPanicError");m();c();p();d();f();var G=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};ue(G,"PrismaClientUnknownRequestError");m();c();p();d();f();var te=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};ue(te,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var we=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function De(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();function Yi(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}m();c();p();d();f();function Nt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function Zi(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}m();c();p();d();f();function st(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function dr(e){return e.toString()!=="Invalid Date"}m();c();p();d();f();m();c();p();d();f();var at=9e15,Be=1e9,Cn="0123456789abcdef",gr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",hr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Sn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-at,maxE:at,crypto:!1},ro,ke,D=!0,wr="[DecimalError] ",qe=wr+"Invalid argument: ",no=wr+"Precision limit exceeded",io=wr+"crypto unavailable",oo="[object Decimal]",re=Math.floor,W=Math.pow,Zl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Xl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,eu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,so=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,M=7,tu=9007199254740991,ru=gr.length-1,Rn=hr.length-1,R={toStringTag:oo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};R.ceil=function(){return I(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(qe+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=nu(n,po(n,r)),n.precision=e,n.rounding=t,I(ke==2||ke==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(D=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return D=!0,I(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/M))*M,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return U(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return I(U(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return I(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Er(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return I(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=lt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Er(5,e)),i=lt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,I(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?be(t,n,i):new t(0):new t(NaN):e.isZero()?be(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=be(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=Rn)return s=be(g,h+4,T).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=Rn)return s=be(g,h+4,T).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/M+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/M),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding,O=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(D=!1,a=h+O,s=Ne(u,a),n=t?yr(g,a+10):Ne(e,a),l=U(s,n,a,1),qt(l.d,i=h,T))do if(a+=10,s=Ne(u,a),n=t?yr(g,a+10):Ne(e,a),l=U(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(qt(l.d,i+=10,T));return D=!0,I(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,O=this,C=O.constructor;if(e=new C(e),!O.d||!e.d)return!O.s||!e.s?e=new C(NaN):O.d?e.s=-e.s:e=new C(e.d||O.s!==e.s?O:NaN),e;if(O.s!=e.s)return e.s=-e.s,O.plus(e);if(u=O.d,T=e.d,a=C.precision,l=C.rounding,!u[0]||!T[0]){if(T[0])e.s=-e.s;else if(u[0])e=new C(O);else return new C(l===3?-0:0);return D?I(e,a,l):e}if(r=re(e.e/M),g=re(O.e/M),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=T.length):(t=T,r=g,s=u.length),n=Math.max(Math.ceil(a/M),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=T.length,h=n0;--n)u[s++]=0;for(n=T.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/fe|0,u[i]%=fe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=br(u,n),D?I(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(qe+e);return r.d?(t=ao(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=ou(n,po(n,r)),n.precision=e,n.rounding=t,I(ke>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(D=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(I(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return D=!0,I(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(ke==2||ke==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,T=g.d,O=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!O||!O[0])return new h(!e.s||T&&!T[0]&&!O||O&&!O[0]&&!T?NaN:!T||!O?e.s/0:e.s*0);for(r=re(g.e/M)+re(e.e/M),l=T.length,u=O.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+O[n]*T[i-n-1]+t,o[i--]=a%fe|0,t=a/fe|0;o[i]=(o[i]+t)%fe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=br(o,r),D?I(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return kn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Be),t===void 0?t=n.rounding:ae(t,0,8),I(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e+1,t),r=Ee(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=Ee(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=I(new o(i),e+i.e+1,t),r=Ee(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,O=this,C=O.d,S=O.constructor;if(!C)return new S(O);if(u=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=ao(C)-O.e-1,s=o%M,t.d[0]=W(10,s<0?M+s:s),e==null)e=o>0?t:u;else{if(a=new S(e),!a.isInt()||a.lt(u))throw Error(qe+a);e=a.gt(t)?o>0?t:u:a}for(D=!1,a=new S(Z(C)),g=S.precision,S.precision=o=C.length*M*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=O.s,T=U(u,n,o,1).minus(O).abs().cmp(U(l,r,o,1).minus(O).abs())<1?[u,n]:[l,r],S.precision=g,D=!0,T};R.toHexadecimal=R.toHex=function(e,t){return kn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(D=!1,r=U(r,e,0,t,1).times(e),D=!0,I(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return kn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return I(a,n,o);if(t=re(e.e/M),t>=e.d.length-1&&(r=u<0?-u:u)<=tu)return i=lo(l,a,r,n),e.s<0?new l(1).div(i):I(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(D=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=On(e.times(Ne(a,n+r)),n),i.d&&(i=I(i,n+5,1),qt(i.d,n,o)&&(t=n+10,i=I(On(e.times(Ne(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,D=!0,l.rounding=o,I(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ee(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e,t),r=Ee(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),I(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return I(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(qe+e)}function qt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=M,i=0):(i=Math.ceil((t+1)/M),t%=M),o=W(10,M-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function fr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function nu(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Er(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=lt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,T,O,C,S,F,_,L,k,q,Y,$,At,J,ie,Ae,X,Ze,tr=n.constructor,Zr=n.s==i.s?1:-1,ee=n.d,B=i.d;if(!ee||!ee[0]||!B||!B[0])return new tr(!n.s||!i.s||(ee?B&&ee[0]==B[0]:!B)?NaN:ee&&ee[0]==0||!B?Zr*0:Zr/0);for(l?(O=1,g=n.e-i.e):(l=fe,O=M,g=re(n.e/O)-re(i.e/O)),X=B.length,ie=ee.length,_=new tr(Zr),L=_.d=[],h=0;B[h]==(ee[h]||0);h++);if(B[h]>(ee[h]||0)&&g--,o==null?($=o=tr.precision,s=tr.rounding):a?$=o+(n.e-i.e)+1:$=o,$<0)L.push(1),C=!0;else{if($=$/O+2|0,h=0,X==1){for(T=0,B=B[0],$++;(h1&&(B=e(B,T,l),ee=e(ee,T,l),X=B.length,ie=ee.length),J=X,k=ee.slice(0,X),q=k.length;q=l/2&&++Ae;do T=0,u=t(B,k,X,q),u<0?(Y=k[0],X!=q&&(Y=Y*l+(k[1]||0)),T=Y/Ae|0,T>1?(T>=l&&(T=l-1),S=e(B,T,l),F=S.length,q=k.length,u=t(S,k,F,q),u==1&&(T--,r(S,X=10;T/=10)h++;_.e=h+g*O-1,I(_,a?o+_.e+1:o,s,C)}return _}}();function I(e,t,r,n){var i,o,s,a,l,u,g,h,T,O=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=M,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/M),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=M,s=o-M+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=M,s=o-M+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=W(10,(M-t%M)%M),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,M-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),u)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==fe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=fe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return D&&(e.e>O.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Le(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Le(-i-1)+o,r&&(n=r-s)>0&&(o+=Le(n))):i>=s?(o+=Le(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Le(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Le(n))),o}function br(e,t){var r=e[0];for(t*=M;r>=10;r/=10)t++;return t}function yr(e,t,r){if(t>ru)throw D=!0,r&&(e.precision=r),Error(no);return I(new e(gr),t,1,!0)}function be(e,t,r){if(t>Rn)throw Error(no);return I(new e(hr),t,r,!0)}function ao(e){var t=e.length-1,r=t*M+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Le(e){for(var t="";e--;)t+="0";return t}function lo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/M+4);for(D=!1;;){if(r%2&&(o=o.times(t),eo(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),eo(t.d,s)}return D=!0,o}function Xi(e){return e.d[e.d.length-1]&1}function uo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(D=!1,l=C):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus(U(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(u<3&&qt(s.d,l-n,O,u))T.precision=l+=10,r=o=a=new T(1),g=0,u++;else return I(s,T.precision=C,O,D=!0);else return T.precision=C,s}s=a}}function Ne(e,t){var r,n,i,o,s,a,l,u,g,h,T,O=1,C=10,S=e,F=S.d,_=S.constructor,L=_.rounding,k=_.precision;if(S.s<0||!F||!F[0]||!S.e&&F[0]==1&&F.length==1)return new _(F&&!F[0]?-1/0:S.s!=1?NaN:F?0:S);if(t==null?(D=!1,g=k):g=t,_.precision=g+=C,r=Z(F),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Z(S.d),n=r.charAt(0),O++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return u=yr(_,g+2,k).times(o+""),S=Ne(new _(n+"."+r.slice(1)),g-C).plus(u),_.precision=k,t==null?I(S,k,L,D=!0):S;for(h=S,l=s=S=U(S.minus(1),S.plus(1),g,1),T=I(S.times(S),g,1),i=3;;){if(s=I(s.times(T),g,1),u=l.plus(U(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(yr(_,g+2,k).times(o+""))),l=U(l,new _(O),g,1),t==null)if(qt(l.d,g-C,L,a))_.precision=g+=C,u=s=S=U(h.minus(1),h.plus(1),g,1),T=I(S.times(S),g,1),i=a=1;else return I(l,_.precision=k,L,D=!0);else return _.precision=k,l;l=u,i+=2}}function co(e){return String(e.s*e.s/0)}function mr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%M,r<0&&(n+=M),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),so.test(t))return mr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Xl.test(t))r=16,t=t.toLowerCase();else if(Zl.test(t))r=2;else if(eu.test(t))r=8;else throw Error(qe+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=lo(n,new n(r),o,o*2)),u=fr(t,r,fe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=br(u,g),e.d=u,D=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Ie.pow(2,l))),D=!0,e)}function ou(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:lt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Er(5,r)),t=lt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function lt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/M);for(D=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return D=!0,s.d.length=h+1,s}function Er(e,t){for(var r=e;--t;)r*=e;return r}function po(e,t){var r,n=t.s<0,i=be(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ke=n?4:1,t;if(r=t.divToInt(i),r.isZero())ke=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ke=Xi(r)?n?2:3:n?4:1,t;ke=Xi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function kn(e,t,r,n){var i,o,s,a,l,u,g,h,T,O=e.constructor,C=r!==void 0;if(C?(ae(r,1,Be),n===void 0?n=O.rounding:ae(n,0,8)):(r=O.precision,n=O.rounding),!e.isFinite())g=co(e);else{for(g=Ee(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new O(1),T.e=g.length-s,T.d=fr(Ee(T),10,i),T.e=T.d.length),h=fr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new O(e),e.d=h,e.e=o,e=U(e,T,r,n,0,i),h=e.d,o=e.e,u=ro),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=fr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function su(e){return new this(e).abs()}function au(e){return new this(e).acos()}function lu(e){return new this(e).acosh()}function uu(e,t){return new this(e).plus(t)}function cu(e){return new this(e).asin()}function pu(e){return new this(e).asinh()}function du(e){return new this(e).atan()}function fu(e){return new this(e).atanh()}function mu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=be(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?be(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=be(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=be(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function gu(e){return new this(e).cbrt()}function hu(e){return I(e=new this(e),e.e+1,2)}function yu(e,t,r){return new this(e).clamp(t,r)}function wu(e){if(!e||typeof e!="object")throw Error(wr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-at,0,"toExpPos",0,at,"maxE",0,at,"minE",-at,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(qe+r+": "+n);if(r="crypto",i&&(this[r]=Sn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(io);else this[r]=!1;else throw Error(qe+r+": "+n);return this}function bu(e){return new this(e).cos()}function Eu(e){return new this(e).cosh()}function fo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,to(o)){u.s=o.s,D?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;D?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(io);else for(;o=10;i/=10)n++;nct,datamodelEnumToSchemaEnum:()=>Ju});m();c();p();d();f();m();c();p();d();f();function Ju(e){return{name:e.name,values:e.values.map(t=>t.name)}}m();c();p();d();f();var ct=(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.updateManyAndReturn="updateManyAndReturn",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw",k))(ct||{});var yo=Qe(Gi());m();c();p();d();f();dn();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var mo={keyword:Se,entity:Se,value:e=>de(We(e)),punctuation:We,directive:Se,function:Se,variable:e=>de(We(e)),string:e=>de(Ot(e)),boolean:kt,number:Se,comment:It};var Gu=e=>e,xr={},Wu=0,N={manual:xr.Prism&&xr.Prism.manual,disableWorkerMessageHandler:xr.Prism&&xr.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof me)continue;if(Y&&J!=t.length-1){L.lastIndex=ie;var h=L.exec(e);if(!h)break;var g=h.index+(q?h[1].length:0),T=h.index+h[0].length,a=J,l=ie;for(let B=t.length;a=l&&(++J,ie=l);if(t[J]instanceof me)continue;u=a-J,Ae=e.slice(ie,l),h.index-=ie}else{L.lastIndex=0;var h=L.exec(Ae),u=1}if(!h){if(o)break;continue}q&&($=h[1]?h[1].length:0);var g=h.index+$,h=h[0].slice($),T=g+h.length,O=Ae.slice(0,g),C=Ae.slice(T);let X=[J,u];O&&(++J,ie+=O.length,X.push(O));let Ze=new me(S,k?N.tokenize(h,k):h,At,h,Y);if(X.push(Ze),C&&X.push(C),Array.prototype.splice.apply(t,X),u!=1&&N.matchGrammar(e,t,r,J,ie,!0,S),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};N.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});N.languages.ts=N.languages.typescript;function me(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}me.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return me.stringify(r,t)}).join(""):Ku(e.type)(e.content)};function Ku(e){return mo[e]||Gu}function go(e){return zu(e,N.languages.javascript)}function zu(e,t){return N.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();function ho(e){return wn(e)}var Pr=class e{firstLineNumber;lines;static read(t){let r;try{r=sr.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` +`);return new e(t,ho(n).split(` +`))}highlight(){let t=go(this.toString());return new e(this.firstLineNumber,t.split(` +`))}toString(){return this.lines.join(` +`)}};var Hu={red:Ge,gray:It,dim:St,bold:de,underline:Rt,highlightSource:e=>e.highlight()},Yu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Zu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Xu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Zu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=Pr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=tc(g),T=ec(g);if(!T)return s;s.functionName=`${T.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,T.openingBraceIndex))),u=o.highlightSource(u);let O=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,S)=>o.gray(String(S).padStart(O))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+O+1;C+=2,s.callArguments=(0,yo.default)(i,C).slice(C)}}return s}function ec(e){let t=Object.keys(ct).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function tc(e){let t=0;for(let r=0;r"Unknown error")}function Po(e){return e.errors.flatMap(t=>t.kind==="Union"?Po(t):[t])}function ic(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:oc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function oc(e,t){return[...new Set(e.concat(t))]}function sc(e){return Tn(e,(t,r)=>{let n=bo(t),i=bo(r);return n!==i?n-i:Eo(t)-Eo(r)})}function bo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Eo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();d();f();var pe=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();To();m();c();p();d();f();var pt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};vo();m();c();p();d();f();m();c();p();d();f();var Ar=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var Cr=e=>e,Sr={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},Ao={bold:de,red:Ge,green:Ot,dim:St,enabled:!0},dt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();d();f();var je=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ft=class extends je{items=[];addItem(t){return this.items.push(new Ar(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new xe("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(dt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var mt=class e extends je{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ft&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new xe("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(dt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var H=class extends je{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var jt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(dt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ac(e,t);break;case"IncludeOnScalar":lc(e,t);break;case"EmptySelection":uc(e,t,r);break;case"UnknownSelectionField":fc(e,t);break;case"InvalidSelectionValue":mc(e,t);break;case"UnknownArgument":gc(e,t);break;case"UnknownInputField":hc(e,t);break;case"RequiredArgumentMissing":yc(e,t);break;case"InvalidArgumentType":wc(e,t);break;case"InvalidArgumentValue":bc(e,t);break;case"ValueTooLarge":Ec(e,t);break;case"SomeFieldsMissing":xc(e,t);break;case"TooManyFieldsGiven":Pc(e,t);break;case"Union":xo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ac(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function lc(e,t){let[r,n]=gt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Ut(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function uc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){cc(e,t,i);return}if(n.hasField("select")){pc(e,t);return}}if(r?.[De(e.outputType.name)]){dc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function cc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function pc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Oo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Ut(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function dc(e,t){let r=new jt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=gt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new mt;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function fc(e,t){let r=ko(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Oo(n,e.outputType);break;case"include":vc(n,e.outputType);break;case"omit":Tc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Ut(n)),i.join(" ")})}function mc(e,t){let r=ko(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function gc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ac(n,e.arguments)),t.addErrorMessage(i=>So(i,r,e.arguments.map(o=>o.name)))}function hc(e,t){let[r,n]=gt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Io(o,e.inputType)}t.addErrorMessage(o=>So(o,n,e.inputType.fields.map(s=>s.name)))}function So(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Sc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Ut(e)),n.join(" ")}function yc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=gt(e.argumentPath),s=new jt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Ro).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=gt(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function Ro(e){return e.kind==="list"?`${Ro(e.elementType)}[]`:e.name}function wc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Rr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function bc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Rr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ec(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function xc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Io(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Rr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Ut(i)),o.join(" ")})}function Pc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Rr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Oo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function vc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Tc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function Ac(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ko(e,t){let[r,n]=gt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Io(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function gt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Ut({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Rr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Cc=3;function Sc(e,t){let r=1/0,n;for(let i of t){let o=(0,Co.default)(e,i);o>Cc||o`}};function ht(e){return e instanceof $t}m();c();p();d();f();var Or=Symbol(),Mn=new WeakMap,Me=class{constructor(t){t===Or?Mn.set(this,`Prisma.${this._getName()}`):Mn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mn.get(this)}},Vt=class extends Me{_getNamespace(){return"NullTypes"}},Qt=class extends Vt{#e};_n(Qt,"DbNull");var Jt=class extends Vt{#e};_n(Jt,"JsonNull");var Gt=class extends Vt{#e};_n(Gt,"AnyNull");var kr={classes:{DbNull:Qt,JsonNull:Jt,AnyNull:Gt},instances:{DbNull:new Qt(Or),JsonNull:new Jt(Or),AnyNull:new Gt(Or)}};function _n(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var Fo=": ",Ir=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Fo.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Fo).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function yt(e){return new Dn(Mo(e))}function Mo(e){let t=new mt;for(let[r,n]of Object.entries(e)){let i=new Ir(r,_o(n));t.addField(i)}return t}function _o(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(ut(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=dr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Me?new H(`Prisma.${e._getName()}`):ht(e)?new H(`prisma.${De(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Rc(e):typeof e=="object"?Mo(e):new H(Object.prototype.toString.call(e))}function Rc(e){let t=new ft;for(let r of e)t.addItem(_o(r));return t}function Fr(e,t){let r=t==="pretty"?Ao:Sr,n=e.renderAllMessages(r),i=new pt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Mr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=yt(e);for(let h of t)Tr(h,a,s);let{message:l,args:u}=Fr(a,r),g=vr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function Lo(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Oc({...e,...Do(t.name,e,t.result.$allModels),...Do(t.name,e,t.result[n])})}function Oc(e){let t=new we,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return pr(e,n=>({...n,needs:r(n.name,new Set)}))}function Do(e,t,r){return r?pr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:kc(t,o,i)})):{}}function kc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function No(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function qo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var _r=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=Nt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Nt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Lo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},wt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new _r(t))}isEmpty(){return this.head===void 0}append(t){return new e(new _r(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();var Dr=class{constructor(t){this.name=t}};function Bo(e){return e instanceof Dr}function jo(e){return new Dr(e)}m();c();p();d();f();m();c();p();d();f();var Uo=Symbol(),Wt=class{constructor(t){if(t!==Uo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Lr:t}},Lr=new Wt(Uo);function ve(e){return e instanceof Wt}var Ic={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},$o="explicitly `undefined` values are not allowed";function Nr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=wt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Ln({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Ic[t],query:Kt(r,h)}}function Kt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Qo(r,n),selection:Fc(e,t,i,n)}}function Fc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Lc(e,n)):Mc(n,t,r)}function Mc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&_c(n,t,e),Dc(n,r,e),n}function _c(e,t,r){for(let[n,i]of Object.entries(t)){if(ve(i))continue;let o=r.nestSelection(n);if(Nn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Kt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Kt(i,o)}}function Dc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=qo(i,n);for(let[s,a]of Object.entries(o)){if(ve(a))continue;Nn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Lc(e,t){let r={},n=t.getComputedFields(),i=No(e,n);for(let[o,s]of Object.entries(i)){if(ve(s))continue;let a=t.nestSelection(o);Nn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ve(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Kt({},a):r[o]=!0;continue}r[o]=Kt(s,a)}}return r}function Vo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(st(e)){if(dr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Bo(e))return{$type:"Param",value:e.name};if(ht(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Nc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(qc(e))return e.values;if(ut(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==kr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Bc(e))return e.toJSON();if(typeof e=="object")return Qo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Qo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ve(i)||(i!==void 0?r[n]=Vo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:$o}))}return r}function Nc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[De(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:ze(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();function Jo(e){if(!e._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var bt=class{_client;constructor(t){this._client=t}prometheus(t){return Jo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Jo(this._client),this._client._engine.metrics({format:"json",...t})}};m();c();p();d();f();function Go(e,t){let r=Nt(()=>jc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function jc(e){return{datamodel:{models:qn(e.models),enums:qn(e.enums),types:qn(e.types)}}}function qn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Bn=new WeakMap,qr="$$PrismaTypedSql",zt=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,qr,{value:qr})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function Wo(e){return(...t)=>new zt(e,t)}function Br(e){return e!=null&&e[qr]===qr}m();c();p();d();f();var da=Qe(Ko());m();c();p();d();f();zo();dn();gn();m();c();p();d();f();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var Ur={enumerable:!0,configurable:!0,writable:!0};function $r(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Ur,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Zo=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=$c(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Xo(Reflect.ownKeys(o),r),a=Xo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Ur,...l?.getPropertyDescriptor(s)}:Ur:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Zo]=function(){let o={...this};return delete o[Zo],o},i}function $c(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Xo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function Et(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function Vr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function es(e){if(e===void 0)return"";let t=yt(e);return new pt(0,{colors:Sr}).write(t).toString()}m();c();p();d();f();var Vc="P2037";function Qr({error:e,user_facing_error:t},r,n){return t.error_code?new se(Qc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new G(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Qc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Vc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Yt="";function ts(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=Wc(n)||zc(n)||Zc(n)||rp(n)||ep(n);return i&&r.push(i),r},[])}var Jc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Wc(e){var t=Jc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Gc.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Yt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Kc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function zc(e){var t=Kc.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Hc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Yc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Zc(e){var t=Hc.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Yc.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Yt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Xc=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function ep(e){var t=Xc.exec(e);return t?{file:t[3],methodName:t[1]||Yt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var tp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function rp(e){var t=tp.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var $n=class{getLocation(){return null}},Vn=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ts(t).find(i=>{if(!i.file)return!1;let o=Pn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ue(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $n:new Vn}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var rs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function xt(e={}){let t=ip(e);return Object.entries(t).reduce((n,[i,o])=>(rs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ip(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Jr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ns(e,t){let r=Jr(e);return t({action:"aggregate",unpacker:r,argsMapper:xt})(e)}m();c();p();d();f();function op(e={}){let{select:t,...r}=e;return typeof t=="object"?xt({...r,_count:t}):xt({...r,_count:{_all:!0}})}function sp(e={}){return typeof e.select=="object"?t=>Jr(e)(t)._count:t=>Jr(e)(t)._count._all}function is(e,t){return t({action:"count",unpacker:sp(e),argsMapper:op})(e)}m();c();p();d();f();function ap(e={}){let t=xt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function lp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function os(e,t){return t({action:"groupBy",unpacker:lp(e),argsMapper:ap})(e)}function ss(e,t,r){if(t==="aggregate")return n=>ns(n,r);if(t==="count")return n=>is(n,r);if(t==="groupBy")return n=>os(n,r)}m();c();p();d();f();function as(e,t){let r=t.fields.filter(i=>!i.relationName),n=Yi(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new $t(e,o,s.type,s.isList,s.kind==="enum")},...$r(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var ls=e=>Array.isArray(e)?e:e.split("."),Qn=(e,t)=>ls(t).reduce((r,n)=>r&&r[n],e),us=(e,t,r)=>ls(t).reduceRight((n,i,o,s)=>Object.assign({},Qn(e,s.slice(0,o)),{[i]:n}),r);function up(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function cp(e,t,r){return t===void 0?e??{}:us(t,r,e||!0)}function Jn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ue(e._errorFormat),g=up(n,i),h=cp(l,o,g),T=r({dataPath:g,callsite:u})(h),O=pp(e,t);return new Proxy(T,{get(C,S){if(!O.includes(S))return C[S];let _=[a[S].type,r,S],L=[g,h];return Jn(e,..._,...L)},...$r([...O,...Object.getOwnPropertyNames(T)])})}}function pp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var dp=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],fp=["aggregate","count","groupBy"];function Gn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[mp(e,t),hp(e,t),Ht(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function mp(e,t){let r=Pe(t),n=Object.keys(ct).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ue(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})},{action:o,args:l,model:t})};return dp.includes(o)?Jn(e,t,s):gp(i)?ss(e,i,s):s({})}}}function gp(e){return fp.includes(e)}function hp(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return as(t,r)}))}m();c();p();d();f();function cs(e){return e.replace(/^./,t=>t.toUpperCase())}var Wn=Symbol();function Zt(e){let t=[yp(e),wp(e),ne(Wn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Ht(r)),ge(e,t)}function yp(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function wp(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=cs(i);if(e._runtimeDataModel.models[o]!==void 0)return Gn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Gn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ps(e){return e[Wn]?e[Wn]:e}function ds(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Zt(t)}m();c();p();d();f();m();c();p();d();f();function fs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(Et(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(Et(u))}bp(e,l.needs)&&s.push(Ep(l,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function bp(e,t){return t.every(r=>vn(e,r))}function Ep(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function Gr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Gr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function gs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Gr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return fs({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var xp=["$connect","$disconnect","$on","$transaction","$extends"],hs=xp;function ys(e){if(e instanceof le)return Pp(e);if(Br(e))return vp(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ys(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(o,l),a.args=s,bs(e,a,r,n+1)}})})}function Es(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return bs(e,t,s)}function xs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ps(r,n,0,e):e(r)}}function Ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(i,l),Ps(a,t,r+1,n)}})}var ws=e=>e;function vs(e=ws,t=ws){return r=>e(t(r))}m();c();p();d();f();var Ts=z("prisma:client"),As={Vercel:"vercel","Netlify CI":"netlify"};function Cs({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(Ts("checkPlatformCaching:postinstall",e),Ts("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in As){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${As[t]}-build`;throw console.error(i),new Q(i,r)}}m();c();p();d();f();function Ss(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Rs(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Os(e){return e.split(` +`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}m();c();p();d();f();var ks=Qe(Ki());function Is({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ks.default)({user:t,repo:r,template:n,title:e,body:i})}function Fs({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Mi(6e3-(s?.length??0)),l=Os(ot(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",g=ot(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${y.version?.padEnd(19)}| +| OS | ${t?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${u} + +## Logs +\`\`\` +${l} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?Rs(s):""} +\`\`\` +`),h=Is({title:r,body:g});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${Rt(h)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Ms(e,t){throw new Error(t)}function Tp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Ap(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Pt(e){return e===null?e:Array.isArray(e)?e.map(Pt):typeof e=="object"?Tp(e)?Cp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Ap(e,Pt):e}function Cp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Ie(t);case"Json":return JSON.parse(t);default:Ms(t,"Unknown tagged value")}}var _s="6.19.0";m();c();p();d();f();m();c();p();d();f();var Rp=()=>globalThis.process?.release?.name==="node",Op=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,kp=()=>!!globalThis.Deno,Ip=()=>typeof globalThis.Netlify=="object",Fp=()=>typeof globalThis.EdgeRuntime=="object",Mp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function _p(){return[[Ip,"netlify"],[Fp,"edge-light"],[Mp,"workerd"],[kp,"deno"],[Op,"bun"],[Rp,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Dp={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ds(){let e=_p();return{id:e,prettyName:Dp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function Wr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function Ls(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var Kn=class{engineObject;constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}compile(){throw new Error("not implemented")}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},Ns={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:Kn}}};var Lp="P2036",Te=z("prisma:client:libraryEngine");function Np(e){return e.item_type==="query"&&"query"in e}function qp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var TO=[...fn,"native"],Bp=0xffffffffffffffffn,zn=1n;function jp(){let e=zn++;return zn>Bp&&(zn=1n),e}var er=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=Ns,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=jp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Up(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new se(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new G(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Te("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new G("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new G("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr));let r=await this.adapterPromise;r&&Te("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Np(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):qp(r)?this.loggerRustPanic=new ce(Hn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Te(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Te("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr)),await this.adapterPromise,Te("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Te("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),Te("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Te("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Te(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(Hn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new G(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Te("requestBatch");let i=Vr(t,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ls(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0],o?.errorRegistry):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(t,r){if(t.user_facing_error.is_panic)return new ce(Hn(this,t.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(t.user_facing_error,r);return n?n.error:Qr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t,r){if(t.error_code===Lp&&r){let n=t.meta?.id;ur(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return ur(i,"External error with reported id was not registered"),i}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Up(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Hn(e,t){return Fs({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}m();c();p();d();f();function qs({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let F=S.join(` +`);o.push({_tag:"error",value:F})},l=!!e?.startsWith("prisma://"),u=bn(e),g=!!t,h=l||u;!g&&r&&h&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):h?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let O={accelerate:T,ppg:u,driverAdapters:g};function C(S){return S.length>0}return C(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:O}:{ok:!0,diagnostics:{warnings:i},isUsing:O}}function Bs({copyEngine:e=!0},t){let r;try{r=Wr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=qs({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"react-native"});for(let h of o.warnings)Lt(...h.value);if(!n){let h=o.errors[0];throw new te(h.value,{clientVersion:t.clientVersion})}let s=it(t.generator),a=s==="library",l=s==="binary",u=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return new er(t)}m();c();p();d();f();function js({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Us=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var $s=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function vt(e){try{return Vs(e,"fast")}catch{return Vs(e,"slow")}}function Vs(e,t){return JSON.stringify(e.map(r=>Js(r,t)))}function Js(e,t){if(Array.isArray(e))return e.map(r=>Js(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(st(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Fe.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if($p(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Gs(e):e}function $p(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Gs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Qs);let t={};for(let r of Object.keys(e))t[r]=Qs(e[r]);return t}function Qs(e){return typeof e=="bigint"?e.toString():Gs(e)}var Vp=/^(\s*alter\s)/i,Ws=z("prisma:client");function Yn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Vp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var Zn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Br(r))n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=$s(r),i={values:vt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ws(`prisma.${e}(${n}, ${i.values})`):Ws(`prisma.${e}(${n})`),{query:n,parameters:i}},Ks={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},zs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Xn(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Hs(r(s)):Hs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Hs(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var Qp=mn.split(".")[0],Jp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ei=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Qp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Jp}};function Ys(){return new ei}m();c();p();d();f();function Zs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function Xs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();d();f();m();c();p();d();f();function Kr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function ea(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ti(e.query.arguments)),t.push(ti(e.query.selection)),t.join("")}function ti(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ti(n)})`:r}).join(" ")})`}m();c();p();d();f();var Gp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ri(e){return Gp[e]}m();c();p();d();f();var zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iYe("bigint",r));case"bytes-array":return t.map(r=>Ye("bytes",r));case"decimal-array":return t.map(r=>Ye("decimal",r));case"datetime-array":return t.map(r=>Ye("datetime",r));case"date-array":return t.map(r=>Ye("date",r));case"time-array":return t.map(r=>Ye("time",r));default:return t}}function Hr(e){let t=[],r=Wp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ri(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:zp(o),containsWrite:u,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(O){return O}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?ta(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ri(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ea(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Kp(t),Hp(t,i))throw t;if(t instanceof se&&Yp(t)){let u=ra(t.meta);Mr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=vr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof G)throw new G(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?ot(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Qn(o,s),l=i==="queryRaw"?Hr(a):Pt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function zp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ta(e)};ze(e,"Unknown transaction kind")}}function ta(e){return{id:e.id,payload:e.payload}}function Hp(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Yp(e){return e.code==="P2009"||e.code==="P2012"}function ra(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ra)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var na=_s;m();c();p();d();f();var la=Qe(In());m();c();p();d();f();var j=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};ue(j,"PrismaClientConstructorValidationError");var ia=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],oa=["pretty","colorless","minimal"],sa=["info","query","warn","error"],Zp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Tt(r,t)||` Available datasources: ${t.join(", ")}`;throw new j(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new j(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&it(t.generator)==="client")throw new j('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new j('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(it(t.generator)==="binary")throw new j('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!oa.includes(e)){let t=Tt(e,oa);throw new j(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!sa.includes(r)){let n=Tt(r,sa);throw new j(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Tt(i,o);throw new j(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new j(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new j(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new j(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new j('"omit" option is expected to be an object.');if(e===null)throw new j('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=ed(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new j(td(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new j(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Tt(r,t);throw new j(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ua(e,t){for(let[r,n]of Object.entries(e)){if(!ia.includes(r)){let i=Tt(r,ia);throw new j(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Zp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new j('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Tt(e,t){if(t.length===0||typeof e!="string")return"";let r=Xp(e,t);return r?` Did you mean "${r}"?`:""}function Xp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,la.default)(e,i)}));r.sort((i,o)=>i.distanceDe(n)===t);if(r)return e[r]}function td(e,t){let r=yt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Fr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}m();c();p();d();f();function ca(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var $e=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var rd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},nd=Symbol.for("prisma.client.transaction.id"),id={id:0,nextId(){return++this.id}};function fa(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Xn();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Cs(e),n&&ua(n,e);let i=new jr().on("error",()=>{});this._extensions=wt.empty(),this._previewFeatures=js(e),this._clientVersion=e.clientVersion??na,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Ys();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Re.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Re.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&z.enable("prisma:client");let h=Re.resolve(e.dirname,e.relativePath);sr.existsSync(h)||(h=e.dirname),$e("dirname",e.dirname),$e("relativePath",e.relativePath),$e("cwd",h);let T=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Xs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(O=>typeof O=="string"?O==="query":O.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ss(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Wr,getBatchRequestPayload:Vr,prismaGraphQLToJSError:Qr,PrismaClientUnknownRequestError:G,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:z("prisma:client:accelerateEngine"),engineVersion:da.version,clientVersion:e.clientVersion}},$e("clientVersion",e.clientVersion),this._engine=Bs(e,this._engineConfig),this._requestHandler=new Yr(this,i),l.log)for(let O of l.log){let C=typeof O=="string"?O:O.emit==="stdout"?O.level:null;C&&this.$on(C,S=>{Dt.log(`${Dt.tags[C]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Zt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{_i()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zn({clientMethod:i,activeProvider:a}),callsite:Ue(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=pa(n,i);return Yn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Yn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Us,callsite:Ue(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zn({clientMethod:i,activeProvider:a}),callsite:Ue(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...pa(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=id.nextId(),s=Zs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ca(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return ge(Zt(ge(ps(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Xn(n)),ne(nd,()=>n.id)])),[Et(hs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??rd,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&u===!1&&delete T.transaction;let O=await Es(this,T);return T.model?gs({result:O,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):O};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:O}){try{n=u?u(n):n;let C={name:"serialize"},S=this._tracingHelper.runInChildSpan(C,()=>Nr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&($e("Prisma Client call:"),$e(`prisma.${i}(${es(n)})`),$e("Generated request:"),$e(JSON.stringify(S,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:O})}catch(C){throw C.clientVersion=this._clientVersion,C}}$metrics=new bt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ds}return t}function pa(e,t){return od(e)?[new le(e,t),Ks]:[e,zs]}function od(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var sd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ma(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!sd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=react-native.js.map diff --git a/packages/challenge-prisma-client/runtime/wasm-compiler-edge.js b/packages/challenge-prisma-client/runtime/wasm-compiler-edge.js new file mode 100644 index 0000000..04cb273 --- /dev/null +++ b/packages/challenge-prisma-client/runtime/wasm-compiler-edge.js @@ -0,0 +1,85 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var ou=Object.create;var Kr=Object.defineProperty;var su=Object.getOwnPropertyDescriptor;var au=Object.getOwnPropertyNames;var lu=Object.getPrototypeOf,cu=Object.prototype.hasOwnProperty;var ye=(e,t)=>()=>(e&&(t=e(e=0)),t);var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},Vo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of au(t))!cu.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=su(t,i))||n.enumerable});return e};var $e=(e,t,r)=>(r=e!=null?ou(lu(e)):{},Vo(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e)),qo=e=>Vo(Kr({},"__esModule",{value:!0}),e);function ui(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(du.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(w=0){return Y(w,"offset"),de(w,"offset"),ee(w,"offset",this.length-1),new DataView(this.buffer)[r[a]](w,f)},o=(a,f)=>function(w,A=0){let R=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),S=mu[R];return Y(A,"offset"),de(A,"offset"),ee(A,"offset",this.length-1),pu(w,"value",S[0],S[1]),new DataView(this.buffer)[r[a]](A,w,f),A+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function jo(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function zr(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function ee(e,t,r=yu+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function Y(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function de(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function pu(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Bo(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function hu(e,t="utf8"){return h.from(e,t)}var h,mu,du,fu,gu,yu,y,pi,c=ye(()=>{"use strict";h=class e extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(t,r=0,n="utf8"){return Bo(n,"encoding"),e.allocUnsafe(t).fill(r,n)}static allocUnsafe(t){return e.from(t)}static allocUnsafeSlow(t){return e.from(t)}static isBuffer(t){return t&&!!t._isBuffer}static byteLength(t,r="utf8"){if(typeof t=="string")return ui(t,r).byteLength;if(t&&t.byteLength)return t.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(t){return gu.includes(t)}static compare(t,r){zr(t,"buff1"),zr(r,"buff2");for(let n=0;nr[n])return 1}return t.length===r.length?0:t.length>r.length?1:-1}static from(t,r="utf8"){if(t&&typeof t=="object"&&t.type==="Buffer")return new e(t.data);if(typeof t=="number")return new e(new Uint8Array(t));if(typeof t=="string")return ui(t,r);if(ArrayBuffer.isView(t)){let{byteOffset:n,byteLength:i,buffer:o}=t;return"map"in t&&typeof t.map=="function"?new e(t.map(s=>s%256),n,i):new e(o,n,i)}if(t&&typeof t=="object"&&("length"in t||"byteLength"in t||"buffer"in t))return new e(t);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(t,r){if(t.length===0)return e.alloc(0);let n=[].concat(...t.map(o=>[...o])),i=e.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(t=0,r=this.length){return this.subarray(t,r)}subarray(t=0,r=this.length){return Object.setPrototypeOf(super.subarray(t,r),e.prototype)}reverse(){return super.reverse(),this}readIntBE(t,r){Y(t,"offset"),de(t,"offset"),ee(t,"offset",this.length-1),Y(r,"byteLength"),de(r,"byteLength");let n=new DataView(this.buffer,t,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,t&255),t=t/256;return r+n}writeUintBE(t,r,n){return this.writeUIntBE(t,r,n)}writeUIntLE(t,r,n){Y(r,"offset"),de(r,"offset"),ee(r,"offset",this.length-1),Y(n,"byteLength"),de(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===t[n])}copy(t,r=0,n=0,i=this.length){ee(r,"targetStart"),ee(n,"sourceStart",this.length),ee(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:t.length),a);return this}includes(t,r=null,n="utf-8"){return this.indexOf(t,r,n)!==-1}lastIndexOf(t,r=null,n="utf-8"){return this.indexOf(t,r,n,!0)}indexOf(t,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=e.from(typeof t=="number"?[t]:t,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,w)=>(i?w<=a:w>=a)&&this[w]===s[0]&&s.every((R,S)=>this[w+S]===R))}toString(t="utf8",r=0,n=this.length){if(r=r<0?0:r,t=t.toString().toLowerCase(),n<=0)return"";if(t==="utf8"||t==="utf-8")return fu.decode(this.slice(r,n));if(t==="base64"||t==="base64url"){let i=btoa(this.reduce((o,s)=>o+pi(s),""));return t==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return this.slice(r,n).reduce((i,o)=>i+pi(o&(t==="ascii"?127:255)),"");if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");jo(`encoding "${t}"`)}toLocaleString(){return this.toString()}inspect(){return``}};mu={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},du=new TextEncoder,fu=new TextDecoder,gu=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],yu=4294967295;uu(h.prototype);y=new Proxy(hu,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),pi=String.fromCodePoint});var g,x,u=ye(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var b,p=ye(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=ye(()=>{"use strict";E=()=>{};E.prototype=E});var d=ye(()=>{"use strict"});function Jo(e,t){var r,n,i,o,s,a,f,w,A=e.constructor,R=A.precision;if(!e.s||!t.s)return t.s||(t=new A(e)),W?q(t,R):t;if(f=e.d,w=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=w.length):(n=w,i=s,a=f.length),s=Math.ceil(R/H),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=w.length,a-o<0&&(o=a,n=w,w=f,f=n),r=0;o;)r=(f[--o]=f[o]+w[o]+r)/te|0,f[o]%=te;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,W?q(t,R):t}function Re(e,t,r){if(e!==~~e||er)throw Error(Ye+e)}function Ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(di+Z(e));if(!e.s)return new A(he);for(t==null?(W=!1,a=R):a=t,s=new A(.03125);e.abs().gte(.1);)e=e.times(s),w+=5;for(n=Math.log(ze(2,w))/Math.LN10*2+5|0,a+=n,r=i=o=new A(he),A.precision=a;;){if(i=q(i.times(e),a),r=r.times(++f),s=o.plus(_e(i,r,a)),Ae(s.d).slice(0,a)===Ae(o.d).slice(0,a)){for(;w--;)o=q(o.times(o),a);return A.precision=R,t==null?(W=!0,q(o,R)):o}o=s}}function Z(e){for(var t=e.e*H,r=e.d[0];r>=10;r/=10)t++;return t}function mi(e,t,r){if(t>e.LN10.sd())throw W=!0,r&&(e.precision=r),Error(be+"LN10 precision limit exceeded");return q(new e(e.LN10),t)}function Ve(e){for(var t="";e--;)t+="0";return t}function Kt(e,t){var r,n,i,o,s,a,f,w,A,R=1,S=10,C=e,L=C.d,k=C.constructor,M=k.precision;if(C.s<1)throw Error(be+(C.s?"NaN":"-Infinity"));if(C.eq(he))return new k(0);if(t==null?(W=!1,w=M):w=t,C.eq(10))return t==null&&(W=!0),mi(k,w);if(w+=S,k.precision=w,r=Ae(L),n=r.charAt(0),o=Z(C),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(e),r=Ae(C.d),n=r.charAt(0),R++;o=Z(C),n>1?(C=new k("0."+r),o++):C=new k(n+"."+r.slice(1))}else return f=mi(k,w+2,M).times(o+""),C=Kt(new k(n+"."+r.slice(1)),w-S).plus(f),k.precision=M,t==null?(W=!0,q(C,M)):C;for(a=s=C=_e(C.minus(he),C.plus(he),w),A=q(C.times(C),w),i=3;;){if(s=q(s.times(A),w),f=a.plus(_e(s,new k(i),w)),Ae(f.d).slice(0,w)===Ae(a.d).slice(0,w))return a=a.times(2),o!==0&&(a=a.plus(mi(k,w+2,M).times(o+""))),a=_e(a,new k(R),w),k.precision=M,t==null?(W=!0,q(a,M)):a;a=f,i+=2}}function Qo(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=dt(r/H),e.d=[],n=(r+1)%H,r<0&&(n+=H),nYr||e.e<-Yr))throw Error(di+r)}else e.s=0,e.e=0,e.d=[0];return e}function q(e,t,r){var n,i,o,s,a,f,w,A,R=e.d;for(s=1,o=R[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=H,i=t,w=R[A=0];else{if(A=Math.ceil((n+1)/H),o=R.length,A>=o)return e;for(w=o=R[A],s=1;o>=10;o/=10)s++;n%=H,i=n-H+s}if(r!==void 0&&(o=ze(10,s-i-1),a=w/o%10|0,f=t<0||R[A+1]!==void 0||w%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?w/ze(10,s-i):0:R[A-1])%10&1||r==(e.s<0?8:7))),t<1||!R[0])return f?(o=Z(e),R.length=1,t=t-o-1,R[0]=ze(10,(H-t%H)%H),e.e=dt(-t/H)||0):(R.length=1,R[0]=e.e=e.s=0),e;if(n==0?(R.length=A,o=1,A--):(R.length=A+1,o=ze(10,H-n),R[A]=i>0?(w/ze(10,s-i)%ze(10,i)|0)*o:0),f)for(;;)if(A==0){(R[0]+=o)==te&&(R[0]=1,++e.e);break}else{if(R[A]+=o,R[A]!=te)break;R[A--]=0,o=1}for(n=R.length;R[--n]===0;)R.pop();if(W&&(e.e>Yr||e.e<-Yr))throw Error(di+Z(e));return e}function Ko(e,t){var r,n,i,o,s,a,f,w,A,R,S=e.constructor,C=S.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new S(e),W?q(t,C):t;if(f=e.d,R=t.d,n=t.e,w=e.e,f=f.slice(),s=w-n,s){for(A=s<0,A?(r=f,s=-s,a=R.length):(r=R,n=w,a=f.length),i=Math.max(Math.ceil(C/H),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=R.length,A=i0;--i)f[a++]=0;for(i=R.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ve(-i-1)+o,r&&(n=r-s)>0&&(o+=Ve(n))):i>=s?(o+=Ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ve(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ve(n))),e.s<0?"-"+o:o}function Ho(e,t){if(e.length>t)return e.length=t,!0}function zo(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ye+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Qo(s,o.toString())}else if(typeof o!="string")throw Error(Ye+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,bu.test(o))Qo(s,o);else throw Error(Ye+o)}if(i.prototype=I,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=zo,i.config=i.set=Eu,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ye+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ye+r+": "+n);return this}var mt,wu,fi,W,be,Ye,di,dt,ze,bu,he,te,H,Go,Yr,I,_e,fi,Zr,Yo=ye(()=>{"use strict";c();u();p();m();d();l();mt=1e9,wu={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W=!0,be="[DecimalError] ",Ye=be+"Invalid argument: ",di=be+"Exponent out of range: ",dt=Math.floor,ze=Math.pow,bu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,te=1e7,H=7,Go=9007199254740991,Yr=dt(Go/H),I={};I.absoluteValue=I.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};I.comparedTo=I.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};I.decimalPlaces=I.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*H;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};I.dividedBy=I.div=function(e){return _e(this,new this.constructor(e))};I.dividedToIntegerBy=I.idiv=function(e){var t=this,r=t.constructor;return q(_e(t,new r(e),0,1),r.precision)};I.equals=I.eq=function(e){return!this.cmp(e)};I.exponent=function(){return Z(this)};I.greaterThan=I.gt=function(e){return this.cmp(e)>0};I.greaterThanOrEqualTo=I.gte=function(e){return this.cmp(e)>=0};I.isInteger=I.isint=function(){return this.e>this.d.length-2};I.isNegative=I.isneg=function(){return this.s<0};I.isPositive=I.ispos=function(){return this.s>0};I.isZero=function(){return this.s===0};I.lessThan=I.lt=function(e){return this.cmp(e)<0};I.lessThanOrEqualTo=I.lte=function(e){return this.cmp(e)<1};I.logarithm=I.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(he))throw Error(be+"NaN");if(r.s<1)throw Error(be+(r.s?"NaN":"-Infinity"));return r.eq(he)?new n(0):(W=!1,t=_e(Kt(r,o),Kt(e,o),o),W=!0,q(t,i))};I.minus=I.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ko(t,e):Jo(t,(e.s=-e.s,e))};I.modulo=I.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(be+"NaN");return r.s?(W=!1,t=_e(r,e,0,1).times(e),W=!0,r.minus(t)):q(new n(r),i)};I.naturalExponential=I.exp=function(){return Wo(this)};I.naturalLogarithm=I.ln=function(){return Kt(this)};I.negated=I.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};I.plus=I.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Jo(t,e):Ko(t,(e.s=-e.s,e))};I.precision=I.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ye+e);if(t=Z(i)+1,n=i.d.length-1,r=n*H+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};I.squareRoot=I.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(be+"NaN")}for(e=Z(a),W=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dt((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(_e(a,o,s+2)).times(.5),Ae(o.d).slice(0,s)===(t=Ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(q(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return W=!0,q(n,r)};I.times=I.mul=function(e){var t,r,n,i,o,s,a,f,w,A=this,R=A.constructor,S=A.d,C=(e=new R(e)).d;if(!A.s||!e.s)return new R(0);for(e.s*=A.s,r=A.e+e.e,f=S.length,w=C.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+C[n]*S[i-n-1]+t,o[i--]=a%te|0,t=a/te|0;o[i]=(o[i]+t)%te|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,W?q(e,R.precision):e};I.toDecimalPlaces=I.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Re(e,0,mt),t===void 0?t=n.rounding:Re(t,0,8),q(r,e+Z(r)+1,t))};I.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ze(n,!0):(Re(e,0,mt),t===void 0?t=i.rounding:Re(t,0,8),n=q(new i(n),e+1,t),r=Ze(n,!0,e+1)),r};I.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ze(i):(Re(e,0,mt),t===void 0?t=o.rounding:Re(t,0,8),n=q(new o(i),e+Z(i)+1,t),r=Ze(n.abs(),!1,e+Z(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};I.toInteger=I.toint=function(){var e=this,t=e.constructor;return q(new t(e),Z(e)+1,t.rounding)};I.toNumber=function(){return+this};I.toPower=I.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,w=12,A=+(e=new f(e));if(!e.s)return new f(he);if(a=new f(a),!a.s){if(e.s<1)throw Error(be+"Infinity");return a}if(a.eq(he))return a;if(n=f.precision,e.eq(he))return q(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=A<0?-A:A)<=Go){for(i=new f(he),t=Math.ceil(n/H+4),W=!1;r%2&&(i=i.times(a),Ho(i.d,t)),r=dt(r/2),r!==0;)a=a.times(a),Ho(a.d,t);return W=!0,e.s<0?new f(he).div(i):q(i,n)}}else if(o<0)throw Error(be+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,W=!1,i=e.times(Kt(a,n+w)),W=!0,i=Wo(i),i.s=o,i};I.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Z(i),n=Ze(i,r<=o.toExpNeg||r>=o.toExpPos)):(Re(e,1,mt),t===void 0?t=o.rounding:Re(t,0,8),i=q(new o(i),e,t),r=Z(i),n=Ze(i,e<=r||r<=o.toExpNeg,e)),n};I.toSignificantDigits=I.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Re(e,1,mt),t===void 0?t=n.rounding:Re(t,0,8)),q(new n(r),e,t)};I.toString=I.valueOf=I.val=I.toJSON=I[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Z(e),r=e.constructor;return Ze(e,t<=r.toExpNeg||t>=r.toExpPos)};_e=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%te|0,s=o/te|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,w,A,R,S,C,L,k,M,De,ue,B,pe,Ke,ci,xe,Jr,Wr=n.constructor,iu=n.s==i.s?1:-1,ve=n.d,z=i.d;if(!n.s)return new Wr(n);if(!i.s)throw Error(be+"Division by zero");for(f=n.e-i.e,xe=z.length,Ke=ve.length,C=new Wr(iu),L=C.d=[],w=0;z[w]==(ve[w]||0);)++w;if(z[w]>(ve[w]||0)&&--f,o==null?ue=o=Wr.precision:s?ue=o+(Z(n)-Z(i))+1:ue=o,ue<0)return new Wr(0);if(ue=ue/H+2|0,w=0,xe==1)for(A=0,z=z[0],ue++;(w1&&(z=e(z,A),ve=e(ve,A),xe=z.length,Ke=ve.length),pe=xe,k=ve.slice(0,xe),M=k.length;M=te/2&&++ci;do A=0,a=t(z,k,xe,M),a<0?(De=k[0],xe!=M&&(De=De*te+(k[1]||0)),A=De/ci|0,A>1?(A>=te&&(A=te-1),R=e(z,A),S=R.length,M=k.length,a=t(R,k,S,M),a==1&&(A--,r(R,xe{"use strict";Yo();v=class extends Zr{static isDecimal(t){return t instanceof Zr}static random(t=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Zr(`0.${n.slice(0,t)}`)}}},se=v});function Ru(){return!1}function bi(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Cu(){return bi()}function Su(){return[]}function Iu(e){e(null,[])}function ku(){return""}function Ou(){return""}function Du(){}function _u(){}function Mu(){}function Nu(){}function Lu(){}function Uu(){}function Fu(){}function $u(){}function Vu(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function qu(e,t){t(null,bi())}var Bu,ju,fs,gs=ye(()=>{"use strict";c();u();p();m();d();l();Bu={},ju={existsSync:Ru,lstatSync:bi,stat:qu,statSync:Cu,readdirSync:Su,readdir:Iu,readlinkSync:ku,realpathSync:Ou,chmodSync:Du,renameSync:_u,mkdirSync:Mu,rmdirSync:Nu,rmSync:Lu,unlinkSync:Uu,watchFile:Fu,unwatchFile:$u,watch:Vu,promises:Bu},fs=ju});var ys=me(()=>{"use strict";c();u();p();m();d();l()});var hs=me((Vy,Qu)=>{Qu.exports={name:"@prisma/internals",version:"6.19.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-engine-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Gu(...e){return e.join("/")}function Ju(...e){return e.join("/")}function Wu(e){let t=ws(e),r=bs(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function ws(e){let t=e.split("/");return t[t.length-1]}function bs(e){return e.split("/").slice(0,-1).join("/")}function zu(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Es,Ku,Yu,Zu,rn,xs=ye(()=>{"use strict";c();u();p();m();d();l();Es="/",Ku=":";Yu={sep:Es},Zu={basename:ws,delimiter:Ku,dirname:bs,join:Ju,normalize:zu,parse:Wu,posix:Yu,resolve:Gu,sep:Es},rn=Zu});var xi={};pt(xi,{Hash:()=>Zt,createHash:()=>Ps,default:()=>yt,randomFillSync:()=>sn,randomUUID:()=>on,webcrypto:()=>Xt});function on(){return globalThis.crypto.randomUUID()}function sn(e,t,r){return t!==void 0&&(r!==void 0?e=e.subarray(t,t+r):e=e.subarray(t)),globalThis.crypto.getRandomValues(e)}function Ps(e){return new Zt(e)}var Xt,Zt,yt,Xe=ye(()=>{"use strict";c();u();p();m();d();l();Xt=globalThis.crypto;Zt=class{#t=[];#e;constructor(t){this.#e=t}update(t){this.#t.push(t)}async digest(){let t=new Uint8Array(this.#t.reduce((i,o)=>i+o.length,0)),r=0;for(let i of this.#t)t.set(i,r),r+=i.length;let n=await globalThis.crypto.subtle.digest(this.#e,t);return new Uint8Array(n)}},yt={webcrypto:Xt,randomUUID:on,randomFillSync:sn,createHash:Ps,Hash:Zt}});var Pi=me(($h,tp)=>{tp.exports={name:"@prisma/engines-version",version:"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"2ba551f319ab1df4bc874a89965d8b3641056773"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Ts=me(an=>{"use strict";c();u();p();m();d();l();Object.defineProperty(an,"__esModule",{value:!0});an.enginesVersion=void 0;an.enginesVersion=Pi().prisma.enginesVersion});var Rs=me((ew,As)=>{"use strict";c();u();p();m();d();l();As.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ss=me((Lw,un)=>{"use strict";c();u();p();m();d();l();un.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};un.exports.default=un.exports});var Ii=me((SP,_s)=>{"use strict";c();u();p();m();d();l();_s.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";c();u();p();m();d();l()});var $s=ye(()=>{"use strict";c();u();p();m();d();l()});var kn,ca=ye(()=>{"use strict";c();u();p();m();d();l();kn=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Xi=me(rt=>{"use strict";c();u();p();m();d();l();Object.defineProperty(rt,"__esModule",{value:!0});rt.anumber=Zi;rt.abytes=ol;rt.ahash=Nm;rt.aexists=Lm;rt.aoutput=Um;function Zi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Mm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ol(e,...t){if(!Mm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Nm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Zi(e.outputLen),Zi(e.blockLen)}function Lm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Um(e,t){ol(e);let r=t.outputLen;if(e.length{"use strict";c();u();p();m();d();l();Object.defineProperty(_,"__esModule",{value:!0});_.add5L=_.add5H=_.add4H=_.add4L=_.add3H=_.add3L=_.rotlBL=_.rotlBH=_.rotlSL=_.rotlSH=_.rotr32L=_.rotr32H=_.rotrBL=_.rotrBH=_.rotrSL=_.rotrSH=_.shrSL=_.shrSH=_.toBig=void 0;_.fromBig=to;_.split=sl;_.add=El;var Fn=BigInt(2**32-1),eo=BigInt(32);function to(e,t=!1){return t?{h:Number(e&Fn),l:Number(e>>eo&Fn)}:{h:Number(e>>eo&Fn)|0,l:Number(e&Fn)|0}}function sl(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);_.toBig=al;var ll=(e,t,r)=>e>>>r;_.shrSH=ll;var cl=(e,t,r)=>e<<32-r|t>>>r;_.shrSL=cl;var ul=(e,t,r)=>e>>>r|t<<32-r;_.rotrSH=ul;var pl=(e,t,r)=>e<<32-r|t>>>r;_.rotrSL=pl;var ml=(e,t,r)=>e<<64-r|t>>>r-32;_.rotrBH=ml;var dl=(e,t,r)=>e>>>r-32|t<<64-r;_.rotrBL=dl;var fl=(e,t)=>t;_.rotr32H=fl;var gl=(e,t)=>e;_.rotr32L=gl;var yl=(e,t,r)=>e<>>32-r;_.rotlSH=yl;var hl=(e,t,r)=>t<>>32-r;_.rotlSL=hl;var wl=(e,t,r)=>t<>>64-r;_.rotlBH=wl;var bl=(e,t,r)=>e<>>64-r;_.rotlBL=bl;function El(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var xl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);_.add3L=xl;var Pl=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;_.add3H=Pl;var Tl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);_.add4L=Tl;var vl=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;_.add4H=vl;var Al=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);_.add5L=Al;var Rl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;_.add5H=Rl;var Fm={fromBig:to,split:sl,toBig:al,shrSH:ll,shrSL:cl,rotrSH:ul,rotrSL:pl,rotrBH:ml,rotrBL:dl,rotr32H:fl,rotr32L:gl,rotlSH:yl,rotlSL:hl,rotlBH:wl,rotlBL:bl,add:El,add3L:xl,add3H:Pl,add4L:Tl,add4H:vl,add5H:Rl,add5L:Al};_.default=Fm});var Sl=me($n=>{"use strict";c();u();p();m();d();l();Object.defineProperty($n,"__esModule",{value:!0});$n.crypto=void 0;var He=(Xe(),qo(xi));$n.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Ol=me(U=>{"use strict";c();u();p();m();d();l();Object.defineProperty(U,"__esModule",{value:!0});U.Hash=U.nextTick=U.byteSwapIfBE=U.isLE=void 0;U.isBytes=$m;U.u8=Vm;U.u32=qm;U.createView=Bm;U.rotr=jm;U.rotl=Qm;U.byteSwap=io;U.byteSwap32=Hm;U.bytesToHex=Jm;U.hexToBytes=Wm;U.asyncLoop=zm;U.utf8ToBytes=kl;U.toBytes=Vn;U.concatBytes=Ym;U.checkOpts=Zm;U.wrapConstructor=Xm;U.wrapConstructorWithOpts=ed;U.wrapXOFConstructorWithOpts=td;U.randomBytes=rd;var Mt=Sl(),no=Xi();function $m(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Vm(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function qm(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Bm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function jm(e,t){return e<<32-t|e>>>t}function Qm(e,t){return e<>>32-t>>>0}U.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function io(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}U.byteSwapIfBE=U.isLE?e=>e:e=>io(e);function Hm(e){for(let t=0;tt.toString(16).padStart(2,"0"));function Jm(e){(0,no.abytes)(e);let t="";for(let r=0;r=Le._0&&e<=Le._9)return e-Le._0;if(e>=Le.A&&e<=Le.F)return e-(Le.A-10);if(e>=Le.a&&e<=Le.f)return e-(Le.a-10)}function Wm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};U.nextTick=Km;async function zm(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update(Vn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function ed(e){let t=(n,i)=>e(i).update(Vn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function td(e){let t=(n,i)=>e(i).update(Vn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function rd(e=32){if(Mt.crypto&&typeof Mt.crypto.getRandomValues=="function")return Mt.crypto.getRandomValues(new Uint8Array(e));if(Mt.crypto&&typeof Mt.crypto.randomBytes=="function")return Mt.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var $l=me(J=>{"use strict";c();u();p();m();d();l();Object.defineProperty(J,"__esModule",{value:!0});J.shake256=J.shake128=J.keccak_512=J.keccak_384=J.keccak_256=J.keccak_224=J.sha3_512=J.sha3_384=J.sha3_256=J.sha3_224=J.Keccak=void 0;J.keccakP=Ul;var Nt=Xi(),Pr=Cl(),Ue=Ol(),Ml=[],Nl=[],Ll=[],nd=BigInt(0),xr=BigInt(1),id=BigInt(2),od=BigInt(7),sd=BigInt(256),ad=BigInt(113);for(let e=0,t=xr,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Ml.push(2*(5*n+r)),Nl.push((e+1)*(e+2)/2%64);let i=nd;for(let o=0;o<7;o++)t=(t<>od)*ad)%sd,t&id&&(i^=xr<<(xr<r>32?(0,Pr.rotlBH)(e,t,r):(0,Pr.rotlSH)(e,t,r),_l=(e,t,r)=>r>32?(0,Pr.rotlBL)(e,t,r):(0,Pr.rotlSL)(e,t,r);function Ul(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,w=r[f],A=r[f+1],R=Dl(w,A,1)^r[a],S=_l(w,A,1)^r[a+1];for(let C=0;C<50;C+=10)e[s+C]^=R,e[s+C+1]^=S}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=Nl[s],f=Dl(i,o,a),w=_l(i,o,a),A=Ml[s];i=e[A],o=e[A+1],e[A]=f,e[A+1]=w}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=ld[n],e[1]^=cd[n]}r.fill(0)}var Tr=class e extends Ue.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Nt.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Ue.u32)(this.state)}keccak(){Ue.isLE||(0,Ue.byteSwap32)(this.state32),Ul(this.state32,this.rounds),Ue.isLE||(0,Ue.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Nt.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Ue.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Nt.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Nt.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};J.Keccak=Tr;var Ge=(e,t,r)=>(0,Ue.wrapConstructor)(()=>new Tr(t,e,r));J.sha3_224=Ge(6,144,224/8);J.sha3_256=Ge(6,136,256/8);J.sha3_384=Ge(6,104,384/8);J.sha3_512=Ge(6,72,512/8);J.keccak_224=Ge(1,144,224/8);J.keccak_256=Ge(1,136,256/8);J.keccak_384=Ge(1,104,384/8);J.keccak_512=Ge(1,72,512/8);var Fl=(e,t,r)=>(0,Ue.wrapXOFConstructorWithOpts)((n={})=>new Tr(t,e,n.dkLen===void 0?r:n.dkLen,!0));J.shake128=Fl(31,168,128/8);J.shake256=Fl(31,136,256/8)});var Jl=me((RL,Je)=>{"use strict";c();u();p();m();d();l();var{sha3_512:ud}=$l(),ql=24,vr=32,oo=(e=4,t=Math.random)=>{let r="";for(;r.lengthBl(ud(e)).toString(36).slice(1),Vl=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),pd=e=>Vl[Math.floor(e()*Vl.length)],Ql=({globalObj:e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+oo(vr,t):oo(vr,t);return jl(n).substring(0,vr)},Hl=e=>()=>e++,md=476782367,Gl=({random:e=Math.random,counter:t=Hl(Math.floor(e()*md)),length:r=ql,fingerprint:n=Ql({random:e})}={})=>function(){let o=pd(e),s=Date.now().toString(36),a=t().toString(36),f=oo(r,e),w=`${s+f+a+n}`;return`${o+jl(w).substring(1,r)}`},dd=Gl(),fd=(e,{minLength:t=2,maxLength:r=vr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};Je.exports.getConstants=()=>({defaultLength:ql,bigLength:vr});Je.exports.init=Gl;Je.exports.createId=dd;Je.exports.bufToBigInt=Bl;Je.exports.createCounter=Hl;Je.exports.createFingerprint=Ql;Je.exports.isCuid=fd});var Wl=me((_L,Ar)=>{"use strict";c();u();p();m();d();l();var{createId:gd,init:yd,getConstants:hd,isCuid:wd}=Jl();Ar.exports.createId=gd;Ar.exports.init=yd;Ar.exports.getConstants=hd;Ar.exports.isCuid=wd});var $f={};pt($f,{DMMF:()=>or,Debug:()=>K,Decimal:()=>se,Extensions:()=>gi,MetricsClient:()=>St,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>X,PrismaClientRustPanicError:()=>ae,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>ie,Public:()=>yi,Sql:()=>fe,createParam:()=>ta,defineDmmfProperty:()=>aa,deserializeJsonResponse:()=>Qe,deserializeRawResult:()=>ai,dmmfToRuntimeDataModel:()=>Ds,empty:()=>pa,getPrismaClient:()=>tu,getRuntime:()=>ti,join:()=>ua,makeStrictEnum:()=>ru,makeTypedQueryFactory:()=>la,objectEnumValues:()=>En,raw:()=>Fi,serializeJsonQuery:()=>Cn,skip:()=>Rn,sqltag:()=>$i,warnEnvConflicts:()=>void 0,warnOnce:()=>rr});module.exports=qo($f);c();u();p();m();d();l();var gi={};pt(gi,{defineExtension:()=>Zo,getExtensionContext:()=>Xo});c();u();p();m();d();l();c();u();p();m();d();l();function Zo(e){return typeof e=="function"?e:t=>t.$extends(e)}c();u();p();m();d();l();function Xo(e){return e}var yi={};pt(yi,{validator:()=>es});c();u();p();m();d();l();c();u();p();m();d();l();function es(...e){return t=>t}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var hi,ts,rs,ns,is=!0;typeof g<"u"&&({FORCE_COLOR:hi,NODE_DISABLE_COLORS:ts,NO_COLOR:rs,TERM:ns}=g.env||{},is=g.stdout&&g.stdout.isTTY);var xu={enabled:!ts&&rs==null&&ns!=="dumb"&&(hi!=null&&hi!=="0"||is)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!xu.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ug=j(0,0),Xr=j(1,22),en=j(2,22),Fg=j(3,23),tn=j(4,24),$g=j(7,27),Vg=j(8,28),qg=j(9,29),Bg=j(30,39),ft=j(31,39),os=j(32,39),ss=j(33,39),as=j(34,39),jg=j(35,39),ls=j(36,39),Qg=j(37,39),cs=j(90,39),Hg=j(90,39),Gg=j(40,49),Jg=j(41,49),Wg=j(42,49),Kg=j(43,49),zg=j(44,49),Yg=j(45,49),Zg=j(46,49),Xg=j(47,49);c();u();p();m();d();l();var Pu=100,us=["green","yellow","blue","magenta","cyan","red"],zt=[],ps=Date.now(),Tu=0,wi=typeof g<"u"?g.env:{};globalThis.DEBUG??=wi.DEBUG??"";globalThis.DEBUG_COLORS??=wi.DEBUG_COLORS?wi.DEBUG_COLORS==="true":!0;var Yt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function vu(e){let t={color:us[Tu++%us.length],enabled:Yt.enabled(e),namespace:e,log:Yt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&zt.push([o,...n]),zt.length>Pu&&zt.shift(),Yt.enabled(o)||i){let f=n.map(A=>typeof A=="string"?A:Au(A)),w=`+${Date.now()-ps}ms`;ps=Date.now(),a(o,...f,w)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var K=new Proxy(vu,{get:(e,t)=>Yt[t],set:(e,t,r)=>Yt[t]=r});function Au(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ms(e=7500){let t=zt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.lengthip,info:()=>np,log:()=>rp,query:()=>op,should:()=>Cs,tags:()=>er,warn:()=>vi});c();u();p();m();d();l();var er={error:ft("prisma:error"),warn:ss("prisma:warn"),info:ls("prisma:info"),query:as("prisma:query")},Cs={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function rp(...e){console.log(...e)}function vi(e,...t){Cs.warn()&&console.warn(`${er.warn} ${e}`,...t)}function np(e,...t){console.info(`${er.info} ${e}`,...t)}function ip(e,...t){console.error(`${er.error} ${e}`,...t)}function op(e,...t){console.log(`${er.query} ${e}`,...t)}c();u();p();m();d();l();function Me(e,t){throw new Error(t)}c();u();p();m();d();l();c();u();p();m();d();l();function Ai({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var sp=Ai();function ht(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(sp,"")}c();u();p();m();d();l();function Ri(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();u();p();m();d();l();function pn(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();u();p();m();d();l();function Ci(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Is.has(e)||(Is.add(e),vi(t,...r))};var F=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};D(F,"PrismaClientInitializationError");c();u();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};D(X,"PrismaClientKnownRequestError");c();u();p();m();d();l();var ae=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};D(ae,"PrismaClientRustPanicError");c();u();p();m();d();l();var ne=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};D(ne,"PrismaClientUnknownRequestError");c();u();p();m();d();l();var ie=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};D(ie,"PrismaClientValidationError");c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Ce=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();u();p();m();d();l();function qe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();u();p();m();d();l();function Os(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}c();u();p();m();d();l();function nr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();u();p();m();d();l();function Ds(e){return{models:Si(e.models),enums:Si(e.enums),types:Si(e.types)}}function Si(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}c();u();p();m();d();l();function wt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function mn(e){return e.toString()!=="Invalid Date"}c();u();p();m();d();l();l();function bt(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();u();p();m();d();l();c();u();p();m();d();l();var or={};pt(or,{ModelAction:()=>ir,datamodelEnumToSchemaEnum:()=>ap});c();u();p();m();d();l();c();u();p();m();d();l();function ap(e){return{name:e.name,values:e.values.map(t=>t.name)}}c();u();p();m();d();l();var ir=(B=>(B.findUnique="findUnique",B.findUniqueOrThrow="findUniqueOrThrow",B.findFirst="findFirst",B.findFirstOrThrow="findFirstOrThrow",B.findMany="findMany",B.create="create",B.createMany="createMany",B.createManyAndReturn="createManyAndReturn",B.update="update",B.updateMany="updateMany",B.updateManyAndReturn="updateManyAndReturn",B.upsert="upsert",B.delete="delete",B.deleteMany="deleteMany",B.groupBy="groupBy",B.count="count",B.aggregate="aggregate",B.findRaw="findRaw",B.aggregateRaw="aggregateRaw",B))(ir||{});var lp=$e(Rs());var cp={red:ft,gray:cs,dim:en,bold:Xr,underline:tn,highlightSource:e=>e.highlight()},up={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function pp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function mp({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(dp(t))),i){a.push("");let w=[i.toString()];o&&(w.push(o),w.push(s.dim(")"))),a.push(w.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function dp(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function dn(e){let t=e.showColors?cp:up,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=pp(e),mp(r,t)}c();u();p();m();d();l();var qs=$e(Ii());c();u();p();m();d();l();function Ls(e,t,r){let n=Us(e),i=fp(n),o=yp(i);o?fn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Us(e){return e.errors.flatMap(t=>t.kind==="Union"?Us(t):[t])}function fp(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:gp(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function gp(e,t){return[...new Set(e.concat(t))]}function yp(e){return Ci(e,(t,r)=>{let n=Ms(t),i=Ms(r);return n!==i?n-i:Ns(t)-Ns(r)})}function Ms(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ns(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();u();p();m();d();l();var we=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();u();p();m();d();l();c();u();p();m();d();l();$s();c();u();p();m();d();l();var Et=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Fs();c();u();p();m();d();l();c();u();p();m();d();l();var gn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();u();p();m();d();l();var yn=e=>e,hn={bold:yn,red:yn,green:yn,dim:yn,enabled:!1},Vs={bold:Xr,red:ft,green:os,dim:en,enabled:!0},xt={write(e){e.writeLine(",")}};c();u();p();m();d();l();var Se=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();u();p();m();d();l();var Be=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Pt=class extends Be{items=[];addItem(t){return this.items.push(new gn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Se("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(xt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Tt=class e extends Be{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Pt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Se("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(xt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();u();p();m();d();l();var re=class extends Be{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Se(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();u();p();m();d();l();var sr=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(xt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function fn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":hp(e,t);break;case"IncludeOnScalar":wp(e,t);break;case"EmptySelection":bp(e,t,r);break;case"UnknownSelectionField":Tp(e,t);break;case"InvalidSelectionValue":vp(e,t);break;case"UnknownArgument":Ap(e,t);break;case"UnknownInputField":Rp(e,t);break;case"RequiredArgumentMissing":Cp(e,t);break;case"InvalidArgumentType":Sp(e,t);break;case"InvalidArgumentValue":Ip(e,t);break;case"ValueTooLarge":kp(e,t);break;case"SomeFieldsMissing":Op(e,t);break;case"TooManyFieldsGiven":Dp(e,t);break;case"Union":Ls(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function hp(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function wp(e,t){let[r,n]=vt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new we(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ar(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function bp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Ep(e,t,i);return}if(n.hasField("select")){xp(e,t);return}}if(r?.[qe(e.outputType.name)]){Pp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Ep(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new we(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function xp(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Qs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ar(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Pp(e,t){let r=new sr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new we("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=vt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Tt;f.addSuggestion(n),a.value=f}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Tp(e,t){let r=Hs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Qs(n,e.outputType);break;case"include":_p(n,e.outputType);break;case"omit":Mp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(ar(n)),i.join(" ")})}function vp(e,t){let r=Hs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Ap(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Np(n,e.arguments)),t.addErrorMessage(i=>Bs(i,r,e.arguments.map(o=>o.name)))}function Rp(e,t){let[r,n]=vt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Gs(o,e.inputType)}t.addErrorMessage(o=>Bs(o,n,e.inputType.fields.map(s=>s.name)))}function Bs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Up(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ar(e)),n.join(" ")}function Cp(e,t){let r;t.addErrorMessage(f=>r?.value instanceof re&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=vt(e.argumentPath),s=new sr,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new we(o,s).makeRequired())}else{let f=e.inputTypes.map(js).join(" | ");a.addSuggestion(new we(o,f).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,f]=vt(e.dependentArgumentPath);t.addErrorMessage(w=>`Argument \`${w.green(o)}\` is required because argument \`${w.green(f)}\` was provided.`)}}}function js(e){return e.kind==="list"?`${js(e.elementType)}[]`:e.name}function Sp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=wn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ip(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=wn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function kp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof re&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Op(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Gs(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${wn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ar(i)),o.join(" ")})}function Dp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${wn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Qs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,"true"))}function _p(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new we(r.name,"true"))}function Mp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new we(r.name,"true"))}function Np(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function Hs(e,t){let[r,n]=vt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Gs(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function vt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ar({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function wn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Lp=3;function Up(e,t){let r=1/0,n;for(let i of t){let o=(0,qs.default)(e,i);o>Lp||o`}};function At(e){return e instanceof lr}c();u();p();m();d();l();var bn=Symbol(),Oi=new WeakMap,Ne=class{constructor(t){t===bn?Oi.set(this,`Prisma.${this._getName()}`):Oi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Oi.get(this)}},cr=class extends Ne{_getNamespace(){return"NullTypes"}},ur=class extends cr{#t};Di(ur,"DbNull");var pr=class extends cr{#t};Di(pr,"JsonNull");var mr=class extends cr{#t};Di(mr,"AnyNull");var En={classes:{DbNull:ur,JsonNull:pr,AnyNull:mr},instances:{DbNull:new ur(bn),JsonNull:new pr(bn),AnyNull:new mr(bn)}};function Di(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();u();p();m();d();l();var Js=": ",xn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Js.length}write(t){let r=new Se(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Js).write(this.value)}};var _i=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function Rt(e){return new _i(Ws(e))}function Ws(e){let t=new Tt;for(let[r,n]of Object.entries(e)){let i=new xn(r,Ks(n));t.addField(i)}return t}function Ks(e){if(typeof e=="string")return new re(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new re(String(e));if(typeof e=="bigint")return new re(`${e}n`);if(e===null)return new re("null");if(e===void 0)return new re("undefined");if(bt(e))return new re(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new re(`Buffer.alloc(${e.byteLength})`):new re(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=mn(e)?e.toISOString():"Invalid Date";return new re(`new Date("${t}")`)}return e instanceof Ne?new re(`Prisma.${e._getName()}`):At(e)?new re(`prisma.${qe(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Fp(e):typeof e=="object"?Ws(e):new re(Object.prototype.toString.call(e))}function Fp(e){let t=new Pt;for(let r of e)t.addItem(Ks(r));return t}function Pn(e,t){let r=t==="pretty"?Vs:hn,n=e.renderAllMessages(r),i=new Et(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Tn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Rt(e);for(let R of t)fn(R,a,s);let{message:f,args:w}=Pn(a,r),A=dn({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:w});throw new ie(A,{clientVersion:o})}c();u();p();m();d();l();c();u();p();m();d();l();function Ie(e){return e.replace(/^./,t=>t.toLowerCase())}c();u();p();m();d();l();function Ys(e,t,r){let n=Ie(r);return!t.result||!(t.result.$allModels||t.result[n])?e:$p({...e,...zs(t.name,e,t.result.$allModels),...zs(t.name,e,t.result[n])})}function $p(e){let t=new Ce,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return pn(e,n=>({...n,needs:r(n.name,new Set)}))}function zs(e,t,r){return r?pn(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Vp(t,o,i)})):{}}function Vp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Zs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Xs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var vn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Ce;modelExtensionsCache=new Ce;queryCallbacksCache=new Ce;clientExtensions=nr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=nr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ys(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ie(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new vn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new vn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();u();p();m();d();l();var An=class{constructor(t){this.name=t}};function ea(e){return e instanceof An}function ta(e){return new An(e)}c();u();p();m();d();l();c();u();p();m();d();l();var ra=Symbol(),dr=class{constructor(t){if(t!==ra)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Rn:t}},Rn=new dr(ra);function ke(e){return e instanceof dr}var qp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},na="explicitly `undefined` values are not allowed";function Cn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A}){let R=new Mi({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A});return{modelName:e,action:qp[t],query:fr(r,R)}}function fr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:oa(r,n),selection:Bp(e,t,i,n)}}function Bp(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Gp(e,n)):jp(n,t,r)}function jp(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Qp(n,t,e),Hp(n,r,e),n}function Qp(e,t,r){for(let[n,i]of Object.entries(t)){if(ke(i))continue;let o=r.nestSelection(n);if(Ni(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=fr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=fr(i,o)}}function Hp(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Xs(i,n);for(let[s,a]of Object.entries(o)){if(ke(a))continue;Ni(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function Gp(e,t){let r={},n=t.getComputedFields(),i=Zs(e,n);for(let[o,s]of Object.entries(i)){if(ke(s))continue;let a=t.nestSelection(o);Ni(s,a);let f=t.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||ke(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=fr({},a):r[o]=!0;continue}r[o]=fr(s,a)}}return r}function ia(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(wt(e)){if(mn(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ea(e))return{$type:"Param",value:e.name};if(At(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Jp(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:y.from(r,n,i).toString("base64")}}if(Wp(e))return e.values;if(bt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ne){if(e!==En.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Kp(e))return e.toJSON();if(typeof e=="object")return oa(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function oa(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ke(i)||(i!==void 0?r[n]=ia(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:na}))}return r}function Jp(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[qe(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Me(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();u();p();m();d();l();function sa(e){if(!e._hasPreviewFlag("metrics"))throw new ie("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var St=class{_client;constructor(t){this._client=t}prometheus(t){return sa(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return sa(this._client),this._client._engine.metrics({format:"json",...t})}};c();u();p();m();d();l();function aa(e,t){let r=nr(()=>zp(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function zp(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();u();p();m();d();l();var Ui=new WeakMap,Sn="$$PrismaTypedSql",gr=class{constructor(t,r){Ui.set(this,{sql:t,values:r}),Object.defineProperty(this,Sn,{value:Sn})}get sql(){return Ui.get(this).sql}get values(){return Ui.get(this).values}};function la(e){return(...t)=>new gr(e,t)}function In(e){return e!=null&&e[Sn]===Sn}c();u();p();m();d();l();var eu=$e(Pi());c();u();p();m();d();l();ca();gs();xs();c();u();p();m();d();l();var fe=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();u();p();m();d();l();c();u();p();m();d();l();var On={enumerable:!0,configurable:!0,writable:!0};function Dn(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>On,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ma=Symbol.for("nodejs.util.inspect.custom");function Pe(e,t){let r=Yp(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=da(Reflect.ownKeys(o),r),a=da(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...On,...f?.getPropertyDescriptor(s)}:On:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ma]=function(){let o={...this};return delete o[ma],o},i}function Yp(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function da(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();u();p();m();d();l();function It(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();u();p();m();d();l();function kt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();u();p();m();d();l();function fa(e){if(e===void 0)return"";let t=Rt(e);return new Et(0,{colors:hn}).write(t).toString()}c();u();p();m();d();l();var Zp="P2037";function _n({error:e,user_facing_error:t},r,n){return t.error_code?new X(Xp(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ne(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Xp(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Zp&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Vi=class{getLocation(){return null}};function je(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Vi}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var ga={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ot(e={}){let t=tm(e);return Object.entries(t).reduce((n,[i,o])=>(ga[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function tm(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Mn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ya(e,t){let r=Mn(e);return t({action:"aggregate",unpacker:r,argsMapper:Ot})(e)}c();u();p();m();d();l();function rm(e={}){let{select:t,...r}=e;return typeof t=="object"?Ot({...r,_count:t}):Ot({...r,_count:{_all:!0}})}function nm(e={}){return typeof e.select=="object"?t=>Mn(e)(t)._count:t=>Mn(e)(t)._count._all}function ha(e,t){return t({action:"count",unpacker:nm(e),argsMapper:rm})(e)}c();u();p();m();d();l();function im(e={}){let t=Ot(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function om(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function wa(e,t){return t({action:"groupBy",unpacker:om(e),argsMapper:im})(e)}function ba(e,t,r){if(t==="aggregate")return n=>ya(n,r);if(t==="count")return n=>ha(n,r);if(t==="groupBy")return n=>wa(n,r)}c();u();p();m();d();l();function Ea(e,t){let r=t.fields.filter(i=>!i.relationName),n=Os(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new lr(e,o,s.type,s.isList,s.kind==="enum")},...Dn(Object.keys(n))})}c();u();p();m();d();l();c();u();p();m();d();l();var xa=e=>Array.isArray(e)?e:e.split("."),qi=(e,t)=>xa(t).reduce((r,n)=>r&&r[n],e),Pa=(e,t,r)=>xa(t).reduceRight((n,i,o,s)=>Object.assign({},qi(e,s.slice(0,o)),{[i]:n}),r);function sm(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function am(e,t,r){return t===void 0?e??{}:Pa(t,r,e||!0)}function Bi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,w)=>({...f,[w.name]:w}),{});return f=>{let w=je(e._errorFormat),A=sm(n,i),R=am(f,o,A),S=r({dataPath:A,callsite:w})(R),C=lm(e,t);return new Proxy(S,{get(L,k){if(!C.includes(k))return L[k];let De=[a[k].type,r,k],ue=[A,R];return Bi(e,...De,...ue)},...Dn([...C,...Object.getOwnPropertyNames(S)])})}}function lm(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var cm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],um=["aggregate","count","groupBy"];function ji(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[pm(e,t),dm(e,t),yr(r),le("name",()=>t),le("$name",()=>t),le("$parent",()=>e._appliedParent)];return Pe({},n)}function pm(e,t){let r=Ie(t),n=Object.keys(ir).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let w=je(e._errorFormat);return e._createPrismaPromise(A=>{let R={args:f,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:A,callsite:w};return e._request({...R,...a})},{action:o,args:f,model:t})};return cm.includes(o)?Bi(e,t,s):mm(i)?ba(e,i,s):s({})}}}function mm(e){return um.includes(e)}function dm(e,t){return et(le("fields",()=>{let r=e._runtimeDataModel.models[t];return Ea(t,r)}))}c();u();p();m();d();l();function Ta(e){return e.replace(/^./,t=>t.toUpperCase())}var Qi=Symbol();function hr(e){let t=[fm(e),gm(e),le(Qi,()=>e),le("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(yr(r)),Pe(e,t)}function fm(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function gm(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ie),n=[...new Set(t.concat(r))];return et({getKeys(){return n},getPropertyValue(i){let o=Ta(i);if(e._runtimeDataModel.models[o]!==void 0)return ji(e,o);if(e._runtimeDataModel.models[i]!==void 0)return ji(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function va(e){return e[Qi]?e[Qi]:e}function Aa(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return hr(t)}c();u();p();m();d();l();c();u();p();m();d();l();function Ra({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let w=f.needs.filter(A=>n[A]);w.length>0&&a.push(It(w))}else if(r){if(!r[f.name])continue;let w=f.needs.filter(A=>!r[A]);w.length>0&&a.push(It(w))}ym(e,f.needs)&&s.push(hm(f,Pe(e,s)))}return s.length>0||a.length>0?Pe(e,[...s,...a]):e}function ym(e,t){return t.every(r=>Ri(e,r))}function hm(e,t){return et(le(e.name,()=>e.compute(t)))}c();u();p();m();d();l();function Nn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sA.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let w=typeof s=="object"?s:{};t[o]=Nn({visitor:i,result:t[o],args:w,modelName:f.type,runtimeDataModel:n})}}function Sa({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Nn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,w)=>{let A=Ie(f);return Ra({result:a,modelName:A,select:w.select,omit:w.select?void 0:{...o?.[A],...w.omit},extensions:n})}})}c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();var wm=["$connect","$disconnect","$on","$transaction","$extends"],Ia=wm;function ka(e){if(e instanceof fe)return bm(e);if(In(e))return Em(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ka(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=La(o,f),a.args=s,Da(e,a,r,n+1)}})})}function _a(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Da(e,t,s)}function Ma(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Na(r,n,0,e):e(r)}}function Na(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=La(i,f),Na(a,t,r+1,n)}})}var Oa=e=>e;function La(e=Oa,t=Oa){return r=>e(t(r))}c();u();p();m();d();l();var Ua=K("prisma:client"),Fa={Vercel:"vercel","Netlify CI":"netlify"};function $a({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(Ua("checkPlatformCaching:postinstall",e),Ua("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in Fa){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${Fa[t]}-build`;throw console.error(i),new F(i,r)}}c();u();p();m();d();l();function Va(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();function qa(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}c();u();p();m();d();l();function Ba(e){return e.split(` +`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}c();u();p();m();d();l();var ja=$e(Ss());function Qa({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ja.default)({user:t,repo:r,template:n,title:e,body:i})}function Ha({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=ms(6e3-(s?.length??0)),f=Ba(ht(a)),w=n?`# Description +\`\`\` +${n} +\`\`\``:"",A=ht(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${g.version?.padEnd(19)}| +| OS | ${t?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${w} + +## Logs +\`\`\` +${f} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?qa(s):""} +\`\`\` +`),R=Qa({title:r,body:A});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${tn(R)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();l();function $(e,t){throw new Error(t)}function Hi(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Hi(e[r],t[r]))}function Dt(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(se.isDecimal(e[o])||se.isDecimal(t[o])){let s=Ga(e[o]),a=Ga(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=Ja(e[o]),a=Ja(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return Wa(e[o])?.getTime()===Wa(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return Ka(e[o])===Ka(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return za(e[o])===za(t[o])}return Hi(e[o],t[o])})}function Ga(e){return se.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new se(e):void 0}function Ja(e){return y.isBuffer(e)?e:e instanceof Uint8Array?y.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?y.from(e,"base64"):void 0}function Wa(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function Ka(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function za(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function br(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():ArrayBuffer.isView(r)?y.from(r.buffer,r.byteOffset,r.byteLength).toString("base64"):r)}function xm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Pm(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Qe(e){return e===null?e:Array.isArray(e)?e.map(Qe):typeof e=="object"?xm(e)?Tm(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Pm(e,Qe):e}function Tm({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=y.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new v(t);case"Json":return JSON.parse(t);default:$(t,"Unknown tagged value")}}c();u();p();m();d();l();var ce=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function _t(e){if(!nn(e))throw e;let t=vm(e),r=Ya(e);throw!t||!r?e:new ce(r,t,{driverAdapterError:e})}function Ji(e){throw nn(e)?new ce(`Raw query failed. Code: \`${e.cause.originalCode??"N/A"}\`. Message: \`${e.cause.originalMessage??Ya(e)}\``,"P2010",{driverAdapterError:e}):e}function vm(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function Ya(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${Gi(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${Gi(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${Gi(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Error in connector: Conversion error: ${e.cause.level}`;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function Gi(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}function Za(e,t){let r=e.map(i=>t.keys.reduce((o,s)=>(o[s]=Qe(i[s]),o),{})),n=new Set(t.nestedSelection);return t.arguments.map(i=>{let o=r.findIndex(s=>Dt(s,i));if(o===-1)return t.expectNonEmpty?new ce("An operation failed because it depends on one or more records that were required but not found","P2025"):null;{let s=Object.entries(e[o]).filter(([a])=>n.has(a));return Object.fromEntries(s)}})}c();u();p();m();d();l();l();var G=class extends Error{name="DataMapperError"};function el(e,t,r){switch(t.type){case"affectedRows":if(typeof e!="number")throw new G(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"object":return Ki(e,t.fields,r,t.skipNulls);case"field":return Wi(e,"",t.fieldType,r);default:$(t,`Invalid data mapping type: '${t.type}'`)}}function Ki(e,t,r,n){if(e===null)return null;if(Array.isArray(e)){let i=e;return n&&(i=i.filter(o=>o!==null)),i.map(o=>Xa(o,t,r))}if(typeof e=="object")return Xa(e,t,r);if(typeof e=="string"){let i;try{i=JSON.parse(e)}catch(o){throw new G("Expected an array or object, got a string that is not valid JSON",{cause:o})}return Ki(i,t,r,n)}throw new G(`Expected an array or an object, got: ${typeof e}`)}function Xa(e,t,r){if(typeof e!="object")throw new G(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"affectedRows":throw new G(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new G(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=Ki(s,o.fields,r,o.skipNulls);break}case"field":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=Am(e[s],s,o.fieldType,r);else throw new G(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:$(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function Am(e,t,r,n){return e===null?r.arity==="list"?[]:null:r.arity==="list"?e.map((o,s)=>Wi(o,`${t}[${s}]`,r,n)):Wi(e,t,r,n)}function Wi(e,t,r,n){switch(r.type){case"unsupported":return e;case"string":{if(typeof e!="string")throw new G(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new G(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new G(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new G(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"bigint":{if(typeof e!="number"&&typeof e!="string")throw new G(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new G(`Expected a float in column '${t}', got string: ${e}`);return i}throw new G(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new G(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(Array.isArray(e)){for(let i of e)if(i!==0)return!0;return!1}throw new G(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"decimal":if(typeof e!="number"&&typeof e!="string"&&!se.isDecimal(e))throw new G(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"datetime":{if(typeof e=="string")return{$type:"DateTime",value:Cm(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new G(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"object":return{$type:"Json",value:br(e)};case"json":return{$type:"Json",value:`${e}`};case"bytes":{switch(r.encoding){case"base64":if(typeof e!="string")throw new G(`Expected a base64-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:e};case"hex":if(typeof e!="string"||!e.startsWith("\\x"))throw new G(`Expected a hex-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:y.from(e.slice(2),"hex").toString("base64")};case"array":if(Array.isArray(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:y.from(e).toString("base64")};throw new G(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`);default:$(r.encoding,`DataMapper: Unknown bytes encoding: ${r.encoding}`)}break}case"enum":{let i=n[r.name];if(i===void 0)throw new G(`Unknown enum '${r.name}'`);let o=i[`${e}`];if(o===void 0)throw new G(`Value '${e}' not found in enum '${r.name}'`);return o}default:$(r,`DataMapper: Unknown result type: ${r.type}`)}}var Rm=/\d{2}:\d{2}:\d{2}(?:\.\d+)?(Z|[+-]\d{2}(:?\d{2})?)?$/;function Cm(e){let t=Rm.exec(e);if(t===null)return`${e}T00:00:00Z`;let r=e,[n,i,o]=t;if(i!==void 0&&i!=="Z"&&o===void 0?r=`${e}:00`:i===void 0&&(r=`${e}Z`),n.length===e.length)return`1970-01-01T${r}`;let s=t.index-1;return r[s]===" "&&(r=`${r.slice(0,s)}T${r.slice(s+1)}`),r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Er;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Er||(Er={}));function Sm(e){switch(e){case"postgresql":case"postgres":case"prisma+postgres":return"postgresql";case"sqlserver":return"mssql";case"mysql":case"sqlite":case"cockroachdb":case"mongodb":return e;default:$(e,`Unknown provider: ${e}`)}}async function Ln({query:e,tracingHelper:t,provider:r,onQuery:n,execute:i}){return await t.runInChildSpan({name:"db_query",kind:Er.CLIENT,attributes:{"db.query.text":e.sql,"db.system.name":Sm(r)}},async()=>{let o=new Date,s=b.now(),a=await i(),f=b.now();return n?.({timestamp:o,duration:f-s,query:e.sql,params:e.args}),a})}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();function tt(e,t){var r="000000000"+e;return r.substr(r.length-t)}var tl=$e(ys(),1);function Im(){try{return tl.default.hostname()}catch{return g.env._CLUSTER_NETWORK_NAME_||g.env.COMPUTERNAME||"hostname"}}var rl=2,km=tt(g.pid.toString(36),rl),nl=Im(),Om=nl.length,Dm=tt(nl.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+Om+36).toString(36),rl);function zi(){return km+Dm}c();u();p();m();d();l();c();u();p();m();d();l();function Un(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function Yi(e){let n=Math.pow(36,4),i=0;function o(){return tt((Math.random()*n<<0).toString(36),4)}function s(){return i=int.length&&(Xt.getRandomValues(nt),Lt=0),Lt+=e}function so(e=21){Ed(e|=0);let t="";for(let r=Lt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(yt?.randomBytes)return()=>yt.randomBytes(1).readUInt8()/255;throw new ot(it.PRNGDetectFailure,"Failed to find a reliable PRNG")}function vd(){return Cd()?self:typeof window<"u"?window:typeof globalThis<"u"||typeof globalThis<"u"?globalThis:null}function Ad(e,t){let r="";for(;e>0;e--)r=Pd(t)+r;return r}function Rd(e,t=Zl){if(isNaN(e))throw new ot(it.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>zl)throw new ot(it.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${zl}: ${e}`);if(e<0)throw new ot(it.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new ot(it.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%Rr,n=Yl.charAt(r)+n,e=(e-r)/Rr;return n}function Cd(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Xl(e,t){let r=t||Td(),n=!e||isNaN(e)?Date.now():e;return Rd(n,Zl)+Ad(xd,r)}c();u();p();m();d();l();c();u();p();m();d();l();var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function qn(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}c();u();p();m();d();l();Xe();var jn=new Uint8Array(256),Bn=jn.length;function Ut(){return Bn>jn.length-16&&(sn(jn),Bn=0),jn.slice(Bn,Bn+=16)}c();u();p();m();d();l();c();u();p();m();d();l();Xe();var ao={randomUUID:on};function Sd(e,t,r){if(ao.randomUUID&&!t&&!e)return ao.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ut();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return qn(n)}var lo=Sd;c();u();p();m();d();l();var co={};function Id(e,t,r){let n;if(e)n=ec(e.random??e.rng?.()??Ut(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Ut();kd(co,i,o),n=ec(o,co.msecs,co.seq,t,r)}return t??qn(n)}function kd(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function ec(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var uo=Id;var Qn=class{#t={};constructor(){this.register("uuid",new mo),this.register("cuid",new fo),this.register("ulid",new go),this.register("nanoid",new yo),this.register("product",new ho)}snapshot(){return Object.create(this.#t,{now:{value:new po}})}register(t,r){this.#t[t]=r}},po=class{#t=new Date;generate(){return this.#t.toISOString()}},mo=class{generate(t){if(t===4)return lo();if(t===7)return uo();throw new Error("Invalid UUID generator arguments")}},fo=class{generate(t){if(t===1)return il();if(t===2)return(0,tc.createId)();throw new Error("Invalid CUID generator arguments")}},go=class{generate(){return Xl()}},yo=class{generate(t){if(typeof t=="number")return so(t);if(t===void 0)return so();throw new Error("Invalid Nanoid generator arguments")}},ho=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};c();u();p();m();d();l();function Hn(e,t){return e==null?e:typeof e=="string"?Hn(JSON.parse(e),t):Array.isArray(e)?Dd(e,t):Od(e,t)}function Od(e,t){if(t.pagination){let{skip:r,take:n,cursor:i}=t.pagination;if(r!==null&&r>0||n===0||i!==null&&!Dt(e,i))return null}return nc(e,t.nested)}function nc(e,t){for(let[r,n]of Object.entries(t))e[r]=Hn(e[r],n);return e}function Dd(e,t){if(t.distinct!==null){let r=t.linkingFields!==null?[...t.distinct,...t.linkingFields]:t.distinct;e=_d(e,r)}return t.pagination&&(e=Md(e,t.pagination,t.linkingFields)),t.reverse&&e.reverse(),Object.keys(t.nested).length===0?e:e.map(r=>nc(r,t.nested))}function _d(e,t){let r=new Set,n=[];for(let i of e){let o=Ft(i,t);r.has(o)||(r.add(o),n.push(i))}return n}function Md(e,t,r){if(r===null)return rc(e,t);let n=new Map;for(let o of e){let s=Ft(o,r);n.has(s)||n.set(s,[]),n.get(s).push(o)}let i=Array.from(n.entries());return i.sort(([o],[s])=>os?1:0),i.flatMap(([,o])=>rc(o,t))}function rc(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>Dt(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Ft(e,t){return JSON.stringify(t.map(r=>e[r]))}c();u();p();m();d();l();c();u();p();m();d();l();function wo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function bo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function Po(e,t,r,n){let i=e.args.map(o=>Te(o,t,r));switch(e.type){case"rawSql":return[Ud(e.sql,i,e.argTypes)];case"templateSql":return(e.chunkable?$d(e.fragments,i,n):[i]).map(s=>{if(n!==void 0&&s.length>n)throw new ce("The query parameter limit supported by your database is exceeded.","P2029");return Nd(e.fragments,e.placeholderFormat,s,e.argTypes)});default:$(e.type,"Invalid query type")}}function Te(e,t,r){for(;Fd(e);)if(wo(e)){let n=t[e.prisma__value.name];if(n===void 0)throw new Error(`Missing value for query variable ${e.prisma__value.name}`);e=n}else if(bo(e)){let{name:n,args:i}=e.prisma__value,o=r[n];if(!o)throw new Error(`Encountered an unknown generator '${n}'`);e=o.generate(...i.map(s=>Te(s,t,r)))}else $(e,`Unexpected unevaluated value type: ${e}`);return Array.isArray(e)&&(e=e.map(n=>Te(n,t,r))),e}function Nd(e,t,r,n){let i="",o={placeholderNumber:1},s=[],a=[];for(let f of xo(e,r,n)){if(i+=Ld(f,t,o),f.type==="stringChunk")continue;let w=s.length,A=s.push(...ic(f))-w;if(f.argType.arity==="tuple"){if(A%f.argType.elements.length!==0)throw new Error(`Malformed query template. Expected the number of parameters to match the tuple arity, but got ${A} parameters for a tuple of arity ${f.argType.elements.length}.`);for(let R=0;REo(t,r.placeholderNumber++)).join(",")})`;case"parameterTupleList":return e.value.map(i=>{let o=i.map(()=>Eo(t,r.placeholderNumber++)).join(e.itemSeparator);return`${e.itemPrefix}${o}${e.itemSuffix}`}).join(e.groupSeparator);default:$(n,"Invalid fragment type")}}function Eo(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function Ud(e,t,r){return{sql:e,args:t,argTypes:r}}function Fd(e){return wo(e)||bo(e)}function*xo(e,t,r){let n=0;for(let i of e)switch(i.type){case"parameter":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);yield{...i,value:t[n],argType:r?.[n]},n++;break}case"stringChunk":{yield i;break}case"parameterTuple":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];yield{...i,value:Array.isArray(o)?o:[o],argType:r?.[n]},n++;break}case"parameterTupleList":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];if(!Array.isArray(o))throw new Error("Malformed query template. Tuple list expected.");if(o.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");for(let s of o)if(!Array.isArray(s))throw new Error("Malformed query template. Tuple expected.");yield{...i,value:o,argType:r?.[n]},n++;break}}}function*ic(e){switch(e.type){case"parameter":yield e.value;break;case"stringChunk":break;case"parameterTuple":yield*e.value;break;case"parameterTupleList":for(let t of e.value)yield*t;break}}function $d(e,t,r){let n=0,i=0;for(let s of xo(e,t,void 0)){let a=0;for(let f of ic(s))a++;i=Math.max(i,a),n+=a}let o=[[]];for(let s of xo(e,t,void 0))switch(s.type){case"parameter":{for(let a of o)a.push(s.value);break}case"stringChunk":break;case"parameterTuple":{let a=s.value.length,f=[];if(r&&o.length===1&&a===i&&n>r&&n-af.map(A=>[...w,A]));break}case"parameterTupleList":{let a=s.value.reduce((R,S)=>R+S.length,0),f=[],w=[],A=0;for(let R of s.value)r&&o.length===1&&a===i&&w.length>0&&n-a+A+R.length>r&&(f.push(w),w=[],A=0),w.push(R),A+=R.length;w.length>0&&f.push(w),o=o.flatMap(R=>f.map(S=>[...R,S]));break}}return o}function Vd(e,t){let r=[];for(let n=0;nt.reduce((r,n,i)=>(r[e.columnNames[i]]=n,r),{}))}function sc(e){return{columns:e.columnNames,types:e.columnTypes.map(t=>qd(t)),rows:e.rows.map(t=>t.map((r,n)=>$t(r,e.columnTypes[n])))}}function $t(e,t){if(e===null)return null;switch(t){case O.Int32:switch(typeof e){case"number":return Math.trunc(e);case"string":return Math.trunc(Number(e));default:throw new Error(`Cannot serialize value of type ${typeof e} as Int32`)}case O.Int32Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int32Array`);return e.map(r=>$t(r,O.Int32));case O.Int64:switch(typeof e){case"number":return BigInt(Math.trunc(e));case"string":return e;default:throw new Error(`Cannot serialize value of type ${typeof e} as Int64`)}case O.Int64Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int64Array`);return e.map(r=>$t(r,O.Int64));case O.Json:switch(typeof e){case"string":return JSON.parse(e);default:throw new Error(`Cannot serialize value of type ${typeof e} as Json`)}case O.JsonArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as JsonArray`);return e.map(r=>$t(r,O.Json));case O.Bytes:if(Array.isArray(e))return new Uint8Array(e);throw new Error(`Cannot serialize value of type ${typeof e} as Bytes`);case O.BytesArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BytesArray`);return e.map(r=>$t(r,O.Bytes));case O.Boolean:switch(typeof e){case"boolean":return e;case"string":return e==="true"||e==="1";case"number":return e===1;default:throw new Error(`Cannot serialize value of type ${typeof e} as Boolean`)}case O.BooleanArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BooleanArray`);return e.map(r=>$t(r,O.Boolean));default:return e}}function qd(e){switch(e){case O.Int32:return"int";case O.Int64:return"bigint";case O.Float:return"float";case O.Double:return"double";case O.Text:return"string";case O.Enum:return"enum";case O.Bytes:return"bytes";case O.Boolean:return"bool";case O.Character:return"char";case O.Numeric:return"decimal";case O.Json:return"json";case O.Uuid:return"uuid";case O.DateTime:return"datetime";case O.Date:return"date";case O.Time:return"time";case O.Int32Array:return"int-array";case O.Int64Array:return"bigint-array";case O.FloatArray:return"float-array";case O.DoubleArray:return"double-array";case O.TextArray:return"string-array";case O.EnumArray:return"string-array";case O.BytesArray:return"bytes-array";case O.BooleanArray:return"bool-array";case O.CharacterArray:return"char-array";case O.NumericArray:return"decimal-array";case O.JsonArray:return"json-array";case O.UuidArray:return"uuid-array";case O.DateTimeArray:return"datetime-array";case O.DateArray:return"date-array";case O.TimeArray:return"time-array";case O.UnknownNumber:return"unknown";case O.Set:return"string";default:$(e,`Unexpected column type: ${e}`)}}c();u();p();m();d();l();function ac(e,t,r){if(!t.every(n=>To(e,n))){let n=Bd(e,r),i=jd(r);throw new ce(n,i,r.context)}}function To(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:$(t,`Unknown rule type: ${t.type}`)}}function Bd(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:$(t,`Unknown error identifier: ${t}`)}}function jd(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:$(e,`Unknown error identifier: ${e}`)}}var Cr=class e{#t;#e;#r;#n=new Qn;#s;#i;#a;#o;#c;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a,connectionInfo:f}){this.#t=t,this.#e=r,this.#r=n,this.#s=i,this.#i=o,this.#a=s??o,this.#o=a,this.#c=f}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:oc,rawSerializer:sc,provider:t.provider,connectionInfo:t.connectionInfo})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#e,this.#n.snapshot()).catch(i=>_t(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:Te(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!lc(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(vo(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>Oe(s)+Oe(a)):0}}case"execute":{let o=Po(t.args,n,i,this.#l()),s=0;for(let a of o)s+=await this.#u(a,r,()=>r.executeRaw(a).catch(f=>t.args.type==="rawSql"?Ji(f):_t(f)));return{value:s}}case"query":{let o=Po(t.args,n,i,this.#l()),s;for(let a of o){let f=await this.#u(a,r,()=>r.queryRaw(a).catch(w=>t.args.type==="rawSql"?Ji(w):_t(w)));s===void 0?s=f:(s.rows.push(...f.rows),s.lastInsertId=f.lastInsertId)}return{value:t.args.type==="rawSql"?this.#a(s):this.#i(s),lastInsertId:s?.lastInsertId}}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(lc(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:cc(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async f=>({joinExpr:f,childRecords:(await this.interpretNode(f.child,r,n,i)).value})));return{value:Qd(o,a),lastInsertId:s}}case"transaction":{if(!this.#t.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#t.manager,s=await o.startInternalTransaction(),a=await o.getTransaction(s,"query");try{let f=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),f}catch(f){throw await o.rollbackTransaction(s.id),f}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:el(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return ac(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return To(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=w=>w!==null?Ft(Gn(w),t.args.fields):null,f=new Set(vo(s).map(a));return{value:vo(o).filter(w=>!f.has(a(w)))}}case"process":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:Hn(o,t.args.operations),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,f]of Object.entries(t.args.fields))s[a]=Hd(f,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:Gn(o);for(let[f,w]of Object.entries(t.args.fields))a[f]=Gd(w,a[f],n,i);return{value:a,lastInsertId:s}}default:$(t,`Unexpected node type: ${t.type}`)}}#l(){return this.#c?.maxBindValues!==void 0?this.#c.maxBindValues:this.#p()}#p(){if(this.#o!==void 0)switch(this.#o){case"cockroachdb":case"postgres":case"postgresql":case"prisma+postgres":return 32766;case"mysql":return 65535;case"sqlite":return 999;case"sqlserver":return 2098;case"mongodb":return;default:$(this.#o,`Unexpected provider: ${this.#o}`)}}#u(t,r,n){return Ln({query:t,execute:n,provider:this.#o??r.provider,tracingHelper:this.#s,onQuery:this.#r})}};function lc(e){return Array.isArray(e)?e.length===0:e==null}function vo(e){return Array.isArray(e)?e:[e]}function Oe(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function Gn(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function cc(e,t){return Array.isArray(e)?e.map(r=>cc(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function Qd(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let f=Gn(a),w=Ft(f,i);s[w]||(s[w]=[]),s[w].push(f),r.isRelationUnique?f[r.parentField]=null:f[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let f=Ft(Gn(a),o);for(let w of s[f]??[])r.isRelationUnique?w[r.parentField]=a:w[r.parentField].push(a)}}return e}function Hd(e,t,r,n){switch(e.type){case"value":return Te(e.value,r,n);case"lastInsertId":return t;default:$(e,`Unexpected field initializer type: ${e.type}`)}}function Gd(e,t,r,n){switch(e.type){case"set":return Te(e.value,r,n);case"add":return Oe(t)+Oe(Te(e.value,r,n));case"subtract":return Oe(t)-Oe(Te(e.value,r,n));case"multiply":return Oe(t)*Oe(Te(e.value,r,n));case"divide":{let i=Oe(t),o=Oe(Te(e.value,r,n));return o===0?null:i/o}default:$(e,`Unexpected field operation type: ${e.type}`)}}c();u();p();m();d();l();c();u();p();m();d();l();async function Jd(){return globalThis.crypto??await Promise.resolve().then(()=>(Xe(),xi))}async function uc(){return(await Jd()).randomUUID()}c();u();p();m();d();l();var Ee=class extends ce{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Sr=class extends Ee{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},Jn=class extends Ee{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Wn=class extends Ee{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},Kn=class extends Ee{constructor(){super("Unable to start a transaction in the given time.")}},zn=class extends Ee{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.`,{operation:t,timeout:r,timeTaken:n})}},Vt=class extends Ee{constructor(t){super(`Internal Consistency Error: ${t}`)}},Yn=class extends Ee{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var Wd=100,Ir=K("prisma:client:transactionManager"),Kd=()=>({sql:"COMMIT",args:[],argTypes:[]}),zd=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),Yd=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),Zd=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),kr=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#t;#e;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#t=i,this.#e=o}async startInternalTransaction(t){let r=t!==void 0?this.#a(t):{};return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(r))}async startTransaction(t){let r=t!==void 0?this.#a(t):this.transactionOptions;return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(r))}async#r(t){let r={id:await uc(),status:"waiting",timer:void 0,timeout:t.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(r.id,r);let n=!1,i=pc(()=>n=!0,t.maxWait);switch(i?.unref?.(),r.transaction=await this.driverAdapter.startTransaction(t.isolationLevel).catch(_t),clearTimeout(i),r.status){case"waiting":if(n)throw await this.#i(r,"timed_out"),new Kn;return r.status="running",r.timer=this.#s(r.id,t.timeout),{id:r.id};case"timed_out":case"running":case"committed":case"rolled_back":throw new Vt(`Transaction in invalid state ${r.status} although it just finished startup.`);default:$(r.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.#n(t,"commit");await this.#i(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.#n(t,"rollback");await this.#i(r,"rolled_back")})}async getTransaction(t,r){let n=this.#n(t.id,r);if(n.status==="closing"&&(await n.closing,n=this.#n(t.id,r)),!n.transaction)throw new Sr;return n.transaction}#n(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(Ir("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new Vt("Active transaction found in closed transactions list.");case"committed":throw new Jn(r);case"rolled_back":throw new Wn(r);case"timed_out":throw new zn(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw Ir("Transaction not found.",t),new Sr}if(["committed","rolled_back","timed_out"].includes(n.status))throw new Vt("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.#i(t,"rolled_back")))}#s(t,r){let n=Date.now(),i=pc(async()=>{Ir("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let o=this.transactions.get(t);o&&["running","waiting"].includes(o.status)?await this.#i(o,"timed_out"):Ir("Transaction already committed or rolled back when timeout happened.",t)},r);return i?.unref?.(),i}async#i(t,r){let n=async()=>{Ir("Closing transaction.",{transactionId:t.id,status:r});try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#o(Yd(),t.transaction,()=>t.transaction.commit());else{let i=Kd();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#o(Zd(),t.transaction,()=>t.transaction.rollback());else{let i=zd();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>Wd&&this.closedTransactions.shift()}};t.status==="closing"?(await t.closing,this.#n(t.id,r==="committed"?"commit":"rollback")):await Object.assign(t,{status:"closing",reason:r,closing:n()}).closing}#a(t){if(!t.timeout)throw new Ee("timeout is required");if(!t.maxWait)throw new Ee("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new Yn(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#o(t,r,n){return Ln({query:t,execute:n,provider:this.#e??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#t})}};function pc(e,t){return t!==void 0?setTimeout(e,t):void 0}var Zn="6.19.0";c();u();p();m();d();l();var Xn=class e{#t;#e;#r;#n;constructor(t,r,n){this.#t=t,this.#e=r,this.#r=n,this.#n=r.getConnectionInfo?.()}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new kr({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#n??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#e.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?await this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#e;return await Cr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#t.onQuery,tracingHelper:this.#t.tracingHelper,provider:this.#t.provider,connectionInfo:this.#n}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#e.dispose()}}apiKey(){return null}};c();u();p();m();d();l();c();u();p();m();d();l();var ei=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function mc(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!ei.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!ei.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!ei.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!ei.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!ef(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function ef(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function dc(e,t){let r=(e||"").split(";").filter(f=>typeof f=="string"&&!!f.trim()),n=r.shift()||"",i=tf(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let f of r){let w=f.split("="),A=(w.shift()||"").trimStart().toLowerCase(),R=w.join("=");switch(A){case"expires":{a.expires=new Date(R);break}case"max-age":{a.maxAge=Number.parseInt(R,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=R;break}default:a[A]=R}}return a}function tf(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var rf=()=>globalThis.process?.release?.name==="node",nf=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,of=()=>!!globalThis.Deno,sf=()=>typeof globalThis.Netlify=="object",af=()=>typeof globalThis.EdgeRuntime=="object",lf=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function cf(){return[[sf,"netlify"],[af,"edge-light"],[lf,"workerd"],[of,"deno"],[nf,"bun"],[rf,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var uf={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function ti(){let e=cf();return{id:e,prettyName:uf[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function qt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw ti().id==="workerd"?new F(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new F(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new F("error: Missing URL environment variable, value, or override.",n);return i}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var ri=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ge=class extends ri{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};c();u();p();m();d();l();function N(e,t){return{...e,isRetryable:t}}var st=class extends ge{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,N(r,!1))}};D(st,"InvalidDatasourceError");function ni(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=qt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof g<"u"?g.env:{}}}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==ln)throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let f=Ti(i)?"http:":"https:";g.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(f="http:");let w=new URL(i.href.replace(o,f));return{apiKey:a,url:w}}c();u();p();m();d();l();var fc=$e(Ts()),Bt=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":fc.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#t();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#t(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};c();u();p();m();d();l();function pf(e){return e[0]*1e3+e[1]/1e6}function jt(e){return new Date(pf(e))}var gc=K("prisma:client:clientEngine:remoteExecutor"),ii=class{#t;#e;#r;#n;#s;constructor(t){this.#t=t.clientVersion,this.#n=t.logEmitter,this.#s=t.tracingHelper;let{url:r,apiKey:n}=ni({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new Ao(r),this.#e=new Bt({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}apiKey(){return this.#e.apiKey}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#e.build(),body:n,fetch:i});s.ok||await this.#a(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#o(a.extensions),a}async#a(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new X(s,{clientVersion:this.#t,code:n??"P6000",batchRequestIdx:r,meta:a})}#o(t){if(t.logs)for(let r of t.logs)this.#c(r);t.traces&&this.#s.dispatchEngineSpans(t.traces)}#c(t){switch(t.level){case"debug":case"trace":gc(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:jt(t.timestamp),message:t.attributes.message??"",target:t.target??"RemoteExecutor"});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:jt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target??"RemoteExecutor"});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},Ao=class{#t;#e;#r;constructor(t){this.#t=t,this.#e=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#t),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let f=await o(s.href,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return gc(t,s,f.status,f.statusText),this.#r=f.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#s(s,f),f}#n(t){let r=[],n=new Date;for(let[i,o]of this.#e){if(o.expires&&o.expires0?r.join("; "):void 0}#s(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=dc(i),s=o.domain??t.hostname,a=o.path??"/",f=`${s}:${a}:${o.name}`;this.#e.set(f,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};c();u();p();m();d();l();var Ro={},yc={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new F("WASM query compiler was unexpectedly `undefined`",t);let n;return e.activeProvider===void 0||Ro[e.activeProvider]===void 0?(n=(async()=>{let i=await r.getRuntime(),o=await r.getQueryCompilerWasmModule();if(o==null)throw new F("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let s={"./query_compiler_bg.js":i},a=new WebAssembly.Instance(o,s),f=a.exports.__wbindgen_start;return i.__wbg_set_wasm(a.exports),f(),i.QueryCompiler})(),e.activeProvider!==void 0&&(Ro[e.activeProvider]=n)):n=Ro[e.activeProvider],await n}};var mf="P2038",Or=K("prisma:client:clientEngine"),wc=globalThis;wc.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new ae(e,Zn)}};var Dr=class{name="ClientEngine";#t;#e={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#s;constructor(t,r,n){if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},Or("Using driver adapter: %O",t.adapter);else throw new F("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,mf);this.#r=n??yc,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#s=i=>{this.logEmitter.emit("query",{...i,params:br(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#e.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#a(),n=await this.#o(r)}catch(o){throw this.#e={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#e={type:"connected",engine:i},i});return this.#e={type:"connecting",promise:t},await t}case"connecting":return await this.#e.promise;case"connected":return this.#e.engine;case"disconnecting":return await this.#e.promise,await this.#i()}}async#a(){return this.#n.remote?new ii({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await Xn.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#m(this.config.transactionOptions.isolationLevel)},onQuery:this.#s,provider:this.config.activeProvider})}async#o(t){let r=this.#t;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#t=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#u(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#c(o)}}#c(t){if(t instanceof ae)return t;try{let r=JSON.parse(t.message);return new F(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#l(t,r){if(t instanceof F)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new ae(hc(this,t.message,r),this.config.clientVersion);if(t instanceof ce)return new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new ne(`${n.message} +${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#p(t){return t instanceof ae?t:typeof t.message=="string"&&typeof t.code=="string"?new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):typeof t.message=="string"?new ne(t.message,{clientVersion:this.config.clientVersion}):t}#u(t,r,n=!0){let i=wc.PRISMA_WASM_PANIC_REGISTRY.set_message,o;globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#t=void 0,n&&this.stop().catch(s=>Or("failed to disconnect:",s)),new ae(hc(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#e.type){case"disconnected":return;case"connecting":return await this.#e.promise,await this.stop();case"connected":{let t=this.#e.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#e={type:"disconnected"}}});return this.#e={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#e.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#m(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Me(t,"Invalid transaction action.")}catch(s){throw this.#l(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){Or("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(f=>{throw this.#l(f,i)}),a;try{a=this.#u(()=>this.#d({queries:[t],execute:()=>s.compile(i)}))}catch(f){throw this.#p(f)}try{Or("query plan created",a);let f={},w=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:f,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return Or("query plan executed"),{data:{[t.action]:w}}}catch(f){throw this.#l(f,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(kt(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(w=>{throw this.#l(w,o)}),f;try{f=this.#u(()=>this.#d({queries:t,execute:()=>a.compileBatch(o)}))}catch(w){throw this.#p(w)}try{let w;r?.kind==="itx"&&(w=r.options);let A={};switch(f.type){case"multi":{if(r?.kind!=="itx"){let C=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;w=await this.transaction("start",{},C)}let R=[],S=!1;for(let[C,L]of f.plans.entries())try{let k=await s.execute({plan:L,placeholderValues:A,model:t[C].modelName,operation:t[C].action,batchIndex:C,transaction:w,customFetch:n?.(globalThis.fetch)});R.push({data:{[t[C].action]:k}})}catch(k){R.push(k),S=!0;break}return w!==void 0&&r?.kind!=="itx"&&(S?await this.transaction("rollback",{},w):await this.transaction("commit",{},w)),R}case"compacted":{if(!t.every(C=>C.action===i))throw new Error("All queries in a batch must have the same action");let R=await s.execute({plan:f.plan,placeholderValues:A,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:w,customFetch:n?.(globalThis.fetch)});return Za(R,f).map(C=>({data:{[i]:C}}))}}}catch(w){throw this.#l(w,o)}}metrics(t){throw new Error("Method not implemented.")}async apiKey(){let{executor:t}=await this.#i();return t.apiKey()}#m(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new X(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}#d({queries:t,execute:r}){return this.tracingHelper.runInChildSpan({name:"compile",attributes:{models:t.map(n=>n.modelName).filter(n=>n!==void 0),actions:t.map(n=>n.action)}},r)}};function hc(e,t,r){return Ha({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}c();u();p();m();d();l();c();u();p();m();d();l();var Qt=class extends ge{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",N(t,!0))}};D(Qt,"ForcedRetryError");c();u();p();m();d();l();var at=class extends ge{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,N(r,!1))}};D(at,"NotImplementedYetError");c();u();p();m();d();l();c();u();p();m();d();l();var Q=class extends ge{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lt=class extends Q{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",N(t,!0))}};D(lt,"SchemaMissingError");c();u();p();m();d();l();c();u();p();m();d();l();var Co="This request could not be understood by the server",_r=class extends Q{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Co,N(t,!1)),n&&(this.code=n)}};D(_r,"BadRequestError");c();u();p();m();d();l();var Mr=class extends Q{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",N(t,!0)),this.logs=r}};D(Mr,"HealthcheckTimeoutError");c();u();p();m();d();l();var Nr=class extends Q{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,N(t,!0)),this.logs=n}};D(Nr,"EngineStartupError");c();u();p();m();d();l();var Lr=class extends Q{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",N(t,!1))}};D(Lr,"EngineVersionNotSupportedError");c();u();p();m();d();l();var So="Request timed out",Ur=class extends Q{name="GatewayTimeoutError";code="P5009";constructor(t,r=So){super(r,N(t,!1))}};D(Ur,"GatewayTimeoutError");c();u();p();m();d();l();var df="Interactive transaction error",Fr=class extends Q{name="InteractiveTransactionError";code="P5015";constructor(t,r=df){super(r,N(t,!1))}};D(Fr,"InteractiveTransactionError");c();u();p();m();d();l();var ff="Request parameters are invalid",$r=class extends Q{name="InvalidRequestError";code="P5011";constructor(t,r=ff){super(r,N(t,!1))}};D($r,"InvalidRequestError");c();u();p();m();d();l();var Io="Requested resource does not exist",Vr=class extends Q{name="NotFoundError";code="P5003";constructor(t,r=Io){super(r,N(t,!1))}};D(Vr,"NotFoundError");c();u();p();m();d();l();var ko="Unknown server error",Ht=class extends Q{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ko,N(t,!0)),this.logs=n}};D(Ht,"ServerError");c();u();p();m();d();l();var Oo="Unauthorized, check your connection string",qr=class extends Q{name="UnauthorizedError";code="P5007";constructor(t,r=Oo){super(r,N(t,!1))}};D(qr,"UnauthorizedError");c();u();p();m();d();l();var Do="Usage exceeded, retry again later",Br=class extends Q{name="UsageExceededError";code="P5008";constructor(t,r=Do){super(r,N(t,!0))}};D(Br,"UsageExceededError");async function gf(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function jr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await gf(e);if(n.type==="QueryEngineError")throw new X(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ht(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Lr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Nr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new F(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Mr(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Fr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new $r(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new qr(r,Gt(Oo,n));if(e.status===404)return new Vr(r,Gt(Io,n));if(e.status===429)throw new Br(r,Gt(Do,n));if(e.status===504)throw new Ur(r,Gt(So,n));if(e.status>=500)throw new Ht(r,Gt(ko,n));if(e.status>=400)throw new _r(r,Gt(Co,n))}function Gt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}c();u();p();m();d();l();function bc(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}c();u();p();m();d();l();var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ec(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,f,w,A;for(let R=0;R>18,a=(A&258048)>>12,f=(A&4032)>>6,w=A&63,r+=Fe[s]+Fe[a]+Fe[f]+Fe[w];return i==1?(A=t[o],s=(A&252)>>2,a=(A&3)<<4,r+=Fe[s]+Fe[a]+"=="):i==2&&(A=t[o]<<8|t[o+1],s=(A&64512)>>10,a=(A&1008)>>4,f=(A&15)<<2,r+=Fe[s]+Fe[a]+Fe[f]+"="),r}c();u();p();m();d();l();function xc(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new F("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}c();u();p();m();d();l();var Pc={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};c();u();p();m();d();l();c();u();p();m();d();l();var Qr=class extends ge{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,N(r,!0))}};D(Qr,"RequestError");async function ct(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Qr(a,{clientVersion:n,cause:s})}}var hf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Tc=K("prisma:client:dataproxyEngine");async function wf(e,t){let r=Pc["@prisma/engines-version"],n=t.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&hf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,w]=s.split("."),A=bf(`<=${a}.${f}.${w}`),R=await ct(A,{clientVersion:n});if(!R.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${R.status} ${R.statusText}, response body: ${await R.text()||""}`);let S=await R.text();Tc("length of body fetched from unpkg.com",S.length);let C;try{C=JSON.parse(S)}catch(L){throw console.error("JSON.parse error: body fetched from unpkg.com: ",S),L}return C.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function vc(e,t){let r=await wf(e,t);return Tc("version",r),r}function bf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ac=3,Hr=K("prisma:client:dataproxyEngine"),Gr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){xc(t),this.config=t,this.env=t.env,this.inlineSchema=Ec(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Bt({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await vc(this.host,this.config),Hr("host",this.host),Hr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Hr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:jt(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:jt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ct(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Hr("schema response status",r.status);let n=await jr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=kt(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Hr("graphql response status",a.status),await this.handleError(await jr(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let f=await ct(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await jr(f,this.clientVersion));let w=await f.json(),{extensions:A}=w;A&&this.propagateResponseExtensions(A);let R=w.id,S=w["data-proxy"].endpoint;return{id:R,payload:{endpoint:S}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await jr(a,this.clientVersion));let f=await a.json(),{extensions:w}=f;w&&this.propagateResponseExtensions(w);return}}})}getURLAndAPIKey(){return ni({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new at("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ge)||!i.isRetryable)throw i;if(r>=Ac)throw i instanceof Qt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ac} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await bc(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new Qt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?_n(t[0],this.config.clientVersion,this.config.activeProvider):new ne(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};c();u();p();m();d();l();function Rc({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let M=k.join(` +`);o.push({_tag:"error",value:M})},f=!!e?.startsWith("prisma://"),w=cn(e),A=!!t,R=f||w;!A&&r&&R&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let S=R||!r;A&&(S||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):R?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let C={accelerate:S,ppg:w,driverAdapters:A};function L(k){return k.length>0}return L(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:C}:{ok:!0,diagnostics:{warnings:i},isUsing:C}}function Cc({copyEngine:e=!0},t){let r;try{r=qt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Rc({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"wasm-compiler-edge"});for(let R of o.warnings)rr(...R.value);if(!n){let R=o.errors[0];throw new ie(R.value,{clientVersion:t.clientVersion})}let s=gt(t.generator),a=s==="library",f=s==="binary",w=s==="client",A=(i.accelerate||i.ppg)&&!i.driverAdapters;return w?new Dr(t,A):i.accelerate?new Gr(t):(i.driverAdapters,i.accelerate,new _o({clientVersion:t.clientVersion}))}var _o=class{constructor(t){return new Proxy(this,{get(r,n){let i=`In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters`;throw new ie(i,t)}})}};c();u();p();m();d();l();function Sc({generator:e}){return e?.previewFeatures??[]}c();u();p();m();d();l();var Ic=e=>({command:e});c();u();p();m();d();l();c();u();p();m();d();l();var kc=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();u();p();m();d();l();l();function Jt(e){try{return Oc(e,"fast")}catch{return Oc(e,"slow")}}function Oc(e,t){return JSON.stringify(e.map(r=>_c(r,t)))}function _c(e,t){if(Array.isArray(e))return e.map(r=>_c(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(wt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(se.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(y.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Ef(e))return{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:y.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Mc(e):e}function Ef(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Mc(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Dc);let t={};for(let r of Object.keys(e))t[r]=Dc(e[r]);return t}function Dc(e){return typeof e=="bigint"?e.toString():Mc(e)}var xf=/^(\s*alter\s)/i,Nc=K("prisma:client");function Mo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&xf.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var No=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(In(r))n=r.sql,i={values:Jt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Jt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Jt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Jt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=kc(r),i={values:Jt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Nc(`prisma.${e}(${n}, ${i.values})`):Nc(`prisma.${e}(${n})`),{query:n,parameters:i}},Lc={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new fe(t,r)}},Uc={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();u();p();m();d();l();function Lo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Fc(r(s)):Fc(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Fc(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();u();p();m();d();l();var Pf=Ei.split(".")[0],Tf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Uo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Pf}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Tf}};function $c(){return new Uo}c();u();p();m();d();l();function Vc(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();u();p();m();d();l();function qc(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();u();p();m();d();l();c();u();p();m();d();l();function oi(e){return typeof e.batchRequestIdx=="number"}c();u();p();m();d();l();function Bc(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Fo(e.query.arguments)),t.push(Fo(e.query.selection)),t.join("")}function Fo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Fo(n)})`:r}).join(" ")})`}c();u();p();m();d();l();var vf={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function $o(e){return vf[e]}c();u();p();m();d();l();var si=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iut("bigint",r));case"bytes-array":return t.map(r=>ut("bytes",r));case"decimal-array":return t.map(r=>ut("decimal",r));case"datetime-array":return t.map(r=>ut("datetime",r));case"date-array":return t.map(r=>ut("date",r));case"time-array":return t.map(r=>ut("time",r));default:return t}}function ai(e){let t=[],r=Af(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(R=>R.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),w=n.some(R=>$o(R.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Cf(o),containsWrite:w,customDataProxyFetch:i})).map((R,S)=>{if(R instanceof Error)return R;try{return this.mapQueryEngineResult(n[S],R)}catch(C){return C}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?jc(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:$o(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Bc(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Rf(t),Sf(t,i))throw t;if(t instanceof X&&If(t)){let w=Qc(t.meta);Tn({args:o,errors:[w],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=dn({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let w=s?{modelName:s,...t.meta}:t.meta;throw new X(f,{code:t.code,clientVersion:this.client._clientVersion,meta:w,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ae(f,this.client._clientVersion);if(t instanceof ne)throw new ne(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof F)throw new F(f,this.client._clientVersion);if(t instanceof ae)throw new ae(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?ht(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(w=>w!=="select"&&w!=="include"),a=qi(o,s),f=i==="queryRaw"?ai(a):Qe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Cf(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:jc(e)};Me(e,"Unknown transaction kind")}}function jc(e){return{id:e.id,payload:e.payload}}function Sf(e,t){return oi(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function If(e){return e.code==="P2009"||e.code==="P2012"}function Qc(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Qc)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();u();p();m();d();l();var Hc=Zn;c();u();p();m();d();l();var zc=$e(Ii());c();u();p();m();d();l();var V=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};D(V,"PrismaClientConstructorValidationError");var Gc=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Jc=["pretty","colorless","minimal"],Wc=["info","query","warn","error"],kf={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Wt(r,t)||` Available datasources: ${t.join(", ")}`;throw new V(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new V(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&>(t.generator)==="client")throw new V('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new V('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(gt(t.generator)==="binary")throw new V('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new V(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new V(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Jc.includes(e)){let t=Wt(e,Jc);throw new V(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Wc.includes(r)){let n=Wt(r,Wc);throw new V(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Wt(i,o);throw new V(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new V(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new V(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new V(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new V('"omit" option is expected to be an object.');if(e===null)throw new V('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Df(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(w=>w.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new V(_f(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new V(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Wt(r,t);throw new V(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Yc(e,t){for(let[r,n]of Object.entries(e)){if(!Gc.includes(r)){let i=Wt(r,Gc);throw new V(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}kf[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new V('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Wt(e,t){if(t.length===0||typeof e!="string")return"";let r=Of(e,t);return r?` Did you mean "${r}"?`:""}function Of(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,zc.default)(e,i)}));r.sort((i,o)=>i.distanceqe(n)===t);if(r)return e[r]}function _f(e,t){let r=Rt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Pn(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}c();u();p();m();d();l();function Zc(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=w=>{o||(o=!0,r(w))};for(let w=0;w{n[w]=A,a()},A=>{if(!oi(A)){f(A);return}A.batchRequestIdx===w?f(A):(i||(i=A),a())})})}var We=K("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Mf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Nf=Symbol.for("prisma.client.transaction.id"),Lf={id:0,nextId(){return++this.id}};function tu(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Lo();constructor(n){e=n?.__internal?.configOverride?.(e)??e,$a(e),n&&Yc(n,e);let i=new kn().on("error",()=>{});this._extensions=Ct.empty(),this._previewFeatures=Sc(e),this._clientVersion=e.clientVersion??Hc,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=$c();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==f)throw new F(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new F("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let f=n??{},w=f.__internal??{},A=w.debug===!0;A&&K.enable("prisma:client");let R=rn.resolve(e.dirname,e.relativePath);fs.existsSync(R)||(R=e.dirname),We("dirname",e.dirname),We("relativePath",e.relativePath),We("cwd",R);let S=w.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:R,dirname:e.dirname,enableDebugLogs:A,allowTriggerPanic:S.allowTriggerPanic,prismaPath:S.binaryPath??void 0,engineEndpoint:S.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&qc(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Va(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:qt,getBatchRequestPayload:kt,prismaGraphQLToJSError:_n,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:F,PrismaClientKnownRequestError:X,debug:K("prisma:client:accelerateEngine"),engineVersion:eu.version,clientVersion:e.clientVersion}},We("clientVersion",e.clientVersion),this._engine=Cc(e,this._engineConfig),this._requestHandler=new li(this,i),f.log)for(let C of f.log){let L=typeof C=="string"?C:C.emit==="stdout"?C.level:null;L&&this.$on(L,k=>{tr.log(`${tr.tags[L]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=hr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ds()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:No({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Xc(n,i);return Mo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ie("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Mo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ie(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ic,callsite:je(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:No({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Xc(n,i));throw new ie("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ie("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Lf.nextId(),s=Vc(n.length),a=n.map((f,w)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let A=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,R={kind:"batch",id:o,index:w,isolationLevel:A,lock:s};return f.requestTransaction?.(R)??f});return Zc(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let w={kind:"itx",...a};f=await n(this._createItxClient(w)),await this._engine.transaction("commit",o,a)}catch(w){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),w}return f}_createItxClient(n){return Pe(hr(Pe(va(this),[le("_appliedParent",()=>this._appliedParent._createItxClient(n)),le("_createPrismaPromise",()=>Lo(n)),le(Nf,()=>n.id)])),[It(Ia)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Mf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:w,args:A,...R}=f,S={...n,...R};A&&(S.args=i.middlewareArgsToRequestArgs(A)),n.transaction!==void 0&&w===!1&&delete S.transaction;let C=await _a(this,S);return S.model?Sa({result:C,modelName:S.model,args:S.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):C};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:w,transaction:A,unpacker:R,otelParentCtx:S,customDataProxyFetch:C}){try{n=w?w(n):n;let L={name:"serialize"},k=this._tracingHelper.runInChildSpan(L,()=>Cn({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return K.enabled("prisma:client")&&(We("Prisma Client call:"),We(`prisma.${i}(${fa(n)})`),We("Generated request:"),We(JSON.stringify(k,null,2)+` +`)),A?.kind==="batch"&&await A.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:A,unpacker:R,otelParentCtx:S,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:C})}catch(L){throw L.clientVersion=this._clientVersion,L}}$metrics=new St(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Aa}return t}function Xc(e,t){return Uf(e)?[new fe(e,t),Lc]:[e,Uc]}function Uf(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();u();p();m();d();l();var Ff=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ru(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Ff.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();u();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm-compiler-edge.js.map diff --git a/packages/challenge-prisma-client/runtime/wasm-engine-edge.js b/packages/challenge-prisma-client/runtime/wasm-engine-edge.js new file mode 100644 index 0000000..0dec9ec --- /dev/null +++ b/packages/challenge-prisma-client/runtime/wasm-engine-edge.js @@ -0,0 +1,37 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var zo=Object.create;var St=Object.defineProperty;var Yo=Object.getOwnPropertyDescriptor;var Xo=Object.getOwnPropertyNames;var Zo=Object.getPrototypeOf,es=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ot=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rt=(t,e)=>{for(var r in e)St(t,r,{get:e[r],enumerable:!0})},dn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xo(e))!es.call(t,i)&&i!==r&&St(t,i,{get:()=>e[i],enumerable:!(n=Yo(e,i))||n.enumerable});return t};var kt=(t,e,r)=>(r=t!=null?zo(Zo(t)):{},dn(e||!t||!t.__esModule?St(r,"default",{value:t,enumerable:!0}):r,t)),ts=t=>dn(St({},"__esModule",{value:!0}),t);function xr(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new y(os.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new y([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new y(t.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(h=0){return V(h,"offset"),X(h,"offset"),$(h,"offset",this.length-1),new DataView(this.buffer)[r[a]](h,f)},o=(a,f)=>function(h,C=0){let A=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),k=is[A];return V(C,"offset"),X(C,"offset"),$(C,"offset",this.length-1),ns(h,"value",k[0],k[1]),new DataView(this.buffer)[r[a]](C,h,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function gn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function Dt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function $(t,e,r=ls+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function V(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function X(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function ns(t,e,r,n){if(tn){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function fn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function us(t,e="utf8"){return y.from(t,e)}var y,is,os,ss,as,ls,b,Er,u=ie(()=>{"use strict";y=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return fn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return xr(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return as.includes(e)}static compare(e,r){Dt(e,"buff1"),Dt(r,"buff2");for(let n=0;nr[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return xr(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){V(e,"offset"),X(e,"offset"),$(e,"offset",this.length-1),V(r,"byteLength"),X(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){V(r,"offset"),X(r,"offset"),$(r,"offset",this.length-1),V(n,"byteLength"),X(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===e[n])}copy(e,r=0,n=0,i=this.length){$(r,"targetStart"),$(n,"sourceStart",this.length),$(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,h)=>(i?h<=a:h>=a)&&this[h]===s[0]&&s.every((A,k)=>this[h+k]===A))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return ss.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+Er(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+Er(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");gn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return``}};is={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},os=new TextEncoder,ss=new TextDecoder,as=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],ls=4294967295;rs(y.prototype);b=new Proxy(us,{construct(t,[e,r]){return y.from(e,r)},get(t,e){return y[e]}}),Er=String.fromCodePoint});var g,E,c=ie(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:E}=g});var P,m=ie(()=>{"use strict";P=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var x,p=ie(()=>{"use strict";x=()=>{};x.prototype=x});var w,d=ie(()=>{"use strict";w=class{value;constructor(e){this.value=e}deref(){return this.value}}});function wn(t,e){var r,n,i,o,s,a,f,h,C=t.constructor,A=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),q?L(e,A):e;if(f=t.d,h=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=h.length):(n=h,i=s,a=f.length),s=Math.ceil(A/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=h.length,a-o<0&&(o=a,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/J|0,f[o]%=J;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,q?L(e,A):e}function ce(t,e,r){if(t!==~~t||tr)throw Error(Oe+t)}function ue(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e16)throw Error(vr+j(t));if(!t.s)return new C(te);for(e==null?(q=!1,a=A):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),h+=5;for(n=Math.log(Se(2,h))/Math.LN10*2+5|0,a+=n,r=i=o=new C(te),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(he(i,r,a)),ue(s.d).slice(0,a)===ue(o.d).slice(0,a)){for(;h--;)o=L(o.times(o),a);return C.precision=A,e==null?(q=!0,L(o,A)):o}o=s}}function j(t){for(var e=t.e*N,r=t.d[0];r>=10;r/=10)e++;return e}function Pr(t,e,r){if(e>t.LN10.sd())throw q=!0,r&&(t.precision=r),Error(oe+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function Pe(t){for(var e="";t--;)e+="0";return e}function nt(t,e){var r,n,i,o,s,a,f,h,C,A=1,k=10,R=t,_=R.d,O=R.constructor,D=O.precision;if(R.s<1)throw Error(oe+(R.s?"NaN":"-Infinity"));if(R.eq(te))return new O(0);if(e==null?(q=!1,h=D):h=e,R.eq(10))return e==null&&(q=!0),Pr(O,h);if(h+=k,O.precision=h,r=ue(_),n=r.charAt(0),o=j(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(t),r=ue(R.d),n=r.charAt(0),A++;o=j(R),n>1?(R=new O("0."+r),o++):R=new O(n+"."+r.slice(1))}else return f=Pr(O,h+2,D).times(o+""),R=nt(new O(n+"."+r.slice(1)),h-k).plus(f),O.precision=D,e==null?(q=!0,L(R,D)):R;for(a=s=R=he(R.minus(te),R.plus(te),h),C=L(R.times(R),h),i=3;;){if(s=L(s.times(C),h),f=a.plus(he(s,new O(i),h)),ue(f.d).slice(0,h)===ue(a.d).slice(0,h))return a=a.times(2),o!==0&&(a=a.plus(Pr(O,h+2,D).times(o+""))),a=he(a,new O(A),h),O.precision=D,e==null?(q=!0,L(a,D)):a;a=f,i+=2}}function yn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Fe(r/N),t.d=[],n=(r+1)%N,r<0&&(n+=N),nIt||t.e<-It))throw Error(vr+r)}else t.s=0,t.e=0,t.d=[0];return t}function L(t,e,r){var n,i,o,s,a,f,h,C,A=t.d;for(s=1,o=A[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=N,i=e,h=A[C=0];else{if(C=Math.ceil((n+1)/N),o=A.length,C>=o)return t;for(h=o=A[C],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Se(10,s-i-1),a=h/o%10|0,f=e<0||A[C+1]!==void 0||h%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?h/Se(10,s-i):0:A[C-1])%10&1||r==(t.s<0?8:7))),e<1||!A[0])return f?(o=j(t),A.length=1,e=e-o-1,A[0]=Se(10,(N-e%N)%N),t.e=Fe(-e/N)||0):(A.length=1,A[0]=t.e=t.s=0),t;if(n==0?(A.length=C,o=1,C--):(A.length=C+1,o=Se(10,N-n),A[C]=i>0?(h/Se(10,s-i)%Se(10,i)|0)*o:0),f)for(;;)if(C==0){(A[0]+=o)==J&&(A[0]=1,++t.e);break}else{if(A[C]+=o,A[C]!=J)break;A[C--]=0,o=1}for(n=A.length;A[--n]===0;)A.pop();if(q&&(t.e>It||t.e<-It))throw Error(vr+j(t));return t}function En(t,e){var r,n,i,o,s,a,f,h,C,A,k=t.constructor,R=k.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new k(t),q?L(e,R):e;if(f=t.d,A=e.d,n=e.e,h=t.e,f=f.slice(),s=h-n,s){for(C=s<0,C?(r=f,s=-s,a=A.length):(r=A,n=h,a=f.length),i=Math.max(Math.ceil(R/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=A.length,C=i0;--i)f[a++]=0;for(i=A.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),t.s<0?"-"+o:o}function hn(t,e){if(t.length>e)return t.length=e,!0}function Pn(t){var e,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Oe+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return yn(s,o.toString())}else if(typeof o!="string")throw Error(Oe+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ms.test(o))yn(s,o);else throw Error(Oe+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Pn,i.config=i.set=ps,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Oe+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Oe+r+": "+n);return this}var Le,cs,Tr,q,oe,Oe,vr,Fe,Se,ms,te,J,N,bn,It,S,he,Tr,Mt,vn=ie(()=>{"use strict";u();c();m();p();d();l();Le=1e9,cs={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},q=!0,oe="[DecimalError] ",Oe=oe+"Invalid argument: ",vr=oe+"Exponent out of range: ",Fe=Math.floor,Se=Math.pow,ms=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,N=7,bn=9007199254740991,It=Fe(bn/N),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=nt.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*N;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return he(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(he(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return j(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(te))throw Error(oe+"NaN");if(r.s<1)throw Error(oe+(r.s?"NaN":"-Infinity"));return r.eq(te)?new n(0):(q=!1,e=he(nt(r,o),nt(t,o),o),q=!0,L(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?En(e,t):wn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(oe+"NaN");return r.s?(q=!1,e=he(r,t,0,1).times(t),q=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return xn(this)};S.naturalLogarithm=S.ln=function(){return nt(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?wn(e,t):En(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Oe+t);if(e=j(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(oe+"NaN")}for(t=j(a),q=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=ue(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Fe((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(he(a,o,s+2)).times(.5),ue(o.d).slice(0,s)===(e=ue(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(L(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return q=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,h,C=this,A=C.constructor,k=C.d,R=(t=new A(t)).d;if(!C.s||!t.s)return new A(0);for(t.s*=C.s,r=C.e+t.e,f=k.length,h=R.length,f=0;){for(e=0,i=f+n;i>n;)a=o[i]+R[n]*k[i-n-1]+e,o[i--]=a%J|0,e=a/J|0;o[i]=(o[i]+e)%J|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,q?L(t,A.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(ce(t,0,Le),e===void 0?e=n.rounding:ce(e,0,8),L(r,t+j(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=ke(n,!0):(ce(t,0,Le),e===void 0?e=i.rounding:ce(e,0,8),n=L(new i(n),t+1,e),r=ke(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?ke(i):(ce(t,0,Le),e===void 0?e=o.rounding:ce(e,0,8),n=L(new o(i),t+j(i)+1,e),r=ke(n.abs(),!1,t+j(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),j(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,h=12,C=+(t=new f(t));if(!t.s)return new f(te);if(a=new f(a),!a.s){if(t.s<1)throw Error(oe+"Infinity");return a}if(a.eq(te))return a;if(n=f.precision,t.eq(te))return L(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=C<0?-C:C)<=bn){for(i=new f(te),e=Math.ceil(n/N+4),q=!1;r%2&&(i=i.times(a),hn(i.d,e)),r=Fe(r/2),r!==0;)a=a.times(a),hn(a.d,e);return q=!0,t.s<0?new f(te).div(i):L(i,n)}}else if(o<0)throw Error(oe+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,q=!1,i=t.times(nt(a,n+h)),q=!0,i=xn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=j(i),n=ke(i,r<=o.toExpNeg||r>=o.toExpPos)):(ce(t,1,Le),e===void 0?e=o.rounding:ce(e,0,8),i=L(new o(i),t,e),r=j(i),n=ke(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(ce(t,1,Le),e===void 0?e=n.rounding:ce(e,0,8)),L(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=j(t),r=t.constructor;return ke(t,e<=r.toExpNeg||e>=r.toExpPos)};he=function(){function t(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%J|0,s=o/J|0;return s&&n.unshift(s),n}function e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,h,C,A,k,R,_,O,D,ye,z,F,Y,Re,wr,se,At,Rt=n.constructor,Ho=n.s==i.s?1:-1,le=n.d,B=i.d;if(!n.s)return new Rt(n);if(!i.s)throw Error(oe+"Division by zero");for(f=n.e-i.e,se=B.length,Re=le.length,R=new Rt(Ho),_=R.d=[],h=0;B[h]==(le[h]||0);)++h;if(B[h]>(le[h]||0)&&--f,o==null?z=o=Rt.precision:s?z=o+(j(n)-j(i))+1:z=o,z<0)return new Rt(0);if(z=z/N+2|0,h=0,se==1)for(C=0,B=B[0],z++;(h1&&(B=t(B,C),le=t(le,C),se=B.length,Re=le.length),Y=se,O=le.slice(0,se),D=O.length;D=J/2&&++wr;do C=0,a=e(B,O,se,D),a<0?(ye=O[0],se!=D&&(ye=ye*J+(O[1]||0)),C=ye/wr|0,C>1?(C>=J&&(C=J-1),A=t(B,C),k=A.length,D=O.length,a=e(A,O,k,D),a==1&&(C--,r(A,se{"use strict";vn();v=class extends Mt{static isDecimal(e){return e instanceof Mt}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new Mt(`0.${n.slice(0,e)}`)}}},be=v});function bs(){return!1}function Or(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ws(){return Or()}function xs(){return[]}function Es(t){t(null,[])}function Ps(){return""}function vs(){return""}function Ts(){}function Cs(){}function As(){}function Rs(){}function Ss(){}function Os(){}function ks(){}function Ds(){}function Is(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ms(t,e){e(null,Or())}var _s,Ls,Bn,Vn=ie(()=>{"use strict";u();c();m();p();d();l();_s={},Ls={existsSync:bs,lstatSync:Or,stat:Ms,statSync:ws,readdirSync:xs,readdir:Es,readlinkSync:Ps,realpathSync:vs,chmodSync:Ts,renameSync:Cs,mkdirSync:As,rmdirSync:Rs,rmSync:Ss,unlinkSync:Os,watchFile:ks,unwatchFile:Ds,watch:Is,promises:_s},Bn=Ls});var jn=Ot((Zc,Fs)=>{Fs.exports={name:"@prisma/internals",version:"6.19.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-engine-wasm":"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Ns(...t){return t.join("/")}function qs(...t){return t.join("/")}function Bs(t){let e=$n(t),r=Qn(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function $n(t){let e=t.split("/");return e[e.length-1]}function Qn(t){return t.split("/").slice(0,-1).join("/")}function js(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var Jn,Vs,$s,Qs,Ut,Gn=ie(()=>{"use strict";u();c();m();p();d();l();Jn="/",Vs=":";$s={sep:Jn},Qs={basename:$n,delimiter:Vs,dirname:Qn,join:qs,normalize:js,parse:Bs,posix:$s,resolve:Ns,sep:Jn},Ut=Qs});var Yn=Ot((bp,zn)=>{"use strict";u();c();m();p();d();l();zn.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var Vr=Ot((Hy,ni)=>{"use strict";u();c();m();p();d();l();ni.exports=function(){function t(e,r,n,i,o){return en?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();m();p();d();l()});var ui=ie(()=>{"use strict";u();c();m();p();d();l()});var Mi=Ot((zP,Qa)=>{Qa.exports={name:"@prisma/engines-version",version:"6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"2ba551f319ab1df4bc874a89965d8b3641056773"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var sr,_i=ie(()=>{"use strict";u();c();m();p();d();l();sr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});var Xl={};rt(Xl,{DMMF:()=>ct,Debug:()=>G,Decimal:()=>be,Extensions:()=>Cr,MetricsClient:()=>He,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Z,PrismaClientRustPanicError:()=>xe,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>K,Public:()=>Ar,Sql:()=>ee,createParam:()=>Ci,defineDmmfProperty:()=>Di,deserializeJsonResponse:()=>Xe,deserializeRawResult:()=>hr,dmmfToRuntimeDataModel:()=>ri,empty:()=>Fi,getPrismaClient:()=>Go,getRuntime:()=>Ze,join:()=>Li,makeStrictEnum:()=>Wo,makeTypedQueryFactory:()=>Ii,objectEnumValues:()=>zt,raw:()=>zr,serializeJsonQuery:()=>nr,skip:()=>rr,sqltag:()=>Yr,warnEnvConflicts:()=>void 0,warnOnce:()=>at});module.exports=ts(Xl);u();c();m();p();d();l();var Cr={};rt(Cr,{defineExtension:()=>Tn,getExtensionContext:()=>Cn});u();c();m();p();d();l();u();c();m();p();d();l();function Tn(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();m();p();d();l();function Cn(t){return t}var Ar={};rt(Ar,{validator:()=>An});u();c();m();p();d();l();u();c();m();p();d();l();function An(...t){return e=>e}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Rr,Rn,Sn,On,kn=!0;typeof g<"u"&&({FORCE_COLOR:Rr,NODE_DISABLE_COLORS:Rn,NO_COLOR:Sn,TERM:On}=g.env||{},kn=g.stdout&&g.stdout.isTTY);var ds={enabled:!Rn&&Sn==null&&On!=="dumb"&&(Rr!=null&&Rr!=="0"||kn)};function U(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!ds.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var zu=U(0,0),_t=U(1,22),Lt=U(2,22),Yu=U(3,23),Dn=U(4,24),Xu=U(7,27),Zu=U(8,28),ec=U(9,29),tc=U(30,39),Ue=U(31,39),In=U(32,39),Mn=U(33,39),_n=U(34,39),rc=U(35,39),Ln=U(36,39),nc=U(37,39),Fn=U(90,39),ic=U(90,39),oc=U(40,49),sc=U(41,49),ac=U(42,49),lc=U(43,49),uc=U(44,49),cc=U(45,49),mc=U(46,49),pc=U(47,49);u();c();m();p();d();l();var fs=100,Un=["green","yellow","blue","magenta","cyan","red"],Ft=[],Nn=Date.now(),gs=0,Sr=typeof g<"u"?g.env:{};globalThis.DEBUG??=Sr.DEBUG??"";globalThis.DEBUG_COLORS??=Sr.DEBUG_COLORS?Sr.DEBUG_COLORS==="true":!0;var it={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function ys(t){let e={color:Un[gs++%Un.length],enabled:it.enabled(t),namespace:t,log:it.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&Ft.push([o,...n]),Ft.length>fs&&Ft.shift(),it.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:hs(C)),h=`+${Date.now()-Nn}ms`;Nn=Date.now(),a(o,...f,h)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(ys,{get:(t,e)=>it[e],set:(t,e,r)=>it[e]=r});function hs(t,e=2){let r=new Set;return JSON.stringify(t,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},e)}function qn(){Ft.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var kr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();m();p();d();l();var Us=jn(),Dr=Us.version;u();c();m();p();d();l();function Ne(t){let e=Js();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Gs())}function Js(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Gs(){return"library"}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function Ir(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function Nt(t){return{ok:!0,value:t,map(e){return Nt(e(t))},flatMap(e){return e(t)}}}function De(t){return{ok:!1,error:t,map(){return De(t)},flatMap(){return De(t)}}}var Wn=G("driver-adapter-utils"),Mr=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var qt=(t,e=new Mr)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),executeScript:we(e,t.executeScript.bind(t)),dispose:we(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await we(e,t.startTransaction.bind(t))(...n)).map(o=>Ws(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=Ks(e,t.getConnectionInfo.bind(t))),r},Ws=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),commit:we(t,e.commit.bind(e)),rollback:we(t,e.rollback.bind(e))});function we(t,e){return async(...r)=>{try{return Nt(await e(...r))}catch(n){if(Wn("[error@wrapAsync]",n),Ir(n))return De(n.cause);let i=t.registerNewError(n);return De({kind:"GenericJs",id:i})}}}function Ks(t,e){return(...r)=>{try{return Nt(e(...r))}catch(n){if(Wn("[error@wrapSync]",n),Ir(n))return De(n.cause);let i=t.registerNewError(n);return De({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Kn="prisma+postgres",Hn=`${Kn}:`;function _r(t){return t?.toString().startsWith(`${Hn}//`)??!1}var st={};rt(st,{error:()=>Ys,info:()=>zs,log:()=>Hs,query:()=>Xs,should:()=>Xn,tags:()=>ot,warn:()=>Lr});u();c();m();p();d();l();var ot={error:Ue("prisma:error"),warn:Mn("prisma:warn"),info:Ln("prisma:info"),query:_n("prisma:query")},Xn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Hs(...t){console.log(...t)}function Lr(t,...e){Xn.warn()&&console.warn(`${ot.warn} ${t}`,...e)}function zs(t,...e){console.info(`${ot.info} ${t}`,...e)}function Ys(t,...e){console.error(`${ot.error} ${t}`,...e)}function Xs(t,...e){console.log(`${ot.query} ${t}`,...e)}u();c();m();p();d();l();function Bt(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function Ie(t,e){throw new Error(e)}u();c();m();p();d();l();u();c();m();p();d();l();function Fr({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var Zs=Fr();function Ur(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Zs,"")}u();c();m();p();d();l();function Nr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function Vt(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();m();p();d();l();function qr(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n{Zn.has(t)||(Zn.add(t),Lr(e,...r))};var I=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(I,"PrismaClientInitializationError");u();c();m();p();d();l();var Z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(Z,"PrismaClientKnownRequestError");u();c();m();p();d();l();var xe=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(xe,"PrismaClientRustPanicError");u();c();m();p();d();l();var Q=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(Q,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var K=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(K,"PrismaClientValidationError");u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var me=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();m();p();d();l();function ve(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function ti(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();m();p();d();l();function lt(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function ri(t){return{models:Br(t.models),enums:Br(t.enums),types:Br(t.types)}}function Br(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();function qe(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function jt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function Be(t){return v.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();m();p();d();l();u();c();m();p();d();l();var ct={};rt(ct,{ModelAction:()=>ut,datamodelEnumToSchemaEnum:()=>ea});u();c();m();p();d();l();u();c();m();p();d();l();function ea(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var ut=(F=>(F.findUnique="findUnique",F.findUniqueOrThrow="findUniqueOrThrow",F.findFirst="findFirst",F.findFirstOrThrow="findFirstOrThrow",F.findMany="findMany",F.create="create",F.createMany="createMany",F.createManyAndReturn="createManyAndReturn",F.update="update",F.updateMany="updateMany",F.updateManyAndReturn="updateManyAndReturn",F.upsert="upsert",F.delete="delete",F.deleteMany="deleteMany",F.groupBy="groupBy",F.count="count",F.aggregate="aggregate",F.findRaw="findRaw",F.aggregateRaw="aggregateRaw",F))(ut||{});var ta=kt(Yn());var ra={red:Ue,gray:Fn,dim:Lt,bold:_t,underline:Dn,highlightSource:t=>t.highlight()},na={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function ia({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function oa({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline(sa(e))),i){a.push("");let h=[i.toString()];o&&(h.push(o),h.push(s.dim(")"))),a.push(h.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function sa(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function $t(t){let e=t.showColors?ra:na,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=ia(t),oa(r,e)}u();c();m();p();d();l();var mi=kt(Vr());u();c();m();p();d();l();function si(t,e,r){let n=ai(t),i=aa(n),o=ua(i);o?Qt(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ai(t){return t.errors.flatMap(e=>e.kind==="Union"?ai(e):[e])}function aa(t){let e=new Map,r=[];for(let n of t){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=e.get(i);o?e.set(i,{...n,argument:{...n.argument,typeNames:la(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function la(t,e){return[...new Set(t.concat(e))]}function ua(t){return qr(t,(e,r)=>{let n=ii(e),i=ii(r);return n!==i?n-i:oi(e)-oi(r)})}function ii(t){let e=0;return Array.isArray(t.selectionPath)&&(e+=t.selectionPath.length),Array.isArray(t.argumentPath)&&(e+=t.argumentPath.length),e}function oi(t){switch(t.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var ne=class{constructor(e,r){this.name=e;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(e){let{colors:{green:r}}=e.context;e.addMarginSymbol(r(this.isRequired?"+":"?")),e.write(r(this.name)),this.isRequired||e.write(r("?")),e.write(r(": ")),typeof this.value=="string"?e.write(r(this.value)):e.write(this.value)}};u();c();m();p();d();l();u();c();m();p();d();l();ui();u();c();m();p();d();l();var Ve=class{constructor(e=0,r){this.context=r;this.currentIndent=e}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(e){return typeof e=="string"?this.currentLine+=e:e.write(this),this}writeJoined(e,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};li();u();c();m();p();d();l();u();c();m();p();d();l();var Jt=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Gt=t=>t,Wt={bold:Gt,red:Gt,green:Gt,dim:Gt,enabled:!1},ci={bold:_t,red:Ue,green:In,dim:Lt,enabled:!0},je={write(t){t.writeLine(",")}};u();c();m();p();d();l();var pe=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Te=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var $e=class extends Te{items=[];addItem(e){return this.items.push(new Jt(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new pe("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(je,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Qe=class t extends Te{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof $e&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new pe("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(je,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var W=class extends Te{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();m();p();d();l();var mt=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(je,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Qt(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":ca(t,e);break;case"IncludeOnScalar":ma(t,e);break;case"EmptySelection":pa(t,e,r);break;case"UnknownSelectionField":ya(t,e);break;case"InvalidSelectionValue":ha(t,e);break;case"UnknownArgument":ba(t,e);break;case"UnknownInputField":wa(t,e);break;case"RequiredArgumentMissing":xa(t,e);break;case"InvalidArgumentType":Ea(t,e);break;case"InvalidArgumentValue":Pa(t,e);break;case"ValueTooLarge":va(t,e);break;case"SomeFieldsMissing":Ta(t,e);break;case"TooManyFieldsGiven":Ca(t,e);break;case"Union":si(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function ca(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function ma(t,e){let[r,n]=Je(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ne(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${pt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function pa(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){da(t,e,i);return}if(n.hasField("select")){fa(t,e);return}}if(r?.[ve(t.outputType.name)]){ga(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function da(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new ne(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function fa(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),fi(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${pt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ga(t,e){let r=new mt;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ne("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=Je(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Qe;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function ya(t,e){let r=gi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":fi(n,t.outputType);break;case"include":Aa(n,t.outputType);break;case"omit":Ra(n,t.outputType);break}}e.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`),i.push(pt(n)),i.join(" ")})}function ha(t,e){let r=gi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function ba(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Sa(n,t.arguments)),e.addErrorMessage(i=>pi(i,r,t.arguments.map(o=>o.name)))}function wa(t,e){let[r,n]=Je(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&yi(o,t.inputType)}e.addErrorMessage(o=>pi(o,n,t.inputType.fields.map(s=>s.name)))}function pi(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=ka(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(pt(t)),n.join(" ")}function xa(t,e){let r;e.addErrorMessage(f=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=Je(t.argumentPath),s=new mt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new ne(o,s).makeRequired())}else{let f=t.inputTypes.map(di).join(" | ");a.addSuggestion(new ne(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=Je(t.dependentArgumentPath);e.addErrorMessage(h=>`Argument \`${h.green(o)}\` is required because argument \`${h.green(f)}\` was provided.`)}}}function di(t){return t.kind==="list"?`${di(t.elementType)}[]`:t.name}function Ea(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=Kt("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function Pa(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=Kt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function va(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}e.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Ta(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&yi(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Kt("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(pt(i)),o.join(" ")})}function Ca(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Kt("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function fi(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,"true"))}function Aa(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new ne(r.name,"true"))}function Ra(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new ne(r.name,"true"))}function Sa(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function gi(t,e){let[r,n]=Je(t),i=e.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function yi(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function Je(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function pt({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Kt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var Oa=3;function ka(t,e){let r=1/0,n;for(let i of e){let o=(0,mi.default)(t,i);o>Oa||o`}};function Ge(t){return t instanceof dt}u();c();m();p();d();l();var Ht=Symbol(),$r=new WeakMap,Ee=class{constructor(e){e===Ht?$r.set(this,`Prisma.${this._getName()}`):$r.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return $r.get(this)}},ft=class extends Ee{_getNamespace(){return"NullTypes"}},gt=class extends ft{#e};Qr(gt,"DbNull");var yt=class extends ft{#e};Qr(yt,"JsonNull");var ht=class extends ft{#e};Qr(ht,"AnyNull");var zt={classes:{DbNull:gt,JsonNull:yt,AnyNull:ht},instances:{DbNull:new gt(Ht),JsonNull:new yt(Ht),AnyNull:new ht(Ht)}};function Qr(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var hi=": ",Yt=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+hi.length}write(e){let r=new pe(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(hi).write(this.value)}};var Jr=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(` +`)}};function We(t){return new Jr(bi(t))}function bi(t){let e=new Qe;for(let[r,n]of Object.entries(t)){let i=new Yt(r,wi(n));e.addField(i)}return e}function wi(t){if(typeof t=="string")return new W(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new W(String(t));if(typeof t=="bigint")return new W(`${t}n`);if(t===null)return new W("null");if(t===void 0)return new W("undefined");if(Be(t))return new W(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return b.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=jt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof Ee?new W(`Prisma.${t._getName()}`):Ge(t)?new W(`prisma.${ve(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?Da(t):typeof t=="object"?bi(t):new W(Object.prototype.toString.call(t))}function Da(t){let e=new $e;for(let r of t)e.addItem(wi(r));return e}function Xt(t,e){let r=e==="pretty"?ci:Wt,n=t.renderAllMessages(r),i=new Ve(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Zt({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=We(t);for(let A of e)Qt(A,a,s);let{message:f,args:h}=Xt(a,r),C=$t({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:h});throw new K(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function de(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function Ei(t,e,r){let n=de(r);return!e.result||!(e.result.$allModels||e.result[n])?t:Ia({...t,...xi(e.name,t,e.result.$allModels),...xi(e.name,t,e.result[n])})}function Ia(t){let e=new me,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return Vt(t,n=>({...n,needs:r(n.name,new Set)}))}function xi(t,e,r){return r?Vt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Ma(e,o,i)})):{}}function Ma(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Pi(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function vi(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var er=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new me;modelExtensionsCache=new me;queryCallbacksCache=new me;clientExtensions=lt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=lt(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>Ei(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=de(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Ke=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new er(e))}isEmpty(){return this.head===void 0}append(e){return new t(new er(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var tr=class{constructor(e){this.name=e}};function Ti(t){return t instanceof tr}function Ci(t){return new tr(t)}u();c();m();p();d();l();u();c();m();p();d();l();var Ai=Symbol(),bt=class{constructor(e){if(e!==Ai)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?rr:e}},rr=new bt(Ai);function fe(t){return t instanceof bt}var _a={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ri="explicitly `undefined` values are not allowed";function nr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=Ke.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C}){let A=new Gr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:C});return{modelName:t,action:_a[e],query:wt(r,A)}}function wt({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Oi(r,n),selection:La(t,e,i,n)}}function La(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),qa(t,n)):Fa(n,e,r)}function Fa(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&Ua(n,e,t),Na(n,r,t),n}function Ua(t,e,r){for(let[n,i]of Object.entries(e)){if(fe(i))continue;let o=r.nestSelection(n);if(Wr(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=wt(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=wt(i,o)}}function Na(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=vi(i,n);for(let[s,a]of Object.entries(o)){if(fe(a))continue;Wr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function qa(t,e){let r={},n=e.getComputedFields(),i=Pi(t,n);for(let[o,s]of Object.entries(i)){if(fe(s))continue;let a=e.nestSelection(o);Wr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||fe(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=wt({},a):r[o]=!0;continue}r[o]=wt(s,a)}}return r}function Si(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(qe(t)){if(jt(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ti(t))return{$type:"Param",value:t.name};if(Ge(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return Ba(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if(Va(t))return t.values;if(Be(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof Ee){if(t!==zt.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(ja(t))return t.toJSON();if(typeof t=="object")return Oi(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Oi(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);fe(i)||(i!==void 0?r[n]=Si(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Ri}))}return r}function Ba(t,e){let r=[];for(let n=0;n({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[ve(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ie(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();function ki(t){if(!t._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var He=class{_client;constructor(e){this._client=e}prometheus(e){return ki(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return ki(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function Di(t,e){let r=lt(()=>$a(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function $a(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Kr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();m();p();d();l();var Hr=new WeakMap,ir="$$PrismaTypedSql",xt=class{constructor(e,r){Hr.set(this,{sql:e,values:r}),Object.defineProperty(this,ir,{value:ir})}get sql(){return Hr.get(this).sql}get values(){return Hr.get(this).values}};function Ii(t){return(...e)=>new xt(t,e)}function or(t){return t!=null&&t[ir]===ir}u();c();m();p();d();l();var Jo=kt(Mi());u();c();m();p();d();l();_i();Vn();Gn();u();c();m();p();d();l();var ee=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;it.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ar={enumerable:!0,configurable:!0,writable:!0};function lr(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ar,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var Ui=Symbol.for("nodejs.util.inspect.custom");function ae(t,e){let r=Ja(e),n=new Set,i=new Proxy(t,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ni(Reflect.ownKeys(o),r),a=Ni(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...ar,...f?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ui]=function(){let o={...this};return delete o[Ui],o},i}function Ja(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function Ni(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function ze(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function ur(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();m();p();d();l();function qi(t){if(t===void 0)return"";let e=We(t);return new Ve(0,{colors:Wt}).write(e).toString()}u();c();m();p();d();l();var Ga="P2037";function cr({error:t,user_facing_error:e},r,n){return e.error_code?new Z(Wa(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new Q(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function Wa(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===Ga&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Xr=class{getLocation(){return null}};function Ce(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Xr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Bi={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ye(t={}){let e=Ha(t);return Object.entries(e).reduce((n,[i,o])=>(Bi[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ha(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function mr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function Vi(t,e){let r=mr(t);return e({action:"aggregate",unpacker:r,argsMapper:Ye})(t)}u();c();m();p();d();l();function za(t={}){let{select:e,...r}=t;return typeof e=="object"?Ye({...r,_count:e}):Ye({...r,_count:{_all:!0}})}function Ya(t={}){return typeof t.select=="object"?e=>mr(t)(e)._count:e=>mr(t)(e)._count._all}function ji(t,e){return e({action:"count",unpacker:Ya(t),argsMapper:za})(t)}u();c();m();p();d();l();function Xa(t={}){let e=Ye(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function Za(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function $i(t,e){return e({action:"groupBy",unpacker:Za(t),argsMapper:Xa})(t)}function Qi(t,e,r){if(e==="aggregate")return n=>Vi(n,r);if(e==="count")return n=>ji(n,r);if(e==="groupBy")return n=>$i(n,r)}u();c();m();p();d();l();function Ji(t,e){let r=e.fields.filter(i=>!i.relationName),n=ti(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new dt(t,o,s.type,s.isList,s.kind==="enum")},...lr(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var Gi=t=>Array.isArray(t)?t:t.split("."),Zr=(t,e)=>Gi(e).reduce((r,n)=>r&&r[n],t),Wi=(t,e,r)=>Gi(e).reduceRight((n,i,o,s)=>Object.assign({},Zr(t,s.slice(0,o)),{[i]:n}),r);function el(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function tl(t,e,r){return e===void 0?t??{}:Wi(e,r,t||!0)}function en(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,h)=>({...f,[h.name]:h}),{});return f=>{let h=Ce(t._errorFormat),C=el(n,i),A=tl(f,o,C),k=r({dataPath:C,callsite:h})(A),R=rl(t,e);return new Proxy(k,{get(_,O){if(!R.includes(O))return _[O];let ye=[a[O].type,r,O],z=[C,A];return en(t,...ye,...z)},...lr([...R,...Object.getOwnPropertyNames(k)])})}}function rl(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var nl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],il=["aggregate","count","groupBy"];function tn(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[ol(t,e),al(t,e),Et(r),H("name",()=>e),H("$name",()=>e),H("$parent",()=>t._appliedParent)];return ae({},n)}function ol(t,e){let r=de(e),n=Object.keys(ut).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let h=Ce(t._errorFormat);return t._createPrismaPromise(C=>{let A={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:h};return t._request({...A,...a})},{action:o,args:f,model:e})};return nl.includes(o)?en(t,e,s):sl(i)?Qi(t,i,s):s({})}}}function sl(t){return il.includes(t)}function al(t,e){return Me(H("fields",()=>{let r=t._runtimeDataModel.models[e];return Ji(e,r)}))}u();c();m();p();d();l();function Ki(t){return t.replace(/^./,e=>e.toUpperCase())}var rn=Symbol();function Pt(t){let e=[ll(t),ul(t),H(rn,()=>t),H("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(Et(r)),ae(t,e)}function ll(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function ul(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(de),n=[...new Set(e.concat(r))];return Me({getKeys(){return n},getPropertyValue(i){let o=Ki(i);if(t._runtimeDataModel.models[o]!==void 0)return tn(t,o);if(t._runtimeDataModel.models[i]!==void 0)return tn(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Hi(t){return t[rn]?t[rn]:t}function zi(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Pt(e)}u();c();m();p();d();l();u();c();m();p();d();l();function Yi({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let h=f.needs.filter(C=>n[C]);h.length>0&&a.push(ze(h))}else if(r){if(!r[f.name])continue;let h=f.needs.filter(C=>!r[C]);h.length>0&&a.push(ze(h))}cl(t,f.needs)&&s.push(ml(f,ae(t,s)))}return s.length>0||a.length>0?ae(t,[...s,...a]):t}function cl(t,e){return e.every(r=>Nr(t,r))}function ml(t,e){return Me(H(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function pr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let h=typeof s=="object"?s:{};e[o]=pr({visitor:i,result:e[o],args:h,modelName:f.type,runtimeDataModel:n})}}function Zi({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:pr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,h)=>{let C=de(f);return Yi({result:a,modelName:C,select:h.select,omit:h.select?void 0:{...o?.[C],...h.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();var pl=["$connect","$disconnect","$on","$transaction","$extends"],eo=pl;function to(t){if(t instanceof ee)return dl(t);if(or(t))return fl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:to(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=ao(o,f),a.args=s,no(t,a,r,n+1)}})})}function io(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return no(t,e,s)}function oo(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?so(r,n,0,t):t(r)}}function so(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=ao(i,f),so(a,e,r+1,n)}})}var ro=t=>t;function ao(t=ro,e=ro){return r=>t(e(r))}u();c();m();p();d();l();var lo=G("prisma:client"),uo={Vercel:"vercel","Netlify CI":"netlify"};function co({postinstall:t,ciName:e,clientVersion:r,generator:n}){if(lo("checkPlatformCaching:postinstall",t),lo("checkPlatformCaching:ciName",e),t===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&e&&e in uo){let i=`Prisma has detected that this project was built on ${e}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${uo[e]}-build`;throw console.error(i),new I(i,r)}}u();c();m();p();d();l();function mo(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();l();function po(t,e){throw new Error(e)}function gl(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function yl(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function Xe(t){return t===null?t:Array.isArray(t)?t.map(Xe):typeof t=="object"?gl(t)?hl(t):t.constructor!==null&&t.constructor.name!=="Object"?t:yl(t,Xe):t}function hl({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new v(e);case"Json":return JSON.parse(e);default:po(e,"Unknown tagged value")}}var fo="6.19.0";u();c();m();p();d();l();u();c();m();p();d();l();var wl=()=>globalThis.process?.release?.name==="node",xl=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,El=()=>!!globalThis.Deno,Pl=()=>typeof globalThis.Netlify=="object",vl=()=>typeof globalThis.EdgeRuntime=="object",Tl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Cl(){return[[Pl,"netlify"],[vl,"edge-light"],[Tl,"workerd"],[El,"deno"],[xl,"bun"],[wl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Al={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ze(){let t=Cl();return{id:t,prettyName:Al[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}function dr({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ze().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function go(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var nn,yo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ze().prettyName})`,e);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",e);nn===void 0&&(nn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",e);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a),h=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),h(),o.QueryEngine})());let i=await nn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Rl="P2036",ge=G("prisma:client:libraryEngine");function Sl(t){return t.item_type==="query"&&"query"in t}function Ol(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var oO=[...kr,"native"],kl=0xffffffffffffffffn,on=1n;function Dl(){let t=on++;return on>kl&&(on=1n),t}var Tt=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(e,r){this.libraryLoader=r??yo,this.config=e,this.libraryStarted=!1,this.logQueries=e.logQueries??!1,this.logLevel=e.logLevel??"error",this.logEmitter=e.logEmitter,this.datamodel=e.inlineSchema,this.tracingHelper=e.tracingHelper,e.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(e.overrideDatasources)[0],i=e.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(e){return{applyPendingMigrations:e.applyPendingMigrations?.bind(e),commitTransaction:this.withRequestId(e.commitTransaction.bind(e)),connect:this.withRequestId(e.connect.bind(e)),disconnect:this.withRequestId(e.disconnect.bind(e)),metrics:e.metrics?.bind(e),query:this.withRequestId(e.query.bind(e)),rollbackTransaction:this.withRequestId(e.rollbackTransaction.bind(e)),sdlSchema:e.sdlSchema?.bind(e),startTransaction:this.withRequestId(e.startTransaction.bind(e)),trace:e.trace.bind(e),free:e.free?.bind(e)}}withRequestId(e){return async(...r)=>{let n=Dl().toString();try{return await e(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(e,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(e==="start"){let f=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(f,o)}else e==="commit"?s=await this.engine?.commitTransaction(n.id,o):e==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Il(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new Q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(ge("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(e){if(!e)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new Q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let e=new w(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt));let r=await this.adapterPromise;r&&ge("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",Sl(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Ol(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(e){try{return JSON.parse(e)}catch{}return e}parseRequestError(e){try{return JSON.parse(e)}catch{}return e}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return ge(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{ge("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(qt)),await this.adapterPromise,ge("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",e),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return ge("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let e=async()=>{await new Promise(n=>setImmediate(n)),ge("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,ge("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",e),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(e){return this.library?.debugPanic(e)}async request(e,{traceparent:r,interactiveTransaction:n}){ge(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(e);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new Q(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){ge("requestBatch");let i=ur(e,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),go(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:h}=a;if(Array.isArray(f))return f.map(C=>C.errors&&C.errors.length>0?this.loggerRustPanic??this.buildQueryError(C.errors[0],o?.errorRegistry):{data:C});throw h&&h.length===1?new Error(h[0].error):new Error(JSON.stringify(a))}buildQueryError(e,r){e.user_facing_error.is_panic;let n=this.getExternalAdapterError(e.user_facing_error,r);return n?n.error:cr(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Rl&&r){let n=e.meta?.id;Bt(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return Bt(i,"External error with reported id was not registered"),i}}async metrics(e){await this.start();let r=await this.engine.metrics(JSON.stringify(e));return e.format==="prometheus"?r:this.parseEngineResponse(r)}};function Il(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var Ct="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",fr=class{constructor(e){this.config=e;this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl,this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload,this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError,this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError,this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError,this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError,this.debug=this.config.accelerateUtils?.debug,this.engineVersion=this.config.accelerateUtils?.engineVersion,this.clientVersion=this.config.accelerateUtils?.clientVersion}name="AccelerateEngine";resolveDatasourceUrl;getBatchRequestPayload;prismaGraphQLToJSError;PrismaClientUnknownRequestError;PrismaClientInitializationError;PrismaClientKnownRequestError;debug;engineVersion;clientVersion;onBeforeExit(e){}async start(){}async stop(){}version(e){return"unknown"}transaction(e,r,n){throw new I(Ct,this.config.clientVersion)}metrics(e){throw new I(Ct,this.config.clientVersion)}request(e,r){throw new I(Ct,this.config.clientVersion)}requestBatch(e,r){throw new I(Ct,this.config.clientVersion)}applyPendingMigrations(){throw new I(Ct,this.config.clientVersion)}};u();c();m();p();d();l();function ho({url:t,adapter:e,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=O=>{i.push({_tag:"warning",value:O})},a=O=>{let D=O.join(` +`);o.push({_tag:"error",value:D})},f=!!t?.startsWith("prisma://"),h=_r(t),C=!!e,A=f||h;!C&&r&&A&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let k=A||!r;C&&(k||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):A?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let R={accelerate:k,ppg:h,driverAdapters:C};function _(O){return O.length>0}return _(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:R}:{ok:!0,diagnostics:{warnings:i},isUsing:R}}function bo({copyEngine:t=!0},e){let r;try{r=dr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...g.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=ho({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let A of o.warnings)at(...A.value);if(!n){let A=o.errors[0];throw new K(A.value,{clientVersion:e.clientVersion})}let s=Ne(e.generator),a=s==="library",f=s==="binary",h=s==="client",C=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate,i.driverAdapters?new Tt(e):i.accelerate?new fr(e):new sn({clientVersion:e.clientVersion})}var sn=class{constructor(e){return new Proxy(this,{get(r,n){let i=`In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters`;throw new K(i,e)}})}};u();c();m();p();d();l();function wo({generator:t}){return t?.previewFeatures??[]}u();c();m();p();d();l();var xo=t=>({command:t});u();c();m();p();d();l();u();c();m();p();d();l();var Eo=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function et(t){try{return Po(t,"fast")}catch{return Po(t,"slow")}}function Po(t,e){return JSON.stringify(t.map(r=>To(r,e)))}function To(t,e){if(Array.isArray(t))return t.map(r=>To(r,e));if(typeof t=="bigint")return{prisma__type:"bigint",prisma__value:t.toString()};if(qe(t))return{prisma__type:"date",prisma__value:t.toJSON()};if(be.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(b.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if(Ml(t))return{prisma__type:"bytes",prisma__value:b.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?Co(t):t}function Ml(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Co(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(vo);let e={};for(let r of Object.keys(t))e[r]=vo(t[r]);return e}function vo(t){return typeof t=="bigint"?t.toString():Co(t)}var _l=/^(\s*alter\s)/i,Ao=G("prisma:client");function an(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&_l.exec(e))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var ln=({clientMethod:t,activeProvider:e})=>r=>{let n="",i;if(or(r))n=r.sql,i={values:et(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:et(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:et(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:et(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Eo(r),i={values:et(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${e} provider does not support ${t}`)}return i?.values?Ao(`prisma.${t}(${n}, ${i.values})`):Ao(`prisma.${t}(${n})`),{query:n,parameters:i}},Ro={requestArgsToMiddlewareArgs(t){return[t.strings,...t.values]},middlewareArgsToRequestArgs(t){let[e,...r]=t;return new ee(e,r)}},So={requestArgsToMiddlewareArgs(t){return[t]},middlewareArgsToRequestArgs(t){return t[0]}};u();c();m();p();d();l();function un(t){return function(r,n){let i,o=(s=t)=>{try{return s===void 0||s?.kind==="itx"?i??=Oo(r(s)):Oo(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Oo(t){return typeof t.then=="function"?t:Promise.resolve(t)}u();c();m();p();d();l();var Ll=Dr.split(".")[0],Fl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(t,e){return e()}},cn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(e){return this.getGlobalTracingHelper().getTraceParent(e)}dispatchEngineSpans(e){return this.getGlobalTracingHelper().dispatchEngineSpans(e)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(e,r){return this.getGlobalTracingHelper().runInChildSpan(e,r)}getGlobalTracingHelper(){let e=globalThis[`V${Ll}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return e?.helper??r?.helper??Fl}};function ko(){return new cn}u();c();m();p();d();l();function Do(t,e=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--t===0&&r(e()),i?.(n)}}}u();c();m();p();d();l();function Io(t){return typeof t=="string"?t:t.reduce((e,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?e:e&&(r==="info"||e==="info")?"info":n},void 0)}u();c();m();p();d();l();u();c();m();p();d();l();function gr(t){return typeof t.batchRequestIdx=="number"}u();c();m();p();d();l();function Mo(t){if(t.action!=="findUnique"&&t.action!=="findUniqueOrThrow")return;let e=[];return t.modelName&&e.push(t.modelName),t.query.arguments&&e.push(mn(t.query.arguments)),e.push(mn(t.query.selection)),e.join("")}function mn(t){return`(${Object.keys(t).sort().map(r=>{let n=t[r];return typeof n=="object"&&n!==null?`(${r} ${mn(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var Ul={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function pn(t){return Ul[t]}u();c();m();p();d();l();var yr=class{constructor(e){this.options=e;this.batches={}}batches;tickActive=!1;request(e){let r=this.options.batchBy(e);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:e,resolve:n,reject:i})})):this.options.singleLoader(e)}dispatchBatches(){for(let e in this.batches){let r=this.batches[e];delete this.batches[e],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i_e("bigint",r));case"bytes-array":return e.map(r=>_e("bytes",r));case"decimal-array":return e.map(r=>_e("decimal",r));case"datetime-array":return e.map(r=>_e("datetime",r));case"date-array":return e.map(r=>_e("date",r));case"time-array":return e.map(r=>_e("time",r));default:return e}}function hr(t){let e=[],r=Nl(t);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(A=>A.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),h=n.some(A=>pn(A.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Bl(o),containsWrite:h,customDataProxyFetch:i})).map((A,k)=>{if(A instanceof Error)return A;try{return this.mapQueryEngineResult(n[k],A)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?_o(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:pn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Mo(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(e){try{return await this.dataloader.request(e)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=e;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:e.globalOmit})}}mapQueryEngineResult({dataPath:e,unpacker:r},n){let i=n?.data,o=this.unpack(i,e,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(e){try{this.handleRequestError(e)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:e.clientMethod,timestamp:new Date}),r}}handleRequestError({error:e,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(ql(e),Vl(e,i))throw e;if(e instanceof Z&&jl(e)){let h=Lo(e.meta);Zt({args:o,errors:[h],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=e.message;if(n&&(f=$t({callsite:n,originalMethod:r,isPanic:e.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),e.code){let h=s?{modelName:s,...e.meta}:e.meta;throw new Z(f,{code:e.code,clientVersion:this.client._clientVersion,meta:h,batchRequestIdx:e.batchRequestIdx})}else{if(e.isPanic)throw new xe(f,this.client._clientVersion);if(e instanceof Q)throw new Q(f,{clientVersion:this.client._clientVersion,batchRequestIdx:e.batchRequestIdx});if(e instanceof I)throw new I(f,this.client._clientVersion);if(e instanceof xe)throw new xe(f,this.client._clientVersion)}throw e.clientVersion=this.client._clientVersion,e}sanitizeMessage(e){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?Ur(e):e}unpack(e,r,n){if(!e||(e.data&&(e=e.data),!e))return e;let i=Object.keys(e)[0],o=Object.values(e)[0],s=r.filter(h=>h!=="select"&&h!=="include"),a=Zr(o,s),f=i==="queryRaw"?hr(a):Xe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Bl(t){if(t){if(t.kind==="batch")return{kind:"batch",options:{isolationLevel:t.isolationLevel}};if(t.kind==="itx")return{kind:"itx",options:_o(t)};Ie(t,"Unknown transaction kind")}}function _o(t){return{id:t.id,payload:t.payload}}function Vl(t,e){return gr(t)&&e?.kind==="batch"&&t.batchRequestIdx!==e.index}function jl(t){return t.code==="P2009"||t.code==="P2012"}function Lo(t){if(t.kind==="Union")return{kind:"Union",errors:t.errors.map(Lo)};if(Array.isArray(t.selectionPath)){let[,...e]=t.selectionPath;return{...t,selectionPath:e}}return t}u();c();m();p();d();l();var Fo=fo;u();c();m();p();d();l();var Vo=kt(Vr());u();c();m();p();d();l();var M=class extends Error{constructor(e){super(e+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(M,"PrismaClientConstructorValidationError");var Uo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],No=["pretty","colorless","minimal"],qo=["info","query","warn","error"],$l={datasources:(t,{datasourceNames:e})=>{if(t){if(typeof t!="object"||Array.isArray(t))throw new M(`Invalid value ${JSON.stringify(t)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(t)){if(!e.includes(r)){let i=tt(r,e)||` Available datasources: ${e.join(", ")}`;throw new M(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new M(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new M(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new M(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(t,e)=>{if(!t&&Ne(e.generator)==="client")throw new M('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(t!==null){if(t===void 0)throw new M('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(Ne(e.generator)==="binary")throw new M('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:t=>{if(typeof t<"u"&&typeof t!="string")throw new M(`Invalid value ${JSON.stringify(t)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:t=>{if(t){if(typeof t!="string")throw new M(`Invalid value ${JSON.stringify(t)} for "errorFormat" provided to PrismaClient constructor.`);if(!No.includes(t)){let e=tt(t,No);throw new M(`Invalid errorFormat ${t} provided to PrismaClient constructor.${e}`)}}},log:t=>{if(!t)return;if(!Array.isArray(t))throw new M(`Invalid value ${JSON.stringify(t)} for "log" provided to PrismaClient constructor.`);function e(r){if(typeof r=="string"&&!qo.includes(r)){let n=tt(r,qo);throw new M(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of t){e(r);let n={level:e,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=tt(i,o);throw new M(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new M(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:t=>{if(!t)return;let e=t.maxWait;if(e!=null&&e<=0)throw new M(`Invalid value ${e} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=t.timeout;if(r!=null&&r<=0)throw new M(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(t,e)=>{if(typeof t!="object")throw new M('"omit" option is expected to be an object.');if(t===null)throw new M('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(t)){let o=Jl(n,e.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(h=>h.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new M(Gl(t,r))},__internal:t=>{if(!t)return;let e=["debug","engine","configOverride"];if(typeof t!="object")throw new M(`Invalid value ${JSON.stringify(t)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(t))if(!e.includes(r)){let n=tt(r,e);throw new M(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function jo(t,e){for(let[r,n]of Object.entries(t)){if(!Uo.includes(r)){let i=tt(r,Uo);throw new M(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}$l[r](n,e)}if(t.datasourceUrl&&t.datasources)throw new M('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function tt(t,e){if(e.length===0||typeof t!="string")return"";let r=Ql(t,e);return r?` Did you mean "${r}"?`:""}function Ql(t,e){if(e.length===0)return null;let r=e.map(i=>({value:i,distance:(0,Vo.default)(t,i)}));r.sort((i,o)=>i.distanceve(n)===e);if(r)return t[r]}function Gl(t,e){let r=We(t);for(let o of e)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Xt(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}u();c();m();p();d();l();function $o(t){return t.length===0?Promise.resolve([]):new Promise((e,r)=>{let n=new Array(t.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===t.length&&(o=!0,i?r(i):e(n)))},f=h=>{o||(o=!0,r(h))};for(let h=0;h{n[h]=C,a()},C=>{if(!gr(C)){f(C);return}C.batchRequestIdx===h?f(C):(i||(i=C),a())})})}var Ae=G("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Wl={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},Kl=Symbol.for("prisma.client.transaction.id"),Hl={id:0,nextId(){return++this.id}};function Go(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=un();constructor(n){t=n?.__internal?.configOverride?.(t)??t,co(t),n&&jo(n,t);let i=new sr().on("error",()=>{});this._extensions=Ke.empty(),this._previewFeatures=wo(t),this._clientVersion=t.clientVersion??Fo,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ko();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&Ut.resolve(t.dirname,t.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=t.activeProvider==="postgresql"||t.activeProvider==="cockroachdb"?"postgres":t.activeProvider;if(s.provider!==f)throw new I(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new I("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=t.injectableEdgeEnv?.();try{let f=n??{},h=f.__internal??{},C=h.debug===!0;C&&G.enable("prisma:client");let A=Ut.resolve(t.dirname,t.relativePath);Bn.existsSync(A)||(A=t.dirname),Ae("dirname",t.dirname),Ae("relativePath",t.relativePath),Ae("cwd",A);let k=h.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=t.runtimeDataModel,this._engineConfig={cwd:A,dirname:t.dirname,enableDebugLogs:C,allowTriggerPanic:k.allowTriggerPanic,prismaPath:k.binaryPath??void 0,engineEndpoint:k.endpoint,generator:t.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Io(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:t.engineWasm,compilerWasm:t.compilerWasm,clientVersion:t.clientVersion,engineVersion:t.engineVersion,previewFeatures:this._previewFeatures,activeProvider:t.activeProvider,inlineSchema:t.inlineSchema,overrideDatasources:mo(f,t.datasourceNames),inlineDatasources:t.inlineDatasources,inlineSchemaHash:t.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:t.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:dr,getBatchRequestPayload:ur,prismaGraphQLToJSError:cr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Z,debug:G("prisma:client:accelerateEngine"),engineVersion:Jo.version,clientVersion:t.clientVersion}},Ae("clientVersion",t.clientVersion),this._engine=bo(t,this._engineConfig),this._requestHandler=new br(this,i),f.log)for(let R of f.log){let _=typeof R=="string"?R:R.emit==="stdout"?R.level:null;_&&this.$on(_,O=>{st.log(`${st.tags[_]??""}`,O.message||O.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=Pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{qn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ln({clientMethod:i,activeProvider:a}),callsite:Ce(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Qo(n,i);return an(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(an(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new K(`The ${t.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:xo,callsite:Ce(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ln({clientMethod:i,activeProvider:a}),callsite:Ce(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Qo(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Hl.nextId(),s=Do(n.length),a=n.map((f,h)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let C=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,A={kind:"batch",id:o,index:h,isolationLevel:C,lock:s};return f.requestTransaction?.(A)??f});return $o(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let h={kind:"itx",...a};f=await n(this._createItxClient(h)),await this._engine.transaction("commit",o,a)}catch(h){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),h}return f}_createItxClient(n){return ae(Pt(ae(Hi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>un(n)),H(Kl,()=>n.id)])),[ze(eo)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Wl,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:h,args:C,...A}=f,k={...n,...A};C&&(k.args=i.middlewareArgsToRequestArgs(C)),n.transaction!==void 0&&h===!1&&delete k.transaction;let R=await io(this,k);return k.model?Zi({result:R,modelName:k.model,args:k.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:h,transaction:C,unpacker:A,otelParentCtx:k,customDataProxyFetch:R}){try{n=h?h(n):n;let _={name:"serialize"},O=this._tracingHelper.runInChildSpan(_,()=>nr({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return G.enabled("prisma:client")&&(Ae("Prisma Client call:"),Ae(`prisma.${i}(${qi(n)})`),Ae("Generated request:"),Ae(JSON.stringify(O,null,2)+` +`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:O,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:A,otelParentCtx:k,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(_){throw _.clientVersion=this._clientVersion,_}}$metrics=new He(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=zi}return e}function Qo(t,e){return zl(t)?[new ee(t,e),Ro]:[t,So]}function zl(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var Yl=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Wo(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!Yl.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm-engine-edge.js.map diff --git a/packages/challenge-prisma-client/schema.prisma b/packages/challenge-prisma-client/schema.prisma new file mode 100644 index 0000000..a6fcf45 --- /dev/null +++ b/packages/challenge-prisma-client/schema.prisma @@ -0,0 +1,734 @@ +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +generator client { + provider = "prisma-client-js" + previewFeatures = ["fullTextSearchPostgres", "postgresqlExtensions", "views"] +} + +generator externalClient { + provider = "prisma-client-js" + output = "../packages/challenge-prisma-client" + previewFeatures = ["fullTextSearchPostgres", "postgresqlExtensions", "views"] + binaryTargets = ["native", "debian-openssl-3.0.x"] +} + +// Enum for allowed challenge track values (matches app-constants) +enum ChallengeTrackEnum { + DESIGN + DATA_SCIENCE + DEVELOPMENT + QUALITY_ASSURANCE +} + +enum ReviewTypeEnum { + COMMUNITY + INTERNAL + SYSTEM + PROVISIONAL + EXAMPLE +} + +enum DiscussionTypeEnum { + CHALLENGE +} + +enum ChallengeStatusEnum { + NEW + DRAFT + APPROVED + ACTIVE + COMPLETED + DELETED + CANCELLED + CANCELLED_FAILED_REVIEW + CANCELLED_FAILED_SCREENING + CANCELLED_ZERO_SUBMISSIONS + CANCELLED_WINNER_UNRESPONSIVE + CANCELLED_CLIENT_REQUEST + CANCELLED_REQUIREMENTS_INFEASIBLE + CANCELLED_ZERO_REGISTRATIONS + CANCELLED_PAYMENT_FAILED +} + +enum PrizeSetTypeEnum { + PLACEMENT + COPILOT + REVIEWER + CHECKPOINT +} + +// Enum for review opportunity types on reviewers +enum ReviewOpportunityTypeEnum { + REGULAR_REVIEW + COMPONENT_DEV_REVIEW + SPEC_REVIEW + ITERATIVE_REVIEW + SCENARIOS_REVIEW +} + +////////////////////////////////////////// +// Main Challenge model +////////////////////////////////////////// + +model Challenge { + id String @id @default(uuid()) + name String + description String? + privateDescription String? + challengeSource String? + descriptionFormat String? + projectId Int? // frequently queried field + typeId String + trackId String // FK for relation in ChallengeTrack + timelineTemplateId String? // now used as foreign key to ChallengeTimelineTemplate + overviewTotalPrizes Float? // stored from overview.totalPrizes + numOfRegistrants Int @default(0) + numOfSubmissions Int @default(0) + numOfCheckpointSubmissions Int @default(0) + currentPhaseNames String[] // current phase names + + wiproAllowed Boolean @default(false) + + // simple arrays for tags and groups (PostgreSQL native array type) + tags String[] + groups String[] + + // Task information (flattened from challenge.task) + taskIsTask Boolean @default(false) + taskIsAssigned Boolean @default(false) + taskMemberId String? + + // Dates for challenge lifecycle + submissionStartDate DateTime? + submissionEndDate DateTime? + registrationStartDate DateTime? + registrationEndDate DateTime? + startDate DateTime? + endDate DateTime? + + // Normalized billing and legacy information (one-to-one) + billingRecord ChallengeBilling? + legacyId Int? // Legacy system ID for searching + legacyRecord ChallengeLegacy? @relation("ChallengeLegacyRelation") + + // Additional fields from createChallenge schema + status ChallengeStatusEnum @default(NEW) // new challenges default to status "New" + // Normalized top‑level constraints (e.g. allowedRegistrants) for a challenge + constraintRecord ChallengeConstraint? + + // Additional normalized relations from createChallenge + events ChallengeEvent[] + discussions ChallengeDiscussion[] + + // Existing relations (one-to-many) for challenge metadata, phases, prize sets, winners, attachments, + // terms and skills + metadata ChallengeMetadata[] + phases ChallengePhase[] + prizeSets ChallengePrizeSet[] + reviewers ChallengeReviewer[] + winners ChallengeWinner[] + attachments Attachment[] + terms ChallengeTerm[] + skills ChallengeSkill[] + auditLogs AuditLog[] + memberAccesses MemberChallengeAccess[] + + // Relation to ChallengeType (FK: typeId) + type ChallengeType @relation(fields: [typeId], references: [id]) + // Relation to ChallengeTrack (FK: trackId) + track ChallengeTrack @relation(fields: [trackId], references: [id]) + + timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id]) + + // Auditing fields (present in every table) + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([projectId]) + @@index([status]) // index added for optimized search by status + @@index([createdAt]) + @@index([updatedAt]) + @@index([typeId]) + @@index([trackId]) + @@index([groups], type: Gin, map: "challenge_groups_gin_idx") + @@index([submissionStartDate]) + @@index([submissionEndDate]) + @@index([registrationStartDate]) + @@index([registrationEndDate]) + @@index([startDate]) + @@index([endDate]) + @@index([status, startDate]) + @@index([trackId, typeId, status]) + @@index([status, typeId, trackId, createdAt(sort: Desc)], map: "challenge_status_type_track_created_at_idx") + @@index([legacyId]) + @@index([projectId, status]) +} + +////////////////////////////////////////// +// MemberChallengeAccess view – member/challenge pairs from resources schema +////////////////////////////////////////// + +view MemberChallengeAccess { + challengeId String + memberId String + + challenge Challenge @relation(fields: [challengeId], references: [id]) + + @@map("MemberChallengeAccess") +} + +////////////////////////////////////////// +// ChallengeType model +////////////////////////////////////////// + +model ChallengeType { + id String @id @default(uuid()) + name String + description String? + isActive Boolean @default(true) + isTask Boolean @default(false) + abbreviation String + + challenges Challenge[] + timelineTemplates ChallengeTimelineTemplate[] + // Default reviewer configurations associated with this type + defaultReviewers DefaultChallengeReviewer[] + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([abbreviation]) +} + +////////////////////////////////////////// +// ChallengeTrack model +////////////////////////////////////////// + +model ChallengeTrack { + id String @id @default(uuid()) + name String + description String? + isActive Boolean + abbreviation String + legacyId Int? // numeric legacy system id (if provided) + track ChallengeTrackEnum? // enum value from ChallengeTrackEnum + challenges Challenge[] + // Opposite relation for ChallengeTimelineTemplate + timelineTemplates ChallengeTimelineTemplate[] + // Default reviewer configurations associated with this track + defaultReviewers DefaultChallengeReviewer[] + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([legacyId]) +} + +////////////////////////////////////////// +// ChallengeTimelineTemplate model +////////////////////////////////////////// + +model ChallengeTimelineTemplate { + id String @id @default(uuid()) + typeId String + trackId String + timelineTemplateId String // now required per Swagger spec + + // Link to the TimelineTemplate model via timelineTemplateId. + timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id]) + // Link to the ChallengeTrack model via trackId. + track ChallengeTrack @relation(fields: [trackId], references: [id]) + // Link to the ChallengeType model via typeId. + type ChallengeType @relation(fields: [typeId], references: [id]) + + isDefault Boolean @default(false) + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + // Composite index to support searches/updates by typeId, trackId and timelineTemplateId. + @@index([typeId, trackId, timelineTemplateId]) +} + +////////////////////////////////////////// +// AuditLog model – tracks field changes +////////////////////////////////////////// + +model AuditLog { + id String @id @default(uuid()) + challengeId String? // optional association with a challenge + fieldName String + oldValue String? + newValue String? + createdAt DateTime @default(now()) + createdBy String + memberId String? + + // Relation field to connect AuditLog to Challenge. + challenge Challenge? @relation(fields: [challengeId], references: [id]) + + @@index([challengeId]) +} + +////////////////////////////////////////// +// Attachment model – for challenge attachments +////////////////////////////////////////// + +model Attachment { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String + name String + fileSize Int + url String + description String? + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// ChallengeMetadata model – key/value metadata +////////////////////////////////////////// + +model ChallengeMetadata { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String + name String // name of the metadata + value String // value stored as string for flexibility + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengeId]) +} + +////////////////////////////////////////// +// Prize model – individual prize in a prize set +////////////////////////////////////////// + +model Prize { + id String @id @default(uuid()) + description String? + prizeSet ChallengePrizeSet @relation(fields: [prizeSetId], references: [id], onDelete: Cascade) + prizeSetId String + type String // e.g. "USD", "POINT" (could also be converted to enum later) + value Float + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// ChallengeWinner model – record winners for a challenge +////////////////////////////////////////// + +model ChallengeWinner { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String + userId Int + handle String + placement Int + type PrizeSetTypeEnum + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengeId]) + @@index([challengeId, type, placement]) +} + +////////////////////////////////////////// +// ChallengeTerm model – association of challenge and terms +////////////////////////////////////////// + +model ChallengeTerm { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String + termId String // Terms API id + roleId String // UUID for the associated role + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// ChallengeSkill model – linking challenges with skills +////////////////////////////////////////// + +model ChallengeSkill { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String + skillId String // Request provided skillId + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// ChallengeBilling model – normalized billing info +////////////////////////////////////////// + +model ChallengeBilling { + id String @id @default(uuid()) + billingAccountId String? + markup Float? // in range [0, 100] + clientBillingRate Float? // in range [0, 100]. Supporting range on postgres is an open issue with prisma https://github.com/prisma/prisma/issues/3287. + challengeId String @unique + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// ChallengeLegacy model – normalized legacy info +////////////////////////////////////////// + +model ChallengeLegacy { + id String @id @default(uuid()) + reviewType ReviewTypeEnum @default(INTERNAL) + confidentialityType String @default("public") + forumId Int? + directProjectId Int? + screeningScorecardId Int? + reviewScorecardId Int? + isTask Boolean @default(false) + useSchedulingAPI Boolean @default(false) + pureV5Task Boolean @default(false) + pureV5 Boolean @default(false) + selfService Boolean @default(false) + selfServiceCopilot String? + track String? // as provided in the legacy object + subTrack String? // as provided in the legacy object + legacySystemId Int? // represents the external "legacyId" + challengeId String @unique + challenge Challenge @relation("ChallengeLegacyRelation", fields: [challengeId], references: [id], onDelete: Cascade) + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// ChallengeEvent model – normalized challenge events +////////////////////////////////////////// + +model ChallengeEvent { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String + eventId Int + name String? + key String? + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengeId]) +} + +////////////////////////////////////////// +// ChallengeDiscussion and associated options – normalized discussion channels +////////////////////////////////////////// + +model ChallengeDiscussion { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String + discussionId String? + name String + type DiscussionTypeEnum // updated to use enum + provider String + url String? + options ChallengeDiscussionOption[] + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengeId]) +} + +model ChallengeDiscussionOption { + id String @id @default(uuid()) + discussion ChallengeDiscussion @relation(fields: [discussionId], references: [id], onDelete: Cascade) + discussionId String + optionKey String + optionValue String + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// ChallengeConstraint model – top-level challenge constraints (e.g. allowed registrants) +////////////////////////////////////////// + +model ChallengeConstraint { + id String @id @default(uuid()) + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + challengeId String @unique + allowedRegistrants String[] @default([]) + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String +} + +////////////////////////////////////////// +// New Model: ChallengePhase – to capture per-phase info from create/update challenge operations +// Each phase is linked with a challenge and holds a duration and any custom constraints. +////////////////////////////////////////// + +model Phase { + id String @id @default(uuid()) + name String + description String? + isOpen Boolean + duration Int + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + // Inverse relation for associated challenge phases + challengePhases ChallengePhase[] + ChallengeReviewer ChallengeReviewer[] + DefaultChallengeReviewer DefaultChallengeReviewer[] + + @@unique([name]) +} + +model ChallengePhase { + id String @id @default(uuid()) + challengeId String + phaseId String // foreign key to Phase + + name String // phase name + description String? // description + isOpen Boolean? @default(false) // if this phase is open + predecessor String? // predecessor of this phase + duration Int? // duration in seconds + scheduledStartDate DateTime? // when the phase is scheduled to start + scheduledEndDate DateTime? + actualStartDate DateTime? + actualEndDate DateTime? // when the phase actually ended + constraints ChallengePhaseConstraint[] + + // Relation fields + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + phase Phase @relation(fields: [phaseId], references: [id]) + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengeId]) + @@index([challengeId, isOpen]) + @@index([challengeId, name]) + @@index([challengeId, isOpen, scheduledEndDate, actualEndDate], map: "challenge_phase_challenge_open_end_idx") +} + +////////////////////////////////////////// +// New Model: ChallengePhaseConstraint – to capture custom constraints for each phase +////////////////////////////////////////// + +model ChallengePhaseConstraint { + id String @id @default(uuid()) + challengePhaseId String + name String // the name/key of the constraint + value Int // numeric value of the constraint (can be changed to Float if needed) + + // Relation to the phase + challengePhase ChallengePhase @relation(fields: [challengePhaseId], references: [id], onDelete: Cascade) + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengePhaseId]) +} + +////////////////////////////////////////// +// New Model: ChallengePrizeSet – to group prizes for a challenge +////////////////////////////////////////// + +model ChallengePrizeSet { + id String @id @default(uuid()) + challengeId String + type PrizeSetTypeEnum // using enum instead of string + description String? + prizes Prize[] + + // Relation to the challenge + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengeId]) + @@index([challengeId, type]) +} + +////////////////////////////////////////// +// ChallengeReviewer model – reviewers for a challenge, both AI and member +////////////////////////////////////////// + +model ChallengeReviewer { + id String @id @default(uuid()) + challengeId String + + // Reviewer configuration + scorecardId String + isMemberReview Boolean + memberReviewerCount Int? + phaseId String + fixedAmount Float? @default(0) + baseCoefficient Float? + incrementalCoefficient Float? + type ReviewOpportunityTypeEnum? + aiWorkflowId String? @db.VarChar(14) + shouldOpenOpportunity Boolean @default(true) + + // Relation to the challenge + challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade) + // Relation to the phase + phase Phase @relation(fields: [phaseId], references: [id]) + + // Auditing fields + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([challengeId]) + @@index([phaseId]) + @@index([challengeId, phaseId]) +} + +////////////////////////////////////////// +// DefaultChallengeReviewer model – default reviewers by type and track +////////////////////////////////////////// + +model DefaultChallengeReviewer { + id String @id @default(uuid()) + typeId String + trackId String + timelineTemplateId String? + // Reviewer configuration (mirrors ChallengeReviewer) + scorecardId String? + isMemberReview Boolean + memberReviewerCount Int? + phaseName String + // Optional explicit link to Phase for better fidelity + phaseId String? + fixedAmount Float? @default(0) + baseCoefficient Float? + incrementalCoefficient Float? + opportunityType ReviewOpportunityTypeEnum? + aiWorkflowId String? @db.VarChar(14) + shouldOpenOpportunity Boolean @default(true) + + // Relations + challengeType ChallengeType @relation(fields: [typeId], references: [id]) + challengeTrack ChallengeTrack @relation(fields: [trackId], references: [id]) + timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id]) + // Relation to Phase (optional for backward compatibility with phaseName) + phase Phase? @relation(fields: [phaseId], references: [id]) + + // Auditing fields + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + @@index([typeId, trackId]) + @@index([typeId, trackId, timelineTemplateId]) + @@index([phaseId]) +} + +////////////////////////////////////////// +// TimelineTemplate model – defines timeline templates +////////////////////////////////////////// +model TimelineTemplate { + id String @id @default(uuid()) + name String + description String? + isActive Boolean @default(true) + phases TimelineTemplatePhase[] + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + // Opposite relation field, linking back to ChallengeTimelineTemplate. + challengeTimelineTemplates ChallengeTimelineTemplate[] + + // Opposite relation field for Challenge. + challenges Challenge[] + DefaultChallengeReviewer DefaultChallengeReviewer[] + + @@unique([name]) +} + +////////////////////////////////////////// +// TimelineTemplatePhase model – phases associated with a timeline template +////////////////////////////////////////// +model TimelineTemplatePhase { + id String @id @default(uuid()) + timelineTemplateId String + phaseId String // identifier for the phase + predecessor String? // optional predecessor phase id + defaultDuration Int // duration (in minutes, hours, etc.) as per business rules + + createdAt DateTime @default(now()) + createdBy String + updatedAt DateTime @updatedAt + updatedBy String + + timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id], onDelete: Cascade) + + @@index([timelineTemplateId]) + @@index([timelineTemplateId, phaseId]) +} diff --git a/packages/challenge-prisma-client/wasm-edge-light-loader.mjs b/packages/challenge-prisma-client/wasm-edge-light-loader.mjs new file mode 100644 index 0000000..dcf01f0 --- /dev/null +++ b/packages/challenge-prisma-client/wasm-edge-light-loader.mjs @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +export default import('./query_engine_bg.wasm?module') \ No newline at end of file diff --git a/packages/challenge-prisma-client/wasm-worker-loader.mjs b/packages/challenge-prisma-client/wasm-worker-loader.mjs new file mode 100644 index 0000000..e60a3fa --- /dev/null +++ b/packages/challenge-prisma-client/wasm-worker-loader.mjs @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +export default import('./query_engine_bg.wasm') \ No newline at end of file diff --git a/packages/challenge-prisma-client/wasm.d.ts b/packages/challenge-prisma-client/wasm.d.ts new file mode 100644 index 0000000..274b8fa --- /dev/null +++ b/packages/challenge-prisma-client/wasm.d.ts @@ -0,0 +1 @@ +export * from "./default" \ No newline at end of file diff --git a/packages/challenge-prisma-client/wasm.js b/packages/challenge-prisma-client/wasm.js new file mode 100644 index 0000000..f603062 --- /dev/null +++ b/packages/challenge-prisma-client/wasm.js @@ -0,0 +1,882 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime, + createParam, +} = require('./runtime/wasm-engine-edge.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.0 + * Query Engine version: 2ba551f319ab1df4bc874a89965d8b3641056773 + */ +Prisma.prismaVersion = { + client: "6.19.0", + engine: "2ba551f319ab1df4bc874a89965d8b3641056773" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.ChallengeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + projectId: 'projectId', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + overviewTotalPrizes: 'overviewTotalPrizes', + numOfRegistrants: 'numOfRegistrants', + numOfSubmissions: 'numOfSubmissions', + numOfCheckpointSubmissions: 'numOfCheckpointSubmissions', + currentPhaseNames: 'currentPhaseNames', + wiproAllowed: 'wiproAllowed', + tags: 'tags', + groups: 'groups', + taskIsTask: 'taskIsTask', + taskIsAssigned: 'taskIsAssigned', + taskMemberId: 'taskMemberId', + submissionStartDate: 'submissionStartDate', + submissionEndDate: 'submissionEndDate', + registrationStartDate: 'registrationStartDate', + registrationEndDate: 'registrationEndDate', + startDate: 'startDate', + endDate: 'endDate', + legacyId: 'legacyId', + status: 'status', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + isTask: 'isTask', + abbreviation: 'abbreviation', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + abbreviation: 'abbreviation', + legacyId: 'legacyId', + track: 'track', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + isDefault: 'isDefault', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + fileSize: 'fileSize', + url: 'url', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + userId: 'userId', + handle: 'handle', + placement: 'placement', + type: 'type', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingScalarFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + markup: 'markup', + clientBillingRate: 'clientBillingRate', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyScalarFieldEnum = { + id: 'id', + reviewType: 'reviewType', + confidentialityType: 'confidentialityType', + forumId: 'forumId', + directProjectId: 'directProjectId', + screeningScorecardId: 'screeningScorecardId', + reviewScorecardId: 'reviewScorecardId', + isTask: 'isTask', + useSchedulingAPI: 'useSchedulingAPI', + pureV5Task: 'pureV5Task', + pureV5: 'pureV5', + selfService: 'selfService', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + legacySystemId: 'legacySystemId', + challengeId: 'challengeId', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + eventId: 'eventId', + name: 'name', + key: 'key', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + type: 'type', + provider: 'provider', + url: 'url', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionScalarFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isOpen: 'isOpen', + duration: 'duration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + isOpen: 'isOpen', + predecessor: 'predecessor', + duration: 'duration', + scheduledStartDate: 'scheduledStartDate', + scheduledEndDate: 'scheduledEndDate', + actualStartDate: 'actualStartDate', + actualEndDate: 'actualEndDate', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintScalarFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + value: 'value', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + type: 'type', + description: 'description', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerScalarFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + type: 'type', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerScalarFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + isMemberReview: 'isMemberReview', + memberReviewerCount: 'memberReviewerCount', + phaseName: 'phaseName', + phaseId: 'phaseId', + fixedAmount: 'fixedAmount', + baseCoefficient: 'baseCoefficient', + incrementalCoefficient: 'incrementalCoefficient', + opportunityType: 'opportunityType', + aiWorkflowId: 'aiWorkflowId', + shouldOpenOpportunity: 'shouldOpenOpportunity', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + isActive: 'isActive', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseScalarFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + defaultDuration: 'defaultDuration', + createdAt: 'createdAt', + createdBy: 'createdBy', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessScalarFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.ChallengeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + privateDescription: 'privateDescription', + challengeSource: 'challengeSource', + descriptionFormat: 'descriptionFormat', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + currentPhaseNames: 'currentPhaseNames', + tags: 'tags', + groups: 'groups', + taskMemberId: 'taskMemberId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTypeOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTrackOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + abbreviation: 'abbreviation', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.AuditLogOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + fieldName: 'fieldName', + oldValue: 'oldValue', + newValue: 'newValue', + createdBy: 'createdBy', + memberId: 'memberId' +}; + +exports.Prisma.AttachmentOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + url: 'url', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeMetadataOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + value: 'value', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PrizeOrderByRelevanceFieldEnum = { + id: 'id', + description: 'description', + prizeSetId: 'prizeSetId', + type: 'type', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeWinnerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + handle: 'handle', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeTermOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + termId: 'termId', + roleId: 'roleId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeSkillOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + skillId: 'skillId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeBillingOrderByRelevanceFieldEnum = { + id: 'id', + billingAccountId: 'billingAccountId', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeLegacyOrderByRelevanceFieldEnum = { + id: 'id', + confidentialityType: 'confidentialityType', + selfServiceCopilot: 'selfServiceCopilot', + track: 'track', + subTrack: 'subTrack', + challengeId: 'challengeId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeEventOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + name: 'name', + key: 'key', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + discussionId: 'discussionId', + name: 'name', + provider: 'provider', + url: 'url', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeDiscussionOptionOrderByRelevanceFieldEnum = { + id: 'id', + discussionId: 'discussionId', + optionKey: 'optionKey', + optionValue: 'optionValue', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + allowedRegistrants: 'allowedRegistrants', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.PhaseOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + phaseId: 'phaseId', + name: 'name', + description: 'description', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePhaseConstraintOrderByRelevanceFieldEnum = { + id: 'id', + challengePhaseId: 'challengePhaseId', + name: 'name', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengePrizeSetOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.ChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + challengeId: 'challengeId', + scorecardId: 'scorecardId', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.DefaultChallengeReviewerOrderByRelevanceFieldEnum = { + id: 'id', + typeId: 'typeId', + trackId: 'trackId', + timelineTemplateId: 'timelineTemplateId', + scorecardId: 'scorecardId', + phaseName: 'phaseName', + phaseId: 'phaseId', + aiWorkflowId: 'aiWorkflowId', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplateOrderByRelevanceFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.TimelineTemplatePhaseOrderByRelevanceFieldEnum = { + id: 'id', + timelineTemplateId: 'timelineTemplateId', + phaseId: 'phaseId', + predecessor: 'predecessor', + createdBy: 'createdBy', + updatedBy: 'updatedBy' +}; + +exports.Prisma.MemberChallengeAccessOrderByRelevanceFieldEnum = { + challengeId: 'challengeId', + memberId: 'memberId' +}; +exports.ChallengeTrackEnum = exports.$Enums.ChallengeTrackEnum = { + DESIGN: 'DESIGN', + DATA_SCIENCE: 'DATA_SCIENCE', + DEVELOPMENT: 'DEVELOPMENT', + QUALITY_ASSURANCE: 'QUALITY_ASSURANCE' +}; + +exports.ReviewTypeEnum = exports.$Enums.ReviewTypeEnum = { + COMMUNITY: 'COMMUNITY', + INTERNAL: 'INTERNAL', + SYSTEM: 'SYSTEM', + PROVISIONAL: 'PROVISIONAL', + EXAMPLE: 'EXAMPLE' +}; + +exports.DiscussionTypeEnum = exports.$Enums.DiscussionTypeEnum = { + CHALLENGE: 'CHALLENGE' +}; + +exports.ChallengeStatusEnum = exports.$Enums.ChallengeStatusEnum = { + NEW: 'NEW', + DRAFT: 'DRAFT', + APPROVED: 'APPROVED', + ACTIVE: 'ACTIVE', + COMPLETED: 'COMPLETED', + DELETED: 'DELETED', + CANCELLED: 'CANCELLED', + CANCELLED_FAILED_REVIEW: 'CANCELLED_FAILED_REVIEW', + CANCELLED_FAILED_SCREENING: 'CANCELLED_FAILED_SCREENING', + CANCELLED_ZERO_SUBMISSIONS: 'CANCELLED_ZERO_SUBMISSIONS', + CANCELLED_WINNER_UNRESPONSIVE: 'CANCELLED_WINNER_UNRESPONSIVE', + CANCELLED_CLIENT_REQUEST: 'CANCELLED_CLIENT_REQUEST', + CANCELLED_REQUIREMENTS_INFEASIBLE: 'CANCELLED_REQUIREMENTS_INFEASIBLE', + CANCELLED_ZERO_REGISTRATIONS: 'CANCELLED_ZERO_REGISTRATIONS', + CANCELLED_PAYMENT_FAILED: 'CANCELLED_PAYMENT_FAILED' +}; + +exports.PrizeSetTypeEnum = exports.$Enums.PrizeSetTypeEnum = { + PLACEMENT: 'PLACEMENT', + COPILOT: 'COPILOT', + REVIEWER: 'REVIEWER', + CHECKPOINT: 'CHECKPOINT' +}; + +exports.ReviewOpportunityTypeEnum = exports.$Enums.ReviewOpportunityTypeEnum = { + REGULAR_REVIEW: 'REGULAR_REVIEW', + COMPONENT_DEV_REVIEW: 'COMPONENT_DEV_REVIEW', + SPEC_REVIEW: 'SPEC_REVIEW', + ITERATIVE_REVIEW: 'ITERATIVE_REVIEW', + SCENARIOS_REVIEW: 'SCENARIOS_REVIEW' +}; + +exports.Prisma.ModelName = { + Challenge: 'Challenge', + ChallengeType: 'ChallengeType', + ChallengeTrack: 'ChallengeTrack', + ChallengeTimelineTemplate: 'ChallengeTimelineTemplate', + AuditLog: 'AuditLog', + Attachment: 'Attachment', + ChallengeMetadata: 'ChallengeMetadata', + Prize: 'Prize', + ChallengeWinner: 'ChallengeWinner', + ChallengeTerm: 'ChallengeTerm', + ChallengeSkill: 'ChallengeSkill', + ChallengeBilling: 'ChallengeBilling', + ChallengeLegacy: 'ChallengeLegacy', + ChallengeEvent: 'ChallengeEvent', + ChallengeDiscussion: 'ChallengeDiscussion', + ChallengeDiscussionOption: 'ChallengeDiscussionOption', + ChallengeConstraint: 'ChallengeConstraint', + Phase: 'Phase', + ChallengePhase: 'ChallengePhase', + ChallengePhaseConstraint: 'ChallengePhaseConstraint', + ChallengePrizeSet: 'ChallengePrizeSet', + ChallengeReviewer: 'ChallengeReviewer', + DefaultChallengeReviewer: 'DefaultChallengeReviewer', + TimelineTemplate: 'TimelineTemplate', + TimelineTemplatePhase: 'TimelineTemplatePhase', + MemberChallengeAccess: 'MemberChallengeAccess' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "externalClient", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "/home/vasea/work/topcoder/challenge-api-v6/packages/challenge-prisma-client", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x", + "native": true + }, + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x" + } + ], + "previewFeatures": [ + "fullTextSearchPostgres", + "postgresqlExtensions", + "views" + ], + "sourceFilePath": "/home/vasea/work/topcoder/challenge-api-v6/prisma/schema.prisma", + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": null, + "schemaEnvPath": "../../.env" + }, + "relativePath": "../../prisma", + "clientVersion": "6.19.0", + "engineVersion": "2ba551f319ab1df4bc874a89965d8b3641056773", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "datasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n previewFeatures = [\"fullTextSearchPostgres\", \"postgresqlExtensions\", \"views\"]\n}\n\ngenerator externalClient {\n provider = \"prisma-client-js\"\n output = \"../packages/challenge-prisma-client\"\n previewFeatures = [\"fullTextSearchPostgres\", \"postgresqlExtensions\", \"views\"]\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\n// Enum for allowed challenge track values (matches app-constants)\nenum ChallengeTrackEnum {\n DESIGN\n DATA_SCIENCE\n DEVELOPMENT\n QUALITY_ASSURANCE\n}\n\nenum ReviewTypeEnum {\n COMMUNITY\n INTERNAL\n SYSTEM\n PROVISIONAL\n EXAMPLE\n}\n\nenum DiscussionTypeEnum {\n CHALLENGE\n}\n\nenum ChallengeStatusEnum {\n NEW\n DRAFT\n APPROVED\n ACTIVE\n COMPLETED\n DELETED\n CANCELLED\n CANCELLED_FAILED_REVIEW\n CANCELLED_FAILED_SCREENING\n CANCELLED_ZERO_SUBMISSIONS\n CANCELLED_WINNER_UNRESPONSIVE\n CANCELLED_CLIENT_REQUEST\n CANCELLED_REQUIREMENTS_INFEASIBLE\n CANCELLED_ZERO_REGISTRATIONS\n CANCELLED_PAYMENT_FAILED\n}\n\nenum PrizeSetTypeEnum {\n PLACEMENT\n COPILOT\n REVIEWER\n CHECKPOINT\n}\n\n// Enum for review opportunity types on reviewers\nenum ReviewOpportunityTypeEnum {\n REGULAR_REVIEW\n COMPONENT_DEV_REVIEW\n SPEC_REVIEW\n ITERATIVE_REVIEW\n SCENARIOS_REVIEW\n}\n\n//////////////////////////////////////////\n// Main Challenge model\n//////////////////////////////////////////\n\nmodel Challenge {\n id String @id @default(uuid())\n name String\n description String?\n privateDescription String?\n challengeSource String?\n descriptionFormat String?\n projectId Int? // frequently queried field\n typeId String\n trackId String // FK for relation in ChallengeTrack\n timelineTemplateId String? // now used as foreign key to ChallengeTimelineTemplate\n overviewTotalPrizes Float? // stored from overview.totalPrizes\n numOfRegistrants Int @default(0)\n numOfSubmissions Int @default(0)\n numOfCheckpointSubmissions Int @default(0)\n currentPhaseNames String[] // current phase names\n\n wiproAllowed Boolean @default(false)\n\n // simple arrays for tags and groups (PostgreSQL native array type)\n tags String[]\n groups String[]\n\n // Task information (flattened from challenge.task)\n taskIsTask Boolean @default(false)\n taskIsAssigned Boolean @default(false)\n taskMemberId String?\n\n // Dates for challenge lifecycle\n submissionStartDate DateTime?\n submissionEndDate DateTime?\n registrationStartDate DateTime?\n registrationEndDate DateTime?\n startDate DateTime?\n endDate DateTime?\n\n // Normalized billing and legacy information (one-to-one)\n billingRecord ChallengeBilling?\n legacyId Int? // Legacy system ID for searching\n legacyRecord ChallengeLegacy? @relation(\"ChallengeLegacyRelation\")\n\n // Additional fields from createChallenge schema\n status ChallengeStatusEnum @default(NEW) // new challenges default to status \"New\"\n // Normalized top‑level constraints (e.g. allowedRegistrants) for a challenge\n constraintRecord ChallengeConstraint?\n\n // Additional normalized relations from createChallenge\n events ChallengeEvent[]\n discussions ChallengeDiscussion[]\n\n // Existing relations (one-to-many) for challenge metadata, phases, prize sets, winners, attachments,\n // terms and skills\n metadata ChallengeMetadata[]\n phases ChallengePhase[]\n prizeSets ChallengePrizeSet[]\n reviewers ChallengeReviewer[]\n winners ChallengeWinner[]\n attachments Attachment[]\n terms ChallengeTerm[]\n skills ChallengeSkill[]\n auditLogs AuditLog[]\n memberAccesses MemberChallengeAccess[]\n\n // Relation to ChallengeType (FK: typeId)\n type ChallengeType @relation(fields: [typeId], references: [id])\n // Relation to ChallengeTrack (FK: trackId)\n track ChallengeTrack @relation(fields: [trackId], references: [id])\n\n timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id])\n\n // Auditing fields (present in every table)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([projectId])\n @@index([status]) // index added for optimized search by status\n @@index([createdAt])\n @@index([updatedAt])\n @@index([typeId])\n @@index([trackId])\n @@index([groups], type: Gin, map: \"challenge_groups_gin_idx\")\n @@index([submissionStartDate])\n @@index([submissionEndDate])\n @@index([registrationStartDate])\n @@index([registrationEndDate])\n @@index([startDate])\n @@index([endDate])\n @@index([status, startDate])\n @@index([trackId, typeId, status])\n @@index([status, typeId, trackId, createdAt(sort: Desc)], map: \"challenge_status_type_track_created_at_idx\")\n @@index([legacyId])\n @@index([projectId, status])\n}\n\n//////////////////////////////////////////\n// MemberChallengeAccess view – member/challenge pairs from resources schema\n//////////////////////////////////////////\n\nview MemberChallengeAccess {\n challengeId String\n memberId String\n\n challenge Challenge @relation(fields: [challengeId], references: [id])\n\n @@map(\"MemberChallengeAccess\")\n}\n\n//////////////////////////////////////////\n// ChallengeType model\n//////////////////////////////////////////\n\nmodel ChallengeType {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean @default(true)\n isTask Boolean @default(false)\n abbreviation String\n\n challenges Challenge[]\n timelineTemplates ChallengeTimelineTemplate[]\n // Default reviewer configurations associated with this type\n defaultReviewers DefaultChallengeReviewer[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([abbreviation])\n}\n\n//////////////////////////////////////////\n// ChallengeTrack model\n//////////////////////////////////////////\n\nmodel ChallengeTrack {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean\n abbreviation String\n legacyId Int? // numeric legacy system id (if provided)\n track ChallengeTrackEnum? // enum value from ChallengeTrackEnum\n challenges Challenge[]\n // Opposite relation for ChallengeTimelineTemplate\n timelineTemplates ChallengeTimelineTemplate[]\n // Default reviewer configurations associated with this track\n defaultReviewers DefaultChallengeReviewer[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([legacyId])\n}\n\n//////////////////////////////////////////\n// ChallengeTimelineTemplate model\n//////////////////////////////////////////\n\nmodel ChallengeTimelineTemplate {\n id String @id @default(uuid())\n typeId String\n trackId String\n timelineTemplateId String // now required per Swagger spec\n\n // Link to the TimelineTemplate model via timelineTemplateId.\n timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id])\n // Link to the ChallengeTrack model via trackId.\n track ChallengeTrack @relation(fields: [trackId], references: [id])\n // Link to the ChallengeType model via typeId.\n type ChallengeType @relation(fields: [typeId], references: [id])\n\n isDefault Boolean @default(false)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Composite index to support searches/updates by typeId, trackId and timelineTemplateId.\n @@index([typeId, trackId, timelineTemplateId])\n}\n\n//////////////////////////////////////////\n// AuditLog model – tracks field changes\n//////////////////////////////////////////\n\nmodel AuditLog {\n id String @id @default(uuid())\n challengeId String? // optional association with a challenge\n fieldName String\n oldValue String?\n newValue String?\n createdAt DateTime @default(now())\n createdBy String\n memberId String?\n\n // Relation field to connect AuditLog to Challenge.\n challenge Challenge? @relation(fields: [challengeId], references: [id])\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// Attachment model – for challenge attachments\n//////////////////////////////////////////\n\nmodel Attachment {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n name String\n fileSize Int\n url String\n description String?\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeMetadata model – key/value metadata\n//////////////////////////////////////////\n\nmodel ChallengeMetadata {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n name String // name of the metadata\n value String // value stored as string for flexibility\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// Prize model – individual prize in a prize set\n//////////////////////////////////////////\n\nmodel Prize {\n id String @id @default(uuid())\n description String?\n prizeSet ChallengePrizeSet @relation(fields: [prizeSetId], references: [id], onDelete: Cascade)\n prizeSetId String\n type String // e.g. \"USD\", \"POINT\" (could also be converted to enum later)\n value Float\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeWinner model – record winners for a challenge\n//////////////////////////////////////////\n\nmodel ChallengeWinner {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n userId Int\n handle String\n placement Int\n type PrizeSetTypeEnum\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, type, placement])\n}\n\n//////////////////////////////////////////\n// ChallengeTerm model – association of challenge and terms\n//////////////////////////////////////////\n\nmodel ChallengeTerm {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n termId String // Terms API id\n roleId String // UUID for the associated role\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeSkill model – linking challenges with skills\n//////////////////////////////////////////\n\nmodel ChallengeSkill {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n skillId String // Request provided skillId\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeBilling model – normalized billing info\n//////////////////////////////////////////\n\nmodel ChallengeBilling {\n id String @id @default(uuid())\n billingAccountId String?\n markup Float? // in range [0, 100]\n clientBillingRate Float? // in range [0, 100]. Supporting range on postgres is an open issue with prisma https://github.com/prisma/prisma/issues/3287.\n challengeId String @unique\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeLegacy model – normalized legacy info\n//////////////////////////////////////////\n\nmodel ChallengeLegacy {\n id String @id @default(uuid())\n reviewType ReviewTypeEnum @default(INTERNAL)\n confidentialityType String @default(\"public\")\n forumId Int?\n directProjectId Int?\n screeningScorecardId Int?\n reviewScorecardId Int?\n isTask Boolean @default(false)\n useSchedulingAPI Boolean @default(false)\n pureV5Task Boolean @default(false)\n pureV5 Boolean @default(false)\n selfService Boolean @default(false)\n selfServiceCopilot String?\n track String? // as provided in the legacy object\n subTrack String? // as provided in the legacy object\n legacySystemId Int? // represents the external \"legacyId\"\n challengeId String @unique\n challenge Challenge @relation(\"ChallengeLegacyRelation\", fields: [challengeId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeEvent model – normalized challenge events\n//////////////////////////////////////////\n\nmodel ChallengeEvent {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n eventId Int\n name String?\n key String?\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\n//////////////////////////////////////////\n// ChallengeDiscussion and associated options – normalized discussion channels\n//////////////////////////////////////////\n\nmodel ChallengeDiscussion {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String\n discussionId String?\n name String\n type DiscussionTypeEnum // updated to use enum\n provider String\n url String?\n options ChallengeDiscussionOption[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n}\n\nmodel ChallengeDiscussionOption {\n id String @id @default(uuid())\n discussion ChallengeDiscussion @relation(fields: [discussionId], references: [id], onDelete: Cascade)\n discussionId String\n optionKey String\n optionValue String\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// ChallengeConstraint model – top-level challenge constraints (e.g. allowed registrants)\n//////////////////////////////////////////\n\nmodel ChallengeConstraint {\n id String @id @default(uuid())\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n challengeId String @unique\n allowedRegistrants String[] @default([])\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePhase – to capture per-phase info from create/update challenge operations\n// Each phase is linked with a challenge and holds a duration and any custom constraints.\n//////////////////////////////////////////\n\nmodel Phase {\n id String @id @default(uuid())\n name String\n description String?\n isOpen Boolean\n duration Int\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Inverse relation for associated challenge phases\n challengePhases ChallengePhase[]\n ChallengeReviewer ChallengeReviewer[]\n DefaultChallengeReviewer DefaultChallengeReviewer[]\n\n @@unique([name])\n}\n\nmodel ChallengePhase {\n id String @id @default(uuid())\n challengeId String\n phaseId String // foreign key to Phase\n\n name String // phase name\n description String? // description\n isOpen Boolean? @default(false) // if this phase is open\n predecessor String? // predecessor of this phase\n duration Int? // duration in seconds\n scheduledStartDate DateTime? // when the phase is scheduled to start\n scheduledEndDate DateTime?\n actualStartDate DateTime?\n actualEndDate DateTime? // when the phase actually ended\n constraints ChallengePhaseConstraint[]\n\n // Relation fields\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n phase Phase @relation(fields: [phaseId], references: [id])\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, isOpen])\n @@index([challengeId, name])\n @@index([challengeId, isOpen, scheduledEndDate, actualEndDate], map: \"challenge_phase_challenge_open_end_idx\")\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePhaseConstraint – to capture custom constraints for each phase\n//////////////////////////////////////////\n\nmodel ChallengePhaseConstraint {\n id String @id @default(uuid())\n challengePhaseId String\n name String // the name/key of the constraint\n value Int // numeric value of the constraint (can be changed to Float if needed)\n\n // Relation to the phase\n challengePhase ChallengePhase @relation(fields: [challengePhaseId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengePhaseId])\n}\n\n//////////////////////////////////////////\n// New Model: ChallengePrizeSet – to group prizes for a challenge\n//////////////////////////////////////////\n\nmodel ChallengePrizeSet {\n id String @id @default(uuid())\n challengeId String\n type PrizeSetTypeEnum // using enum instead of string\n description String?\n prizes Prize[]\n\n // Relation to the challenge\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([challengeId, type])\n}\n\n//////////////////////////////////////////\n// ChallengeReviewer model – reviewers for a challenge, both AI and member\n//////////////////////////////////////////\n\nmodel ChallengeReviewer {\n id String @id @default(uuid())\n challengeId String\n\n // Reviewer configuration\n scorecardId String\n isMemberReview Boolean\n memberReviewerCount Int?\n phaseId String\n fixedAmount Float? @default(0)\n baseCoefficient Float?\n incrementalCoefficient Float?\n type ReviewOpportunityTypeEnum?\n aiWorkflowId String? @db.VarChar(14)\n shouldOpenOpportunity Boolean @default(true)\n\n // Relation to the challenge\n challenge Challenge @relation(fields: [challengeId], references: [id], onDelete: Cascade)\n // Relation to the phase\n phase Phase @relation(fields: [phaseId], references: [id])\n\n // Auditing fields\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([challengeId])\n @@index([phaseId])\n @@index([challengeId, phaseId])\n}\n\n//////////////////////////////////////////\n// DefaultChallengeReviewer model – default reviewers by type and track\n//////////////////////////////////////////\n\nmodel DefaultChallengeReviewer {\n id String @id @default(uuid())\n typeId String\n trackId String\n timelineTemplateId String?\n // Reviewer configuration (mirrors ChallengeReviewer)\n scorecardId String?\n isMemberReview Boolean\n memberReviewerCount Int?\n phaseName String\n // Optional explicit link to Phase for better fidelity\n phaseId String?\n fixedAmount Float? @default(0)\n baseCoefficient Float?\n incrementalCoefficient Float?\n opportunityType ReviewOpportunityTypeEnum?\n aiWorkflowId String? @db.VarChar(14)\n shouldOpenOpportunity Boolean @default(true)\n\n // Relations\n challengeType ChallengeType @relation(fields: [typeId], references: [id])\n challengeTrack ChallengeTrack @relation(fields: [trackId], references: [id])\n timelineTemplate TimelineTemplate? @relation(fields: [timelineTemplateId], references: [id])\n // Relation to Phase (optional for backward compatibility with phaseName)\n phase Phase? @relation(fields: [phaseId], references: [id])\n\n // Auditing fields\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n @@index([typeId, trackId])\n @@index([typeId, trackId, timelineTemplateId])\n @@index([phaseId])\n}\n\n//////////////////////////////////////////\n// TimelineTemplate model – defines timeline templates\n//////////////////////////////////////////\nmodel TimelineTemplate {\n id String @id @default(uuid())\n name String\n description String?\n isActive Boolean @default(true)\n phases TimelineTemplatePhase[]\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n // Opposite relation field, linking back to ChallengeTimelineTemplate.\n challengeTimelineTemplates ChallengeTimelineTemplate[]\n\n // Opposite relation field for Challenge.\n challenges Challenge[]\n DefaultChallengeReviewer DefaultChallengeReviewer[]\n\n @@unique([name])\n}\n\n//////////////////////////////////////////\n// TimelineTemplatePhase model – phases associated with a timeline template\n//////////////////////////////////////////\nmodel TimelineTemplatePhase {\n id String @id @default(uuid())\n timelineTemplateId String\n phaseId String // identifier for the phase\n predecessor String? // optional predecessor phase id\n defaultDuration Int // duration (in minutes, hours, etc.) as per business rules\n\n createdAt DateTime @default(now())\n createdBy String\n updatedAt DateTime @updatedAt\n updatedBy String\n\n timelineTemplate TimelineTemplate @relation(fields: [timelineTemplateId], references: [id], onDelete: Cascade)\n\n @@index([timelineTemplateId])\n @@index([timelineTemplateId, phaseId])\n}\n", + "inlineSchemaHash": "17c28fcc4b007a9aff216a8e4ea828c947e6b6f77bcddf8feade92f99a3a060b", + "copyEngine": true +} +config.dirname = '/' + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Challenge\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"privateDescription\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengeSource\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"descriptionFormat\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"projectId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"typeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"trackId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"overviewTotalPrizes\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"numOfRegistrants\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"numOfSubmissions\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"numOfCheckpointSubmissions\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"currentPhaseNames\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"wiproAllowed\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"tags\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"groups\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"taskIsTask\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"taskIsAssigned\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"taskMemberId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"submissionStartDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"submissionEndDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"registrationStartDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"registrationEndDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"startDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"endDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"billingRecord\",\"kind\":\"object\",\"type\":\"ChallengeBilling\",\"relationName\":\"ChallengeToChallengeBilling\"},{\"name\":\"legacyId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"legacyRecord\",\"kind\":\"object\",\"type\":\"ChallengeLegacy\",\"relationName\":\"ChallengeLegacyRelation\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"ChallengeStatusEnum\"},{\"name\":\"constraintRecord\",\"kind\":\"object\",\"type\":\"ChallengeConstraint\",\"relationName\":\"ChallengeToChallengeConstraint\"},{\"name\":\"events\",\"kind\":\"object\",\"type\":\"ChallengeEvent\",\"relationName\":\"ChallengeToChallengeEvent\"},{\"name\":\"discussions\",\"kind\":\"object\",\"type\":\"ChallengeDiscussion\",\"relationName\":\"ChallengeToChallengeDiscussion\"},{\"name\":\"metadata\",\"kind\":\"object\",\"type\":\"ChallengeMetadata\",\"relationName\":\"ChallengeToChallengeMetadata\"},{\"name\":\"phases\",\"kind\":\"object\",\"type\":\"ChallengePhase\",\"relationName\":\"ChallengeToChallengePhase\"},{\"name\":\"prizeSets\",\"kind\":\"object\",\"type\":\"ChallengePrizeSet\",\"relationName\":\"ChallengeToChallengePrizeSet\"},{\"name\":\"reviewers\",\"kind\":\"object\",\"type\":\"ChallengeReviewer\",\"relationName\":\"ChallengeToChallengeReviewer\"},{\"name\":\"winners\",\"kind\":\"object\",\"type\":\"ChallengeWinner\",\"relationName\":\"ChallengeToChallengeWinner\"},{\"name\":\"attachments\",\"kind\":\"object\",\"type\":\"Attachment\",\"relationName\":\"AttachmentToChallenge\"},{\"name\":\"terms\",\"kind\":\"object\",\"type\":\"ChallengeTerm\",\"relationName\":\"ChallengeToChallengeTerm\"},{\"name\":\"skills\",\"kind\":\"object\",\"type\":\"ChallengeSkill\",\"relationName\":\"ChallengeToChallengeSkill\"},{\"name\":\"auditLogs\",\"kind\":\"object\",\"type\":\"AuditLog\",\"relationName\":\"AuditLogToChallenge\"},{\"name\":\"memberAccesses\",\"kind\":\"object\",\"type\":\"MemberChallengeAccess\",\"relationName\":\"ChallengeToMemberChallengeAccess\"},{\"name\":\"type\",\"kind\":\"object\",\"type\":\"ChallengeType\",\"relationName\":\"ChallengeToChallengeType\"},{\"name\":\"track\",\"kind\":\"object\",\"type\":\"ChallengeTrack\",\"relationName\":\"ChallengeToChallengeTrack\"},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"type\":\"TimelineTemplate\",\"relationName\":\"ChallengeToTimelineTemplate\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeType\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isTask\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenges\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeType\"},{\"name\":\"timelineTemplates\",\"kind\":\"object\",\"type\":\"ChallengeTimelineTemplate\",\"relationName\":\"ChallengeTimelineTemplateToChallengeType\"},{\"name\":\"defaultReviewers\",\"kind\":\"object\",\"type\":\"DefaultChallengeReviewer\",\"relationName\":\"ChallengeTypeToDefaultChallengeReviewer\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeTrack\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"legacyId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"track\",\"kind\":\"enum\",\"type\":\"ChallengeTrackEnum\"},{\"name\":\"challenges\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeTrack\"},{\"name\":\"timelineTemplates\",\"kind\":\"object\",\"type\":\"ChallengeTimelineTemplate\",\"relationName\":\"ChallengeTimelineTemplateToChallengeTrack\"},{\"name\":\"defaultReviewers\",\"kind\":\"object\",\"type\":\"DefaultChallengeReviewer\",\"relationName\":\"ChallengeTrackToDefaultChallengeReviewer\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeTimelineTemplate\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"typeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"trackId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"type\":\"TimelineTemplate\",\"relationName\":\"ChallengeTimelineTemplateToTimelineTemplate\"},{\"name\":\"track\",\"kind\":\"object\",\"type\":\"ChallengeTrack\",\"relationName\":\"ChallengeTimelineTemplateToChallengeTrack\"},{\"name\":\"type\",\"kind\":\"object\",\"type\":\"ChallengeType\",\"relationName\":\"ChallengeTimelineTemplateToChallengeType\"},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"AuditLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fieldName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"oldValue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"newValue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"memberId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"AuditLogToChallenge\"}],\"dbName\":null},\"Attachment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"AttachmentToChallenge\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fileSize\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeMetadata\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeMetadata\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"Prize\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prizeSet\",\"kind\":\"object\",\"type\":\"ChallengePrizeSet\",\"relationName\":\"ChallengePrizeSetToPrize\"},{\"name\":\"prizeSetId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeWinner\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeWinner\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"handle\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"placement\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"PrizeSetTypeEnum\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeTerm\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeTerm\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"termId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"roleId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeSkill\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeSkill\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"skillId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeBilling\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"billingAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"markup\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"clientBillingRate\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeBilling\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeLegacy\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reviewType\",\"kind\":\"enum\",\"type\":\"ReviewTypeEnum\"},{\"name\":\"confidentialityType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"forumId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"directProjectId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"screeningScorecardId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"reviewScorecardId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isTask\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"useSchedulingAPI\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"pureV5Task\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"pureV5\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"selfService\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"selfServiceCopilot\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"track\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"subTrack\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"legacySystemId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeLegacyRelation\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeEvent\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeEvent\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eventId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeDiscussion\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeDiscussion\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"discussionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"DiscussionTypeEnum\"},{\"name\":\"provider\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"options\",\"kind\":\"object\",\"type\":\"ChallengeDiscussionOption\",\"relationName\":\"ChallengeDiscussionToChallengeDiscussionOption\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeDiscussionOption\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"discussion\",\"kind\":\"object\",\"type\":\"ChallengeDiscussion\",\"relationName\":\"ChallengeDiscussionToChallengeDiscussionOption\"},{\"name\":\"discussionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"optionKey\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"optionValue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeConstraint\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeConstraint\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"allowedRegistrants\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"Phase\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isOpen\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengePhases\",\"kind\":\"object\",\"type\":\"ChallengePhase\",\"relationName\":\"ChallengePhaseToPhase\"},{\"name\":\"ChallengeReviewer\",\"kind\":\"object\",\"type\":\"ChallengeReviewer\",\"relationName\":\"ChallengeReviewerToPhase\"},{\"name\":\"DefaultChallengeReviewer\",\"kind\":\"object\",\"type\":\"DefaultChallengeReviewer\",\"relationName\":\"DefaultChallengeReviewerToPhase\"}],\"dbName\":null},\"ChallengePhase\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isOpen\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"predecessor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"scheduledStartDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"scheduledEndDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"actualStartDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"actualEndDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"constraints\",\"kind\":\"object\",\"type\":\"ChallengePhaseConstraint\",\"relationName\":\"ChallengePhaseToChallengePhaseConstraint\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengePhase\"},{\"name\":\"phase\",\"kind\":\"object\",\"type\":\"Phase\",\"relationName\":\"ChallengePhaseToPhase\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengePhaseConstraint\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengePhaseId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"challengePhase\",\"kind\":\"object\",\"type\":\"ChallengePhase\",\"relationName\":\"ChallengePhaseToChallengePhaseConstraint\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengePrizeSet\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"PrizeSetTypeEnum\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prizes\",\"kind\":\"object\",\"type\":\"Prize\",\"relationName\":\"ChallengePrizeSetToPrize\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengePrizeSet\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"ChallengeReviewer\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scorecardId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isMemberReview\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"memberReviewerCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fixedAmount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"baseCoefficient\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"incrementalCoefficient\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"ReviewOpportunityTypeEnum\"},{\"name\":\"aiWorkflowId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"shouldOpenOpportunity\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToChallengeReviewer\"},{\"name\":\"phase\",\"kind\":\"object\",\"type\":\"Phase\",\"relationName\":\"ChallengeReviewerToPhase\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"DefaultChallengeReviewer\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"typeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"trackId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scorecardId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isMemberReview\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"memberReviewerCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phaseName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fixedAmount\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"baseCoefficient\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"incrementalCoefficient\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"opportunityType\",\"kind\":\"enum\",\"type\":\"ReviewOpportunityTypeEnum\"},{\"name\":\"aiWorkflowId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"shouldOpenOpportunity\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"challengeType\",\"kind\":\"object\",\"type\":\"ChallengeType\",\"relationName\":\"ChallengeTypeToDefaultChallengeReviewer\"},{\"name\":\"challengeTrack\",\"kind\":\"object\",\"type\":\"ChallengeTrack\",\"relationName\":\"ChallengeTrackToDefaultChallengeReviewer\"},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"type\":\"TimelineTemplate\",\"relationName\":\"DefaultChallengeReviewerToTimelineTemplate\"},{\"name\":\"phase\",\"kind\":\"object\",\"type\":\"Phase\",\"relationName\":\"DefaultChallengeReviewerToPhase\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"TimelineTemplate\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"phases\",\"kind\":\"object\",\"type\":\"TimelineTemplatePhase\",\"relationName\":\"TimelineTemplateToTimelineTemplatePhase\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challengeTimelineTemplates\",\"kind\":\"object\",\"type\":\"ChallengeTimelineTemplate\",\"relationName\":\"ChallengeTimelineTemplateToTimelineTemplate\"},{\"name\":\"challenges\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToTimelineTemplate\"},{\"name\":\"DefaultChallengeReviewer\",\"kind\":\"object\",\"type\":\"DefaultChallengeReviewer\",\"relationName\":\"DefaultChallengeReviewerToTimelineTemplate\"}],\"dbName\":null},\"TimelineTemplatePhase\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timelineTemplateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phaseId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"predecessor\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"defaultDuration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timelineTemplate\",\"kind\":\"object\",\"type\":\"TimelineTemplate\",\"relationName\":\"TimelineTemplateToTimelineTemplatePhase\"}],\"dbName\":null},\"MemberChallengeAccess\":{\"fields\":[{\"name\":\"challengeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"memberId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"challenge\",\"kind\":\"object\",\"type\":\"Challenge\",\"relationName\":\"ChallengeToMemberChallengeAccess\"}],\"dbName\":\"MemberChallengeAccess\"}},\"enums\":{},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = { + getRuntime: async () => require('./query_engine_bg.js'), + getQueryEngineWasmModule: async () => { + const loader = (await import('#wasm-engine-loader')).default + const engine = (await loader).default + return engine + } +} +config.compilerWasm = undefined + +config.injectableEdgeEnv = () => ({ + parsed: { + DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined + } +}) + +if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { + Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) +} + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 8ce74c9..4e6027a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -8,6 +8,13 @@ generator client { previewFeatures = ["fullTextSearchPostgres", "postgresqlExtensions", "views"] } +generator externalClient { + provider = "prisma-client-js" + output = "../packages/challenge-prisma-client" + previewFeatures = ["fullTextSearchPostgres", "postgresqlExtensions", "views"] + binaryTargets = ["native", "debian-openssl-3.0.x"] +} + // Enum for allowed challenge track values (matches app-constants) enum ChallengeTrackEnum { DESIGN