@easy-cms/core 1.31.0 → 1.32.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.
@@ -1472,6 +1472,262 @@ type RichTextBlocks<C extends Config, S extends CollectionSlug<C>, F extends str
1472
1472
  fields: Simplify<FieldsValue<Fs, C, false>>;
1473
1473
  } : never : never;
1474
1474
 
1475
+ type IntegrationCategory = 'social' | 'ai' | 'notifications' | 'automation';
1476
+ /** A value to fill when connecting (`kind: 'fields'`). */
1477
+ interface IntegrationField {
1478
+ readonly name: string;
1479
+ readonly label?: Label;
1480
+ readonly description?: Label;
1481
+ /** `multiselect`: ticked options, kept as `a,b,c`. */
1482
+ readonly type?: 'text' | 'url' | 'textarea' | 'select' | 'multiselect';
1483
+ /** For `select` and `multiselect`: values, or `{ value, label }`. */
1484
+ readonly options?: readonly (string | {
1485
+ readonly value: string;
1486
+ readonly label: Label;
1487
+ })[];
1488
+ /**
1489
+ * Choices from the provider for this field (#356): a Find button beside it runs this with the
1490
+ * values typed so far, e.g. the chats a Telegram bot was written to.
1491
+ */
1492
+ readonly lookup?: (values: Readonly<Record<string, string>>, args: {
1493
+ cms: EasyCMS;
1494
+ }) => Promise<readonly {
1495
+ value: string;
1496
+ label: string;
1497
+ }[]> | readonly {
1498
+ value: string;
1499
+ label: string;
1500
+ }[];
1501
+ readonly placeholder?: string;
1502
+ readonly required?: boolean;
1503
+ /** Encrypted at rest and never sent back to the admin (shown as `••••1234`). */
1504
+ readonly secret?: boolean;
1505
+ }
1506
+ interface IntegrationTestResult {
1507
+ readonly ok: boolean;
1508
+ /** The account it reaches, e.g. a Page's or a bot's name. */
1509
+ readonly account?: string;
1510
+ /** Why it failed. */
1511
+ readonly message?: string;
1512
+ }
1513
+ /** What `exchange` gets back from the provider: one account, or several to choose from. */
1514
+ interface IntegrationOAuthResult {
1515
+ readonly values?: Readonly<Record<string, string>>;
1516
+ readonly account?: string;
1517
+ readonly accounts?: readonly {
1518
+ readonly id: string;
1519
+ readonly name: string;
1520
+ readonly values: Readonly<Record<string, string>>;
1521
+ }[];
1522
+ }
1523
+ /** An outside provider a plugin connects to (`integrations` in the config). */
1524
+ interface IntegrationConfig {
1525
+ /** Lowercase letters, digits and `-`, e.g. `telegram`. */
1526
+ readonly id: string;
1527
+ readonly label: Label;
1528
+ readonly category: IntegrationCategory;
1529
+ readonly description?: Label;
1530
+ readonly icon?: string;
1531
+ /** A link to its guide. */
1532
+ readonly docs?: string;
1533
+ /** The plugin it comes from, e.g. `@easy-cms/plugin-notify`. */
1534
+ readonly plugin?: string;
1535
+ /** `fields`: values to paste (a token, a URL); `oauth`: a Connect button. */
1536
+ readonly kind: 'fields' | 'oauth';
1537
+ readonly fields?: readonly IntegrationField[];
1538
+ /**
1539
+ * Environment variables by field: set, they win over the admin. With all of `fields`, the
1540
+ * provider has an "Environment" connection that can't be changed in the admin.
1541
+ */
1542
+ readonly env?: Readonly<Record<string, string>>;
1543
+ /** For `kind: 'oauth'`: the provider's sign-in page, and turning its code into tokens. */
1544
+ readonly oauth?: {
1545
+ readonly authorizeUrl: (args: {
1546
+ redirectUri: string;
1547
+ state: string;
1548
+ }) => string;
1549
+ readonly exchange: (args: {
1550
+ code: string;
1551
+ redirectUri: string;
1552
+ }) => Promise<IntegrationOAuthResult> | IntegrationOAuthResult;
1553
+ };
1554
+ /** Checks the values without posting anything. */
1555
+ readonly test?: (values: Readonly<Record<string, string>>, args: {
1556
+ cms: EasyCMS;
1557
+ }) => Promise<IntegrationTestResult> | IntegrationTestResult;
1558
+ }
1559
+ /** A connection as plugins read it: its values, secrets decrypted. */
1560
+ interface IntegrationConnection {
1561
+ readonly name: string;
1562
+ readonly values: Readonly<Record<string, string>>;
1563
+ /** From environment variables. */
1564
+ readonly env: boolean;
1565
+ }
1566
+ interface AdminConnection {
1567
+ id: ID | 'env';
1568
+ name: string;
1569
+ isDefault: boolean;
1570
+ env: boolean;
1571
+ account: string | null;
1572
+ lastUsedAt: string | null;
1573
+ lastError: string | null;
1574
+ /** Plain values; secrets as `••••1234`. */
1575
+ values: Record<string, string>;
1576
+ }
1577
+ /** A field as the admin gets it: without its functions. */
1578
+ type AdminIntegrationField = Omit<IntegrationField, 'lookup'> & {
1579
+ findable?: true;
1580
+ };
1581
+ interface AdminIntegration {
1582
+ id: string;
1583
+ label: Label;
1584
+ category: IntegrationCategory;
1585
+ description?: Label;
1586
+ icon?: string;
1587
+ docs?: string;
1588
+ plugin?: string;
1589
+ kind: 'fields' | 'oauth';
1590
+ fields: AdminIntegrationField[];
1591
+ enabled: boolean;
1592
+ /** Fields set in the environment. */
1593
+ envFields: string[];
1594
+ testable: boolean;
1595
+ connections: AdminConnection[];
1596
+ }
1597
+ /** What the code configures: shown, not changed, on the Integrations page. */
1598
+ interface ConfiguredService {
1599
+ id: string;
1600
+ kind: 'email' | 'storage' | 'search' | 'sign-in' | 'payments';
1601
+ name: string;
1602
+ }
1603
+ /** Official plugins, offered when they aren't installed. */
1604
+ declare const OFFICIAL_PLUGINS: readonly {
1605
+ name: string;
1606
+ category: IntegrationCategory | 'payments';
1607
+ description: Label;
1608
+ docs: string;
1609
+ }[];
1610
+ /** The connections of plugins' integrations: kept, read and tested by Easy CMS. */
1611
+ declare class Integrations {
1612
+ private readonly cms;
1613
+ constructor(cms: EasyCMS);
1614
+ private get config();
1615
+ private get secrets();
1616
+ /** The integrations plugins declared. */
1617
+ get definitions(): readonly IntegrationConfig[];
1618
+ private definition;
1619
+ private rows;
1620
+ /** The values of the fields set in the environment. */
1621
+ private envValues;
1622
+ /** Every field is in the environment: an "Environment" connection. */
1623
+ private envComplete;
1624
+ private enabled;
1625
+ private decrypt;
1626
+ private reseal;
1627
+ /** Splits values into the plain ones and the secret ones (encrypted). */
1628
+ private seal;
1629
+ /**
1630
+ * A connection for a plugin: the default one, or the one named; `null` when there is none
1631
+ * or the integration is turned off. Values from the environment win.
1632
+ */
1633
+ get(id: string, options?: {
1634
+ name?: string;
1635
+ }): Promise<IntegrationConnection | null>;
1636
+ /**
1637
+ * Every connection of an integration (the environment's first), e.g. to notify each chat;
1638
+ * none when it is turned off.
1639
+ */
1640
+ all(id: string): Promise<IntegrationConnection[]>;
1641
+ /** The connection was used: its card says when, and an earlier error is gone. */
1642
+ markUsed(id: string, name?: string): Promise<void>;
1643
+ /** It failed: the card and the dashboard's "needs attention" say why. */
1644
+ markError(id: string, message: string, name?: string): Promise<void>;
1645
+ private mark;
1646
+ overview(): Promise<{
1647
+ integrations: AdminIntegration[];
1648
+ configured: ConfiguredService[];
1649
+ catalog: typeof OFFICIAL_PLUGINS;
1650
+ staleSecrets: number;
1651
+ }>;
1652
+ /** The adapters the config sets: email, storage, search, sign-in, payments. */
1653
+ private configured;
1654
+ private audit;
1655
+ private checkFields;
1656
+ private cleanValues;
1657
+ private uniqueName;
1658
+ private create;
1659
+ /** Connects with pasted values (`kind: 'fields'`); tested first when the plugin can. */
1660
+ connect(id: string, body: unknown, user: AuthUser): Promise<{
1661
+ id: ID;
1662
+ }>;
1663
+ private row;
1664
+ /** A new name or values (secrets left empty are kept), or the default. */
1665
+ update(id: string, cid: ID, body: unknown, user: AuthUser): Promise<{
1666
+ ok: boolean;
1667
+ }>;
1668
+ /** Removes the connection and its secrets; the oldest left becomes the default. */
1669
+ disconnect(id: string, cid: ID, user: AuthUser): Promise<{
1670
+ deleted: number;
1671
+ }>;
1672
+ /** Turns the integration on or off; its connections are kept. */
1673
+ setEnabled(id: string, enabled: boolean, user: AuthUser): Promise<{
1674
+ enabled: boolean;
1675
+ }>;
1676
+ /** Checks a connection's values with the provider; the card shows the result. */
1677
+ test(id: string, cid: ID | 'env'): Promise<IntegrationTestResult>;
1678
+ /**
1679
+ * A field's choices from the provider, with the values typed (and, editing a connection, its
1680
+ * stored secrets for the fields left empty).
1681
+ */
1682
+ lookup(id: string, fieldName: string, body: unknown): Promise<{
1683
+ choices: ({
1684
+ value: string;
1685
+ label: string;
1686
+ } | {
1687
+ value: string;
1688
+ label: string;
1689
+ })[];
1690
+ }>;
1691
+ /** The provider's sign-in page to send the admin to. */
1692
+ authorize(id: string, user: AuthUser, redirectUri: string, name: string): {
1693
+ url: string;
1694
+ };
1695
+ /**
1696
+ * Back from the provider: one account is connected at once; several wait (encrypted, 10
1697
+ * minutes) for the admin to choose. Returns where the admin goes next.
1698
+ */
1699
+ callback(id: string, code: string, stateText: string, redirectUri: string, user: AuthUser): Promise<{
1700
+ connected: true;
1701
+ pending?: never;
1702
+ } | {
1703
+ pending: ID;
1704
+ connected?: never;
1705
+ }>;
1706
+ /** The accounts waiting to be chosen from, by name only. */
1707
+ pending(id: string, pid: ID, user: AuthUser): Promise<{
1708
+ name: string;
1709
+ accounts: {
1710
+ id: string;
1711
+ name: string;
1712
+ }[];
1713
+ }>;
1714
+ private pendingRow;
1715
+ /** Connects the account chosen. */
1716
+ choose(id: string, pid: ID, accountId: string, user: AuthUser): Promise<{
1717
+ id: ID;
1718
+ }>;
1719
+ /** Encrypts again, with the current secret, every connection still on an older one. */
1720
+ rotate(): Promise<{
1721
+ resealed: number;
1722
+ }>;
1723
+ /** Connections whose test or last use failed, for the dashboard's "needs attention". */
1724
+ broken(): Promise<{
1725
+ integration: string;
1726
+ name: string;
1727
+ error: string;
1728
+ }[]>;
1729
+ }
1730
+
1475
1731
  /** What a role may do with a collection or global, ticked in Settings → Roles. */
