@protobase/workflows 0.83.1 → 0.84.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.
- package/dist/plugin/context.d.ts +16 -1
- package/dist/plugin/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/plugin/context.d.ts
CHANGED
|
@@ -56,17 +56,32 @@ export type StoredFile = {
|
|
|
56
56
|
* may not read fails as one that does not exist (`Storage.NotFound`).
|
|
57
57
|
*/
|
|
58
58
|
export type PluginStorage = {
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Streams `body` to `path` in the configuration, replacing what is there; it is whole or not there at all. A put that
|
|
61
|
+
* fails cancels `body`.
|
|
62
|
+
*/
|
|
60
63
|
put(configuration: string, path: string, body: ReadableStream<Uint8Array>, file: {
|
|
61
64
|
name: string;
|
|
62
65
|
type: string;
|
|
63
66
|
}): Promise<StoredFile>;
|
|
67
|
+
/**
|
|
68
|
+
* The configuration and `path` checked before there is a body, for a step that should not fetch one it cannot store:
|
|
69
|
+
* its `put` then streams a body there as `put` does.
|
|
70
|
+
*/
|
|
71
|
+
open(configuration: string, path: string): Promise<StorageTarget>;
|
|
64
72
|
/** The bytes of a stored file, as a stream; `field` names the argument in the error. Fails as `Storage.NotFound` when it is gone. */
|
|
65
73
|
read(file: unknown, field: string): Promise<{
|
|
66
74
|
file: StoredFile;
|
|
67
75
|
body: ReadableStream<Uint8Array>;
|
|
68
76
|
}>;
|
|
69
77
|
};
|
|
78
|
+
/** A place in a storage configuration, checked by `PluginStorage.open`. */
|
|
79
|
+
export type StorageTarget = {
|
|
80
|
+
put(body: ReadableStream<Uint8Array>, file: {
|
|
81
|
+
name: string;
|
|
82
|
+
type: string;
|
|
83
|
+
}): Promise<StoredFile>;
|
|
84
|
+
};
|
|
70
85
|
type Key = string | number | (string | number)[];
|
|
71
86
|
type Record_ = Record<string, unknown>;
|
|
72
87
|
/**
|
package/dist/plugin/index.d.ts
CHANGED
|
@@ -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, StoredFile } from "./context.js";
|
|
2
|
+
import { FileValue, JsonSchema, PluginConnection, PluginFetch, PluginFetchInit, PluginFiles, PluginMail, PluginMailMessage, PluginRecords, PluginServices, PluginStorage, 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";
|
|
@@ -7,4 +7,4 @@ import { AddressRefusedError, ResponseTooLargeError, fetchMaxBytes } from "./fet
|
|
|
7
7
|
import { isFileValue } from "./file-value.js";
|
|
8
8
|
import { isStoredFile } from "./stored-file.js";
|
|
9
9
|
import { webhookBodyCeiling, webhookBodyDefault, webhookInputCheck, webhookInputProperties } from "./webhook-input.js";
|
|
10
|
-
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 StoredFile, type TriggerContext, type TriggerItem, type TriggerType, type WebhookEvent, type WebhookItem, type WebhookTrigger, definePlugin, fetchMaxBytes, isFileValue, isStoredFile, pluginApi, webhookBodyCeiling, webhookBodyDefault, webhookInputCheck, webhookInputProperties };
|
|
10
|
+
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, webhookBodyCeiling, webhookBodyDefault, webhookInputCheck, webhookInputProperties };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.0",
|
|
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": {
|