@easy-cms/core 0.33.0 → 0.35.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.
package/dist/index.d.ts CHANGED
@@ -65,6 +65,11 @@ interface PasswordEmailArgs {
65
65
  readonly locale: string;
66
66
  /** When the link stops working. */
67
67
  readonly expiresAt?: Date;
68
+ /**
69
+ * Invitations when passwords are off (`auth.password: false`): the providers to sign in with,
70
+ * e.g. `['Google']`; `url` is then the login page.
71
+ */
72
+ readonly sso?: readonly string[];
68
73
  }
69
74
  /** An email's content: a subject, and text and/or HTML. */
70
75
  interface PasswordEmail {
@@ -80,6 +85,50 @@ declare const DEFAULT_PASSWORD_EMAILS: {
80
85
  passwordChanged: PasswordEmailFn;
81
86
  };
82
87
 
88
+ /**
89
+ * Signing in to the admin with an outside account (`auth.providers`): Google, Microsoft, GitHub
90
+ * or any OpenID Connect provider. `@easy-cms/auth-oauth` makes these; Easy CMS runs the rest
91
+ * (the redirect, matching users, sessions).
92
+ */
93
+ /** Values bound to one sign-in, checked when the browser comes back. */
94
+ interface AuthProviderRequest {
95
+ /** Where the provider sends the browser back: `<serverURL><api>/auth/<id>/callback`. */
96
+ readonly redirectUri: string;
97
+ readonly state: string;
98
+ /** For PKCE: the provider gets its S256 challenge. */
99
+ readonly codeVerifier: string;
100
+ /** For OpenID Connect: must come back in the ID token. */
101
+ readonly nonce: string;
102
+ }
103
+ /** Who signed in, as the provider says. */
104
+ interface AuthProviderProfile {
105
+ /** The provider's stable id for the account (`sub`). */
106
+ readonly subject: string;
107
+ readonly email: string | null;
108
+ /** The provider vouches for the email. Only verified emails are matched to users. */
109
+ readonly emailVerified: boolean;
110
+ readonly name?: string | undefined;
111
+ }
112
+ interface AuthProvider {
113
+ /** In URLs and stored identities, e.g. `google`: lowercase letters, digits and `-`. */
114
+ readonly id: string;
115
+ /** On the sign-in button, e.g. `Google`. */
116
+ readonly name: string;
117
+ /** The button's icon in the admin. Default `key`. */
118
+ readonly icon?: 'google' | 'microsoft' | 'github' | 'key';
119
+ /** The provider's page to send the browser to. */
120
+ authorizationURL(request: AuthProviderRequest): Promise<URL>;
121
+ /**
122
+ * After the browser comes back to `redirectUri` (`url`, with its query): checks the response
123
+ * and exchanges the code. Throws when anything does not check out.
124
+ */
125
+ callback(request: AuthProviderRequest & {
126
+ readonly url: URL;
127
+ }): Promise<AuthProviderProfile>;
128
+ /** For Settings → SSO: what it connects to, never secrets. */
129
+ describe?(): Readonly<Record<string, string>>;
130
+ }
131
+
83
132
  interface Logger {
84
133
  info(message: string): void;
85
134
  warn(message: string): void;
@@ -339,6 +388,103 @@ type PreviewTarget = {
339
388
  /** Why a password link was sent: a forgotten password, or an invitation to a new account. */
340
389
  type PasswordPurpose = 'reset' | 'invite';
341
390
 
391
+ /** The cookie that carries a sign-in through the provider and back. */
392
+ declare const SSO_COOKIE = "ecms-sso";
393
+ /** A provider as the login page shows it (`GET <api>/users/init`). */
394
+ interface SsoProviderRef {
395
+ id: string;
396
+ name: string;
397
+ icon: string;
398
+ }
399
+ /** Settings → SSO (`GET <api>/admin/sso`). */
400
+ interface AdminSso {
401
+ providers: (SsoProviderRef & {
402
+ /** Give this to the provider as the redirect (callback) URL. */
403
+ callbackURL: string | null;
404
+ details: Record<string, string>;
405
+ })[];
406
+ /** Who may sign in with a password: everyone, or only admins. */
407
+ password: 'everyone' | 'admins';
408
+ /** Email domains whose people get an account when they first sign in. */
409
+ signUp: {
410
+ domains: string[];
411
+ role: string;
412
+ } | null;
413
+ /** Without `serverURL`, sign-in only works in development. */
414
+ serverURL: boolean;
415
+ }
416
+ /** An outside account a user signs in with (`GET <api>/auth/identities`). */
417
+ interface UserIdentity {
418
+ id: ID;
419
+ provider: string;
420
+ /** The provider's name, e.g. `Google`. */
421
+ name: string;
422
+ email: string | null;
423
+ createdAt: string;
424
+ lastUsedAt: string | null;
425
+ }
426
+ /** Why a sign-in did not work, as `?sso=` on the page it ends on. */
427
+ type SsoOutcome = 'linked' | 'cancelled' | 'expired' | 'failed' | 'no-account' | 'unverified' | 'inactive' | 'taken';
428
+ /** Single sign-on with `auth.providers`. Available as `cms.auth.sso`. */
429
+ declare class SingleSignOn {
430
+ private readonly cms;
431
+ constructor(cms: EasyCMS);
432
+ private get config();
433
+ get enabled(): boolean;
434
+ providers(): SsoProviderRef[];
435
+ /** Whether a user may sign in with a password (`auth.password: false` leaves only admins). */
436
+ passwordAllowed(user: {
437
+ readonly [key: string]: unknown;
438
+ }): boolean;
439
+ /** `<serverURL><api>/auth/<id>/callback`, or `null` without `serverURL` in production. */
440
+ callbackURL(provider: string, origin?: string): string | null;
441
+ /**
442
+ * Starts signing in (or, with `user`, linking an account): the provider's URL to send the
443
+ * browser to, and the sealed value of the cookie that must come back with it.
444
+ */
445
+ start(providerId: string, options: {
446
+ origin?: string;
447
+ redirect?: string | null;
448
+ user?: AuthUser;
449
+ }): Promise<{
450
+ url: string;
451
+ cookie: string;
452
+ }>;
453
+ /**
454
+ * Finishes at `<api>/auth/<id>/callback`: checks the response, finds (or makes) the user and
455
+ * starts a session. Returns where to send the browser; failures end on the login page (or the
456
+ * account page, when linking) with `?sso=<outcome>`.
457
+ */
458
+ finish(providerId: string, options: {
459
+ url: URL;
460
+ cookie: string | undefined;
461
+ origin?: string;
462
+ user: AuthUser | null;
463
+ }): Promise<{
464
+ redirect: string;
465
+ session?: Session;
466
+ }>;
467
+ /** A user's outside accounts. */
468
+ identities(userId: ID): Promise<UserIdentity[]>;
469
+ /**
470
+ * Unlinks an outside account: the user's own, or anyone's for admins. Refuses to unlink the
471
+ * last way a user has to sign in.
472
+ */
473
+ unlink(actor: AuthUser, identityId: ID): Promise<void>;
474
+ /** Forgets a deleted user's outside accounts. */
475
+ forget(userId: ID): Promise<void>;
476
+ settings(origin?: string): AdminSso;
477
+ private provider;
478
+ /** Only pages of the admin: anything else (another site) goes to the admin's home. */
479
+ private adminPage;
480
+ private identity;
481
+ private addIdentity;
482
+ private userByEmail;
483
+ /** A new account for people from `allowSignUp.domains`. */
484
+ private signUp;
485
+ private defaultRole;
486
+ }
487
+
342
488
  interface LoginArgs {
343
489
  readonly email: string;
344
490
  readonly password: string;
@@ -363,6 +509,8 @@ interface PasswordLinkOptions {
363
509
  /** Login, logout and session verification. Available as `cms.auth`. */
364
510
  declare class Auth {
365
511
  private readonly cms;
512
+ /** Signing in with outside accounts (`auth.providers`). */
513
+ readonly sso: SingleSignOn;
366
514
  constructor(cms: EasyCMS);
367
515
  private get db();
368
516
  private get config();
@@ -744,6 +892,9 @@ type GlobalInput<C extends Config, S extends GlobalSlug<C>> = Partial<Simplify<F
744
892
  /** What a role may do with a collection or global, ticked in Settings → Roles. */
745
893
  declare const ROLE_OPERATIONS: readonly ["read", "create", "update", "delete", "publish"];
746
894
  type RoleOperation = (typeof ROLE_OPERATIONS)[number];
895
+ /** A field a role may only read, or not see at all; fields not listed follow the collection. */
896
+ type FieldRule = 'read' | 'hidden';
897
+ type FieldRules = Readonly<Record<string, Readonly<Record<string, FieldRule>>>>;
747
898
  /**
748
899
  * Stored in a role's `permissions`. Anything not listed is not allowed. A slug listed with no
749
900
  * operations has been looked at and given nothing (it is not "new" in Settings → Roles).
@@ -753,6 +904,13 @@ interface RolePermissions {
753
904
  readonly globals?: Readonly<Record<string, readonly RoleOperation[]>>;
754
905
  /** Admin pages: `status`, `deliveries`, `page:<path>` (`admin.pages`), `widget:<tag>` (`admin.dashboard`). */
755
906
  readonly admin?: readonly string[];
907
+ /** Operations of `collections` allowed only on the role's own documents (see `admin.ownerField`). */
908
+ readonly own?: Readonly<Record<string, readonly RoleOperation[]>>;
909
+ /** Top-level fields the role may only read or not see, by collection or global slug. */
910
+ readonly fields?: {
911
+ readonly collections?: FieldRules;
912
+ readonly globals?: FieldRules;
913
+ };
756
914
  }
757
915
  /** One role as Settings → Roles shows it (`GET <api>/admin/roles`). */
758
916
  interface AdminRole {
@@ -767,6 +925,15 @@ interface AdminRole {
767
925
  permissions: RolePermissions;
768
926
  updatedAt: string;
769
927
  }
928
+ /** A top-level field whose permission can be set per role. */
929
+ interface AdminRoleField {
930
+ name: string;
931
+ label?: Label;
932
+ /** Required without a default value: roles that create documents must be able to fill it. */
933
+ required: boolean;
934
+ /** The collection's owner field (`admin.ownerField`). */
935
+ owner?: boolean;
936
+ }
770
937
  /** A row of the permissions table. */
771
938
  interface AdminRoleTarget {
772
939
  slug: string;
@@ -774,6 +941,7 @@ interface AdminRoleTarget {
774
941
  ops: RoleOperation[];
775
942
  /** No role has been given anything here yet (added to the config since). */
776
943
  new: boolean;
944
+ fields: AdminRoleField[];
777
945
  }
778
946
  /** A page or dashboard panel that can be given to roles. */
779
947
  interface AdminRoleView {
@@ -787,6 +955,8 @@ interface AdminRoles {
787
955
  collections: (AdminRoleTarget & {
788
956
  /** Collections its relationship and upload fields point to. */
789
957
  references: string[];
958
+ /** Can be limited to own documents: the field that names the owner (`createdBy` by default). */
959
+ owner?: string;
790
960
  })[];
791
961
  globals: AdminRoleTarget[];
792
962
  views: AdminRoleView[];
@@ -808,11 +978,12 @@ interface AdminRoleChange {
808
978
  declare class Roles {
809
979
  private readonly config;
810
980
  private readonly db;
981
+ private readonly log?;
811
982
  readonly enabled: boolean;
812
983
  private readonly versions;
813
984
  private cache;
814
985
  private synced;
815
- constructor(config: ResolvedConfig, db: Database);
986
+ constructor(config: ResolvedConfig, db: Database, log?: ((message: string) => void) | undefined);
816
987
  /**
817
988
  * Whether the user's role allows an operation: `true`, `false`, or for their own account
818
989
  * (users without read or update on `users`) a constraint to it.
@@ -827,6 +998,25 @@ declare class Roles {
827
998
  * it; without roles, nobody else (`status`, `deliveries`) or everybody (plugin pages).
828
999
  */
829
1000
  canView(user: AuthUser, id: string): Promise<boolean>;
1001
+ /**
1002
+ * The field that names a collection's owner, for "own documents only": `admin.ownerField`, or
1003
+ * `createdBy`. `undefined` without roles, and for users and collections roles don't cover.
1004
+ */
1005
+ ownerOf(slug: string): string | undefined;
1006
+ /**
1007
+ * The user's field rules (top-level fields their role may only read, or not see), for field
1008
+ * access checks. Roles that may update only their own documents can't change the owner field.
1009
+ */
1010
+ fieldRules(user: AuthUser | null): Promise<ReadonlyMap<Field, FieldRule> | undefined>;
1011
+ /** A new document is its creator's: sets `createdBy`, and an empty owner field. */
1012
+ fillOwner(slug: string, data: Record<string, unknown>, user: AuthUser | null): void;
1013
+ /** Documents a user owns, by collection (`createdBy` and owner fields), for deleting them. */
1014
+ owned(userId: ID): Promise<{
1015
+ collection: string;
1016
+ count: number;
1017
+ }[]>;
1018
+ /** Gives a deleted user's documents to another user, or to nobody (`null`). */
1019
+ transfer(from: ID, to: ID | null): Promise<void>;
830
1020
  /** Forgets cached permissions, after a role changed. */
831
1021
  invalidate(): void;
832
1022
  /**
@@ -835,6 +1025,12 @@ declare class Roles {
835
1025
  */
836
1026
  sync(): Promise<void>;
837
1027
  private addMissing;
1028
+ /**
1029
+ * Documents from before roles have no `createdBy`: it is filled from who saved their first
1030
+ * version, for collections with versions. Only while no document of the collection has one,
1031
+ * so it runs once (and finds nothing to do afterwards).
1032
+ */
1033
+ private backfillCreators;
838
1034
  /** Whether a role exists (users can only be given existing roles). */
839
1035
  exists(key: string): Promise<boolean>;
840
1036
  /** Roles a user can be given, those of `auth.roles` first; `name` may be empty. */
@@ -860,6 +1056,15 @@ declare class Roles {
860
1056
  private everything;
861
1057
  /** Keeps only known collections, globals, operations and pages; `read` comes with the others. */
862
1058
  private clean;
1059
+ /**
1060
+ * Keeps rules for known top-level fields. A field that must be filled in (required, without a
1061
+ * default) can't be read-only or hidden for a role that creates documents.
1062
+ */
1063
+ private cleanRules;
1064
+ /** Fields that name a collection's owner (`createdBy`, and `admin.ownerField`). */
1065
+ private ownerColumns;
1066
+ /** Sets one field of every matching document, keeping the rest as stored. */
1067
+ private setWhere;
863
1068
  private cleanName;
864
1069
  private permissionsOf;
865
1070
  private load;
@@ -1107,7 +1312,13 @@ declare class EasyCMS<C extends Config = Config> {
1107
1312
  private previewURL;
1108
1313
  private versionTarget;
1109
1314
  private updateDocument;
1110
- delete<S extends Slug<C>>(collection: S, id: ID, options?: AccessOptions): Promise<Doc<C, S>>;
1315
+ /**
1316
+ * Deletes a document. Deleting a user with roles from the admin (`auth.rbac`): `transferTo`
1317
+ * gives the documents they own to another user; without it they have no owner.
1318
+ */
1319
+ delete<S extends Slug<C>>(collection: S, id: ID, options?: AccessOptions & {
1320
+ transferTo?: ID | null;
1321
+ }): Promise<Doc<C, S>>;
1111
1322
  findGlobal<S extends GSlug<C>>(slug: S, options?: ReadOptions): Promise<GDoc<C, S>>;
1112
1323
  updateGlobal<S extends GSlug<C>>(slug: S, data: GInput<C, S>, options?: DepthOptions): Promise<GDoc<C, S>>;
1113
1324
  /** Takes a global off the site (`status: 'draft'`). See `unpublish`. */
@@ -1244,6 +1455,13 @@ declare class EasyCMS<C extends Config = Config> {
1244
1455
  private checkDocumentAccess;
1245
1456
  private checkGlobalAccess;
1246
1457
  private fieldChecker;
1458
+ /**
1459
+ * Refuses filtering or sorting by fields the caller may not read: the results would tell
1460
+ * their values. Checks each field along a dotted path, through groups, arrays and blocks.
1461
+ */
1462
+ private checkQueryFields;
1463
+ /** `checkGrant` for one document: a role limited to its own documents must own it. */
1464
+ private checkDocumentGrant;
1247
1465
  /** Runs afterRead hooks, populates relationships and removes what the caller may not see. */
1248
1466
  private output;
1249
1467
  /** Creates a document: access, input filtering, hooks, validation, then afterChange. */
@@ -1638,6 +1856,11 @@ interface CollectionAdmin extends ContainerAdmin {
1638
1856
  */
1639
1857
  readonly group?: 'settings';
1640
1858
  readonly list?: CollectionListAdmin;
1859
+ /**
1860
+ * With `auth.rbac`: the relationship field to `users` that names a document's owner, e.g.
1861
+ * `author`, for roles given "own documents only". Default: who created it (`createdBy`).
1862
+ */
1863
+ readonly ownerField?: string;
1641
1864
  }
1642
1865
  interface CollectionListAdmin {
1643
1866
  /**
@@ -1845,6 +2068,24 @@ interface AuthConfig {
1845
2068
  readonly resetPasswordExpiration?: number;
1846
2069
  /** How long an invitation link works, in seconds. Default 7 days. */
1847
2070
  readonly inviteExpiration?: number;
2071
+ /**
2072
+ * Signing in to the admin with outside accounts, e.g. `[google({ clientId, clientSecret })]`
2073
+ * from `@easy-cms/auth-oauth`. Users are matched by their verified email.
2074
+ */
2075
+ readonly providers?: readonly AuthProvider[];
2076
+ /**
2077
+ * With `providers`: people from these email domains who sign in for the first time get an
2078
+ * account with `role` (default: as new users). Without it, only existing users can sign in.
2079
+ */
2080
+ readonly allowSignUp?: {
2081
+ readonly domains: readonly string[];
2082
+ readonly role?: string;
2083
+ };
2084
+ /**
2085
+ * `false`: only admins may sign in with a password (a way in when the provider is down);
2086
+ * everyone else signs in with `providers`. Default `true`.
2087
+ */
2088
+ readonly password?: boolean;
1848
2089
  /** Your own text for the password emails, e.g. in your brand's voice. Default: English or Thai. */
1849
2090
  readonly emails?: {
1850
2091
  readonly resetPassword?: PasswordEmailFn;
@@ -2427,6 +2668,8 @@ interface AdminCollection {
2427
2668
  delete: boolean;
2428
2669
  publish: boolean;
2429
2670
  };
2671
+ /** With `auth.rbac`: the field naming a document's owner (`createdBy` or `admin.ownerField`). */
2672
+ owner?: string;
2430
2673
  }
2431
2674
  interface AdminGlobal {
2432
2675
  slug: string;
@@ -2490,7 +2733,12 @@ interface AdminSchema {
2490
2733
  backups: boolean;
2491
2734
  email: boolean;
2492
2735
  roles: boolean;
2736
+ sso: boolean;
2493
2737
  };
2738
+ /** Roles from the admin are on (`auth.rbac`): documents have owners. */
2739
+ rbac: boolean;
2740
+ /** Outside accounts users can sign in with and link (`auth.providers`). */
2741
+ providers: SsoProviderRef[];
2494
2742
  /** Pages this user may open (`admin.pages`). */
2495
2743
  pages: AdminPageRef[];
2496
2744
  /** Dashboard panels this user may see (`admin.dashboard`). */
@@ -2589,4 +2837,4 @@ declare function validateConfig(config: Config): ConfigIssue[];
2589
2837
  /** The version of `@easy-cms/core`, set when the package is built. */
2590
2838
  declare const VERSION: string;
2591
2839
 
2592
- 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 AdminRoleTarget, type AdminRoleView, type AdminRoles, type AdminSchema, type AdminStatus, type AdminViewAccess, type AdminWebhookDelivery, type AdminWidgetRef, type AfterChangeHook, type AfterDeleteHook, type AfterReadHook, type ApiKeyContext, type ApiKeyGlobalOperation, type ApiKeyOperation, type ApiKeyPermissions, type ArrayField, Auth, type AuthConfig, 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 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 DocumentOf, EXTENSIONS, EasyCMS, EasyCMSError, type EmailAdapter, type EmailCheck, type EmailField, type EmailMessage, type EmailSetting, type Endpoint, type EndpointRequest, FIELD_TYPES, FIELD_TYPE_BASES, type Field, type FieldAccess, type FieldAccessFn, type FieldAdmin, type FieldError, 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, 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, MIN_PASSWORD_LENGTH, MIN_SECRET_LENGTH, type MediaDocument, 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, type ScheduledJob, SchemaError, type SchemaMode, type SelectField, type SelectOption, type Session, type SlugField, type SlugOf, type StorageAdapter, type StoredFile, type TextField, type TextareaField, TooManyRequestsError, type TypedPlugin, UnauthorizedError, type UpdateInput, type UpdateOptions, type UploadConfig, type UploadField, type UploadFromURLConfig, 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, createEasyCMS, createRestHandler, createRootEndpointHandler, defineConfig, defineFieldType, definePlugin, fillMissing, findConfigFile, generateSlugs, generateTypes, hasRows, hashPassword, imageDimensions, importConfig, isAdmin, isHasMany, isLoggedIn, keyAllows, loadConfig, localStorage, mergeForUpdate, mimeAllowed, mimeAllowedBy, parseId, populate, readCookie, resolveAdminModule, resolveConfig, rowFields, silentLogger, singularize, slugify, sniffMimeType, validateConfig, validateFields, verifyPassword, writeBackupFile };
2840
+ 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 ApiKeyContext, type ApiKeyGlobalOperation, type ApiKeyOperation, type ApiKeyPermissions, type ArrayField, 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 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 DocumentOf, EXTENSIONS, EasyCMS, EasyCMSError, type EmailAdapter, type EmailCheck, type EmailField, type EmailMessage, type EmailSetting, type Endpoint, type EndpointRequest, FIELD_TYPES, FIELD_TYPE_BASES, 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, 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, MIN_PASSWORD_LENGTH, MIN_SECRET_LENGTH, type MediaDocument, 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, createEasyCMS, createRestHandler, createRootEndpointHandler, defineConfig, defineFieldType, definePlugin, fillMissing, findConfigFile, generateSlugs, generateTypes, hasRows, hashPassword, imageDimensions, importConfig, isAdmin, isHasMany, isLoggedIn, keyAllows, loadConfig, localStorage, mergeForUpdate, mimeAllowed, mimeAllowedBy, parseId, populate, readCookie, resolveAdminModule, resolveConfig, rowFields, silentLogger, singularize, slugify, sniffMimeType, validateConfig, validateFields, verifyPassword, writeBackupFile };