1476
1732
  declare const ROLE_OPERATIONS: readonly ["read", "create", "update", "delete", "publish"];
1477
1733
  type RoleOperation = (typeof ROLE_OPERATIONS)[number];
@@ -1901,6 +2157,18 @@ interface SearchResults {
1901
2157
  readonly limit: number;
1902
2158
  readonly hasNextPage: boolean;
1903
2159
  }
2160
+ /** What a listener of `cms.on` gets: the event's name, its data, and the document it is about. */
2161
+ interface EventMessage {
2162
+ readonly event: string;
2163
+ readonly data: Record<string, unknown>;
2164
+ /** The document or global it is about, when there is one. */
2165
+ readonly about?: {
2166
+ readonly collection?: string;
2167
+ readonly id?: ID;
2168
+ readonly global?: string;
2169
+ };
2170
+ }
2171
+ type EventListener = (message: EventMessage) => unknown;
1904
2172
  interface CreateEasyCMSOptions {
1905
2173
  /** Project root. Default `process.cwd()`. */
1906
2174
  readonly cwd?: string;
@@ -1950,6 +2218,8 @@ declare class EasyCMS<C extends Config = Config> {
1950
2218
  readonly audit: AuditLog;
1951
2219
  /** Folders of the media library and their permissions (`upload.folders`). */
1952
2220
  readonly folders: MediaFolders;
2221
+ /** Accounts connected to plugins' integrations (`integrations`, Settings → Integrations). */
2222
+ readonly integrations: Integrations;
1953
2223
  private readonly versions;
1954
2224
  private readonly webhooks;
1955
2225
  private readonly mailer;
@@ -2305,6 +2575,17 @@ declare class EasyCMS<C extends Config = Config> {
2305
2575
  collection: string;
2306
2576
  id: ID;
2307
2577
  }): void;
2578
+ private readonly listeners;
2579
+ /** Listeners of every event (`events: '*'` in the config's `listeners`). */
2580
+ private readonly anyListeners;
2581
+ /**
2582
+ * Runs `handler` after each `event` on this server (#356): the config's and plugins' events, the
2583
+ * content changes webhooks get (`create`, `publish`…), and Easy CMS's own (`scheduled.failed`,
2584
+ * `delivery.failed`, `backup.failed`, `integration.failed`). It runs after the change, without
2585
+ * being waited for; its errors are logged. Returns a function that stops it.
2586
+ */
2587
+ on(event: string, handler: EventListener): () => void;
2588
+ private dispatch;
2308
2589
  /**
2309
2590
  * Tries webhook deliveries that are due for another attempt. Deliveries are kept in the
2310
2591
  * database until they succeed, so they survive restarts.
@@ -3792,6 +4073,16 @@ interface Config {
3792
4073
  readonly events?: readonly string[];
3793
4074
  /** Work run with the scheduled jobs, e.g. a plugin's clean-up. */
3794
4075
  readonly jobs?: readonly JobConfig[];
4076
+ /**
4077
+ * Run after events on this server (#356), as `cms.on` does: plugins use this, e.g. to send a
4078
+ * notification. `events`: names, or `'*'` for every event.
4079
+ */
4080
+ readonly listeners?: readonly {
4081
+ readonly events: readonly string[] | '*';
4082
+ readonly handler: (message: EventMessage, args: {
4083
+ readonly cms: EasyCMS;
4084
+ }) => unknown;
4085
+ }[];
3795
4086
  /** Content in several languages: fields with `localized: true` hold one value per locale. */
3796
4087
  readonly localization?: LocalizationConfig | false;
3797
4088
  readonly routes?: RoutesConfig;
@@ -3893,9 +4184,14 @@ interface Config {
3893
4184
  */
3894
4185
  readonly telemetry?: boolean | TelemetryConfig;
3895
4186
  readonly plugins?: readonly Plugin[];
4187
+ /**
4188
+ * Outside providers admins connect accounts to on the Integrations page (#311), usually added
4189
+ * by plugins: a Telegram bot, an AI provider, a Facebook Page. See `IntegrationConfig`.
4190
+ */
4191
+ readonly integrations?: readonly IntegrationConfig[];
3896
4192
  }
3897
4193
  /** The config after plugins ran, validation passed and defaults were applied. */
3898
- interface ResolvedConfig extends Omit<Config, 'cors' | 'localization' | 'routes' | 'admin' | 'upload' | 'auth' | 'collections' | 'globals' | 'endpoints' | 'plugins' | 'audit'> {
4194
+ interface ResolvedConfig extends Omit<Config, 'cors' | 'localization' | 'routes' | 'admin' | 'upload' | 'auth' | 'collections' | 'globals' | 'endpoints' | 'plugins' | 'audit' | 'integrations'> {
3899
4195
  readonly cors: readonly string[] | '*';
3900
4196
  /** `null` without localization. */
3901
4197
  readonly localization: Required<LocalizationConfig> | null;
@@ -3908,6 +4204,7 @@ interface ResolvedConfig extends Omit<Config, 'cors' | 'localization' | 'routes'
3908
4204
  readonly collections: readonly CollectionConfig[];
3909
4205
  readonly globals: readonly GlobalConfig[];
3910
4206
  readonly endpoints: readonly Endpoint[];
4207
+ readonly integrations: readonly IntegrationConfig[];
3911
4208
  readonly cliCommands: readonly CliCommand[];
3912
4209
  readonly events: readonly string[];
3913
4210
  readonly jobs: readonly JobConfig[];
@@ -3923,5 +4220,5 @@ interface ResolvedConfig extends Omit<Config, 'cors' | 'localization' | 'routes'
3923
4220
  */
3924
4221
  declare function defineConfig<const TConfig extends Config>(config: TConfig): TConfig;
3925
4222
 
3926
- export { ADAPTER_API_VERSION as A, EasyCMS as E, AuditLog as _, Auth as a1, EasyCMSError as aK, FIELD_TYPES as aR, ConfigError as at, ForbiddenError as b9, NotFoundError as bA, PLUGIN_API_VERSION as bG, PayloadTooLargeError as bL, QueryError as bR, ROLE_OPERATIONS as bS, isSystemAdmin as c$, Roles as c2, SchemaError as c5, ValidationError as cF, WEBHOOK_EVENTS as cJ, anyone as cN, consoleEmail as cO, consoleLogger as cP, createEasyCMS as cQ, defineConfig as cR, defineFieldType as cS, definePlugin as cT, diskStorage as cU, hasRows as cV, isAdmin as cW, isHasMany as cX, isPolymorphic as cY, isSignedIn as cZ, isStaff as c_, SingleSignOn as ck, TRIGRAM_LIKE_MIN as cr, TooManyRequestsError as cv, UnauthorizedError as cy, jsonLogger as d0, memorySearch as d1, mimeAllowedBy as d2, polymorphicValue as d3, relationTargets as d4, rowFields as d5, silentLogger as d6, uniqueWithinOf as d7, API_KEYS as d8, API_KEY_GLOBAL_OPERATIONS as d9, API_KEY_OPERATIONS as da, DEFAULT_MAX_VERSIONS as db, DEFAULT_PASSWORD_EMAILS as dc, FIELD_TYPE_BASES as dd, FOLDER_LEVELS as de, MediaFolders as df, SSO_COOKIE as dg, codeOfStatus as di, isJsonLogger as dj, keyAllows as dk, logFormat as dl, secretsOf as dm, ADMIN_ICONS as j };
3927
- export type { AuditPage as $, AdminRoles as B, Config as C, AdminSso as D, Field as F, GlobalSlug as G, AdminSwitcher as H, ID as I, AdminViewAccess as J, AfterChangeHook as K, LocalizationConfig as L, AfterDeleteHook as M, AfterReadHook as N, ApiKeyContext as O, PaginatedDocs as P, ApiKeyGlobalOperation as Q, ResolvedConfig as R, ApiKeyOperation as S, ApiKeyPermissions as T, UncountedDocs as U, ArrayField as V, Where as W, AuditChange as X, AuditConfig as Y, AuditEntry as Z, CollectionSlug as a, FieldValidateContext as a$, AuditVerification as a0, AuthConfig as a2, AuthProvider as a3, AuthProviderProfile as a4, AuthProviderRequest as a5, AuthUser as a6, BackupsConfig as a7, BeforeChangeHook as a8, BeforeDeleteHook as a9, DashboardWidget as aA, Database as aB, DatabaseAdapter as aC, DatabaseInitArgs as aD, DatabaseTransfer as aE, DateField as aF, DepthOptions as aG, DirectUpload as aH, DiskStorageOptions as aI, DocumentOf as aJ, EmailAdapter as aL, EmailField as aM, EmailMessage as aN, Endpoint as aO, EndpointRequest as aP, ErrorCode as aQ, FieldAccess as aS, FieldAccessFn as aT, FieldAdmin as aU, FieldRule as aV, FieldType as aW, FieldTypeBase as aX, FieldTypeDefinition as aY, FieldTypeValidateContext as aZ, FieldValidate as a_, BeforeValidateHook as aa, Block as ab, BlockSummaryArgs as ac, BlocksField as ad, BooleanField as ae, BuiltinApiKeysCollection as af, BuiltinMediaCollection as ag, BuiltinMediaFoldersCollection as ah, BuiltinUsersCollection as ai, BundleHints as aj, CliCommand as ak, CollectionAccess as al, CollectionAdmin as am, CollectionCalendarAdmin as an, CollectionConfig as ao, CollectionHooks as ap, CollectionListAdmin as aq, CollectionSearch as ar, CollectionView as as, ConfigIssue as au, ContainerAdmin as av, CreateInput as aw, CreateMigrationResult as ax, CustomField as ay, CustomFieldTypes as az, CollectionDocument as b, Role as b$, FieldValue as b0, FieldsInput as b1, FieldsValue as b2, FilterOptionsArgs as b3, FindAfterArgs as b4, FindArgs as b5, FindOptions as b6, FolderLevel as b7, FolderPermissions as b8, NumberField as bB, OnRequest as bC, OnRequestArgs as bD, Operation as bE, OutboxRow as bF, PasswordEmail as bH, PasswordEmailArgs as bI, PasswordEmailFn as bJ, PasswordLinkOptions as bK, Plugin as bM, PluginInfo as bN, PluginTypes as bO, PreviewTarget as bP, PreviewURL as bQ, RawDocument as bT, ReadOptions as bU, RelationshipField as bV, RequestContext as bW, RichTextBlock as bX, RichTextBlocks as bY, RichTextDocument as bZ, RichTextField as b_, GlobalAccess as ba, GlobalConfig as bb, GlobalHooks as bc, GlobalInput as bd, GroupField as be, ImageSize as bf, IncrementOptions as bg, InferCollection as bh, InferGlobal as bi, JobConfig as bj, JsonField as bk, KeysetPage as bl, Label as bm, LayoutNode as bn, LivePreview as bo, LocaleOf as bp, LogDetails as bq, Logger as br, LoginArgs as bs, LogsConfig as bt, MediaDocument as bu, MediaSize as bv, MembersConfig as bw, MembersSignup as bx, MigrationInfo as by, NavGroup as bz, CursorDocs as c, RoleOperation as c0, RolePermissions as c1, RoutesConfig as c3, ScheduledPublish as c4, SchemaMode as c6, SearchAdapter as c7, SearchEntry as c8, SearchHits as c9, UpdateOptions as cA, UploadConfig as cB, UploadField as cC, UploadFromURLConfig as cD, UserIdentity as cE, Version as cG, VersionSummary as cH, VersionsConfig as cI, WebhookConfig as cK, WebhookEvent as cL, WhereOperators as cM, SearchOptions as ca, SearchQuery as cb, SearchResults as cc, SearchSetting as cd, SelectField as ce, SelectOption as cf, Session as cg, SidebarPanel as ch, SignupArgs as ci, SignupResult as cj, SlugField as cl, SlugOf as cm, SsoOutcome as cn, SsoProviderRef as co, StorageAdapter as cp, StoredFile as cq, TelemetryConfig as cs, TextField as ct, TextareaField as cu, TypedPlugin as cw, UiField as cx, UpdateInput as cz, GlobalDocument as d, Secrets as dh, FieldError as e, FilterOptions as f, CreateEasyCMSOptions as g, EmailSetting as h, WebhookPayload as i, Access as k, AccessArgs as l, AccessOptions as m, AdminBrand as n, AdminCommand as o, AdminComponent as p, AdminConfig as q, AdminFieldArgs as r, AdminIcon as s, AdminLocale as t, AdminPage as u, AdminRole as v, AdminRoleChange as w, AdminRoleField as x, AdminRoleTarget as y, AdminRoleView as z };
4223
+ export { ADAPTER_API_VERSION as A, EasyCMS as E, AuditLog as _, Auth as a1, EasyCMSError as aK, FIELD_TYPES as aT, ConfigError as at, NotFoundError as bI, PLUGIN_API_VERSION as bO, PayloadTooLargeError as bT, QueryError as bZ, ROLE_OPERATIONS as b_, ForbiddenError as bb, definePlugin as c$, TooManyRequestsError as cD, UnauthorizedError as cG, ValidationError as cN, WEBHOOK_EVENTS as cR, anyone as cV, consoleEmail as cW, consoleLogger as cX, createEasyCMS as cY, defineConfig as cZ, defineFieldType as c_, Roles as ca, SchemaError as cd, SingleSignOn as cs, TRIGRAM_LIKE_MIN as cz, diskStorage as d0, hasRows as d1, isAdmin as d2, isHasMany as d3, isPolymorphic as d4, isSignedIn as d5, isStaff as d6, isSystemAdmin as d7, jsonLogger as d8, memorySearch as d9, mimeAllowedBy as da, polymorphicValue as db, relationTargets as dc, rowFields as dd, silentLogger as de, uniqueWithinOf as df, API_KEYS as dg, API_KEY_GLOBAL_OPERATIONS as dh, API_KEY_OPERATIONS as di, DEFAULT_MAX_VERSIONS as dj, DEFAULT_PASSWORD_EMAILS as dk, FIELD_TYPE_BASES as dl, FOLDER_LEVELS as dm, MediaFolders as dn, SSO_COOKIE as dp, codeOfStatus as dr, isJsonLogger as ds, keyAllows as dt, logFormat as du, secretsOf as dv, ADMIN_ICONS as j };
4224
+ export type { AuditPage as $, AdminRoles as B, Config as C, AdminSso as D, Field as F, GlobalSlug as G, AdminSwitcher as H, ID as I, AdminViewAccess as J, AfterChangeHook as K, LocalizationConfig as L, AfterDeleteHook as M, AfterReadHook as N, ApiKeyContext as O, PaginatedDocs as P, ApiKeyGlobalOperation as Q, ResolvedConfig as R, ApiKeyOperation as S, ApiKeyPermissions as T, UncountedDocs as U, ArrayField as V, Where as W, AuditChange as X, AuditConfig as Y, AuditEntry as Z, CollectionSlug as a, FieldTypeValidateContext as a$, AuditVerification as a0, AuthConfig as a2, AuthProvider as a3, AuthProviderProfile as a4, AuthProviderRequest as a5, AuthUser as a6, BackupsConfig as a7, BeforeChangeHook as a8, BeforeDeleteHook as a9, DashboardWidget as aA, Database as aB, DatabaseAdapter as aC, DatabaseInitArgs as aD, DatabaseTransfer as aE, DateField as aF, DepthOptions as aG, DirectUpload as aH, DiskStorageOptions as aI, DocumentOf as aJ, EmailAdapter as aL, EmailField as aM, EmailMessage as aN, Endpoint as aO, EndpointRequest as aP, ErrorCode as aQ, EventListener as aR, EventMessage as aS, FieldAccess as aU, FieldAccessFn as aV, FieldAdmin as aW, FieldRule as aX, FieldType as aY, FieldTypeBase as aZ, FieldTypeDefinition as a_, BeforeValidateHook as aa, Block as ab, BlockSummaryArgs as ac, BlocksField as ad, BooleanField as ae, BuiltinApiKeysCollection as af, BuiltinMediaCollection as ag, BuiltinMediaFoldersCollection as ah, BuiltinUsersCollection as ai, BundleHints as aj, CliCommand as ak, CollectionAccess as al, CollectionAdmin as am, CollectionCalendarAdmin as an, CollectionConfig as ao, CollectionHooks as ap, CollectionListAdmin as aq, CollectionSearch as ar, CollectionView as as, ConfigIssue as au, ContainerAdmin as av, CreateInput as aw, CreateMigrationResult as ax, CustomField as ay, CustomFieldTypes as az, CollectionDocument as b, RawDocument as b$, FieldValidate as b0, FieldValidateContext as b1, FieldValue as b2, FieldsInput as b3, FieldsValue as b4, FilterOptionsArgs as b5, FindAfterArgs as b6, FindArgs as b7, FindOptions as b8, FolderLevel as b9, LoginArgs as bA, LogsConfig as bB, MediaDocument as bC, MediaSize as bD, MembersConfig as bE, MembersSignup as bF, MigrationInfo as bG, NavGroup as bH, NumberField as bJ, OnRequest as bK, OnRequestArgs as bL, Operation as bM, OutboxRow as bN, PasswordEmail as bP, PasswordEmailArgs as bQ, PasswordEmailFn as bR, PasswordLinkOptions as bS, Plugin as bU, PluginInfo as bV, PluginTypes as bW, PreviewTarget as bX, PreviewURL as bY, FolderPermissions as ba, GlobalAccess as bc, GlobalConfig as bd, GlobalHooks as be, GlobalInput as bf, GroupField as bg, ImageSize as bh, IncrementOptions as bi, InferCollection as bj, InferGlobal as bk, IntegrationCategory as bl, IntegrationConfig as bm, IntegrationConnection as bn, IntegrationField as bo, IntegrationOAuthResult as bp, IntegrationTestResult as bq, JobConfig as br, JsonField as bs, KeysetPage as bt, Label as bu, LayoutNode as bv, LivePreview as bw, LocaleOf as bx, LogDetails as by, Logger as bz, CursorDocs as c, ReadOptions as c0, RelationshipField as c1, RequestContext as c2, RichTextBlock as c3, RichTextBlocks as c4, RichTextDocument as c5, RichTextField as c6, Role as c7, RoleOperation as c8, RolePermissions as c9, TelemetryConfig as cA, TextField as cB, TextareaField as cC, TypedPlugin as cE, UiField as cF, UpdateInput as cH, UpdateOptions as cI, UploadConfig as cJ, UploadField as cK, UploadFromURLConfig as cL, UserIdentity as cM, Version as cO, VersionSummary as cP, VersionsConfig as cQ, WebhookConfig as cS, WebhookEvent as cT, WhereOperators as cU, RoutesConfig as cb, ScheduledPublish as cc, SchemaMode as ce, SearchAdapter as cf, SearchEntry as cg, SearchHits as ch, SearchOptions as ci, SearchQuery as cj, SearchResults as ck, SearchSetting as cl, SelectField as cm, SelectOption as cn, Session as co, SidebarPanel as cp, SignupArgs as cq, SignupResult as cr, SlugField as ct, SlugOf as cu, SsoOutcome as cv, SsoProviderRef as cw, StorageAdapter as cx, StoredFile as cy, GlobalDocument as d, Secrets as dq, FieldError as e, FilterOptions as f, CreateEasyCMSOptions as g, EmailSetting as h, WebhookPayload as i, Access as k, AccessArgs as l, AccessOptions as m, AdminBrand as n, AdminCommand as o, AdminComponent as p, AdminConfig as q, AdminFieldArgs as r, AdminIcon as s, AdminLocale as t, AdminPage as u, AdminRole as v, AdminRoleChange as w, AdminRoleField as x, AdminRoleTarget as y, AdminRoleView as z };
@@ -1,4 +1,4 @@
1
- import { I as ID, C as Config, E as EasyCMS, L as LocalizationConfig, F as Field, e as FieldError, f as FilterOptions, g as CreateEasyCMSOptions, R as ResolvedConfig } from './config-BUySbadL.js';
1
+ import { I as ID, C as Config, E as EasyCMS, L as LocalizationConfig, F as Field, e as FieldError, f as FilterOptions, g as CreateEasyCMSOptions, R as ResolvedConfig } from './config-Dr_NZGm6.js';
2
2
 
3
3
  /** Decrypts a file from `encryptBackup`; throws for another key or a changed file. */
4
4
  declare function decryptBackup(data: Uint8Array, encryptionKey: string): Uint8Array;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as PaginatedDocs, I as ID, h as EmailSetting, i as WebhookPayload } from './config-BUySbadL.js';
2
- export { A as ADAPTER_API_VERSION, j as ADMIN_ICONS, k as Access, l as AccessArgs, m as AccessOptions, n as AdminBrand, o as AdminCommand, p as AdminComponent, q as AdminConfig, r as AdminFieldArgs, s as AdminIcon, t as AdminLocale, u as AdminPage, v as AdminRole, w as AdminRoleChange, x as AdminRoleField, y as AdminRoleTarget, z as AdminRoleView, B as AdminRoles, D as AdminSso, H as AdminSwitcher, J as AdminViewAccess, K as AfterChangeHook, M as AfterDeleteHook, N as AfterReadHook, O as ApiKeyContext, Q as ApiKeyGlobalOperation, S as ApiKeyOperation, T as ApiKeyPermissions, V as ArrayField, X as AuditChange, Y as AuditConfig, Z as AuditEntry, _ as AuditLog, $ as AuditPage, a0 as AuditVerification, a1 as Auth, a2 as AuthConfig, a3 as AuthProvider, a4 as AuthProviderProfile, a5 as AuthProviderRequest, a6 as AuthUser, a7 as BackupsConfig, a8 as BeforeChangeHook, a9 as BeforeDeleteHook, aa as BeforeValidateHook, ab as Block, ac as BlockSummaryArgs, ad as BlocksField, ae as BooleanField, af as BuiltinApiKeysCollection, ag as BuiltinMediaCollection, ah as BuiltinMediaFoldersCollection, ai as BuiltinUsersCollection, aj as BundleHints, ak as CliCommand, al as CollectionAccess, am as CollectionAdmin, an as CollectionCalendarAdmin, ao as CollectionConfig, b as CollectionDocument, ap as CollectionHooks, aq as CollectionListAdmin, ar as CollectionSearch, a as CollectionSlug, as as CollectionView, C as Config, at as ConfigError, au as ConfigIssue, av as ContainerAdmin, g as CreateEasyCMSOptions, aw as CreateInput, ax as CreateMigrationResult, c as CursorDocs, ay as CustomField, az as CustomFieldTypes, aA as DashboardWidget, aB as Database, aC as DatabaseAdapter, aD as DatabaseInitArgs, aE as DatabaseTransfer, aF as DateField, aG as DepthOptions, aH as DirectUpload, aI as DiskStorageOptions, aJ as DocumentOf, E as EasyCMS, aK as EasyCMSError, aL as EmailAdapter, aM as EmailField, aN as EmailMessage, aO as Endpoint, aP as EndpointRequest, aQ as ErrorCode, aR as FIELD_TYPES, F as Field, aS as FieldAccess, aT as FieldAccessFn, aU as FieldAdmin, e as FieldError, aV as FieldRule, aW as FieldType, aX as FieldTypeBase, aY as FieldTypeDefinition, aZ as FieldTypeValidateContext, a_ as FieldValidate, a$ as FieldValidateContext, b0 as FieldValue, b1 as FieldsInput, b2 as FieldsValue, f as FilterOptions, b3 as FilterOptionsArgs, b4 as FindAfterArgs, b5 as FindArgs, b6 as FindOptions, b7 as FolderLevel, b8 as FolderPermissions, b9 as ForbiddenError, ba as GlobalAccess, bb as GlobalConfig, d as GlobalDocument, bc as GlobalHooks, bd as GlobalInput, G as GlobalSlug, be as GroupField, bf as ImageSize, bg as IncrementOptions, bh as InferCollection, bi as InferGlobal, bj as JobConfig, bk as JsonField, bl as KeysetPage, bm as Label, bn as LayoutNode, bo as LivePreview, bp as LocaleOf, L as LocalizationConfig, bq as LogDetails, br as Logger, bs as LoginArgs, bt as LogsConfig, bu as MediaDocument, bv as MediaSize, bw as MembersConfig, bx as MembersSignup, by as MigrationInfo, bz as NavGroup, bA as NotFoundError, bB as NumberField, bC as OnRequest, bD as OnRequestArgs, bE as Operation, bF as OutboxRow, bG as PLUGIN_API_VERSION, bH as PasswordEmail, bI as PasswordEmailArgs, bJ as PasswordEmailFn, bK as PasswordLinkOptions, bL as PayloadTooLargeError, bM as Plugin, bN as PluginInfo, bO as PluginTypes, bP as PreviewTarget, bQ as PreviewURL, bR as QueryError, bS as ROLE_OPERATIONS, bT as RawDocument, bU as ReadOptions, bV as RelationshipField, bW as RequestContext, R as ResolvedConfig, bX as RichTextBlock, bY as RichTextBlocks, bZ as RichTextDocument, b_ as RichTextField, b$ as Role, c0 as RoleOperation, c1 as RolePermissions, c2 as Roles, c3 as RoutesConfig, c4 as ScheduledPublish, c5 as SchemaError, c6 as SchemaMode, c7 as SearchAdapter, c8 as SearchEntry, c9 as SearchHits, ca as SearchOptions, cb as SearchQuery, cc as SearchResults, cd as SearchSetting, ce as SelectField, cf as SelectOption, cg as Session, ch as SidebarPanel, ci as SignupArgs, cj as SignupResult, ck as SingleSignOn, cl as SlugField, cm as SlugOf, cn as SsoOutcome, co as SsoProviderRef, cp as StorageAdapter, cq as StoredFile, cr as TRIGRAM_LIKE_MIN, cs as TelemetryConfig, ct as TextField, cu as TextareaField, cv as TooManyRequestsError, cw as TypedPlugin, cx as UiField, cy as UnauthorizedError, U as UncountedDocs, cz as UpdateInput, cA as UpdateOptions, cB as UploadConfig, cC as UploadField, cD as UploadFromURLConfig, cE as UserIdentity, cF as ValidationError, cG as Version, cH as VersionSummary, cI as VersionsConfig, cJ as WEBHOOK_EVENTS, cK as WebhookConfig, cL as WebhookEvent, W as Where, cM as WhereOperators, cN as anyone, cO as consoleEmail, cP as consoleLogger, cQ as createEasyCMS, cR as defineConfig, cS as defineFieldType, cT as definePlugin, cU as diskStorage, cV as hasRows, cW as isAdmin, cX as isHasMany, cY as isPolymorphic, cZ as isSignedIn, c_ as isStaff, c$ as isSystemAdmin, d0 as jsonLogger, d1 as memorySearch, d2 as mimeAllowedBy, d3 as polymorphicValue, d4 as relationTargets, d5 as rowFields, d6 as silentLogger, d7 as uniqueWithinOf } from './config-BUySbadL.js';
3
- export { A as ADMIN_API_VERSION, a as AdminCollection, b as AdminComponentRef, c as AdminElementProps, d as AdminField, e as AdminGlobal, f as AdminLayoutNode, g as AdminNavGroup, h as AdminNavItem, i as AdminNavNode, j as AdminPageRef, k as AdminPageRoute, l as AdminSchema, m as AdminWidgetRef, S as SetFieldDetail, w as warnDeprecated } from './plugin-DmTHvlFA.js';
4
- export { A as AdminBackup, a as AdminBackups, b as ApiHandlerOptions, B as BackupState, L as LoadConfigOptions, R as RestHandler, c as RestHandlerOptions, d as createApiHandler, e as createRestHandler, l as loadConfig, r as resolveConfig, s as sharedEasyCMS, f as slugify } from './handler-rhJ8-GMQ.js';
1
+ import { P as PaginatedDocs, I as ID, h as EmailSetting, i as WebhookPayload } from './config-Dr_NZGm6.js';
2
+ export { A as ADAPTER_API_VERSION, j as ADMIN_ICONS, k as Access, l as AccessArgs, m as AccessOptions, n as AdminBrand, o as AdminCommand, p as AdminComponent, q as AdminConfig, r as AdminFieldArgs, s as AdminIcon, t as AdminLocale, u as AdminPage, v as AdminRole, w as AdminRoleChange, x as AdminRoleField, y as AdminRoleTarget, z as AdminRoleView, B as AdminRoles, D as AdminSso, H as AdminSwitcher, J as AdminViewAccess, K as AfterChangeHook, M as AfterDeleteHook, N as AfterReadHook, O as ApiKeyContext, Q as ApiKeyGlobalOperation, S as ApiKeyOperation, T as ApiKeyPermissions, V as ArrayField, X as AuditChange, Y as AuditConfig, Z as AuditEntry, _ as AuditLog, $ as AuditPage, a0 as AuditVerification, a1 as Auth, a2 as AuthConfig, a3 as AuthProvider, a4 as AuthProviderProfile, a5 as AuthProviderRequest, a6 as AuthUser, a7 as BackupsConfig, a8 as BeforeChangeHook, a9 as BeforeDeleteHook, aa as BeforeValidateHook, ab as Block, ac as BlockSummaryArgs, ad as BlocksField, ae as BooleanField, af as BuiltinApiKeysCollection, ag as BuiltinMediaCollection, ah as BuiltinMediaFoldersCollection, ai as BuiltinUsersCollection, aj as BundleHints, ak as CliCommand, al as CollectionAccess, am as CollectionAdmin, an as CollectionCalendarAdmin, ao as CollectionConfig, b as CollectionDocument, ap as CollectionHooks, aq as CollectionListAdmin, ar as CollectionSearch, a as CollectionSlug, as as CollectionView, C as Config, at as ConfigError, au as ConfigIssue, av as ContainerAdmin, g as CreateEasyCMSOptions, aw as CreateInput, ax as CreateMigrationResult, c as CursorDocs, ay as CustomField, az as CustomFieldTypes, aA as DashboardWidget, aB as Database, aC as DatabaseAdapter, aD as DatabaseInitArgs, aE as DatabaseTransfer, aF as DateField, aG as DepthOptions, aH as DirectUpload, aI as DiskStorageOptions, aJ as DocumentOf, E as EasyCMS, aK as EasyCMSError, aL as EmailAdapter, aM as EmailField, aN as EmailMessage, aO as Endpoint, aP as EndpointRequest, aQ as ErrorCode, aR as EventListener, aS as EventMessage, aT as FIELD_TYPES, F as Field, aU as FieldAccess, aV as FieldAccessFn, aW as FieldAdmin, e as FieldError, aX as FieldRule, aY as FieldType, aZ as FieldTypeBase, a_ as FieldTypeDefinition, a$ as FieldTypeValidateContext, b0 as FieldValidate, b1 as FieldValidateContext, b2 as FieldValue, b3 as FieldsInput, b4 as FieldsValue, f as FilterOptions, b5 as FilterOptionsArgs, b6 as FindAfterArgs, b7 as FindArgs, b8 as FindOptions, b9 as FolderLevel, ba as FolderPermissions, bb as ForbiddenError, bc as GlobalAccess, bd as GlobalConfig, d as GlobalDocument, be as GlobalHooks, bf as GlobalInput, G as GlobalSlug, bg as GroupField, bh as ImageSize, bi as IncrementOptions, bj as InferCollection, bk as InferGlobal, bl as IntegrationCategory, bm as IntegrationConfig, bn as IntegrationConnection, bo as IntegrationField, bp as IntegrationOAuthResult, bq as IntegrationTestResult, br as JobConfig, bs as JsonField, bt as KeysetPage, bu as Label, bv as LayoutNode, bw as LivePreview, bx as LocaleOf, L as LocalizationConfig, by as LogDetails, bz as Logger, bA as LoginArgs, bB as LogsConfig, bC as MediaDocument, bD as MediaSize, bE as MembersConfig, bF as MembersSignup, bG as MigrationInfo, bH as NavGroup, bI as NotFoundError, bJ as NumberField, bK as OnRequest, bL as OnRequestArgs, bM as Operation, bN as OutboxRow, bO as PLUGIN_API_VERSION, bP as PasswordEmail, bQ as PasswordEmailArgs, bR as PasswordEmailFn, bS as PasswordLinkOptions, bT as PayloadTooLargeError, bU as Plugin, bV as PluginInfo, bW as PluginTypes, bX as PreviewTarget, bY as PreviewURL, bZ as QueryError, b_ as ROLE_OPERATIONS, b$ as RawDocument, c0 as ReadOptions, c1 as RelationshipField, c2 as RequestContext, R as ResolvedConfig, c3 as RichTextBlock, c4 as RichTextBlocks, c5 as RichTextDocument, c6 as RichTextField, c7 as Role, c8 as RoleOperation, c9 as RolePermissions, ca as Roles, cb as RoutesConfig, cc as ScheduledPublish, cd as SchemaError, ce as SchemaMode, cf as SearchAdapter, cg as SearchEntry, ch as SearchHits, ci as SearchOptions, cj as SearchQuery, ck as SearchResults, cl as SearchSetting, cm as SelectField, cn as SelectOption, co as Session, cp as SidebarPanel, cq as SignupArgs, cr as SignupResult, cs as SingleSignOn, ct as SlugField, cu as SlugOf, cv as SsoOutcome, cw as SsoProviderRef, cx as StorageAdapter, cy as StoredFile, cz as TRIGRAM_LIKE_MIN, cA as TelemetryConfig, cB as TextField, cC as TextareaField, cD as TooManyRequestsError, cE as TypedPlugin, cF as UiField, cG as UnauthorizedError, U as UncountedDocs, cH as UpdateInput, cI as UpdateOptions, cJ as UploadConfig, cK as UploadField, cL as UploadFromURLConfig, cM as UserIdentity, cN as ValidationError, cO as Version, cP as VersionSummary, cQ as VersionsConfig, cR as WEBHOOK_EVENTS, cS as WebhookConfig, cT as WebhookEvent, W as Where, cU as WhereOperators, cV as anyone, cW as consoleEmail, cX as consoleLogger, cY as createEasyCMS, cZ as defineConfig, c_ as defineFieldType, c$ as definePlugin, d0 as diskStorage, d1 as hasRows, d2 as isAdmin, d3 as isHasMany, d4 as isPolymorphic, d5 as isSignedIn, d6 as isStaff, d7 as isSystemAdmin, d8 as jsonLogger, d9 as memorySearch, da as mimeAllowedBy, db as polymorphicValue, dc as relationTargets, dd as rowFields, de as silentLogger, df as uniqueWithinOf } from './config-Dr_NZGm6.js';
3
+ export { A as ADMIN_API_VERSION, a as AdminCollection, b as AdminComponentRef, c as AdminElementProps, d as AdminField, e as AdminGlobal, f as AdminLayoutNode, g as AdminNavGroup, h as AdminNavItem, i as AdminNavNode, j as AdminPageRef, k as AdminPageRoute, l as AdminSchema, m as AdminWidgetRef, S as SetFieldDetail, w as warnDeprecated } from './plugin-DBHFjM-r.js';
4
+ export { A as AdminBackup, a as AdminBackups, b as ApiHandlerOptions, B as BackupState, L as LoadConfigOptions, R as RestHandler, c as RestHandlerOptions, d as createApiHandler, e as createRestHandler, l as loadConfig, r as resolveConfig, s as sharedEasyCMS, f as slugify } from './handler-B0m4VOAy.js';
5
5
  export { FieldCondition, matchesCondition } from './conditions.js';
6
6
 
7
7
  type DeliveryKind = 'webhook' | 'email';
@@ -224,6 +224,13 @@ type AdminAttention =
224
224
  id: 'jobs-paused';
225
225
  count: number;
226
226
  names: string[];
227
+ }
228
+ /** Connections whose test or last use failed (Settings → Integrations, #311). */
229
+ | {
230
+ id: 'integrations';
231
+ count: number;
232
+ names: string[];
233
+ secrets?: number;
227
234
  };
228
235
  /** What the dashboard shows admins (`GET <api>/admin/status`). */
229
236
  interface AdminStatus {
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  silentLogger,
29
29
  slugify,
30
30
  verifyWebhook
31
- } from "./chunk-ZA5KIRYX.js";
31
+ } from "./chunk-J4NASOMO.js";
32
32
  import {
33
33
  matchesCondition
34
34
  } from "./chunk-U266LV4M.js";
