@protobase/workflows 0.101.0 → 0.101.1

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.
@@ -1,13 +1,17 @@
1
1
  import { Definition, Machine, State } from "../types.js";
2
2
  import { Reference } from "./references.js";
3
- import { RecordSchemas } from "./resolve-schema.js";
3
+ import { EmailSchemas, RecordSchemas } from "./resolve-schema.js";
4
4
  //#region src/definition/pins/pin-sources.d.ts
5
5
  type JsonSchema = Record<string, unknown>;
6
- /** What the types of pins are read from: each step type's input and each step and trigger type's output, by id, and the records of the app's resources. */
6
+ /**
7
+ * What the types of pins are read from: each step type's input and each step and trigger type's output, by id, the
8
+ * records of the app's resources, and its email templates' data.
9
+ */
7
10
  export type PinSchemas = {
8
11
  inputs: Readonly<Record<string, JsonSchema>>;
9
12
  outputs: Readonly<Record<string, JsonSchema>>;
10
13
  records: RecordSchemas;
14
+ emails?: EmailSchemas;
11
15
  };
12
16
  /** The state outside any Block that keeps its whole result in `variable`, when exactly one does; its name. */
13
17
  export declare const resultState: (machine: Machine, variable: string) => [string, State] | undefined;
@@ -27,13 +27,13 @@ const resultState = (machine, variable) => {
27
27
  const resultSchema = (state, schemas) => {
28
28
  if (state.Type !== "Task") return;
29
29
  const { type, waits } = taskResource(state.Resource);
30
- return !waits && schemas.outputs[type] ? resolveSchema(schemas.outputs[type], argumentsOf(state), schemas.records) : void 0;
30
+ return !waits && schemas.outputs[type] ? resolveSchema(schemas.outputs[type], argumentsOf(state), schemas.records, schemas.emails) : void 0;
31
31
  };
32
32
  /** The run's input as the trigger gives it, with what its input names filled in; undefined for a manual workflow. */
33
33
  const triggerSchema = (definition, schemas) => {
34
34
  const [id, input] = Object.entries(definition.trigger ?? {})[0] ?? [];
35
35
  if (id === void 0 || id === "manual" || !schemas.outputs[id]) return;
36
- return resolveSchema(schemas.outputs[id], input ?? {}, schemas.records);
36
+ return resolveSchema(schemas.outputs[id], input ?? {}, schemas.records, schemas.emails);
37
37
  };
38
38
  /**
39
39
  * The schema of the value a reference reads, in a state outside any Block: the trigger's run input, or the result a
@@ -66,7 +66,7 @@ const referenceSchema = (definition, reference, schemas) => {
66
66
  const inputSchema = (state, schemas) => {
67
67
  if (state.Type !== "Task") return;
68
68
  const { type } = taskResource(state.Resource);
69
- return schemas.inputs[type] ? resolveSchema(schemas.inputs[type], argumentsOf(state), schemas.records) : void 0;
69
+ return schemas.inputs[type] ? resolveSchema(schemas.inputs[type], argumentsOf(state), schemas.records, schemas.emails) : void 0;
70
70
  };
71
71
  /** Every Task of a machine outside any Block, with its path, the ones in Maps too: a Block's steps read only its own input. */
72
72
  /** Every Block of a machine outside any other Block, with its path, the ones in Maps too. */
@@ -4,15 +4,21 @@ type JsonSchema = Record<string, unknown>;
4
4
  export type RecordUse = 'read' | 'write';
5
5
  /** A resource's record as JSON Schema, for a use; undefined for a resource the app does not have. */
6
6
  export type RecordSchemas = (resource: string, use: RecordUse) => JsonSchema | undefined;
7
+ /** An email template of the app by its name: the JSON Schema of its data and the languages it is sent in; undefined for one the app does not have. */
8
+ export type EmailSchemas = (template: string) => {
9
+ schema: JsonSchema;
10
+ languages: readonly string[];
11
+ } | undefined;
7
12
  /**
8
13
  * A type's schema with what its arguments name filled in: `{ "x-record-of": "<argument>" }` is the record of the
9
14
  * resource that argument names, for the `x-record-use` it says (default `read`), and `{ "x-schema-of": "<argument>" }`
10
15
  * is the schema that argument holds, such as an HTTP answer's declared body, and `{ "x-one-or-many-of": "<argument>",
11
16
  * "anyOf": [<one>, <list>] }` is one or the list as that argument holds an object or a list. `{ "x-file": true }` is a
12
- * stored file, with its own title and description. An argument that is an expression, or a resource the app does not
13
- * have, leaves the value of any type.
17
+ * stored file, with its own title and description. `{ "x-email-of": "<argument>" }` is the data of the email template
18
+ * that argument names, and with `"x-email-use": "locale"` one of the languages it is sent in. An argument that is an
19
+ * expression, or a resource or template the app does not have, leaves the value of any type.
14
20
  */
15
- export declare const resolveSchema: (schema: JsonSchema, args: Record<string, unknown>, records: RecordSchemas) => JsonSchema;
21
+ export declare const resolveSchema: (schema: JsonSchema, args: Record<string, unknown>, records: RecordSchemas, emails?: EmailSchemas) => JsonSchema;
16
22
  /**
17
23
  * The schema of the value at `path` below a value of `schema`: a property's, or a map's `additionalProperties`; for a
18
24
  * schema of several kinds, any of the branches' schemas for it. Undefined when the schema, or one of its branches,
@@ -6,10 +6,11 @@ const isSchema = (value) => typeof value === "object" && value !== null && !Arra
6
6
  * resource that argument names, for the `x-record-use` it says (default `read`), and `{ "x-schema-of": "<argument>" }`
7
7
  * is the schema that argument holds, such as an HTTP answer's declared body, and `{ "x-one-or-many-of": "<argument>",
8
8
  * "anyOf": [<one>, <list>] }` is one or the list as that argument holds an object or a list. `{ "x-file": true }` is a
9
- * stored file, with its own title and description. An argument that is an expression, or a resource the app does not
10
- * have, leaves the value of any type.
9
+ * stored file, with its own title and description. `{ "x-email-of": "<argument>" }` is the data of the email template
10
+ * that argument names, and with `"x-email-use": "locale"` one of the languages it is sent in. An argument that is an
11
+ * expression, or a resource or template the app does not have, leaves the value of any type.
11
12
  */
12
- const resolveSchema = (schema, args, records) => {
13
+ const resolveSchema = (schema, args, records, emails = () => void 0) => {
13
14
  const resolve = (node) => {
14
15
  if (Array.isArray(node)) return node.map(resolve);
15
16
  if (!isSchema(node)) return node;
@@ -23,6 +24,17 @@ const resolveSchema = (schema, args, records) => {
23
24
  const use = node["x-record-use"] === "write" ? "write" : "read";
24
25
  return (typeof resource === "string" && !resource.startsWith("{%") ? records(resource, use) : void 0) ?? withoutKeys(node, ["x-record-of", "x-record-use"]);
25
26
  }
27
+ const emailOf = node["x-email-of"];
28
+ if (typeof emailOf === "string") {
29
+ const name = args[emailOf];
30
+ const template = typeof name === "string" && !name.startsWith("{%") ? emails(name) : void 0;
31
+ const rest = withoutKeys(node, ["x-email-of", "x-email-use"]);
32
+ if (node["x-email-use"] === "locale") return template && template.languages.length > 0 ? {
33
+ ...rest,
34
+ enum: [...template.languages]
35
+ } : rest;
36
+ return template?.schema ?? rest;
37
+ }
26
38
  const oneOrMany = node["x-one-or-many-of"];
27
39
  if (typeof oneOrMany === "string" && Array.isArray(node.anyOf) && node.anyOf.length === 2) {
28
40
  const given = args[oneOrMany];
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Problem, problemText } from "./definition/problem.js";
2
2
  import { BlockCache, BlockState, Catcher, ChoiceRule, ChoiceState, Definition, Machine, MapState, Order, Retrier, State, StateMachine, TaskState, Trigger, orderOf } from "./definition/types.js";
3
3
  import { TriggerCheck } from "./definition/check-trigger.js";
4
4
  import { ReadBase, Reference, expressionReferences, parseReference, readText, referenceValue } from "./definition/pins/references.js";
5
- import { RecordSchemas, RecordUse, resolveSchema, schemaAt } from "./definition/pins/resolve-schema.js";
5
+ import { EmailSchemas, RecordSchemas, RecordUse, resolveSchema, schemaAt } from "./definition/pins/resolve-schema.js";
6
6
  import { PinSchemas, inputSchema, referenceSchema, resultSchema, resultState, stepStatusSchema, triggerSchema } from "./definition/pins/pin-sources.js";
7
7
  import { CheckOptions, checkDefinition } from "./definition/check-definition.js";
8
8
  import { dataflowDefinitionSchema, definitionSchema } from "./definition/schema.js";
@@ -36,10 +36,10 @@ import { StepWiring, stepHandlers } from "./plugin/step-handlers.js";
36
36
  import { triggerChecks } from "./plugin/trigger-checks.js";
37
37
  import { TypeEntry, Unavailable, typeList } from "./plugin/type-list.js";
38
38
  import { ConnectionSupport, connectionUnavailable } from "./plugin/connection-availability.js";
39
- import { CatalogEntry, TypeCatalog, typeCatalog } from "./plugin/type-catalog.js";
39
+ import { CatalogEntry, CatalogTemplate, TypeCatalog, typeCatalog } from "./plugin/type-catalog.js";
40
40
  import { KnownRunner, MatchSettings, Placement, PollingRunner, QueuedJob, RunnerState, Tier, jobKind, matchJobs, tierOf } from "./runners/match-jobs.js";
41
41
  import { CompletedVersion, JobCompletion, jobAnswer, jobErrors } from "./runners/job-answer.js";
42
42
  import { BuildReport, JobBuild, JobFile, RunnerJob, RunnerOrder, buildKind, buildStatuses, fileInputName, fileProperties } from "./runners/job-contract.js";
43
43
  import { customPlugin, customStepOf } from "./plugin/custom-step-id.js";
44
44
  import { CustomStepBuildStatus, CustomStepManifest, CustomStepVersion, ManifestProblem, customStepEntry, customStepTestDefinition, customStepTestState, latestCustomSteps, manifestProblems, withCustomSteps } from "./plugin/custom-steps.js";
45
- export { type AnswerRefusal, type BlockCache, type BlockRun, type BlockRunStore, type BlockShare, type BlockState, type BuildReport, type CacheCall, type CacheEntry, type CacheIdentity, type CatalogEntry, type Catcher, type CheckOptions, type Checkpoint, type ChoiceRule, type ChoiceState, type CompareOp, type CompletedVersion, type ConditionInput, type ConditionOperand, type ConditionPart, type ConditionPattern, type ConditionSide, type ConnectionHeader, type ConnectionHeaders, type ConnectionSupport, type CustomStepBuildStatus, type CustomStepJob, type CustomStepJobs, type CustomStepManifest, type CustomStepVersion, type Definition, type DefinitionParts, type Dependencies, type EarlierCheckpoint, type ErrorOutput, type JobBuild, type JobCompletion, type JobFile, type KeptAnswer, type KeyShape, type KnownRunner, type LoadedPlugin, type LoadedRun, type Machine, type ManifestProblem, type MapState, type MatchSettings, type Order, type PinKind, type PinSchemas, type PinType, type Placement, type PollingRunner, type Problem, type QueuedJob, type ReadBase, type RecordSchemas, type RecordUse, type Redactor, type Reference, type ReplayedStep, type RerunFrom, type Retrier, type RunChange, type RunStatus, type RunStore, type Runner, type RunnerJob, type RunnerOrder, type RunnerPort, type RunnerState, type SegmentInput, type SegmentQueue, type SelectPart, type SelectValue, type State, type StateMachine, type StepCacheStore, StepError, type StepLog, type StepRecord, type StepStatus, type StepWiring, type TaskAnswer, type TaskContext, type TaskHandler, type TaskHandlers, type TaskState, type TaskTokenStore, type Tier, type TraceMode, type TraceSink, type Trigger, type TriggerCheck, type TypeCatalog, type TypeEntry, type Unavailable, type WaitingTask, allStates, assignedNames, blockDefinition, buildKind, buildStatuses, checkDefinition, conditionParts, conditionValue, connectionUnavailable, createRunner, customPlugin, customStepEntry, customStepOf, customStepTestDefinition, customStepTestState, dataflowDefinitionSchema, definitionFromParts, definitionSchema, definitionWarnings, dependsOn, expressionReferences, expressionSource, fileInputName, fileProperties, findBlock, fits, heldBackLog, importStateMachine, innerMachine, inputSchema, isConditionPart, jobAnswer, jobErrors, jobKind, keptAssigned, latestCustomSteps, limits, loadPlugins, machineDependencies, manifestProblems, matchJobs, nestingDepth, orderOf, parseReference, partOfProblem, partsOfDefinition, pinType, pinTypeText, problemText, readText, redacted, referenceSchema, referenceValue, rerunCheckpoint, rerunFrom, rerunProblem, resolveSchema, resources, resultRead, resultSchema, resultState, runSegment, schemaAt, secretRedactor, selectParts, selectValue, shortestSecret, stepHandlers, stepStatusSchema, stepStatuses, taskResource, taskTokenHash, tierOf, tokenPattern, triggerChecks, triggerSchema, typeCatalog, typeList, usedConnections, waitSuffix, waitsForToken, withCustomSteps };
45
+ export { type AnswerRefusal, type BlockCache, type BlockRun, type BlockRunStore, type BlockShare, type BlockState, type BuildReport, type CacheCall, type CacheEntry, type CacheIdentity, type CatalogEntry, type CatalogTemplate, type Catcher, type CheckOptions, type Checkpoint, type ChoiceRule, type ChoiceState, type CompareOp, type CompletedVersion, type ConditionInput, type ConditionOperand, type ConditionPart, type ConditionPattern, type ConditionSide, type ConnectionHeader, type ConnectionHeaders, type ConnectionSupport, type CustomStepBuildStatus, type CustomStepJob, type CustomStepJobs, type CustomStepManifest, type CustomStepVersion, type Definition, type DefinitionParts, type Dependencies, type EarlierCheckpoint, type EmailSchemas, type ErrorOutput, type JobBuild, type JobCompletion, type JobFile, type KeptAnswer, type KeyShape, type KnownRunner, type LoadedPlugin, type LoadedRun, type Machine, type ManifestProblem, type MapState, type MatchSettings, type Order, type PinKind, type PinSchemas, type PinType, type Placement, type PollingRunner, type Problem, type QueuedJob, type ReadBase, type RecordSchemas, type RecordUse, type Redactor, type Reference, type ReplayedStep, type RerunFrom, type Retrier, type RunChange, type RunStatus, type RunStore, type Runner, type RunnerJob, type RunnerOrder, type RunnerPort, type RunnerState, type SegmentInput, type SegmentQueue, type SelectPart, type SelectValue, type State, type StateMachine, type StepCacheStore, StepError, type StepLog, type StepRecord, type StepStatus, type StepWiring, type TaskAnswer, type TaskContext, type TaskHandler, type TaskHandlers, type TaskState, type TaskTokenStore, type Tier, type TraceMode, type TraceSink, type Trigger, type TriggerCheck, type TypeCatalog, type TypeEntry, type Unavailable, type WaitingTask, allStates, assignedNames, blockDefinition, buildKind, buildStatuses, checkDefinition, conditionParts, conditionValue, connectionUnavailable, createRunner, customPlugin, customStepEntry, customStepOf, customStepTestDefinition, customStepTestState, dataflowDefinitionSchema, definitionFromParts, definitionSchema, definitionWarnings, dependsOn, expressionReferences, expressionSource, fileInputName, fileProperties, findBlock, fits, heldBackLog, importStateMachine, innerMachine, inputSchema, isConditionPart, jobAnswer, jobErrors, jobKind, keptAssigned, latestCustomSteps, limits, loadPlugins, machineDependencies, manifestProblems, matchJobs, nestingDepth, orderOf, parseReference, partOfProblem, partsOfDefinition, pinType, pinTypeText, problemText, readText, redacted, referenceSchema, referenceValue, rerunCheckpoint, rerunFrom, rerunProblem, resolveSchema, resources, resultRead, resultSchema, resultState, runSegment, schemaAt, secretRedactor, selectParts, selectValue, shortestSecret, stepHandlers, stepStatusSchema, stepStatuses, taskResource, taskTokenHash, tierOf, tokenPattern, triggerChecks, triggerSchema, typeCatalog, typeList, usedConnections, waitSuffix, waitsForToken, withCustomSteps };
@@ -117,6 +117,33 @@ export type PluginMailMessage = {
117
117
  export type PluginMail = {
118
118
  send(message: PluginMailMessage): Promise<void>;
119
119
  };
120
+ /** The app a mail comes from, as a template names it: its name, and its home page. */
121
+ export type PluginMailingApp = {
122
+ name: string;
123
+ url: string;
124
+ };
125
+ /**
126
+ * An email template of the app, as `app:mail.template` sends it: its name, the languages it is sent in, and the JSON
127
+ * Schema of its data. `send` renders the mail in the language closest to `locale` and sends it through `mailer`; it
128
+ * rejects data the template's schema refuses with an error that has `issues`, each naming its `path`.
129
+ */
130
+ export type PluginTemplate = {
131
+ readonly name: string;
132
+ readonly languages: readonly string[];
133
+ readonly dataSchema: JsonSchema;
134
+ send(to: string, data: object, options: {
135
+ locale?: string;
136
+ mailer: PluginMail;
137
+ app: PluginMailingApp;
138
+ }): Promise<{
139
+ locale: string;
140
+ }>;
141
+ };
142
+ /** The app's email templates, and the app they name as the one the mail comes from. */
143
+ export type PluginTemplates = {
144
+ list: readonly PluginTemplate[];
145
+ app: PluginMailingApp;
146
+ };
120
147
  /** The sign-in a step or trigger declared, bound by its workflow; it names no other. */
121
148
  export type PluginConnection = {
122
149
  /**
@@ -127,7 +154,7 @@ export type PluginConnection = {
127
154
  refresh?: boolean;
128
155
  }): Promise<string>;
129
156
  };
130
- /** What the app gives every hook of a plugin: its guarded requests, records, files, storage and mail. */
157
+ /** What the app gives every hook of a plugin: its guarded requests, records, files, storage, mail and email templates. */
131
158
  export type PluginServices = {
132
159
  fetch: PluginFetch;
133
160
  records: PluginRecords;
@@ -135,6 +162,8 @@ export type PluginServices = {
135
162
  storage: PluginStorage;
136
163
  /** Undefined when the app sends no mail. */
137
164
  mail: PluginMail | undefined;
165
+ /** The app's email templates, none when it exports none. */
166
+ templates: PluginTemplates;
138
167
  };
139
168
  /** What a step's `run` gets: its checked input, the app's services, and the step's own run details. */
140
169
  export type StepContext<Input = Record<string, unknown>> = PluginServices & {
@@ -1,5 +1,5 @@
1
1
  import { StepError } from "../run/errors.js";
2
- import { FileValue, JsonSchema, PluginConnection, PluginFetch, PluginFetchInit, PluginFiles, PluginMail, PluginMailMessage, PluginRecords, PluginServices, PluginStorage, StepContext, StorageTarget, StoredFile } from "./context.js";
2
+ import { FileValue, JsonSchema, PluginConnection, PluginFetch, PluginFetchInit, PluginFiles, PluginMail, PluginMailMessage, PluginMailingApp, PluginRecords, PluginServices, PluginStorage, PluginTemplate, PluginTemplates, StepContext, StorageTarget, StoredFile } from "./context.js";
3
3
  import { ConnectionDeclaration, OAuthEndpoints, Plugin, PollEvery, PollingTrigger, ReadyTrigger, StepType, TriggerContext, TriggerItem, TriggerType, WebhookEvent, WebhookItem, WebhookTrigger } from "./types.js";
4
4
  import { ConnectionError } from "./connection-error.js";
5
5
  import { definePlugin, pluginApi } from "./define-plugin.js";
@@ -8,4 +8,4 @@ import { isFileValue } from "./file-value.js";
8
8
  import { isStoredFile, storedFileSchema } from "./stored-file.js";
9
9
  import { valueProblems } from "./value-check.js";
10
10
  import { webhookBodyCeiling, webhookBodyDefault, webhookInputCheck, webhookInputProperties } from "./webhook-input.js";
11
- export { AddressRefusedError, type ConnectionDeclaration, ConnectionError, type FileValue, type JsonSchema, type OAuthEndpoints, type Plugin, type PluginConnection, type PluginFetch, type PluginFetchInit, type PluginFiles, type PluginMail, type PluginMailMessage, type PluginRecords, type PluginServices, type PluginStorage, type PollEvery, type PollingTrigger, type ReadyTrigger, ResponseTooLargeError, type StepContext, StepError, type StepType, type StorageTarget, type StoredFile, type TriggerContext, type TriggerItem, type TriggerType, type WebhookEvent, type WebhookItem, type WebhookTrigger, definePlugin, fetchMaxBytes, isFileValue, isStoredFile, pluginApi, storedFileSchema, valueProblems, webhookBodyCeiling, webhookBodyDefault, webhookInputCheck, webhookInputProperties };
11
+ export { AddressRefusedError, type ConnectionDeclaration, ConnectionError, type FileValue, type JsonSchema, type OAuthEndpoints, type Plugin, type PluginConnection, type PluginFetch, type PluginFetchInit, type PluginFiles, type PluginMail, type PluginMailMessage, type PluginMailingApp, type PluginRecords, type PluginServices, type PluginStorage, type PluginTemplate, type PluginTemplates, type PollEvery, type PollingTrigger, type ReadyTrigger, ResponseTooLargeError, type StepContext, StepError, type StepType, type StorageTarget, type StoredFile, type TriggerContext, type TriggerItem, type TriggerType, type WebhookEvent, type WebhookItem, type WebhookTrigger, definePlugin, fetchMaxBytes, isFileValue, isStoredFile, pluginApi, storedFileSchema, valueProblems, webhookBodyCeiling, webhookBodyDefault, webhookInputCheck, webhookInputProperties };
@@ -1,19 +1,27 @@
1
+ import { JsonSchema } from "./context.js";
1
2
  import { TypeEntry } from "./type-list.js";
2
3
  //#region src/plugin/type-catalog.d.ts
3
4
  /** A type as a model or the editor reads it: its declaration as its plugin gives it, with whether this app can run it. */
4
5
  export type CatalogEntry = Omit<TypeEntry, 'kind' | 'plugin'> & {
5
6
  kind: TypeEntry['kind'] | 'manual';
6
7
  };
8
+ /** An email template of the app as the catalog lists it: its name, the languages it is sent in, and the JSON Schema of its data. */
9
+ export type CatalogTemplate = {
10
+ name: string;
11
+ languages: string[];
12
+ schema: JsonSchema;
13
+ };
7
14
  /**
8
15
  * What `list_workflow_types` answers and the editor reads: every step type a Task names as its `Resource` and every
9
16
  * trigger a definition's `trigger` holds as `{ "<id>": <input> }`, built-in and plugin types alike, each with its JSON
10
- * Schemas.
17
+ * Schemas, and the app's email templates, whose data `app:mail.template` takes.
11
18
  */
12
- export declare const typeCatalog: (types: readonly TypeEntry[]) => TypeCatalog;
13
- /** The app's types, `manual` first among the triggers, as `typeCatalog` lists them. */
19
+ export declare const typeCatalog: (types: readonly TypeEntry[], templates?: readonly CatalogTemplate[]) => TypeCatalog;
20
+ /** The app's types, `manual` first among the triggers, and its email templates, as `typeCatalog` lists them. */
14
21
  export type TypeCatalog = {
15
22
  step_types: CatalogEntry[];
16
23
  triggers: CatalogEntry[];
24
+ templates?: CatalogTemplate[];
17
25
  note: string;
18
26
  };
19
27
  //#endregion
@@ -15,11 +15,12 @@ const manual = {
15
15
  /**
16
16
  * What `list_workflow_types` answers and the editor reads: every step type a Task names as its `Resource` and every
17
17
  * trigger a definition's `trigger` holds as `{ "<id>": <input> }`, built-in and plugin types alike, each with its JSON
18
- * Schemas.
18
+ * Schemas, and the app's email templates, whose data `app:mail.template` takes.
19
19
  */
20
- const typeCatalog = (types) => ({
20
+ const typeCatalog = (types, templates = []) => ({
21
21
  step_types: types.filter((type) => type.kind === "step").map(entry),
22
22
  triggers: [manual, ...types.filter((type) => type.kind !== "step").map(entry)],
23
+ ...templates.length > 0 && { templates: [...templates] },
23
24
  note: "A definition holds its trigger as { \"<id>\": <input> }, such as { \"app:record\": { \"resource\": \"orders\" } }. A type with available false cannot be saved here; its reason says why. A trigger other than manual starts runs only while its workflow is enabled, on its enabled_version, as enable_workflow sets it, which a later save leaves as it is; run_workflow starts a run of any workflow, enabled or not, on the version saved last, so a manual workflow needs no enabled_version."
24
25
  });
25
26
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/workflows",
3
- "version": "0.101.0",
3
+ "version": "0.101.1",
4
4
  "description": "Workflows as state machines with JSONata expressions: their check, a runner that saves only what a run needs to go on and traces every step, and the plugin interface for trigger and step types.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {