Initial commit
This commit is contained in:
18
packages/core-shared/src/payload/payload-custom-ambient.d.ts
vendored
Normal file
18
packages/core-shared/src/payload/payload-custom-ambient.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { FieldPii } from "./pii-types";
|
||||
import type { CollectionRetention } from "./retention-types";
|
||||
import type { CollectionSubject } from "./subject-linkage-types";
|
||||
|
||||
declare module "payload" {
|
||||
// FieldBase.custom is typed as FieldCustom (interface extending Record<string, any>).
|
||||
// Augmenting it makes pii available on every field type.
|
||||
interface FieldCustom {
|
||||
pii?: FieldPii;
|
||||
}
|
||||
|
||||
// CollectionConfig.custom is typed as CollectionCustom (interface extending Record<string, any>).
|
||||
interface CollectionCustom {
|
||||
retention?: CollectionRetention;
|
||||
authPii?: Record<string, FieldPii | null>;
|
||||
subject?: CollectionSubject | CollectionSubject[];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user