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
32 lines
1.6 KiB
Plaintext
32 lines
1.6 KiB
Plaintext
import { DirectusField } from "../../../schema/field.cjs";
|
|
import { NestedPartial } from "../../../types/utils.cjs";
|
|
import { ApplyQueryFields } from "../../../types/output.cjs";
|
|
import { FieldQuery, Query } from "../../../types/query.cjs";
|
|
import { RestCommand } from "../../types.cjs";
|
|
|
|
//#region src/rest/commands/update/fields.d.ts
|
|
type UpdateFieldOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusField<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
|
|
/**
|
|
* Updates the given field in the given collection.
|
|
* @param collection
|
|
* @param field
|
|
* @param item
|
|
* @param query
|
|
* @returns
|
|
* @throws Will throw if collection is empty
|
|
* @throws Will throw if field is empty
|
|
*/
|
|
declare const updateField: <Schema, const TQuery extends FieldQuery<Schema, DirectusField<Schema>>>(collection: DirectusField<Schema>["collection"], field: DirectusField<Schema>["field"], item: NestedPartial<DirectusField<Schema>>, query?: TQuery) => RestCommand<UpdateFieldOutput<Schema, TQuery>, Schema>;
|
|
/**
|
|
* Updates the multiple field in the given collection.
|
|
* Update multiple existing fields.
|
|
* @param collection
|
|
* @param items
|
|
* @param query
|
|
* @returns
|
|
* @throws Will throw if collection is empty
|
|
*/
|
|
declare const updateFields: <Schema, const TQuery extends FieldQuery<Schema, DirectusField<Schema>>>(collection: DirectusField<Schema>["collection"], items: NestedPartial<DirectusField<Schema>>[], query?: TQuery) => RestCommand<UpdateFieldOutput<Schema, TQuery>[], Schema>;
|
|
//#endregion
|
|
export { UpdateFieldOutput, updateField, updateFields };
|
|
//# sourceMappingURL=fields.d.cts.map |