@@ -1,6 +1,6 @@
1
1
  import { Config, Database, EasyCMS, NavGroup, CollectionConfig, ID, RawDocument, Field, ResolvedConfig, ConfigIssue } from './index.js';
2
- export { d8 as API_KEYS, d9 as API_KEY_GLOBAL_OPERATIONS, da as API_KEY_OPERATIONS, db as DEFAULT_MAX_VERSIONS, dc as DEFAULT_PASSWORD_EMAILS, dd as FIELD_TYPE_BASES, de as FOLDER_LEVELS, df as MediaFolders, dg as SSO_COOKIE, dh as Secrets, cr as TRIGRAM_LIKE_MIN, di as codeOfStatus, cV as hasRows, cX as isHasMany, dj as isJsonLogger, cY as isPolymorphic, dk as keyAllows, dl as logFormat, d2 as mimeAllowedBy, d3 as polymorphicValue, d4 as relationTargets, d5 as rowFields, dm as secretsOf, d7 as uniqueWithinOf } from './config-BUySbadL.js';
3
- export { C as CONFIG_FILE_NAMES, g as CSRF_COOKIE, h as CSRF_HEADER, D as DEFAULT_ADMIN_PATH, i as DEFAULT_API_PATH, j as DEFAULT_MAX_FILE_SIZE, k as DEFAULT_TOKEN_EXPIRATION, m as applyDefaults, n as applyPlugins, o as createRootEndpointHandler, p as decryptBackup, q as fillMissing, t as findConfigFile, u as forwardedClientIp, v as generateSlugs, w as importConfig, x as isEmail, y as mergeForUpdate, z as parseId, E as platformClientIp, F as readCookie, G as validateFields, H as writeBackupFile } from './handler-rhJ8-GMQ.js';
2
+ export { dg as API_KEYS, dh as API_KEY_GLOBAL_OPERATIONS, di as API_KEY_OPERATIONS, dj as DEFAULT_MAX_VERSIONS, dk as DEFAULT_PASSWORD_EMAILS, dl as FIELD_TYPE_BASES, dm as FOLDER_LEVELS, dn as MediaFolders, dp as SSO_COOKIE, dq as Secrets, cz as TRIGRAM_LIKE_MIN, dr as codeOfStatus, d1 as hasRows, d3 as isHasMany, ds as isJsonLogger, d4 as isPolymorphic, dt as keyAllows, du as logFormat, da as mimeAllowedBy, db as polymorphicValue, dc as relationTargets, dd as rowFields, dv as secretsOf, df as uniqueWithinOf } from './config-Dr_NZGm6.js';
3
+ export { C as CONFIG_FILE_NAMES, g as CSRF_COOKIE, h as CSRF_HEADER, D as DEFAULT_ADMIN_PATH, i as DEFAULT_API_PATH, j as DEFAULT_MAX_FILE_SIZE, k as DEFAULT_TOKEN_EXPIRATION, m as applyDefaults, n as applyPlugins, o as createRootEndpointHandler, p as decryptBackup, q as fillMissing, t as findConfigFile, u as forwardedClientIp, v as generateSlugs, w as importConfig, x as isEmail, y as mergeForUpdate, z as parseId, E as platformClientIp, F as readCookie, G as validateFields, H as writeBackupFile } from './handler-B0m4VOAy.js';
4
4
  export { conditionIssues } from './conditions.js';
