processfocus 0.1.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE.md +28 -0
  2. package/README.md +14 -0
  3. package/dist/auth-FmXptohB.mjs +275 -0
  4. package/dist/auth-config/src/lib/authentication-config.d.ts +146 -0
  5. package/dist/auth-config/src/lib/custom-entities-config.d.ts +47 -0
  6. package/dist/auth-config/src/lib/policies-config.d.ts +52 -0
  7. package/dist/auth-config/src/lib/provider-types.d.ts +194 -0
  8. package/dist/auth.d.ts +4 -0
  9. package/dist/auth.mjs +2 -0
  10. package/dist/business-calendar/src/index.d.ts +10 -0
  11. package/dist/business-calendar/src/lib/calendar-config.d.ts +163 -0
  12. package/dist/business-calendar/src/lib/calendar-period.d.ts +88 -0
  13. package/dist/business-calendar/src/lib/calendar-service-impl.d.ts +19 -0
  14. package/dist/business-calendar/src/lib/calendar-service.d.ts +215 -0
  15. package/dist/business-calendar/src/lib/datetime-utils.d.ts +30 -0
  16. package/dist/business-calendar/src/lib/duration-calculator.d.ts +49 -0
  17. package/dist/business-calendar/src/lib/errors.d.ts +69 -0
  18. package/dist/business-calendar/src/lib/holiday-calculator.d.ts +61 -0
  19. package/dist/business-calendar/src/lib/holidays.d.ts +141 -0
  20. package/dist/business-calendar/src/lib/types.d.ts +110 -0
  21. package/dist/calendar.d.ts +1 -0
  22. package/dist/calendar.mjs +1204 -0
  23. package/dist/form-client-representation/src/index.d.ts +6 -0
  24. package/dist/form-client-representation/src/lib/as-client-representation.d.ts +31 -0
  25. package/dist/form-client-representation/src/lib/client-form-definition.d.ts +17 -0
  26. package/dist/form-client-representation/src/lib/extract-annotations.d.ts +20 -0
  27. package/dist/form-client-representation/src/lib/plugin-registry.d.ts +6 -0
  28. package/dist/form-client-representation/src/lib/types.d.ts +239 -0
  29. package/dist/form-client-representation/src/lib/walker.d.ts +68 -0
  30. package/dist/form-rule/src/index.d.ts +3 -0
  31. package/dist/form-rule/src/lib/evaluator.d.ts +2 -0
  32. package/dist/form-rule/src/lib/paths.d.ts +9 -0
  33. package/dist/form-rule/src/lib/types.d.ts +89 -0
  34. package/dist/form-schema/src/index.d.ts +8 -0
  35. package/dist/form-schema/src/lib/annotation-helpers.d.ts +8 -0
  36. package/dist/form-schema/src/lib/deferred-value.d.ts +10 -0
  37. package/dist/form-schema/src/lib/email.d.ts +23 -0
  38. package/dist/form-schema/src/lib/field-count.d.ts +32 -0
  39. package/dist/form-schema/src/lib/form-annotations.d.ts +25 -0
  40. package/dist/form-schema/src/lib/form-schema.d.ts +459 -0
  41. package/dist/form-schema/src/lib/phone.d.ts +4 -0
  42. package/dist/form-schema/src/lib/property-signature.d.ts +3 -0
  43. package/dist/form-submission-schema/src/index.d.ts +2 -0
  44. package/dist/form-submission-schema/src/lib/form-submission-schema.d.ts +49 -0
  45. package/dist/form-submission-schema/src/lib/schema-defaults.d.ts +16 -0
  46. package/dist/forms.d.ts +1 -0
  47. package/dist/forms.mjs +2 -0
  48. package/dist/frontend-manifest/src/index.d.ts +2 -0
  49. package/dist/frontend-manifest/src/lib/browser-plugin-artifact.d.ts +25 -0
  50. package/dist/frontend-manifest/src/lib/frontend-manifest.d.ts +83 -0
  51. package/dist/frontend-plugin-host/src/index.d.ts +2 -0
  52. package/dist/frontend-plugin-host/src/lib/frontend-plugin-host.d.ts +124 -0
  53. package/dist/index.d.ts +26 -0
  54. package/dist/index.mjs +3780 -0
  55. package/dist/manifest.d.ts +2 -0
  56. package/dist/manifest.mjs +5 -0
  57. package/dist/paths-BkzLn-rG.mjs +282 -0
  58. package/dist/plugin.d.ts +3 -0
  59. package/dist/plugin.mjs +84 -0
  60. package/dist/process/src/lib/app-icons.d.ts +52 -0
  61. package/dist/process/src/lib/brands.d.ts +20 -0
  62. package/dist/process/src/lib/document-store.d.ts +30 -0
  63. package/dist/process/src/lib/execution-failure-notifications.d.ts +14 -0
  64. package/dist/process/src/lib/flow-context.d.ts +181 -0
  65. package/dist/process/src/lib/flow-path.d.ts +123 -0
  66. package/dist/process/src/lib/form-authoring.d.ts +19 -0
  67. package/dist/process/src/lib/form-decoration.d.ts +13 -0
  68. package/dist/process/src/lib/form-defaults.d.ts +5 -0
  69. package/dist/process/src/lib/form.d.ts +557 -0
  70. package/dist/process/src/lib/invitation.d.ts +35 -0
  71. package/dist/process/src/lib/list.d.ts +447 -0
  72. package/dist/process/src/lib/lookup-accessor.d.ts +68 -0
  73. package/dist/process/src/lib/node_step.d.ts +68 -0
  74. package/dist/process/src/lib/org-unit.d.ts +53 -0
  75. package/dist/process/src/lib/org-utils.d.ts +56 -0
  76. package/dist/process/src/lib/organisation-frontend-plugin-manifest.d.ts +33 -0
  77. package/dist/process/src/lib/organisation.d.ts +166 -0
  78. package/dist/process/src/lib/phase.d.ts +16 -0
  79. package/dist/process/src/lib/process.d.ts +196 -0
  80. package/dist/process/src/lib/public-form-branding.d.ts +27 -0
  81. package/dist/process/src/lib/role.d.ts +29 -0
  82. package/dist/process/src/lib/schedule.d.ts +239 -0
  83. package/dist/process/src/lib/sla.d.ts +84 -0
  84. package/dist/process/src/lib/stats-view.d.ts +68 -0
  85. package/dist/process/src/lib/step.d.ts +130 -0
  86. package/dist/process/src/lib/system-step-executor.d.ts +130 -0
  87. package/dist/process/src/lib/system-step.d.ts +248 -0
  88. package/dist/sdk/src/auth.d.ts +4 -0
  89. package/dist/sdk/src/calendar.d.ts +1 -0
  90. package/dist/sdk/src/forms.d.ts +1 -0
  91. package/dist/sdk/src/index.d.ts +26 -0
  92. package/dist/sdk/src/manifest.d.ts +2 -0
  93. package/dist/sdk/src/plugin.d.ts +3 -0
  94. package/dist/sdk/src/testing.d.ts +9 -0
  95. package/dist/src-C-909PVQ.mjs +498 -0
  96. package/dist/testing.d.ts +9 -0
  97. package/dist/testing.mjs +5 -0
  98. package/package.json +67 -0
