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
29 lines
1.4 KiB
Plaintext
29 lines
1.4 KiB
Plaintext
import { DirectusPolicy } from "../../../schema/policy.cjs";
|
|
import { NestedPartial } from "../../../types/utils.cjs";
|
|
import { ApplyQueryFields } from "../../../types/output.cjs";
|
|
import { Query } from "../../../types/query.cjs";
|
|
import { RestCommand } from "../../types.cjs";
|
|
|
|
//#region src/rest/commands/create/policies.d.ts
|
|
type CreatePolicyOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusPolicy<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
|
|
/**
|
|
* Create multiple new policies
|
|
*
|
|
* @param items The policies to create
|
|
* @param query Optional return data query
|
|
*
|
|
* @returns Returns the policy objects for the created policies.
|
|
*/
|
|
declare const createPolicies: <Schema, const TQuery extends Query<Schema, DirectusPolicy<Schema>>>(items: NestedPartial<DirectusPolicy<Schema>>[], query?: TQuery) => RestCommand<CreatePolicyOutput<Schema, TQuery>[], Schema>;
|
|
/**
|
|
* Create a new policy
|
|
*
|
|
* @param item The policy to create
|
|
* @param query Optional return data query
|
|
*
|
|
* @returns Returns the policy object for the created policy.
|
|
*/
|
|
declare const createPolicy: <Schema, const TQuery extends Query<Schema, DirectusPolicy<Schema>>>(item: NestedPartial<DirectusPolicy<Schema>>, query?: TQuery) => RestCommand<CreatePolicyOutput<Schema, TQuery>, Schema>;
|
|
//#endregion
|
|
export { CreatePolicyOutput, createPolicies, createPolicy };
|
|
//# sourceMappingURL=policies.d.cts.map |