5
5
 
6
6
  /** The session cookie the REST API sets at login. */
package/dist/internal.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  verifyPassword,
59
59
  verifyTurnstile,
60
60
  writeBackupFile
61
- } from "./chunk-ZA5KIRYX.js";
61
+ } from "./chunk-J4NASOMO.js";
62
62
  import {
63
63
  conditionIssues
64
64
  } from "./chunk-U266LV4M.js";
@@ -1,4 +1,4 @@
1
- import { bm as Label, F as Field, I as ID, as as CollectionView, t as AdminLocale, H as AdminSwitcher, co as SsoProviderRef } from './config-BUySbadL.js';
1
+ import { bu as Label, F as Field, I as ID, as as CollectionView, t as AdminLocale, H as AdminSwitcher, cw as SsoProviderRef } from './config-Dr_NZGm6.js';
2
2
  import { FieldCondition } from './conditions.js';
3
3
 
4
4
  /** A Web Component from an admin module, with its `props` (plain JSON). */
@@ -39,7 +39,7 @@ type AdminNavItem = {
39
39
  path: string;
40
40
  } | {
41
41
  kind: 'view';
42
- view: 'roles' | 'sso' | 'backups' | 'email' | 'deliveries' | 'jobs' | 'audit' | 'calendar';
42
+ view: 'roles' | 'sso' | 'backups' | 'email' | 'deliveries' | 'jobs' | 'audit' | 'calendar' | 'integrations';
43
43
  };
