@dyrected/core 2.13.5 → 2.13.6
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/{app-De-3eNn1.d.cts → app-phLVsEOM.d.cts} +221 -63
- package/dist/{app-De-3eNn1.d.ts → app-phLVsEOM.d.ts} +221 -63
- package/dist/index.cjs +46 -5
- package/dist/index.d.cts +139 -25
- package/dist/index.d.ts +139 -25
- package/dist/index.js +40 -5
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/package.json +1 -1
|
@@ -685,7 +685,15 @@ interface WorkflowTransition {
|
|
|
685
685
|
/** Stable transition key used by the REST and SDK APIs. */
|
|
686
686
|
name: string;
|
|
687
687
|
label: string;
|
|
688
|
+
/**
|
|
689
|
+
* Source state(s) this transition originates from.
|
|
690
|
+
* Must match names in the workflow's `states` array.
|
|
691
|
+
*/
|
|
688
692
|
from: string | string[];
|
|
693
|
+
/**
|
|
694
|
+
* Target state this transition leads to.
|
|
695
|
+
* Must match a name in the workflow's `states` array.
|
|
696
|
+
*/
|
|
689
697
|
to: string;
|
|
690
698
|
/** Every listed capability is required. */
|
|
691
699
|
requiredCapabilities?: string[];
|
|
@@ -1300,10 +1308,10 @@ type WhereOperator = {
|
|
|
1300
1308
|
/** Top-level where clause. Fields map to operator objects or shorthand scalar values. */
|
|
1301
1309
|
type WhereClause = {
|
|
1302
1310
|
[field: string]: WhereOperator | any;
|
|
1303
|
-
OR?: WhereClause[];
|
|
1304
|
-
or?: WhereClause[];
|
|
1305
|
-
AND?: WhereClause[];
|
|
1306
|
-
and?: WhereClause[];
|
|
1311
|
+
OR?: WhereClause[] | readonly WhereClause[];
|
|
1312
|
+
or?: WhereClause[] | readonly WhereClause[];
|
|
1313
|
+
AND?: WhereClause[] | readonly WhereClause[];
|
|
1314
|
+
and?: WhereClause[] | readonly WhereClause[];
|
|
1307
1315
|
};
|
|
1308
1316
|
interface SqlWhereResult {
|
|
1309
1317
|
sql: string;
|
|
@@ -1495,9 +1503,9 @@ interface ViewConfig {
|
|
|
1495
1503
|
access?: AccessConfig;
|
|
1496
1504
|
}
|
|
1497
1505
|
/**
|
|
1498
|
-
*
|
|
1506
|
+
* Base configuration shared by all action types.
|
|
1499
1507
|
*/
|
|
1500
|
-
interface
|
|
1508
|
+
interface ActionConfigBase<TDoc extends Record<string, unknown> = Record<string, unknown>> {
|
|
1501
1509
|
/** Unique action identifier (e.g. `"checkIn"`, `"markPaid"`). */
|
|
1502
1510
|
name: string;
|
|
1503
1511
|
/** Button label displayed in the UI. */
|
|
@@ -1512,13 +1520,32 @@ interface ActionConfig<TDoc extends Record<string, unknown> = Record<string, unk
|
|
|
1512
1520
|
confirm?: string;
|
|
1513
1521
|
/** Optional interactive modal form fields prompting the user for input before executing. */
|
|
1514
1522
|
fields?: Field[];
|
|
1515
|
-
/** Declarative database mutation applied to targeted documents (e.g. `{ checkedIn: true, checkedInAt: "now()" }`). */
|
|
1516
|
-
mutation?: Partial<TDoc> | Record<string, unknown>;
|
|
1517
|
-
/** Self-hosted server handler function executed when the action is triggered. */
|
|
1518
|
-
handler?: (context: ActionContext<TDoc>) => Promise<unknown> | unknown;
|
|
1519
1523
|
/** Role-based access rules controlling who can trigger this action. */
|
|
1520
1524
|
access?: AccessConfig;
|
|
1521
1525
|
}
|
|
1526
|
+
/**
|
|
1527
|
+
* An operational workflow action with declarative data mutation.
|
|
1528
|
+
*/
|
|
1529
|
+
interface ActionConfigWithMutation<TDoc extends Record<string, unknown> = Record<string, unknown>> extends ActionConfigBase<TDoc> {
|
|
1530
|
+
/** Declarative database mutation applied to targeted documents (e.g. `{ checkedIn: true, checkedInAt: "now()" }`). */
|
|
1531
|
+
mutation: Partial<TDoc> | Record<string, unknown>;
|
|
1532
|
+
/** Optional server handler for additional logic. */
|
|
1533
|
+
handler?: (context: ActionContext<TDoc>) => Promise<unknown> | unknown;
|
|
1534
|
+
}
|
|
1535
|
+
/**
|
|
1536
|
+
* An operational workflow action with server handler.
|
|
1537
|
+
*/
|
|
1538
|
+
interface ActionConfigWithHandler<TDoc extends Record<string, unknown> = Record<string, unknown>> extends ActionConfigBase<TDoc> {
|
|
1539
|
+
/** Self-hosted server handler function executed when the action is triggered (required when mutation is not provided). */
|
|
1540
|
+
handler: (context: ActionContext<TDoc>) => Promise<unknown> | unknown;
|
|
1541
|
+
/** Optional declarative mutation. */
|
|
1542
|
+
mutation?: Partial<TDoc> | Record<string, unknown>;
|
|
1543
|
+
}
|
|
1544
|
+
/**
|
|
1545
|
+
* An operational workflow action that can mutate data or trigger server logic.
|
|
1546
|
+
* Requires either `mutation` or `handler` (or both).
|
|
1547
|
+
*/
|
|
1548
|
+
type ActionConfig<TDoc extends Record<string, unknown> = Record<string, unknown>> = ActionConfigWithMutation<TDoc> | ActionConfigWithHandler<TDoc>;
|
|
1522
1549
|
/**
|
|
1523
1550
|
* Context passed to an action's server handler function.
|
|
1524
1551
|
*/
|
|
@@ -1544,41 +1571,17 @@ interface AccessConfig {
|
|
|
1544
1571
|
delete?: AccessRule<any>;
|
|
1545
1572
|
}
|
|
1546
1573
|
/**
|
|
1547
|
-
*
|
|
1548
|
-
*
|
|
1549
|
-
* @example
|
|
1550
|
-
* ```ts
|
|
1551
|
-
* export const attendingGuests = defineView({
|
|
1552
|
-
* slug: "attending-guests",
|
|
1553
|
-
* label: "Attending Guests",
|
|
1554
|
-
* icon: "UserCheck",
|
|
1555
|
-
* layout: "table",
|
|
1556
|
-
* groupBy: "tableNumber",
|
|
1557
|
-
* filter: { attending: { equals: true } },
|
|
1558
|
-
* columns: ["name", "email", "guestCount", "checkedIn"],
|
|
1559
|
-
* sort: { field: "name", direction: "asc" },
|
|
1560
|
-
* });
|
|
1561
|
-
* ```
|
|
1574
|
+
* Base options shared by all operational view types.
|
|
1562
1575
|
*/
|
|
1563
|
-
interface
|
|
1576
|
+
interface DefineViewBaseOptions {
|
|
1564
1577
|
/** Stable URL slug for the view (`/collections/:slug/views/:viewSlug`). */
|
|
1565
1578
|
slug: string;
|
|
1566
1579
|
/** Human-readable title displayed in the sidebar navigation and view header. */
|
|
1567
1580
|
label: string;
|
|
1568
1581
|
/** Lucide icon name (e.g. `"UserCheck"`, `"Calendar"`, `"Shirt"`, `"TableProperties"`). */
|
|
1569
1582
|
icon?: string;
|
|
1570
|
-
/** Layout engine to render: `'table' | 'spreadsheet' | 'kanban' | 'calendar' | 'gantt' | 'cards'`. Defaults to `'table'`. */
|
|
1571
|
-
layout?: ViewLayout;
|
|
1572
1583
|
/** Base query filter applied before user toolbar filters (e.g. `{ attending: { equals: true } }` or JEXL string). */
|
|
1573
1584
|
filter?: Record<string, any> | string;
|
|
1574
|
-
/** Field name used to organize records into kanban columns or collapsible grouped sections in table, cards, and spreadsheet. */
|
|
1575
|
-
groupBy?: string;
|
|
1576
|
-
/** Field name containing the ISO date string for calendar placement. Required when `layout: 'calendar'`. */
|
|
1577
|
-
dateField?: string;
|
|
1578
|
-
/** Field name for the start date in timeline/gantt views. Required when `layout: 'gantt'`. */
|
|
1579
|
-
startDateField?: string;
|
|
1580
|
-
/** Field name for the end date in timeline/gantt views. Required when `layout: 'gantt'`. */
|
|
1581
|
-
endDateField?: string;
|
|
1582
1585
|
/** Field names to show in this view, in order. If omitted, Dyrected infers default display fields. */
|
|
1583
1586
|
columns?: string[];
|
|
1584
1587
|
/** Default sorting rule when entering the view. */
|
|
@@ -1602,6 +1605,57 @@ interface DefineViewOptions {
|
|
|
1602
1605
|
/** Role-based access rules controlling who can see or use this view. */
|
|
1603
1606
|
access?: AccessConfig;
|
|
1604
1607
|
}
|
|
1608
|
+
/** Table view — requires no special fields. */
|
|
1609
|
+
interface DefineTableViewOptions extends DefineViewBaseOptions {
|
|
1610
|
+
layout?: 'table' | 'spreadsheet';
|
|
1611
|
+
/** Field name used to organize records into kanban columns or collapsible grouped sections in table, cards, and spreadsheet. */
|
|
1612
|
+
groupBy?: string;
|
|
1613
|
+
}
|
|
1614
|
+
/** Kanban view — requires `groupBy` to organize into columns. */
|
|
1615
|
+
interface DefineKanbanViewOptions extends DefineViewBaseOptions {
|
|
1616
|
+
layout: 'kanban';
|
|
1617
|
+
/** Field name to organize records into kanban columns. */
|
|
1618
|
+
groupBy: string;
|
|
1619
|
+
}
|
|
1620
|
+
/** Calendar view — requires `dateField` to place records on the calendar. */
|
|
1621
|
+
interface DefineCalendarViewOptions extends DefineViewBaseOptions {
|
|
1622
|
+
layout: 'calendar';
|
|
1623
|
+
/** Field name containing the ISO date string for calendar placement. */
|
|
1624
|
+
dateField: string;
|
|
1625
|
+
}
|
|
1626
|
+
/** Gantt view — requires both `startDateField` and `endDateField`. */
|
|
1627
|
+
interface DefineGanttViewOptions extends DefineViewBaseOptions {
|
|
1628
|
+
layout: 'gantt';
|
|
1629
|
+
/** Field name for the start date in the gantt timeline. */
|
|
1630
|
+
startDateField: string;
|
|
1631
|
+
/** Field name for the end date in the gantt timeline. */
|
|
1632
|
+
endDateField: string;
|
|
1633
|
+
}
|
|
1634
|
+
/** Cards view — shows records as image/thumbnail gallery. */
|
|
1635
|
+
interface DefineCardsViewOptions extends DefineViewBaseOptions {
|
|
1636
|
+
layout: 'cards';
|
|
1637
|
+
/** Field name used to organize records into groups. */
|
|
1638
|
+
groupBy?: string;
|
|
1639
|
+
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Options for defining an operational view with `defineView`.
|
|
1642
|
+
* Use layout-specific overloads to ensure required fields are provided.
|
|
1643
|
+
*
|
|
1644
|
+
* @example
|
|
1645
|
+
* ```ts
|
|
1646
|
+
* export const attendingGuests = defineView({
|
|
1647
|
+
* slug: "attending-guests",
|
|
1648
|
+
* label: "Attending Guests",
|
|
1649
|
+
* icon: "UserCheck",
|
|
1650
|
+
* layout: "table",
|
|
1651
|
+
* groupBy: "tableNumber",
|
|
1652
|
+
* filter: { attending: { equals: true } },
|
|
1653
|
+
* columns: ["name", "email", "guestCount", "checkedIn"],
|
|
1654
|
+
* sort: { field: "name", direction: "asc" },
|
|
1655
|
+
* });
|
|
1656
|
+
* ```
|
|
1657
|
+
*/
|
|
1658
|
+
type DefineViewOptions = DefineTableViewOptions | DefineKanbanViewOptions | DefineCalendarViewOptions | DefineGanttViewOptions | DefineCardsViewOptions;
|
|
1605
1659
|
/**
|
|
1606
1660
|
* Options for defining a custom workflow action with `defineAction`.
|
|
1607
1661
|
*
|
|
@@ -1639,22 +1693,59 @@ interface DefineActionOptions<TDoc extends Record<string, unknown> = Record<stri
|
|
|
1639
1693
|
}
|
|
1640
1694
|
/**
|
|
1641
1695
|
* Defines a typed operational view for a collection.
|
|
1696
|
+
* Layout-specific overloads enforce required fields for each view type.
|
|
1642
1697
|
*
|
|
1643
1698
|
* @example
|
|
1644
1699
|
* ```ts
|
|
1645
|
-
*
|
|
1646
|
-
*
|
|
1647
|
-
*
|
|
1648
|
-
*
|
|
1649
|
-
* layout: "table",
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1700
|
+
* // Table view (no special requirements)
|
|
1701
|
+
* export const allGuests = defineView({
|
|
1702
|
+
* slug: "all-guests",
|
|
1703
|
+
* label: "All Guests",
|
|
1704
|
+
* layout: "table", // or omit for default
|
|
1705
|
+
* });
|
|
1706
|
+
*
|
|
1707
|
+
* // Kanban view (requires groupBy)
|
|
1708
|
+
* export const guestsByTable = defineView({
|
|
1709
|
+
* slug: "by-table",
|
|
1710
|
+
* label: "Guests by Table",
|
|
1711
|
+
* layout: "kanban",
|
|
1712
|
+
* groupBy: "tableNumber", // required!
|
|
1713
|
+
* });
|
|
1714
|
+
*
|
|
1715
|
+
* // Calendar view (requires dateField)
|
|
1716
|
+
* export const eventCalendar = defineView({
|
|
1717
|
+
* slug: "event-calendar",
|
|
1718
|
+
* label: "Event Calendar",
|
|
1719
|
+
* layout: "calendar",
|
|
1720
|
+
* dateField: "eventDate", // required!
|
|
1721
|
+
* });
|
|
1722
|
+
*
|
|
1723
|
+
* // Gantt view (requires startDateField and endDateField)
|
|
1724
|
+
* export const projectTimeline = defineView({
|
|
1725
|
+
* slug: "timeline",
|
|
1726
|
+
* label: "Project Timeline",
|
|
1727
|
+
* layout: "gantt",
|
|
1728
|
+
* startDateField: "startDate", // required!
|
|
1729
|
+
* endDateField: "endDate", // required!
|
|
1654
1730
|
* });
|
|
1655
1731
|
* ```
|
|
1656
1732
|
*/
|
|
1733
|
+
declare function defineView(config: DefineTableViewOptions): DefineTableViewOptions;
|
|
1734
|
+
declare function defineView(config: DefineKanbanViewOptions): DefineKanbanViewOptions;
|
|
1735
|
+
declare function defineView(config: DefineCalendarViewOptions): DefineCalendarViewOptions;
|
|
1736
|
+
declare function defineView(config: DefineGanttViewOptions): DefineGanttViewOptions;
|
|
1737
|
+
declare function defineView(config: DefineCardsViewOptions): DefineCardsViewOptions;
|
|
1657
1738
|
declare function defineView<const T extends DefineViewOptions>(config: T): T;
|
|
1739
|
+
/** Convenience helper for table views. Enforces no view-specific required fields. */
|
|
1740
|
+
declare function defineTableView(config: DefineTableViewOptions): DefineTableViewOptions;
|
|
1741
|
+
/** Convenience helper for kanban views. Enforces `groupBy` is provided. */
|
|
1742
|
+
declare function defineKanbanView(config: DefineKanbanViewOptions): DefineKanbanViewOptions;
|
|
1743
|
+
/** Convenience helper for calendar views. Enforces `dateField` is provided. */
|
|
1744
|
+
declare function defineCalendarView(config: DefineCalendarViewOptions): DefineCalendarViewOptions;
|
|
1745
|
+
/** Convenience helper for gantt views. Enforces `startDateField` and `endDateField` are provided. */
|
|
1746
|
+
declare function defineGanttView(config: DefineGanttViewOptions): DefineGanttViewOptions;
|
|
1747
|
+
/** Convenience helper for cards views. Optional `groupBy`. */
|
|
1748
|
+
declare function defineCardsView(config: DefineCardsViewOptions): DefineCardsViewOptions;
|
|
1658
1749
|
/**
|
|
1659
1750
|
* Defines a custom workflow action for an operational view.
|
|
1660
1751
|
*
|
|
@@ -2434,6 +2525,18 @@ interface DynamicOptionsConfig {
|
|
|
2434
2525
|
/** Cache duration in seconds for identical resolver calls. */
|
|
2435
2526
|
cacheTTL?: number;
|
|
2436
2527
|
}
|
|
2528
|
+
interface DefaultValueContext {
|
|
2529
|
+
/** The document being created or edited. */
|
|
2530
|
+
doc?: Record<string, any>;
|
|
2531
|
+
/** Batch of documents (for bulk operations). */
|
|
2532
|
+
docs?: Record<string, any>[];
|
|
2533
|
+
/** Authenticated user performing the operation. */
|
|
2534
|
+
user?: AuthenticatedUser;
|
|
2535
|
+
/** Values of sibling fields in the same object or array row. */
|
|
2536
|
+
siblingData?: Record<string, any>;
|
|
2537
|
+
/** Incoming field value from the request payload. */
|
|
2538
|
+
data?: any;
|
|
2539
|
+
}
|
|
2437
2540
|
type DynamicOptionItem = string | {
|
|
2438
2541
|
label: string;
|
|
2439
2542
|
value: unknown;
|
|
@@ -2488,7 +2591,7 @@ interface FieldBase {
|
|
|
2488
2591
|
required?: boolean;
|
|
2489
2592
|
/** Whether values for this field must be unique across the collection. */
|
|
2490
2593
|
unique?: boolean;
|
|
2491
|
-
/** Default value
|
|
2594
|
+
/** Default value: literal value or function computed from context. */
|
|
2492
2595
|
defaultValue?: unknown;
|
|
2493
2596
|
/** Static or dynamic option source for supported selection fields. */
|
|
2494
2597
|
options?: string[] | {
|
|
@@ -2639,8 +2742,10 @@ type FieldAdminOptionsHookResult = Array<string | {
|
|
|
2639
2742
|
value: unknown;
|
|
2640
2743
|
}>;
|
|
2641
2744
|
type FieldAdminOptionsHook = (args: FieldAdminOptionsHookArgs) => FieldAdminOptionsHookResult | Promise<FieldAdminOptionsHookResult>;
|
|
2642
|
-
type TypedField<TType extends FieldType, TValue, TAdminExtra = Record<never, never>> = Omit<FieldBase, "admin"> & {
|
|
2745
|
+
type TypedField<TType extends FieldType, TValue, TAdminExtra = Record<never, never>> = Omit<FieldBase, "admin" | "defaultValue"> & {
|
|
2643
2746
|
type: TType;
|
|
2747
|
+
/** Default value: literal value, parameterless function, or function taking context. */
|
|
2748
|
+
defaultValue?: TValue | (() => TValue) | ((context: DefaultValueContext) => TValue);
|
|
2644
2749
|
admin?: BaseFieldAdmin & TAdminExtra;
|
|
2645
2750
|
} & FieldHooks<TValue> & FieldAdminHooks<TValue>;
|
|
2646
2751
|
/**
|
|
@@ -3011,32 +3116,85 @@ type DateField = TypedField<"date", string, DateFieldAdmin>;
|
|
|
3011
3116
|
type DateTimeField = TypedField<"datetime", string, DateFieldAdmin>;
|
|
3012
3117
|
/** A local time of day, stored as a string when the date is modeled elsewhere. */
|
|
3013
3118
|
type TimeField = TypedField<"time", string, DateFieldAdmin>;
|
|
3014
|
-
/**
|
|
3119
|
+
/**
|
|
3120
|
+
* A single choice from a fixed or dynamically-resolved set of options, stored as the chosen value.
|
|
3121
|
+
* Should include either static `options` or dynamic option configuration via the base FieldBase type.
|
|
3122
|
+
*/
|
|
3015
3123
|
type SelectField = TypedField<"select", string, SelectFieldAdmin>;
|
|
3016
|
-
/**
|
|
3124
|
+
/**
|
|
3125
|
+
* A single choice shown as radio buttons, stored as the chosen value.
|
|
3126
|
+
* Should include either static `options` or dynamic option configuration via the base FieldBase type.
|
|
3127
|
+
*/
|
|
3017
3128
|
type RadioField = TypedField<"radio", string, RadioFieldAdmin>;
|
|
3018
3129
|
/** A numeric value. Optional advisory `min`/`max` guide editors without enforcing server-side validation. */
|
|
3019
3130
|
type NumberField = TypedField<"number", number, NumberFieldAdmin> & NumberLimitFieldConfig;
|
|
3020
3131
|
/** A `true`/`false` value, shown to editors as a checkbox or switch. */
|
|
3021
3132
|
type BooleanField = TypedField<"boolean", boolean, BooleanFieldAdmin>;
|
|
3022
|
-
/**
|
|
3133
|
+
/**
|
|
3134
|
+
* Several choices from a fixed or dynamically-resolved set, stored as an array of the chosen values.
|
|
3135
|
+
* Should include either static `options` or dynamic option configuration via the base FieldBase type.
|
|
3136
|
+
*/
|
|
3023
3137
|
type MultiSelectField = TypedField<"multiSelect", string[], MultiSelectFieldAdmin>;
|
|
3024
|
-
/**
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3138
|
+
/**
|
|
3139
|
+
* A reference to one or more documents in another collection, stored as an ID or array of IDs.
|
|
3140
|
+
* Requires `relationTo` to specify the target collection.
|
|
3141
|
+
* Use `hasMany` for multiple relationships.
|
|
3142
|
+
*/
|
|
3143
|
+
type RelationshipField = TypedField<"relationship", string | string[]> & {
|
|
3144
|
+
/** Target collection slug (required for relationship fields). */
|
|
3145
|
+
relationTo: string;
|
|
3146
|
+
};
|
|
3147
|
+
/**
|
|
3148
|
+
* A reference to one or more documents in an upload-enabled collection, stored as an ID or array of IDs.
|
|
3149
|
+
* Requires `relationTo` to specify the target collection.
|
|
3150
|
+
* Use `hasMany` for multiple relationships.
|
|
3151
|
+
*/
|
|
3152
|
+
type ImageField = TypedField<"image", string | string[]> & {
|
|
3153
|
+
/** Target collection slug (required for image fields). */
|
|
3154
|
+
relationTo: string;
|
|
3155
|
+
};
|
|
3028
3156
|
/** Formatted content authored in the admin editor, stored as an HTML string. */
|
|
3029
3157
|
type RichTextField = TypedField<"richText", string> & RichTextFieldConfig;
|
|
3030
3158
|
/** An arbitrary JSON value. Dyrected stores it as-is and does not validate its shape. */
|
|
3031
3159
|
type JsonField = TypedField<"json", Record<string, unknown>, JsonFieldAdmin>;
|
|
3032
|
-
/**
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3160
|
+
/**
|
|
3161
|
+
* A group of nested `fields` stored as an embedded object under this field's `name`.
|
|
3162
|
+
* Requires `fields` to define the structure of the object.
|
|
3163
|
+
*/
|
|
3164
|
+
type ObjectField = TypedField<"object", unknown> & {
|
|
3165
|
+
/** Child fields that make up the object structure (required). */
|
|
3166
|
+
fields: Field[];
|
|
3167
|
+
};
|
|
3168
|
+
/**
|
|
3169
|
+
* A repeatable list of rows that all share the same `fields`, stored as an array of objects.
|
|
3170
|
+
* Requires `fields` to define the structure of each row.
|
|
3171
|
+
*/
|
|
3172
|
+
type ArrayField = TypedField<"array", unknown> & {
|
|
3173
|
+
/** Child fields that make up each row in the array (required). */
|
|
3174
|
+
fields: Field[];
|
|
3175
|
+
};
|
|
3176
|
+
/**
|
|
3177
|
+
* Flexible content built from a controlled set of typed `blocks`, stored as an ordered array where each row records its `blockType`.
|
|
3178
|
+
* Requires either inline `blocks` definitions or `blockReferences` pointing to shared block definitions.
|
|
3179
|
+
*/
|
|
3180
|
+
type BlocksField = ((TypedField<"blocks", unknown> & {
|
|
3181
|
+
/** Inline block definitions (required unless blockReferences is set). */
|
|
3182
|
+
blocks: Block[];
|
|
3183
|
+
}) | (TypedField<"blocks", unknown> & {
|
|
3184
|
+
/** References to shared block definitions from the root config (required unless blocks is set). */
|
|
3185
|
+
blockReferences: string[];
|
|
3186
|
+
}));
|
|
3187
|
+
/**
|
|
3188
|
+
* A virtual reverse relationship that surfaces documents pointing back at this one.
|
|
3189
|
+
* Read-only; nothing is stored on this document.
|
|
3190
|
+
* Requires `collection` (target collection slug) and `on` (back-reference field name).
|
|
3191
|
+
*/
|
|
3192
|
+
type JoinField = TypedField<"join", unknown, JoinFieldAdmin> & {
|
|
3193
|
+
/** Target collection slug (required for join fields). */
|
|
3194
|
+
collection: string;
|
|
3195
|
+
/** Back-reference field name on the joined collection (required for join fields). */
|
|
3196
|
+
on: string;
|
|
3197
|
+
};
|
|
3040
3198
|
/** A layout-only container that arranges its child `fields` horizontally in the admin UI. Stores no value of its own. */
|
|
3041
3199
|
type RowField = TypedField<"row", unknown>;
|
|
3042
3200
|
type Field = TextField | TextareaField | EmailField | UrlField | IconField | DateField | DateTimeField | TimeField | SelectField | RadioField | NumberField | BooleanField | MultiSelectField | RelationshipField | ImageField | RichTextField | JsonField | ObjectField | ArrayField | BlocksField | JoinField | RowField;
|
|
@@ -3629,4 +3787,4 @@ interface DyrectedContext {
|
|
|
3629
3787
|
*/
|
|
3630
3788
|
declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
3631
3789
|
|
|
3632
|
-
export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type
|
|
3790
|
+
export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type FieldType as O, type PublicAdminAuthConfig as P, type BooleanField as Q, type AuthConfig as R, type AccessPolicyResolver as S, type DateField as T, type DateTimeField as U, type EmailField as V, type WorkflowConfig as W, type IconField as X, type ImageField as Y, type JoinField as Z, type JsonField as _, type DeclarativeHookExpression as a, type CharacterLimitFieldAdmin as a$, type NumberField as a0, type ObjectField as a1, type RadioField as a2, type RelationshipField as a3, type RichTextField as a4, type RowField as a5, type SelectField as a6, type TextField as a7, type TextareaField as a8, type TimeField as a9, type ActionConfigWithHandler as aA, type ActionConfigWithMutation as aB, type ActionContext as aC, type ActionType as aD, type AdminAuthAccessResolution as aE, type AdminAuthClaimMapping as aF, type AdminAuthMember as aG, type AdminAuthProvider as aH, type AdminAuthProviderMembersConfig as aI, type AdminAuthProvisioningMode as aJ, type AdminAuthResolveAccessArgs as aK, type AdminAuthResolvedIdentity as aL, type AdminConfig as aM, type AdminDashboardComponentSlots as aN, type AdminIconName as aO, type AggregateArgs as aP, type AggregateCastType as aQ, type AggregateCollectionResult as aR, type AggregateInput as aS, type AggregateOperation as aT, type AggregateResult as aU, type BaseAdminAuthProvider as aV, type BaseFieldAdmin as aW, type BlockVariant as aX, type BlocksField as aY, type BooleanFieldAdmin as aZ, type BooleanFormat as a_, type UrlField as aa, type AIAction as ab, type AIActionStatus as ac, type AIActionType as ad, type AIAuditActionType as ae, type AIAuditRecord as af, type AIChunk as ag, type AIMessage as ah, type AIPIIPattern as ai, type AIRateLimitResult as aj, type AIRateLimitStore as ak, type AIThread as al, type AIToolContext as am, type AIToolDefinition as an, AI_ACTIONS_COLLECTION as ao, AI_AUDIT_COLLECTION as ap, AI_CHUNKS_COLLECTION as aq, AI_MESSAGES_COLLECTION as ar, AI_THREADS_COLLECTION as as, type AccessConfig as at, type AccessFunction as au, type AccessFunctionArgs as av, type AccessResult as aw, type AccessRule as ax, type ActionConfig as ay, type ActionConfigBase as az, type AuthenticatedUser as b, type GlobalBeforeChangeHookEntry as b$, type CharacterLimitFieldConfig as b0, type CollectionAfterChangeHook as b1, type CollectionAfterDeleteHook as b2, type CollectionAfterReadHook as b3, type CollectionAfterReadHookEntry as b4, type CollectionAfterTransitionHook as b5, type CollectionBeforeChangeHook as b6, type CollectionBeforeChangeHookEntry as b7, type CollectionBeforeDeleteHook as b8, type CollectionBeforeReadHook as b9, type DynamicOptionItem as bA, type DynamicOptionsConfig as bB, type DynamicOptionsResolver as bC, type DynamicOptionsResolverArgs as bD, type DyrectedAIContext as bE, type DyrectedLoggerConfig as bF, type DyrectedObservabilityConfig as bG, type EmailFieldAdmin as bH, type FieldAdminHooks as bI, type FieldAdminOnChangeHook as bJ, type FieldAdminOnChangeHookArgs as bK, type FieldAdminOptionsHook as bL, type FieldAdminOptionsHookArgs as bM, type FieldAdminOptionsHookResult as bN, type FieldAfterReadHook as bO, type FieldAfterReadHookArgs as bP, type FieldBase as bQ, type FieldBeforeChangeHook as bR, type FieldBeforeChangeHookArgs as bS, type FieldHook as bT, type FieldHooks as bU, type FileData as bV, type GetDocumentResult as bW, type GlobalAfterChangeHook as bX, type GlobalAfterReadHook as bY, type GlobalAfterReadHookEntry as bZ, type GlobalBeforeChangeHook as b_, type CollectionBeforeReadHookEntry as ba, type CollectionBeforeTransitionHook as bb, type CollectionListComponentSlots as bc, type CollectionRAGConfig as bd, type CollectionSchemaResult as be, type CollectionSummaryResult as bf, type CollectionViewComponentSlots as bg, type CountOperation as bh, type CustomAdminAuthProvider as bi, type DatabaseAdapter as bj, type DateFieldAdmin as bk, type DateFormat as bl, type DefaultValueContext as bm, type DefineActionOptions as bn, type DefineCalendarViewOptions as bo, type DefineCardsViewOptions as bp, type DefineGanttViewOptions as bq, type DefineKanbanViewOptions as br, type DefineTableViewOptions as bs, type DefineViewBaseOptions as bt, type DefineViewOptions as bu, type DetailSpan as bv, type DisplayTone as bw, type DisplayVariant as bx, type DistinctCountOperation as by, type DistinctValuesOperation as bz, type WorkflowTransition as c, defineCalendarView as c$, type GlobalBeforeReadHook as c0, type GlobalBeforeReadHookEntry as c1, type GlobalRAGConfig as c2, type GlobalSchemaResult as c3, type GlobalSummaryResult as c4, type HeadingLevel as c5, type HookFunction as c6, type IconFieldAdmin as c7, type ImageService as c8, type ImageTransformOptions as c9, type SelectFieldAdmin as cA, type SqlWhereResult as cB, type StorageAdapter as cC, type TextFieldAdmin as cD, type TextFormat as cE, type TextareaFieldAdmin as cF, type TrustProxyConfig as cG, type TypedField as cH, type UploadConfig as cI, type UrlFieldAdmin as cJ, type UrlLinkValue as cK, type ViewActionFeatures as cL, type ViewComponentSlots as cM, type ViewConfig as cN, type ViewLayout as cO, type ViewMetric as cP, type ViewSubMetric as cQ, type WhereClause as cR, type WhereOperator as cS, type WhereOperatorName as cT, type WordLimitFieldAdmin as cU, type WordLimitFieldConfig as cV, type WorkflowMetadata as cW, type WorkflowRole as cX, type WorkflowState as cY, type WorkflowTransitionContext as cZ, defineAction as c_, type InferAggregateResult as ca, type JoinFieldAdmin as cb, type JsonFieldAdmin as cc, type JsonFormat as cd, LIFECYCLE_EVENT_NAMES as ce, type LifecycleEventHandler as cf, type LinkFormat as cg, type MetricColor as ch, type MultiSelectFieldAdmin as ci, type NamedAccessPolicy as cj, type NumberFieldAdmin as ck, type NumberFormat as cl, type NumberLimitFieldAdmin as cm, type NumberLimitFieldConfig as cn, type NumericOperation as co, type OIDCAdminAuthProvider as cp, type OptionFormat as cq, type PaginatedResult as cr, type PublicAdminAuthProvider as cs, type QueryCollectionResult as ct, type RAGSearchResult as cu, type RadioFieldAdmin as cv, type RateLimitConfig as cw, type ReadonlyDatabaseAdapter as cx, type RichTextFeature as cy, type RichTextFieldConfig as cz, type LifecycleEvent as d, defineCardsView as d0, defineGanttView as d1, defineKanbanView as d2, defineTableView as d3, defineView as d4, isAICollection as d5, parseMongoWhere as d6, parseSqlWhere as d7, type DyrectedObservabilityRuntime as d8, type RequestBodyCapture as d9, type RequestTraceContext as da, type ResolvedObservabilityConfig as db, attachRequestMetrics as dc, bindObservabilityRuntime as dd, buildRequestLogger as de, captureRequestBody as df, createDyrectedApp as dg, createObservabilityRuntime as dh, createRequestSpan as di, endRequestSpan as dj, getConfigLogger as dk, getObservabilityRuntime as dl, getRequestLogger as dm, redactBody as dn, redactHeaders as dp, renderPrometheusMetrics as dq, resolveObservabilityConfig as dr, shouldSampleRequest as ds, type BaseDocument as e, type DetailComputedOptions as f, type ComputedHandler as g, type DetailComputed as h, type DetailCustomOptions as i, type DetailCustom as j, type DetailDividerOptions as k, type DetailDivider as l, type DisplayFieldOptions as m, type DetailField as n, type DetailItem as o, type DetailGridOptions as p, type DetailGrid as q, type DetailRepeatOptions as r, type DetailRepeat as s, type DetailSectionOptions as t, type DetailSection as u, type DetailTabOptions as v, type DetailTab as w, type DetailTabsOptions as x, type DetailTabs as y, type DetailTextOptions as z };
|