@dyrected/core 2.5.61 → 2.5.62
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-config-BcuZIpvL.d.cts +1951 -0
- package/dist/app-config-BcuZIpvL.d.ts +1951 -0
- package/dist/app-config-Bm9-2Am6.d.cts +1875 -0
- package/dist/app-config-Bm9-2Am6.d.ts +1875 -0
- package/dist/app-config-CJAGGPrk.d.cts +1900 -0
- package/dist/app-config-CJAGGPrk.d.ts +1900 -0
- package/dist/app-config-CiEDJm0e.d.cts +1912 -0
- package/dist/app-config-CiEDJm0e.d.ts +1912 -0
- package/dist/app-config-DCDh8Gbx.d.cts +1926 -0
- package/dist/app-config-DCDh8Gbx.d.ts +1926 -0
- package/dist/app-config-Dv5XACR4.d.cts +2065 -0
- package/dist/app-config-Dv5XACR4.d.ts +2065 -0
- package/dist/app-config-_kkj71CB.d.cts +2010 -0
- package/dist/app-config-_kkj71CB.d.ts +2010 -0
- package/dist/app-config-tITj_0sn.d.cts +1926 -0
- package/dist/app-config-tITj_0sn.d.ts +1926 -0
- package/dist/chunk-57FNM42D.js +2392 -0
- package/dist/chunk-BAMX7YUC.js +1815 -0
- package/dist/chunk-BQV3QW3Y.js +2588 -0
- package/dist/chunk-EH3MJGB5.js +2571 -0
- package/dist/chunk-M3HKRN7E.js +1665 -0
- package/dist/chunk-MQZH7RQC.js +1667 -0
- package/dist/chunk-VCYYBN5J.js +1873 -0
- package/dist/chunk-WVD7PORQ.js +1672 -0
- package/dist/chunk-XZLIBQSO.js +2397 -0
- package/dist/index.cjs +336 -39
- package/dist/index.d.cts +34 -4
- package/dist/index.d.ts +34 -4
- package/dist/index.js +3 -1
- package/dist/server.cjs +2934 -708
- package/dist/server.d.cts +124 -12
- package/dist/server.d.ts +124 -12
- package/dist/server.js +2059 -697
- package/package.json +10 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { F as Field, B as Block, D as DyrectedConfig, C as CollectionConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, W as WorkflowConfig, a as AuthenticatedUser, b as WorkflowTransition, L as LifecycleEventName, c as LifecycleEvent, d as BaseDocument, H as HookRequestContext, e as ArrayField, f as BlocksField, g as BooleanField, h as
|
|
2
|
-
export {
|
|
1
|
+
import { F as Field, B as Block, D as DyrectedConfig, C as CollectionConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, W as WorkflowConfig, a as AuthenticatedUser, b as WorkflowTransition, L as LifecycleEventName, c as LifecycleEvent, d as BaseDocument, H as HookRequestContext, e as ArrayField, f as BlocksField, g as BooleanField, h as AuthConfig, i as DateField, j as DateTimeField, E as EmailField, G as GlobalConfig, I as IconField, k as ImageField, J as JoinField, l as JsonField, M as MultiSelectField, N as NumberField, O as ObjectField, R as RadioField, m as RelationshipField, n as RichTextField, o as RowField, S as SelectField, T as TextField, p as TextareaField, q as TimeField, U as UrlField } from './app-config-Dv5XACR4.js';
|
|
2
|
+
export { r as AccessFunction, s as AccessFunctionArgs, t as AccessPolicyResolver, u as AccessResult, v as AccessRule, w as AdminAuthAccessResolution, x as AdminAuthClaimMapping, y as AdminAuthMember, z as AdminAuthProvider, K as AdminAuthProviderMembersConfig, Q as AdminAuthProvisioningMode, V as AdminAuthResolveAccessArgs, X as AdminAuthResolvedIdentity, Y as AdminConfig, Z as AdminDashboardComponentSlots, _ as AdminIconName, $ as BaseAdminAuthProvider, a0 as BaseFieldAdmin, a1 as BlockVariant, a2 as BooleanFieldAdmin, a3 as BooleanFormat, a4 as CharacterLimitFieldAdmin, a5 as CharacterLimitFieldConfig, a6 as CollectionAfterChangeHook, a7 as CollectionAfterDeleteHook, a8 as CollectionAfterReadHook, a9 as CollectionAfterTransitionHook, aa as CollectionBeforeChangeHook, ab as CollectionBeforeDeleteHook, ac as CollectionBeforeReadHook, ad as CollectionBeforeTransitionHook, ae as CollectionListComponentSlots, af as CustomAdminAuthProvider, ag as DatabaseAdapter, ah as DateFieldAdmin, ai as DateFormat, aj as DisplayTone, ak as DynamicOptionItem, al as DynamicOptionsConfig, am as DynamicOptionsResolver, an as DynamicOptionsResolverArgs, ao as DyrectedLoggerConfig, ap as DyrectedObservabilityConfig, aq as EmailFieldAdmin, ar as FieldAdminHooks, as as FieldAdminOnChangeHook, at as FieldAdminOnChangeHookArgs, au as FieldAdminOptionsHook, av as FieldAdminOptionsHookArgs, aw as FieldAdminOptionsHookResult, ax as FieldAfterReadHook, ay as FieldAfterReadHookArgs, az as FieldBase, aA as FieldBeforeChangeHook, aB as FieldBeforeChangeHookArgs, aC as FieldHook, aD as FieldHooks, aE as FieldType, aF as FileData, aG as GlobalAfterChangeHook, aH as GlobalAfterReadHook, aI as GlobalBeforeChangeHook, aJ as GlobalBeforeReadHook, aK as HeadingLevel, aL as HookFunction, aM as IconFieldAdmin, aN as ImageService, aO as JsonFieldAdmin, aP as JsonFormat, aQ as LIFECYCLE_EVENT_NAMES, aR as LifecycleEventHandler, aS as LinkFormat, aT as MultiSelectFieldAdmin, aU as NamedAccessPolicy, aV as NumberFieldAdmin, aW as NumberFormat, aX as NumberLimitFieldAdmin, aY as NumberLimitFieldConfig, aZ as OIDCAdminAuthProvider, a_ as OptionFormat, a$ as PaginatedResult, b0 as PublicAdminAuthProvider, b1 as RadioFieldAdmin, b2 as RateLimitConfig, b3 as ReadonlyDatabaseAdapter, b4 as RichTextFeature, b5 as RichTextFieldConfig, b6 as SelectFieldAdmin, b7 as StorageAdapter, b8 as TextFieldAdmin, b9 as TextFormat, ba as TextareaFieldAdmin, bb as TrustProxyConfig, bc as TypedField, bd as UploadConfig, be as UrlFieldAdmin, bf as UrlLinkValue, bg as WordLimitFieldAdmin, bh as WordLimitFieldConfig, bi as WorkflowMetadata, bj as WorkflowRole, bk as WorkflowState, bl as WorkflowTransitionContext } from './app-config-Dv5XACR4.js';
|
|
3
3
|
import 'lucide-react';
|
|
4
|
+
import 'pino';
|
|
4
5
|
|
|
5
6
|
type Prettify<T> = {
|
|
6
7
|
[K in keyof T]: T[K];
|
|
@@ -241,6 +242,35 @@ declare function generateOpenApi(config: DyrectedConfig): any;
|
|
|
241
242
|
|
|
242
243
|
declare const WORKFLOW_HISTORY_COLLECTION = "__workflow_history";
|
|
243
244
|
declare const LIFECYCLE_EVENTS_COLLECTION = "__lifecycle_events";
|
|
245
|
+
/**
|
|
246
|
+
* Role mapping for {@link definePublishingWorkflow}. Map your app's own role
|
|
247
|
+
* values onto the publishing workflow's two capability tiers.
|
|
248
|
+
*/
|
|
249
|
+
interface PublishingWorkflowOptions {
|
|
250
|
+
/** Role values allowed to edit and submit for review. Defaults to `["editor"]`. */
|
|
251
|
+
editors?: string[];
|
|
252
|
+
/** Role values allowed to also publish and unpublish. Defaults to `["publisher", "admin"]`. */
|
|
253
|
+
publishers?: string[];
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Build a `draft → in review → published` editorial workflow, mapping your own
|
|
257
|
+
* role values onto its capability tiers. Reach for this instead of
|
|
258
|
+
* {@link publishingWorkflow} when your roles aren't named
|
|
259
|
+
* `editor`/`publisher`/`admin`.
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* workflow: definePublishingWorkflow({
|
|
263
|
+
* editors: ["writer"],
|
|
264
|
+
* publishers: ["managing-editor", "admin"],
|
|
265
|
+
* })
|
|
266
|
+
*/
|
|
267
|
+
declare function definePublishingWorkflow(options?: PublishingWorkflowOptions): WorkflowConfig;
|
|
268
|
+
/**
|
|
269
|
+
* The default `draft → in review → published` editorial workflow, using the
|
|
270
|
+
* conventional role names `editor`, `publisher`, and `admin`. Shorthand for
|
|
271
|
+
* `definePublishingWorkflow()` — use {@link definePublishingWorkflow} to map
|
|
272
|
+
* your own role names onto its capability tiers.
|
|
273
|
+
*/
|
|
244
274
|
declare function publishingWorkflow(): WorkflowConfig;
|
|
245
275
|
declare function simplePublishingWorkflow(): WorkflowConfig;
|
|
246
276
|
declare function workflowCapabilities(workflow: WorkflowConfig, user?: AuthenticatedUser): Set<string>;
|
|
@@ -326,7 +356,7 @@ declare function defineCollection<const TFields extends Field[]>(config: Omit<Co
|
|
|
326
356
|
id: string;
|
|
327
357
|
} & InferDocShape<TFields> & SystemDocFields & AuthDocFields>>, "fields" | "auth"> & {
|
|
328
358
|
fields: TFields;
|
|
329
|
-
auth: true;
|
|
359
|
+
auth: true | AuthConfig;
|
|
330
360
|
}): CollectionConfig<Prettify<{
|
|
331
361
|
id: string;
|
|
332
362
|
} & InferDocShape<TFields> & SystemDocFields & AuthDocFields>>;
|
|
@@ -539,4 +569,4 @@ declare function defineTab<const T extends readonly Field[]>(args: {
|
|
|
539
569
|
fields: T;
|
|
540
570
|
}): T;
|
|
541
571
|
|
|
542
|
-
export { AdminAuthConfig, ArrayField, type AuthDocFields, AuthenticatedUser, BaseDocument, Block, BlocksField, BooleanField, CollectionConfig, DateField, DateTimeField, DyrectedConfig, EmailField, Field, GlobalConfig, HookRequestContext, IconField, ImageField, type InferDocShape, JoinField, JsonField, LIFECYCLE_EVENTS_COLLECTION, LifecycleEvent, LifecycleEventName, MultiSelectField, NumberField, ObjectField, type Prettify, PublicAdminAuthConfig, RadioField, RelationshipField, RichTextField, RowField, SelectField, type SortClause, type SortDirection, type SqlSortDialect, type SqlWhereResult, type SystemDocFields, TextField, TextareaField, TimeField, type UploadDocFields, UrlField, WORKFLOW_HISTORY_COLLECTION, type WhereClause, type WhereOperator, type WhereOperatorName, WorkflowConfig, WorkflowTransition, availableWorkflowTransitions, buildSqlOrderBy, canViewWorkflowDraft, createLifecycleEvent, createWorkflowDocument, defineArrayField, defineBlock, defineBlocksField, defineBooleanField, defineCollection, defineConfig, defineDateField, defineDateTimeField, defineEmailField, defineField, defineGlobal, defineIconField, defineImageField, defineJoinField, defineJsonField, defineMultiSelectField, defineNumberField, defineObjectField, defineRadioField, defineRelationshipField, defineRichTextField, defineRowField, defineSelectField, defineTab, defineTextField, defineTextareaField, defineTimeField, defineUrlField, dispatchLifecycleEvent, dispatchPendingLifecycleEvents, executeFieldAfterRead, executeFieldBeforeChange, generateOpenApi, getAdminAuthCollection, getPublicAdminAuthConfig, initializeWorkflowDocument, materializeWorkflowDocument, normalizeConfig, numericFieldNames, parseMongoWhere, parseSort, parseSqlWhere, publishingWorkflow, resolveAdminAuthCollection, runCollectionHooks, saveWorkflowDraft, simplePublishingWorkflow, transitionWorkflow, workflowCapabilities };
|
|
572
|
+
export { AdminAuthConfig, ArrayField, AuthConfig, type AuthDocFields, AuthenticatedUser, BaseDocument, Block, BlocksField, BooleanField, CollectionConfig, DateField, DateTimeField, DyrectedConfig, EmailField, Field, GlobalConfig, HookRequestContext, IconField, ImageField, type InferDocShape, JoinField, JsonField, LIFECYCLE_EVENTS_COLLECTION, LifecycleEvent, LifecycleEventName, MultiSelectField, NumberField, ObjectField, type Prettify, PublicAdminAuthConfig, type PublishingWorkflowOptions, RadioField, RelationshipField, RichTextField, RowField, SelectField, type SortClause, type SortDirection, type SqlSortDialect, type SqlWhereResult, type SystemDocFields, TextField, TextareaField, TimeField, type UploadDocFields, UrlField, WORKFLOW_HISTORY_COLLECTION, type WhereClause, type WhereOperator, type WhereOperatorName, WorkflowConfig, WorkflowTransition, availableWorkflowTransitions, buildSqlOrderBy, canViewWorkflowDraft, createLifecycleEvent, createWorkflowDocument, defineArrayField, defineBlock, defineBlocksField, defineBooleanField, defineCollection, defineConfig, defineDateField, defineDateTimeField, defineEmailField, defineField, defineGlobal, defineIconField, defineImageField, defineJoinField, defineJsonField, defineMultiSelectField, defineNumberField, defineObjectField, definePublishingWorkflow, defineRadioField, defineRelationshipField, defineRichTextField, defineRowField, defineSelectField, defineTab, defineTextField, defineTextareaField, defineTimeField, defineUrlField, dispatchLifecycleEvent, dispatchPendingLifecycleEvents, executeFieldAfterRead, executeFieldBeforeChange, generateOpenApi, getAdminAuthCollection, getPublicAdminAuthConfig, initializeWorkflowDocument, materializeWorkflowDocument, normalizeConfig, numericFieldNames, parseMongoWhere, parseSort, parseSqlWhere, publishingWorkflow, resolveAdminAuthCollection, runCollectionHooks, saveWorkflowDraft, simplePublishingWorkflow, transitionWorkflow, workflowCapabilities };
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
canViewWorkflowDraft,
|
|
6
6
|
createLifecycleEvent,
|
|
7
7
|
createWorkflowDocument,
|
|
8
|
+
definePublishingWorkflow,
|
|
8
9
|
dispatchLifecycleEvent,
|
|
9
10
|
dispatchPendingLifecycleEvents,
|
|
10
11
|
executeFieldAfterRead,
|
|
@@ -22,7 +23,7 @@ import {
|
|
|
22
23
|
simplePublishingWorkflow,
|
|
23
24
|
transitionWorkflow,
|
|
24
25
|
workflowCapabilities
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BQV3QW3Y.js";
|
|
26
27
|
|
|
27
28
|
// src/types/workflows.ts
|
|
28
29
|
var LIFECYCLE_EVENT_NAMES = [
|
|
@@ -308,6 +309,7 @@ export {
|
|
|
308
309
|
defineMultiSelectField,
|
|
309
310
|
defineNumberField,
|
|
310
311
|
defineObjectField,
|
|
312
|
+
definePublishingWorkflow,
|
|
311
313
|
defineRadioField,
|
|
312
314
|
defineRelationshipField,
|
|
313
315
|
defineRichTextField,
|