@easy-cms/core 0.43.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +192 -10
  2. package/dist/index.js +446 -164
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -6,8 +6,19 @@ interface AuthUser {
6
6
  readonly id: ID;
7
7
  readonly email: string;
8
8
  readonly role: Role;
9
+ /**
10
+ * Set by `onRequest` (e.g. a multi-tenant plugin) when `role` holds only in part of the site,
11
+ * such as one tenant: an `admin` there administers that part, not the whole system (Settings,
12
+ * backups, roles, other users' API keys).
13
+ */
14
+ readonly scoped?: boolean;
9
15
  readonly [field: string]: unknown;
10
16
  }
17
+ /**
18
+ * An admin of the whole system: role `admin`, signed in (not an API key), and not an admin of a
19
+ * part only (`scoped`).
20
+ */
21
+ declare const isSystemAdmin: (user: AuthUser | null | undefined) => boolean;
11
22
  interface WhereOperators {
12
23
  readonly equals?: unknown;
13
24
  readonly not_equals?: unknown;
@@ -26,9 +37,16 @@ type Where = {
26
37
  } & {
27
38
  readonly [field: string]: WhereOperators | readonly Where[] | undefined;
28
39
  };
40
+ /**
41
+ * What a request is about besides its user, e.g. the site or tenant it works in: set by
42
+ * `onRequest` in the config (usually a plugin's), or passed to the Local API as `context`.
43
+ */
44
+ type RequestContext = Readonly<Record<string, unknown>>;
29
45
  interface AccessArgs {
30
46
  /** `null` when the request is not logged in. */
31
47
  readonly user: AuthUser | null;
48
+ /** The request's context (`onRequest`), `{}` when there is none. */
49
+ readonly context?: RequestContext;
32
50
  readonly id?: ID;
33
51
  readonly data?: Readonly<Record<string, unknown>>;
34
52
  }
@@ -1069,9 +1087,15 @@ declare class MediaFolders {
1069
1087
  * The folder with this key (`folder: 'banners'` on upload fields), made at the top level when
1070
1088
  * there is none yet.
1071
1089
  */
1072
- keyed(key: string): Promise<ID>;
1090
+ /**
1091
+ * The folder with this key, made when first needed. `scope`: the values the key is unique
1092
+ * within (`uniqueWithin` of the `key` field, e.g. the tenant), given to a new folder too.
1093
+ * `null` when there is none and `create` is false.
1094
+ */
1095
+ keyed(key: string, scope?: Readonly<Record<string, unknown>>): Promise<ID>;
1096
+ keyed(key: string, scope: Readonly<Record<string, unknown>>, create: boolean): Promise<ID | null>;
1073
1097
  /** Whether a file in `folder` is in the folder with this key, or below it. */
1074
- inKeyed(key: string, folder: ID | null): Promise<boolean>;
1098
+ inKeyed(key: string, folder: ID | null, scope?: Readonly<Record<string, unknown>>): Promise<boolean>;
1075
1099
  /** The user's level in a folder (`null`: the top level). */
1076
1100
  level(user: AuthUser | null, id: ID | null): Promise<FolderLevel | 'none'>;
1077
1101
  /**
@@ -1191,6 +1215,11 @@ interface AccessOptions {
1191
1215
  readonly overrideAccess?: boolean;
1192
1216
  /** The user to check access for. `null` = not logged in. */
1193
1217
  readonly user?: AuthUser | null;
1218
+ /**
1219
+ * What the call is about besides its user, e.g. the tenant (see `onRequest`): given to access
1220
+ * functions, hooks and `filterOptions`.
1221
+ */
1222
+ readonly context?: RequestContext;
1194
1223
  }
1195
1224
  interface DepthOptions extends AccessOptions {
1196
1225
  /** How many levels of relationships to populate. Default 1, maximum 3. */
@@ -1278,6 +1307,20 @@ declare class EasyCMS<C extends Config = Config> {
1278
1307
  private readonly webhooks;
1279
1308
  private readonly mailer;
1280
1309
  constructor(config: ResolvedConfig, db: Database, logger?: Logger, storage?: StorageAdapter, cwd?: string, privateStorage?: StorageAdapter | null);
1310
+ /**
1311
+ * The user and context of a request, as the REST API works them out: its session cookie or
1312
+ * Bearer token, then `onRequest`. For framework routes and server code that act for a visitor;
1313
+ * pass both to the Local API with `overrideAccess: false`.
1314
+ */
1315
+ forRequest(request: Request | Headers): Promise<{
1316
+ user: AuthUser | null;
1317
+ context: RequestContext;
1318
+ }>;
1319
+ /** @internal `onRequest` of the config, for a request whose user is known. */
1320
+ applyOnRequest(headers: Headers, url: URL | undefined, user: AuthUser | null): Promise<{
1321
+ user: AuthUser | null;
1322
+ context: RequestContext;
1323
+ }>;
1281
1324
  find<S extends Slug<C>>(collection: S, options?: FindOptions): Promise<PaginatedDocs<Doc<C, S>>>;
1282
1325
  findById<S extends Slug<C>>(collection: S, id: ID, options?: ReadOptions): Promise<Doc<C, S> | null>;
1283
1326
  count<S extends Slug<C>>(collection: S, options?: {
@@ -1442,6 +1485,16 @@ declare class EasyCMS<C extends Config = Config> {
1442
1485
  transferTo?: ID | null;
1443
1486
  }): Promise<Doc<C, S>>;
1444
1487
  findGlobal<S extends GSlug<C>>(slug: S, options?: ReadOptions): Promise<GDoc<C, S>>;
1488
+ /** A global as stored under `key` (see `globalKey`); empty when there is no key. */
1489
+ private readGlobal;
1490
+ /**
1491
+ * Where a global is kept: its slug, or `<slug>@<scope>` for globals with `scope` (e.g. one per
1492
+ * tenant). `null` when the call has no scope: reads give the global empty. `scope` is given by
1493
+ * scheduled jobs, which have no request.
1494
+ */
1495
+ private globalKey;
1496
+ /** `globalKey` for changes, which need a scope. */
1497
+ private writeKey;
1445
1498
  updateGlobal<S extends GSlug<C>>(slug: S, data: GInput<C, S>, options?: DepthOptions): Promise<GDoc<C, S>>;
1446
1499
  /** Takes a global off the site (`status: 'draft'`). See `unpublish`. */
1447
1500
  unpublishGlobal<S extends GSlug<C>>(slug: S, options?: DepthOptions): Promise<GDoc<C, S>>;
@@ -1463,7 +1516,7 @@ declare class EasyCMS<C extends Config = Config> {
1463
1516
  * What `user` may do with one document. Resolves `where`-style access
1464
1517
  * against the document, so the admin UI can hide actions precisely.
1465
1518
  */
1466
- documentPermissions(collection: Slug<C>, id: ID, user: AuthUser | null): Promise<{
1519
+ documentPermissions(collection: Slug<C>, id: ID, user: AuthUser | null, context?: RequestContext): Promise<{
1467
1520
  update: boolean;
1468
1521
  delete: boolean;
1469
1522
  }>;
@@ -1626,6 +1679,23 @@ declare class EasyCMS<C extends Config = Config> {
1626
1679
  private makeSlugsUnique;
1627
1680
  private checkUnique;
1628
1681
  private isTaken;
1682
+ /**
1683
+ * What folder keys are unique within for a call (`uniqueWithin` of the `key` field of media
1684
+ * folders, e.g. the tenant): the value a folder made by this call would get from its hooks.
1685
+ */
1686
+ private folderScope;
1687
+ /**
1688
+ * Where a unique field's values must differ for a call (`uniqueWithin`, e.g. the tenant): the
1689
+ * value a document created by this call would get there from its hooks, as `{ [field]: value }`;
1690
+ * `{}` when the field is unique everywhere. For finding documents by such a field, e.g. a page
1691
+ * by its path in the current tenant.
1692
+ */
1693
+ uniqueScope(collection: string, field: string, options?: Pick<AccessOptions, 'user' | 'context'>): Promise<Record<string, unknown>>;
1694
+ /**
1695
+ * @internal The id of the media folder with this key (`folder` of upload fields), made when
1696
+ * needed; `null` when the call has no scope to make it in (e.g. all tenants) and none exists.
1697
+ */
1698
+ keyedFolder(key: string, options?: AccessOptions): Promise<ID | null>;
1629
1699
  /** Each reference is one its relationship's `filterOptions` allow. */
1630
1700
  private checkFilterOptions;
1631
1701
  private checkReferences;
@@ -1664,6 +1734,23 @@ interface FieldAdmin {
1664
1734
  readonly after?: readonly AdminComponent[];
1665
1735
  /** Shows the value in the admin's lists (e.g. a color swatch). Default: the plain value. */
1666
1736
  readonly cell?: AdminComponent;
1737
+ /**
1738
+ * A column of the list at first (each user can change it): `true`, or per request, e.g.
1739
+ * only when the admin shows every tenant.
1740
+ */
1741
+ readonly column?: boolean | ((args: AdminFieldArgs) => boolean | Promise<boolean>);
1742
+ /** Relationships: offer to create the related document in place. Default true. */
1743
+ readonly allowCreate?: boolean;
1744
+ /**
1745
+ * The value a new document's form starts with, worked out for each user, e.g. from the
1746
+ * request's context. The server's own default (`defaultValue`, hooks) still applies.
1747
+ */
1748
+ readonly defaultValue?: (args: AdminFieldArgs) => unknown;
1749
+ }
1750
+ /** What per-request admin options of a field receive. */
1751
+ interface AdminFieldArgs {
1752
+ readonly user: AuthUser;
1753
+ readonly context: RequestContext;
1667
1754
  }
1668
1755
  /**
1669
1756
  * Field types that packages add (`fieldTypes` in the config), for the types inferred from the
@@ -1693,6 +1780,12 @@ interface BaseField<TType extends string, TValue> {
1693
1780
  readonly label?: Label;
1694
1781
  readonly required?: boolean;
1695
1782
  readonly unique?: boolean;
1783
+ /**
1784
+ * With `unique` (or on a slug field): a sibling field (e.g. `parent` or `tenant`), or several,
1785
+ * whose documents only need to differ among themselves, so `/about/team` and `/careers/team`
1786
+ * can both be `team`. Single, unlocalized relationship, select, text or number fields.
1787
+ */
1788
+ readonly uniqueWithin?: string | readonly string[];
1696
1789
  readonly index?: boolean;
1697
1790
  readonly defaultValue?: TValue;
1698
1791
  readonly validate?: FieldValidate<TValue>;
@@ -1743,11 +1836,6 @@ interface SelectField extends BaseField<'select', string | readonly string[]> {
1743
1836
  interface SlugField extends BaseField<'slug', string> {
1744
1837
  /** Name of a sibling `text` field to generate the slug from. */
1745
1838
  readonly from?: string;
1746
- /**
1747
- * Name of a sibling field (e.g. `parent`): slugs then only need to differ among documents
1748
- * with the same value there, so `/about/team` and `/careers/team` can both be `team`.
1749
- */
1750
- readonly uniqueWithin?: string;
1751
1839
  }
1752
1840
  /** Tiptap / ProseMirror JSON document. */
1753
1841
  interface RichTextDocument {
@@ -1777,12 +1865,16 @@ interface UploadField extends BaseField<'upload', never> {
1777
1865
  readonly folder?: string;
1778
1866
  /** With `folder`: only files in that folder (and its subfolders) may be chosen. */
1779
1867
  readonly folderOnly?: boolean;
1868
+ /** Which media documents may be chosen, as for relationships: offered and checked on save. */
1869
+ readonly filterOptions?: FilterOptions;
1780
1870
  }
1781
1871
  interface FilterOptionsArgs {
1782
1872
  /** The document being edited; `undefined` while it is being created. */
1783
1873
  readonly id: ID | undefined;
1784
1874
  readonly user: AuthUser | null;
1785
1875
  readonly cms: EasyCMS;
1876
+ /** The request's context (`onRequest`), `{}` when there is none. */
1877
+ readonly context: RequestContext;
1786
1878
  }
1787
1879
  /**
1788
1880
  * Which documents a relationship may point to: a `where` on the target collection, or `true`
@@ -1826,6 +1918,8 @@ interface BlocksField extends BaseField<'blocks', never> {
1826
1918
  readonly minRows?: number;
1827
1919
  readonly maxRows?: number;
1828
1920
  }
1921
+ /** The fields `uniqueWithin` names, as a list. */
1922
+ declare const uniqueWithinOf: (field: Field) => readonly string[];
1829
1923
  /** Fields with `hasMany`: their value is a list of options, documents or files. */
1830
1924
  declare const isHasMany: (field: Field) => boolean;
1831
1925
  /** Whether a MIME type is one of `patterns` (`image/*` matches every image). */
@@ -1846,6 +1940,12 @@ interface AuditConfig {
1846
1940
  readonly values?: boolean;
1847
1941
  /** Failed logins within an hour that the dashboard warns about. Default 20. */
1848
1942
  readonly failedLogins?: number;
1943
+ /**
1944
+ * The part of the site an entry belongs to, from the request's context, e.g. its tenant
1945
+ * (usually set by a plugin). Users whose role holds in a part only (`scoped`) see that part's
1946
+ * entries; others see the chosen part's, or all.
1947
+ */
1948
+ readonly scope?: ((context: RequestContext) => string | null | undefined) | null;
1849
1949
  }
1850
1950
  /** A field that changed: values before and after, unless they are not kept. */
1851
1951
  interface AuditChange {
@@ -1893,6 +1993,8 @@ interface AuditFilter {
1893
1993
  /** ISO dates. */
1894
1994
  from?: string | null;
1895
1995
  to?: string | null;
1996
+ /** Only entries of this part of the site (`scope`). */
1997
+ scope?: string | null;
1896
1998
  }
1897
1999
  /** `POST <api>/admin/audit/verify`. */
1898
2000
  interface AuditVerification {
@@ -1929,12 +2031,14 @@ declare class AuditLog {
1929
2031
  email?: string | null;
1930
2032
  changes?: AuditChange[] | null;
1931
2033
  detail?: Record<string, unknown> | null;
2034
+ /** The call's context, when it is not the request's. */
2035
+ context?: RequestContext;
1932
2036
  }): Promise<void>;
1933
2037
  /**
1934
2038
  * A change to a document or global: what changed between `before` and `after`. Internal
1935
2039
  * collections (sessions, versions…) are not logged.
1936
2040
  */
1937
- content(config: CollectionConfig | GlobalConfig, global: boolean, action: string, after: Record<string, unknown> | undefined, before: Record<string, unknown> | undefined, user: AuthUser | null): Promise<void>;
2041
+ content(config: CollectionConfig | GlobalConfig, global: boolean, action: string, after: Record<string, unknown> | undefined, before: Record<string, unknown> | undefined, user: AuthUser | null, context?: RequestContext): Promise<void>;
1938
2042
  /** Fields whose stored value changed. Hidden ones never (the password only as "changed"). */
1939
2043
  diff(fields: readonly Field[], before: Record<string, unknown>, after: Record<string, unknown>): AuditChange[];
1940
2044
  list(filter: AuditFilter, page?: number): Promise<AuditPage>;
@@ -1959,6 +2063,8 @@ declare class AuditLog {
1959
2063
  invalid: number;
1960
2064
  at: string;
1961
2065
  })[]>;
2066
+ /** The part of the site a context is in (`scope`), or `null`. */
2067
+ scopeOf(context: RequestContext | undefined): string | null;
1962
2068
  private sign;
1963
2069
  private lastVerification;
1964
2070
  private where;
@@ -2170,6 +2276,8 @@ interface HookBase {
2170
2276
  readonly cms: EasyCMS;
2171
2277
  /** Slug of the collection or global. */
2172
2278
  readonly slug: string;
2279
+ /** The request's context (`onRequest`, or `context` of a Local API call); `{}` when there is none. */
2280
+ readonly context: RequestContext;
2173
2281
  }
2174
2282
  type BeforeValidateHook = (args: HookBase & {
2175
2283
  data: Data$1;
@@ -2247,6 +2355,16 @@ interface CollectionAdmin extends ContainerAdmin {
2247
2355
  * `author`, for roles given "own documents only". Default: who created it (`createdBy`).
2248
2356
  */
2249
2357
  readonly ownerField?: string;
2358
+ /**
2359
+ * Deleting asks more than "Are you sure?", for documents that take much with them (e.g. a
2360
+ * tenant): `typeTitle` has the user type the document's title; `impact` is a path under the
2361
+ * API, called with `?id=`, that returns `{ message }` (a label) saying what will be lost.
2362
+ * Documents are then deleted one at a time, not from a selection.
2363
+ */
2364
+ readonly confirmDelete?: {
2365
+ readonly typeTitle?: boolean;
2366
+ readonly impact?: string;
2367
+ };
2250
2368
  }
2251
2369
  interface CollectionListAdmin {
2252
2370
  /**
@@ -2307,6 +2425,15 @@ interface GlobalConfig {
2307
2425
  readonly preview?: PreviewURL;
2308
2426
  readonly access?: GlobalAccess;
2309
2427
  readonly hooks?: GlobalHooks;
2428
+ /**
2429
+ * One value per scope, e.g. per tenant (usually set by a plugin): the scope of a call, from its
2430
+ * context (`onRequest`). A string keeps a value of its own; `undefined` the shared value; `null`
2431
+ * means the call has none, so reads give the global empty and changes are refused.
2432
+ */
2433
+ readonly scope?: (args: {
2434
+ readonly context: RequestContext;
2435
+ readonly user: AuthUser | null;
2436
+ }) => string | null | undefined;
2310
2437
  /** Custom admin components. */
2311
2438
  readonly admin?: ContainerAdmin;
2312
2439
  }
@@ -2382,6 +2509,23 @@ interface AdminConfig {
2382
2509
  readonly pages?: readonly AdminPage[];
2383
2510
  /** Panels on the dashboard, after the built-in ones. */
2384
2511
  readonly dashboard?: readonly DashboardWidget[];
2512
+ /**
2513
+ * A choice at the top of the menu that applies to everything in the admin, e.g. the tenant
2514
+ * (usually set by a plugin). The choice is kept in a cookie, which every request of the admin
2515
+ * sends; `onRequest` reads it.
2516
+ */
2517
+ readonly switcher?: AdminSwitcher | null;
2518
+ }
2519
+ /** See `AdminConfig.switcher`. */
2520
+ interface AdminSwitcher {
2521
+ /** Cookie that keeps the choice, e.g. `ecms-tenant`. */
2522
+ readonly cookie: string;
2523
+ readonly label: Label;
2524
+ /**
2525
+ * Path under the API that lists the choices for the logged-in user:
2526
+ * `{ options: [{ value, label }], all?: Label }`, with `all` to offer "all of them" (value `*`).
2527
+ */
2528
+ readonly options: string;
2385
2529
  }
2386
2530
  interface ImageSize {
2387
2531
  /** Key in `media.sizes`, e.g. `thumbnail`. */
@@ -2497,6 +2641,24 @@ interface AuthConfig {
2497
2641
  readonly passwordChanged?: PasswordEmailFn;
2498
2642
  };
2499
2643
  }
2644
+ /** What `onRequest` receives. */
2645
+ interface OnRequestArgs {
2646
+ readonly headers: Headers;
2647
+ /** The request's URL; `undefined` when only headers are known (`cms.forRequest(headers)`). */
2648
+ readonly url: URL | undefined;
2649
+ /** The user of the session or API key, before `onRequest` changes it; `null` when anonymous. */
2650
+ readonly user: AuthUser | null;
2651
+ readonly cms: EasyCMS;
2652
+ }
2653
+ /**
2654
+ * Runs on each API request (REST, plugin endpoints, `cms.forRequest`) after the user is known:
2655
+ * returns the request's `context` (e.g. the tenant it works in, from a header) and may change the
2656
+ * user (e.g. their role in that tenant, `scoped`). Plugins that set it call the one before.
2657
+ */
2658
+ type OnRequest = (args: OnRequestArgs) => MaybePromise<{
2659
+ readonly user?: AuthUser | null;
2660
+ readonly context?: RequestContext;
2661
+ } | undefined>;
2500
2662
  /** What an endpoint's handler receives. */
2501
2663
  interface EndpointRequest {
2502
2664
  readonly request: Request;
@@ -2505,6 +2667,8 @@ interface EndpointRequest {
2505
2667
  readonly params: Readonly<Record<string, string>>;
2506
2668
  /** The logged-in user (session cookie or Bearer token), or `null`. */
2507
2669
  readonly user: AuthUser | null;
2670
+ /** The request's context (`onRequest`): pass it to the Local API with `user`. */
2671
+ readonly context: RequestContext;
2508
2672
  /** The client's IP address, when the adapter knows it (e.g. to rate-limit a public form). */
2509
2673
  readonly ip: string | undefined;
2510
2674
  /** The Local API. Pass `{ user, overrideAccess: false }` to apply the user's access rules. */
@@ -2656,6 +2820,8 @@ interface Config {
2656
2820
  readonly endpoints?: readonly Endpoint[];
2657
2821
  /** Extra `easy-cms <name>` CLI commands, e.g. from plugins. */
2658
2822
  readonly commands?: readonly CliCommand[];
2823
+ /** The request's context and user, worked out on each API request (usually by a plugin). */
2824
+ readonly onRequest?: OnRequest;
2659
2825
  /**
2660
2826
  * Field types from packages, e.g. `color` from `@easy-cms/fields`: fields then use
2661
2827
  * `type: 'color'`. See `defineFieldType`.
@@ -2725,6 +2891,11 @@ interface ApiKeyPermissions {
2725
2891
  * or missing: every folder.
2726
2892
  */
2727
2893
  readonly folders?: readonly (string | number)[];
2894
+ /**
2895
+ * The context the key was created in (`onRequest`, e.g. its tenant), kept for good: requests
2896
+ * with the key get it as `user.apiKey.permissions.context`. Set by Easy CMS, not by input.
2897
+ */
2898
+ readonly context?: RequestContext;
2728
2899
  }
2729
2900
  /** Set on `AuthUser.apiKey` when a request authenticated with an API key. */
2730
2901
  interface ApiKeyContext {
@@ -3094,6 +3265,10 @@ interface AdminField {
3094
3265
  after?: AdminComponentRef[];
3095
3266
  cell?: AdminComponentRef;
3096
3267
  };
3268
+ /** A column of the list at first (`admin.column`). */
3269
+ column?: boolean;
3270
+ /** A relationship that offers no "Create" in place (`admin.allowCreate: false`). */
3271
+ noCreate?: boolean;
3097
3272
  /** A field of an added type (`fieldTypes`), e.g. `color`; `type` is the base it's stored as. */
3098
3273
  customType?: string;
3099
3274
  }
@@ -3131,6 +3306,11 @@ interface AdminCollection {
3131
3306
  };
3132
3307
  /** With `auth.rbac`: the field naming a document's owner (`createdBy` or `admin.ownerField`). */
3133
3308
  owner?: string;
3309
+ /** Deleting asks to type the title, and says what goes too (`admin.confirmDelete`). */
3310
+ confirmDelete?: {
3311
+ typeTitle?: boolean;
3312
+ impact?: string;
3313
+ };
3134
3314
  }
3135
3315
  interface AdminGlobal {
3136
3316
  slug: string;
@@ -3167,6 +3347,8 @@ interface AdminWidgetRef {
3167
3347
  }
3168
3348
  interface AdminSchema {
3169
3349
  locale: AdminLocale;
3350
+ /** A choice for the whole admin, e.g. the tenant (`admin.switcher`). */
3351
+ switcher: AdminSwitcher | null;
3170
3352
  /** Admins can email users links to set their password (needs `email` and `serverURL`). */
3171
3353
  passwordLinks: boolean;
3172
3354
  /** Menu order of collections (`admin.menu`); unlisted ones follow. */
@@ -3330,4 +3512,4 @@ declare function validateConfig(config: Config): ConfigIssue[];
3330
3512
  /** The version of `@easy-cms/core`, set when the package is built. */
3331
3513
  declare const VERSION: string;
3332
3514
 
3333
- export { ADMIN_ICONS, API_KEYS, API_KEY_GLOBAL_OPERATIONS, API_KEY_OPERATIONS, type Access, type AccessArgs, type AccessOptions, type AdminAttention, type AdminBackup, type AdminBackups, type AdminBrand, type AdminCollection, type AdminComponent, type AdminComponentRef, type AdminConfig, type AdminDeliveries, type AdminDelivery, type AdminEmail, type AdminEmailDelivery, type AdminField, type AdminGlobal, type AdminIcon, type AdminLocale, type AdminPage, type AdminPageRef, type AdminRole, type AdminRoleChange, type AdminRoleField, type AdminRoleTarget, type AdminRoleView, type AdminRoles, type AdminSchema, type AdminSso, type AdminStatus, type AdminViewAccess, type AdminWebhookDelivery, type AdminWidgetRef, type AfterChangeHook, type AfterDeleteHook, type AfterReadHook, type ApiHandlerOptions, type ApiKeyContext, type ApiKeyGlobalOperation, type ApiKeyOperation, type ApiKeyPermissions, type ArrayField, type AuditChange, type AuditConfig, type AuditEntry, AuditLog, type AuditPage, type AuditVerification, Auth, type AuthConfig, type AuthProvider, type AuthProviderProfile, type AuthProviderRequest, type AuthUser, BUILTIN_COLLECTIONS, type BackupState, type BackupsConfig, type BeforeChangeHook, type BeforeDeleteHook, type BeforeValidateHook, type Block, type BlocksField, type BooleanField, type BuiltinApiKeysCollection, type BuiltinMediaCollection, type BuiltinMediaFoldersCollection, type BuiltinUsersCollection, type BundleHints, CONFIG_FILE_NAMES, CSRF_COOKIE, CSRF_HEADER, type CliCommand, type CollectionAccess, type CollectionAdmin, type CollectionConfig, type CollectionDocument, type CollectionHooks, type CollectionListAdmin, type CollectionSlug, type Config, ConfigError, type ConfigIssue, type ContainerAdmin, type CopyProgress, type CopyResult, type CreateEasyCMSOptions, type CreateInput, type CreateMigrationResult, type CustomField, type CustomFieldTypes, DEFAULT_ADMIN_PATH, DEFAULT_API_PATH, DEFAULT_DEPTH, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_VERSIONS, DEFAULT_PASSWORD_EMAILS, DEFAULT_TOKEN_EXPIRATION, type DashboardWidget, type Database, type DatabaseAdapter, type DatabaseInitArgs, type DatabaseTransfer, type DateField, type DeliveryKind, type DeliveryState, type DepthOptions, type DirectUpload, type DocumentOf, EXTENSIONS, EasyCMS, EasyCMSError, type EmailAdapter, type EmailCheck, type EmailField, type EmailMessage, type EmailSetting, type Endpoint, type EndpointRequest, FIELD_TYPES, FIELD_TYPE_BASES, FOLDER_LEVELS, type Field, type FieldAccess, type FieldAccessFn, type FieldAdmin, type FieldError, type FieldRule, type FieldType, type FieldTypeBase, type FieldTypeDefinition, type FieldTypeValidateContext, type FieldValidate, type FieldValidateContext, type FieldValue, type FieldsInput, type FieldsValue, type FilterOptions, type FilterOptionsArgs, type FindArgs, type FindOptions, type FolderLevel, type FolderPermissions, ForbiddenError, type GlobalAccess, type GlobalConfig, type GlobalDocument, type GlobalHooks, type GlobalInput, type GlobalSlug, type GroupField, type ID, INTERNAL_COLLECTIONS, type ImageSize, type InferCollection, type InferGlobal, type JsonField, type Label, type LivePreview, type LoadConfigOptions, type LocalStorageOptions, type LocalizationConfig, type Logger, type LoginArgs, MAX_DEPTH, MEDIA, MEDIA_FOLDERS, MIME_GROUPS, MIN_PASSWORD_LENGTH, MIN_SECRET_LENGTH, type MediaDocument, MediaFolders, type MediaSize, type MigrationInfo, NotFoundError, type NumberField, type Operation, type PaginatedDocs, type PasswordEmail, type PasswordEmailArgs, type PasswordEmailFn, type PasswordLinkOptions, PayloadTooLargeError, type Plugin, type PluginInfo, type PluginTypes, type PreviewTarget, type PreviewURL, QueryError, ROLE_OPERATIONS, type RawDocument, type ReadOptions, type RelationshipField, type ResolvedConfig, type RestHandler, type RestHandlerOptions, type RichTextDocument, type RichTextField, type Role, type RoleOperation, type RolePermissions, Roles, type RoutesConfig, SESSION_COOKIE, SSO_COOKIE, type ScheduledJob, SchemaError, type SchemaMode, type SelectField, type SelectOption, type Session, type SlugField, type SlugOf, type SsoOutcome, type SsoProviderRef, type StorageAdapter, type StoredFile, type TextField, type TextareaField, TooManyRequestsError, type TypedPlugin, UnauthorizedError, type UpdateInput, type UpdateOptions, type UploadConfig, type UploadField, type UploadFromURLConfig, type UserIdentity, VERSION, ValidationError, type Version, type VersionSummary, type VersionsConfig, WEBHOOK_EVENTS, type WebhookConfig, type WebhookEvent, type WebhookPayload, type Where, type WhereOperators, anyone, applyDefaults, applyPlugins, configSignature, consoleEmail, consoleLogger, copyDatabase, createApiHandler, createEasyCMS, createRestHandler, createRootEndpointHandler, defineConfig, defineFieldType, definePlugin, expandMimeTypes, fillMissing, findConfigFile, generateSlugs, generateTypes, hasRows, hashPassword, imageDimensions, importConfig, isAdmin, isHasMany, isLoggedIn, keyAllows, loadConfig, localStorage, mergeForUpdate, mimeAllowed, mimeAllowedBy, parseId, populate, readCookie, resolveAdminModule, resolveConfig, rowFields, sharedEasyCMS, silentLogger, singularize, slugify, sniffMimeType, validateConfig, validateFields, verifyPassword, writeBackupFile };
3515
+ export { ADMIN_ICONS, API_KEYS, API_KEY_GLOBAL_OPERATIONS, API_KEY_OPERATIONS, type Access, type AccessArgs, type AccessOptions, type AdminAttention, type AdminBackup, type AdminBackups, type AdminBrand, type AdminCollection, type AdminComponent, type AdminComponentRef, type AdminConfig, type AdminDeliveries, type AdminDelivery, type AdminEmail, type AdminEmailDelivery, type AdminField, type AdminFieldArgs, type AdminGlobal, type AdminIcon, type AdminLocale, type AdminPage, type AdminPageRef, type AdminRole, type AdminRoleChange, type AdminRoleField, type AdminRoleTarget, type AdminRoleView, type AdminRoles, type AdminSchema, type AdminSso, type AdminStatus, type AdminSwitcher, type AdminViewAccess, type AdminWebhookDelivery, type AdminWidgetRef, type AfterChangeHook, type AfterDeleteHook, type AfterReadHook, type ApiHandlerOptions, type ApiKeyContext, type ApiKeyGlobalOperation, type ApiKeyOperation, type ApiKeyPermissions, type ArrayField, type AuditChange, type AuditConfig, type AuditEntry, AuditLog, type AuditPage, type AuditVerification, Auth, type AuthConfig, type AuthProvider, type AuthProviderProfile, type AuthProviderRequest, type AuthUser, BUILTIN_COLLECTIONS, type BackupState, type BackupsConfig, type BeforeChangeHook, type BeforeDeleteHook, type BeforeValidateHook, type Block, type BlocksField, type BooleanField, type BuiltinApiKeysCollection, type BuiltinMediaCollection, type BuiltinMediaFoldersCollection, type BuiltinUsersCollection, type BundleHints, CONFIG_FILE_NAMES, CSRF_COOKIE, CSRF_HEADER, type CliCommand, type CollectionAccess, type CollectionAdmin, type CollectionConfig, type CollectionDocument, type CollectionHooks, type CollectionListAdmin, type CollectionSlug, type Config, ConfigError, type ConfigIssue, type ContainerAdmin, type CopyProgress, type CopyResult, type CreateEasyCMSOptions, type CreateInput, type CreateMigrationResult, type CustomField, type CustomFieldTypes, DEFAULT_ADMIN_PATH, DEFAULT_API_PATH, DEFAULT_DEPTH, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_VERSIONS, DEFAULT_PASSWORD_EMAILS, DEFAULT_TOKEN_EXPIRATION, type DashboardWidget, type Database, type DatabaseAdapter, type DatabaseInitArgs, type DatabaseTransfer, type DateField, type DeliveryKind, type DeliveryState, type DepthOptions, type DirectUpload, type DocumentOf, EXTENSIONS, EasyCMS, EasyCMSError, type EmailAdapter, type EmailCheck, type EmailField, type EmailMessage, type EmailSetting, type Endpoint, type EndpointRequest, FIELD_TYPES, FIELD_TYPE_BASES, FOLDER_LEVELS, type Field, type FieldAccess, type FieldAccessFn, type FieldAdmin, type FieldError, type FieldRule, type FieldType, type FieldTypeBase, type FieldTypeDefinition, type FieldTypeValidateContext, type FieldValidate, type FieldValidateContext, type FieldValue, type FieldsInput, type FieldsValue, type FilterOptions, type FilterOptionsArgs, type FindArgs, type FindOptions, type FolderLevel, type FolderPermissions, ForbiddenError, type GlobalAccess, type GlobalConfig, type GlobalDocument, type GlobalHooks, type GlobalInput, type GlobalSlug, type GroupField, type ID, INTERNAL_COLLECTIONS, type ImageSize, type InferCollection, type InferGlobal, type JsonField, type Label, type LivePreview, type LoadConfigOptions, type LocalStorageOptions, type LocalizationConfig, type Logger, type LoginArgs, MAX_DEPTH, MEDIA, MEDIA_FOLDERS, MIME_GROUPS, MIN_PASSWORD_LENGTH, MIN_SECRET_LENGTH, type MediaDocument, MediaFolders, type MediaSize, type MigrationInfo, NotFoundError, type NumberField, type OnRequest, type OnRequestArgs, type Operation, type PaginatedDocs, type PasswordEmail, type PasswordEmailArgs, type PasswordEmailFn, type PasswordLinkOptions, PayloadTooLargeError, type Plugin, type PluginInfo, type PluginTypes, type PreviewTarget, type PreviewURL, QueryError, ROLE_OPERATIONS, type RawDocument, type ReadOptions, type RelationshipField, type RequestContext, type ResolvedConfig, type RestHandler, type RestHandlerOptions, type RichTextDocument, type RichTextField, type Role, type RoleOperation, type RolePermissions, Roles, type RoutesConfig, SESSION_COOKIE, SSO_COOKIE, type ScheduledJob, SchemaError, type SchemaMode, type SelectField, type SelectOption, type Session, type SlugField, type SlugOf, type SsoOutcome, type SsoProviderRef, type StorageAdapter, type StoredFile, type TextField, type TextareaField, TooManyRequestsError, type TypedPlugin, UnauthorizedError, type UpdateInput, type UpdateOptions, type UploadConfig, type UploadField, type UploadFromURLConfig, type UserIdentity, VERSION, ValidationError, type Version, type VersionSummary, type VersionsConfig, WEBHOOK_EVENTS, type WebhookConfig, type WebhookEvent, type WebhookPayload, type Where, type WhereOperators, anyone, applyDefaults, applyPlugins, configSignature, consoleEmail, consoleLogger, copyDatabase, createApiHandler, createEasyCMS, createRestHandler, createRootEndpointHandler, defineConfig, defineFieldType, definePlugin, expandMimeTypes, fillMissing, findConfigFile, generateSlugs, generateTypes, hasRows, hashPassword, imageDimensions, importConfig, isAdmin, isHasMany, isLoggedIn, isSystemAdmin, keyAllows, loadConfig, localStorage, mergeForUpdate, mimeAllowed, mimeAllowedBy, parseId, populate, readCookie, resolveAdminModule, resolveConfig, rowFields, sharedEasyCMS, silentLogger, singularize, slugify, sniffMimeType, uniqueWithinOf, validateConfig, validateFields, verifyPassword, writeBackupFile };