chore: path cleanup
This commit is contained in:
@@ -297,4 +297,4 @@
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"devDependencies": {
|
||||
"@types/mongoose-aggregate-paginate-v2": "^1.0.5",
|
||||
"mongodb-memory-server": "^8.13.0",
|
||||
"payload": "^1.11.7",
|
||||
"payload": "^1.11.8",
|
||||
"typescript": "^4.9.4"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -21,4 +21,4 @@
|
||||
"mongoose-aggregate-paginate-v2": "^1.0.6",
|
||||
"mongoose-paginate-v2": "1.7.22"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import paginate from 'mongoose-paginate-v2';
|
||||
import { PaginateOptions, Schema } from 'mongoose';
|
||||
import { SanitizedConfig } from '../../../../../config/types';
|
||||
import { SanitizedConfig } from 'payload/dist/config/types';
|
||||
import { SanitizedCollectionConfig } from 'payload/dist/collections/config/types';
|
||||
import getBuildQueryPlugin from '../queries/buildQuery';
|
||||
import buildSchema from './buildSchema';
|
||||
import { SanitizedCollectionConfig } from '../../../../../collections/config/types';
|
||||
|
||||
const buildCollectionSchema = (collection: SanitizedCollectionConfig, config: SanitizedConfig, schemaOptions = {}): Schema => {
|
||||
const schema = buildSchema(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import mongoose from 'mongoose';
|
||||
import { SanitizedConfig } from 'payload/dist/config/types';
|
||||
import buildSchema from './buildSchema';
|
||||
import { SanitizedConfig } from '../../../../../config/types';
|
||||
import getBuildQueryPlugin from '../queries/buildQuery';
|
||||
import type { GlobalModel } from '../types';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-use-before-define */
|
||||
/* eslint-disable no-use-before-define */
|
||||
import { IndexOptions, Schema, SchemaOptions, SchemaTypeOptions } from 'mongoose';
|
||||
import { SanitizedConfig } from '../../../../../config/types';
|
||||
import { SanitizedConfig } from 'payload/dist/config/types';
|
||||
import {
|
||||
ArrayField,
|
||||
Block,
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
TextField,
|
||||
UnnamedTab,
|
||||
UploadField,
|
||||
} from '../../../../../fields/config/types';
|
||||
} from 'payload/dist/fields/config/types';
|
||||
|
||||
export type BuildSchemaOptions = {
|
||||
options?: SchemaOptions
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,8 +3,6 @@ import { DeepRequired } from 'ts-essentials';
|
||||
import { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql';
|
||||
import { Response } from 'express';
|
||||
import { Config as GeneratedTypes } from 'payload/generated-types';
|
||||
import type { IndexDefinition, IndexOptions } from 'mongoose';
|
||||
import type { Where } from '../../types';
|
||||
import { Access, Endpoint, EntityDescription, GeneratePreviewURL } from '../../config/types';
|
||||
import { Field } from '../../fields/config/types';
|
||||
import { PayloadRequest, RequestContext } from '../../express/types';
|
||||
@@ -392,7 +390,45 @@ export type TypeWithTimestamps = {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
type IndexDirection = 1 | -1 | '2d' | '2dsphere' | 'geoHaystack' | 'hashed' | 'text' | 'ascending' | 'asc' | 'descending' | 'desc';
|
||||
|
||||
type IndexOptions = {
|
||||
expires?: number | string
|
||||
weights?: Record<string, number>
|
||||
/** Creates the index in the background, yielding whenever possible. */
|
||||
background?: boolean;
|
||||
/** Creates an unique index. */
|
||||
unique?: boolean;
|
||||
/** Override the autogenerated index name (useful if the resulting name is larger than 128 bytes) */
|
||||
name?: string;
|
||||
/** Creates a partial index based on the given filter object (MongoDB 3.2 or higher) */
|
||||
partialFilterExpression?: Document;
|
||||
/** Creates a sparse index. */
|
||||
sparse?: boolean;
|
||||
/** Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher) */
|
||||
expireAfterSeconds?: number;
|
||||
/** Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher) */
|
||||
storageEngine?: Document;
|
||||
/** (MongoDB 4.4. or higher) Specifies how many data-bearing members of a replica set, including the primary, must complete the index builds successfully before the primary marks the indexes as ready. This option accepts the same values for the "w" field in a write concern plus "votingMembers", which indicates all voting data-bearing nodes. */
|
||||
commitQuorum?: number | string;
|
||||
/** Specifies the index version number, either 0 or 1. */
|
||||
version?: number;
|
||||
default_language?: string;
|
||||
language_override?: string;
|
||||
textIndexVersion?: number;
|
||||
'2dsphereIndexVersion'?: number;
|
||||
bits?: number;
|
||||
/** For geospatial indexes set the lower bound for the co-ordinates. */
|
||||
min?: number;
|
||||
/** For geospatial indexes set the high bound for the co-ordinates. */
|
||||
max?: number;
|
||||
bucketSize?: number;
|
||||
wildcardProjection?: Document;
|
||||
/** Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. (MongoDB 4.4 or higher) */
|
||||
hidden?: boolean;
|
||||
}
|
||||
|
||||
export type TypeOfIndex = {
|
||||
fields: IndexDefinition
|
||||
fields: Record<string, IndexDirection>
|
||||
options?: IndexOptions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user