Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
28 lines
997 B
Plaintext
28 lines
997 B
Plaintext
import type { CollectionConfig } from '../../collections/config/types.js';
|
|
import type { SanitizedConfig } from '../types.js';
|
|
/**
|
|
* This function creates:
|
|
* - N fields per collection, named `_order` or `_<collection>_<joinField>_order`
|
|
* - 1 hook per collection
|
|
* - 1 endpoint per app
|
|
*
|
|
* Also, if collection.defaultSort or joinField.defaultSort is not set, it will be set to the orderable field.
|
|
*/
|
|
export declare const setupOrderable: (config: SanitizedConfig) => void;
|
|
export declare const addOrderableFieldsAndHook: (collection: CollectionConfig, orderableFieldNames: string[]) => void;
|
|
/**
|
|
* The body of the reorder endpoint.
|
|
* @internal
|
|
*/
|
|
export type OrderableEndpointBody = {
|
|
collectionSlug: string;
|
|
docsToMove: string[];
|
|
newKeyWillBe: 'greater' | 'less';
|
|
orderableFieldName: string;
|
|
target: {
|
|
id: string;
|
|
key: string;
|
|
};
|
|
};
|
|
export declare const addOrderableEndpoint: (config: SanitizedConfig) => void;
|
|
//# sourceMappingURL=index.d.ts.map |