@@ -0,0 +1,2 @@
1
+ export type { ExecutionMenuActionRegistration, ExecutionMenuActionSelectContext, ExecutionMenuActionVisibilityContext, FormRenderer, FormRendererOptions, FormRendererRegistration, FrontendClientPluginGraphqlRequestError, FrontendClientPluginIdentity, FrontendClientPluginRegistration, FrontendPluginField, FrontendPluginForm, FrontendPluginSession, FrontendPluginSessionConsumerProps, GraphqlClientConsumerProps, GraphqlRequester, OrganisationFrontendPlugin, OrganisationFrontendPluginFailure, OrganisationFrontendPluginHost, RegistrationDisposer, RegistrationRegistry, } from "./lib/frontend-plugin-host.js";
2
+ export { DuplicatePluginRegistrationError, FRONTEND_PLUGIN_HOST_INTERFACE_VERSION, activateOrganisationFrontendPlugin, activateOrganisationFrontendPlugins, createRegistrationRegistry, } from "./lib/frontend-plugin-host.js";
@@ -0,0 +1,124 @@
1
+ import type { ComponentType, JSX, ReactNode } from "react";
2
+ export declare const FRONTEND_PLUGIN_HOST_INTERFACE_VERSION: 1;
3
+ export interface GraphqlRequester {
4
+ readonly request: <TData>(document: string, variables?: Record<string, unknown>) => Promise<TData>;
5
+ }
6
+ export interface GraphqlClientConsumerProps {
7
+ readonly children: (graphqlClient: GraphqlRequester) => ReactNode;
8
+ }
9
+ export interface FrontendPluginSession {
10
+ readonly email?: string;
11
+ }
12
+ export interface FrontendPluginSessionConsumerProps {
13
+ readonly children: (session: FrontendPluginSession) => ReactNode;
14
+ }
15
+ export interface FrontendClientPluginGraphqlRequestError {
16
+ readonly operationName: string;
17
+ readonly pathname: string | null;
18
+ readonly responseStatus: number | null;
19
+ readonly graphqlErrors: ReadonlyArray<{
20
+ readonly code: string | null;
21
+ readonly message: string;
22
+ readonly path: string | null;
23
+ }>;
24
+ }
25
+ export interface FrontendClientPluginIdentity {
26
+ readonly email?: string;
27
+ readonly name?: string;
28
+ readonly userId: string;
29
+ readonly username: string;
30
+ }
31
+ export interface FrontendClientPluginRegistration {
32
+ readonly type: string;
33
+ readonly captureClientException?: (config: unknown, error: Error, properties?: Record<string, unknown>) => void;
34
+ readonly captureGraphqlRequestError?: (config: unknown, error: Error, details: FrontendClientPluginGraphqlRequestError) => void;
35
+ readonly renderIdentify?: (config: unknown, identity: FrontendClientPluginIdentity) => ReactNode;
36
+ readonly resetIdentity?: () => void;
37
+ readonly render: (config: unknown) => ReactNode;
38
+ }
39
+ export interface FrontendPluginField {
40
+ readonly _tag: "plugin";
41
+ readonly field: string;
42
+ readonly label: string;
43
+ readonly description?: string;
44
+ readonly readonly?: boolean;
45
+ readonly disabled?: boolean;
46
+ readonly hidden?: boolean;
47
+ readonly required?: boolean;
48
+ readonly autoComplete?: string;
49
+ readonly pluginType: string;
50
+ readonly pluginData?: unknown;
51
+ }
52
+ export interface FrontendPluginForm {
53
+ readonly AppField: ComponentType<{
54
+ readonly name: string;
55
+ readonly children: () => JSX.Element;
56
+ }>;
57
+ }
58
+ export interface FormRendererOptions {
59
+ readonly todoId?: string;
60
+ readonly stepPath?: string;
61
+ }
62
+ export type FormRenderer = (form: FrontendPluginForm, component: FrontendPluginField, shouldAutoFocus: boolean, options?: FormRendererOptions) => JSX.Element;
63
+ export interface FormRendererRegistration {
64
+ readonly type: string;
65
+ readonly renderer: FormRenderer;
66
+ }
67
+ export interface ExecutionMenuActionVisibilityContext {
68
+ readonly executionId: string;
69
+ readonly processPath: string;
70
+ readonly status: string;
71
+ readonly showProcessState: boolean;
72
+ }
73
+ export interface ExecutionMenuActionSelectContext extends ExecutionMenuActionVisibilityContext {
74
+ readonly request: GraphqlRequester["request"];
75
+ }
76
+ export interface ExecutionMenuActionRegistration {
77
+ readonly id: string;
78
+ readonly label: string;
79
+ readonly busyLabel?: string;
80
+ readonly isVisible: (context: ExecutionMenuActionVisibilityContext) => boolean;
81
+ readonly onSelect: (context: ExecutionMenuActionSelectContext) => Promise<void>;
82
+ }
83
+ export type RegistrationDisposer = () => void;
84
+ /** Versioned browser capabilities supplied to organisation plugins. */
85
+ export interface OrganisationFrontendPluginHost {
86
+ readonly kind: "organisation-plugin-host";
87
+ readonly interfaceVersion: typeof FRONTEND_PLUGIN_HOST_INTERFACE_VERSION;
88
+ readonly analytics: {
89
+ readonly register: (plugin: FrontendClientPluginRegistration) => RegistrationDisposer;
90
+ };
91
+ readonly formRenderers: {
92
+ readonly register: (renderer: FormRendererRegistration) => RegistrationDisposer;
93
+ };
94
+ readonly executionMenu: {
95
+ readonly register: (action: ExecutionMenuActionRegistration) => RegistrationDisposer;
96
+ };
97
+ readonly graphql: {
98
+ readonly ClientConsumer: ComponentType<GraphqlClientConsumerProps>;
99
+ };
100
+ readonly session?: {
101
+ readonly Consumer: ComponentType<FrontendPluginSessionConsumerProps>;
102
+ };
103
+ }
104
+ export interface OrganisationFrontendPlugin {
105
+ readonly id: string;
106
+ readonly activate: (host: OrganisationFrontendPluginHost) => Promise<void> | void;
107
+ }
108
+ export interface OrganisationFrontendPluginFailure {
109
+ readonly pluginId: string;
110
+ readonly cause: unknown;
111
+ }
112
+ export interface RegistrationRegistry<T> {
113
+ readonly register: (registration: T) => RegistrationDisposer;
114
+ readonly get: (key: string) => T | undefined;
115
+ readonly list: () => readonly T[];
116
+ readonly reset: (resetRegistration?: (registration: T) => void, onFailure?: (cause: unknown, registration: T) => void) => void;
117
+ }
118
+ export declare class DuplicatePluginRegistrationError extends Error {
119
+ readonly key: string;
120
+ constructor(key: string);
121
+ }
122
+ export declare const createRegistrationRegistry: <T>(getKey: (registration: T) => string) => RegistrationRegistry<T>;
123
+ export declare const activateOrganisationFrontendPlugin: (plugin: OrganisationFrontendPlugin, host: OrganisationFrontendPluginHost) => Promise<void>;
124
+ export declare const activateOrganisationFrontendPlugins: (plugins: readonly OrganisationFrontendPlugin[], host: OrganisationFrontendPluginHost, onFailure?: (failure: OrganisationFrontendPluginFailure) => void) => Promise<void>;
@@ -0,0 +1,26 @@
1
+ export type { ExecutorDescriptor } from "@processfocus/runtime";
2
+ export { type AppIconManifestIconProps, type AppIconMetadataIconProps, AppIcons, type AppIconsProps, } from "./process/src/lib/app-icons.js";
3
+ export { isDocumentStore, isForm, isInvitation, isList, isOrgUnit, isOrganisation, isProcess, isRole, isStatsView, isStep, } from "./process/src/lib/brands.js";
4
+ export { DocumentStore, type DocumentStoreProps, } from "./process/src/lib/document-store.js";
5
+ export { ExecutionFailureNotifications, type ExecutionFailureNotificationsProps, } from "./process/src/lib/execution-failure-notifications.js";
6
+ export type { CamelCase, FlowContext, ForEachOutput, FormStepMeta, MergeFormStep, MergeSteps, ProcessMeta, ProviderUserDisplayResolver, StepMeta, StepProviderUserInfo, StepUserInfo, SummaryContext, } from "./process/src/lib/flow-context.js";
7
+ export { type ConditionOptions, ElseBranch, type ElseTransitionOptions, FlowPath, type MergeState, type OnErrorOptions, type ScheduleOptions, type TransitionOptions, } from "./process/src/lib/flow-path.js";
8
+ export { Form, type FormEmbedConfig, type FormPublicCompletionConfig, FormRuleSelf, type FormRuleTargetTree, type FormStepProps, LookupFieldNotFoundError, type PublicCompletionCorrectionConfig, type PublicCompletionEmailTemplate, type PublicCompletionRecipient, type Summary, } from "./process/src/lib/form.js";
9
+ export { Invitation, type InvitationProps, } from "./process/src/lib/invitation.js";
10
+ export { DEFAULT_PAGE_SIZE, List, type ListDeleteFunction, type ListItemQueryContext, type ListItemQueryFunction, type ListProps, type ListQueryContext, type ListQueryFunction, type ListQueryResult, type ListSortDirection, type ListSortInput, ListSortable, type ListUpdateFunction, ListUpdateValidationError, ListVisibleInList, MAX_PAGE_SIZE, type OutputItem, } from "./process/src/lib/list.js";
11
+ export { type DependentQueryInput, LookupAccessor, LookupBuilder, type QueryInput, } from "./process/src/lib/lookup-accessor.js";
12
+ export { NodeStep, type NodeStepProps, } from "./process/src/lib/node_step.js";
13
+ export { OrgUnit, type OrgUnitProps, type OrgUnitType, } from "./process/src/lib/org-unit.js";
14
+ export { Organisation, type OrganisationProps, } from "./process/src/lib/organisation.js";
15
+ export { Phase, type PhaseProps } from "./process/src/lib/phase.js";
16
+ export { type Condition, type CronWeekday, type DailyProcessCron, type HourlyProcessCron, type InferFormSchemaType, type InferSchemaType, type MonthlyProcessCron, Process, type ProcessCron, type ProcessProps, type ProcessResponsibility, type ResolveStepOutput, type ScheduleFn, type WeeklyProcessCron, } from "./process/src/lib/process.js";
17
+ export { PublicFormBranding, type PublicFormBrandingProps, } from "./process/src/lib/public-form-branding.js";
18
+ export { Role, type RoleProps } from "./process/src/lib/role.js";
19
+ export { type BusinessDaysSchedule, type BusinessHoursSchedule, type BusinessMinutesSchedule, type ClockTimeSchedule, type FromPointSchedule, Schedule, type ScheduleMarker, type ScheduledTime, } from "./process/src/lib/schedule.js";
20
+ export { Sla, type SlaConfig, type SlaOptions, type SlaUnit, } from "./process/src/lib/sla.js";
21
+ export { StatsView, type StatsViewProps, type StatsViewRenderer, } from "./process/src/lib/stats-view.js";
22
+ export { type IStepScope, Step, type StepProps, } from "./process/src/lib/step.js";
23
+ export { type AuthorTaggedError, CurrentStepJobContext, type ForEachConfig, type StepJobContext, type StepResult, SystemStep, type SystemStepProps, coerceAuthorTaggedError, isAuthorTaggedError, isNonRetryableAuthorError, } from "./process/src/lib/system-step.js";
24
+ export { StepProcessStateReader } from "./process/src/lib/system-step-executor.js";
25
+ export * from "./auth.js";
26
+ export type { OrganisationFrontendManifestFormComponentPluginDeclaration, OrganisationFrontendPluginManifestClientPlugin, OrganisationFrontendPluginManifestJson, } from "./manifest.js";