44
44
  /** A group of the admin menu (`admin.nav`), with what this user may open in it. */
45
45
  interface AdminNavGroup {
@@ -288,6 +288,8 @@ interface AdminSchema {
288
288
  audit: boolean;
289
289
  /** The Calendar page (#272): documents with `admin.calendar` and scheduled publishing. */
290
290
  calendar: boolean;
291
+ /** Settings → Integrations (#311): plugins' integrations. */
292
+ integrations: boolean;
291
293
  };
292
294
  /** Roles from the admin are on (`auth.rbac`): documents have owners. */
293
295
  rbac: boolean;
package/dist/plugin.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { j as ADMIN_ICONS, p as AdminComponent, s as AdminIcon, a6 as AuthUser, ak as CliCommand, al as CollectionAccess, ao as CollectionConfig, C as Config, at as ConfigError, aA as DashboardWidget, aK as EasyCMSError, aO as Endpoint, aP as EndpointRequest, aQ as ErrorCode, F as Field, aS as FieldAccess, e as FieldError, aX as FieldTypeBase, aY as FieldTypeDefinition, aZ as FieldTypeValidateContext, b9 as ForbiddenError, bb as GlobalConfig, I as ID, bj as JobConfig, bm as Label, bz as NavGroup, bA as NotFoundError, bC as OnRequest, bD as OnRequestArgs, bG as PLUGIN_API_VERSION, bL as PayloadTooLargeError, bM as Plugin, bN as PluginInfo, bO as PluginTypes, bR as QueryError, bW as RequestContext, cv as TooManyRequestsError, cw as TypedPlugin, cy as UnauthorizedError, cF as ValidationError, W as Where, cS as defineFieldType, cT as definePlugin } from './config-BUySbadL.js';
2
- export { A as ADMIN_API_VERSION, c as AdminElementProps, k as AdminPageRoute, S as SetFieldDetail, w as warnDeprecated } from './plugin-DmTHvlFA.js';
1
+ export { j as ADMIN_ICONS, p as AdminComponent, s as AdminIcon, a6 as AuthUser, ak as CliCommand, al as CollectionAccess, ao as CollectionConfig, C as Config, at as ConfigError, aA as DashboardWidget, aK as EasyCMSError, aO as Endpoint, aP as EndpointRequest, aQ as ErrorCode, F as Field, aU as FieldAccess, e as FieldError, aZ as FieldTypeBase, a_ as FieldTypeDefinition, a$ as FieldTypeValidateContext, bb as ForbiddenError, bd as GlobalConfig, I as ID, br as JobConfig, bu as Label, bH as NavGroup, bI as NotFoundError, bK as OnRequest, bL as OnRequestArgs, bO as PLUGIN_API_VERSION, bT as PayloadTooLargeError, bU as Plugin, bV as PluginInfo, bW as PluginTypes, bZ as QueryError, c2 as RequestContext, cD as TooManyRequestsError, cE as TypedPlugin, cG as UnauthorizedError, cN as ValidationError, W as Where, c_ as defineFieldType, c$ as definePlugin } from './config-Dr_NZGm6.js';
2
+ export { A as ADMIN_API_VERSION, c as AdminElementProps, k as AdminPageRoute, S as SetFieldDetail, w as warnDeprecated } from './plugin-DBHFjM-r.js';
3
3
  import './conditions.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/core",
3
- "version": "1.31.0",
3
+ "version": "1.32.0",
4
4
  "description": "Embedded, code-first headless CMS for Nuxt and Next.js",
5
5
  "license": "MIT",
6
6
  "type": "module",