@visualautomate/plugin-sdk 0.7.0 → 0.8.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.
@@ -13,4 +13,14 @@ export interface ManifestCheck {
13
13
  * Check `raw`, the parsed manifest.json. `hasCode` says whether an index.js
14
14
  * (or plugin.ts) sits beside it.
15
15
  */
16
+ /**
17
+ * Why a developer's step cannot use a connected account, and what to do instead.
18
+ *
19
+ * Only VisualAutomate's own apps act as somebody's mailbox, workspace or store.
20
+ * A step built with this SDK reaches an API at its own address, with a key the
21
+ * user enters in a `secret` property.
22
+ */
23
+ export declare const ACCOUNTS_ARE_OURS = "Only VisualAutomate's own apps act as a connected account: call the API at its own address instead (action.baseUrl, or fetch in code), with a key the user enters in a property of type \"secret\"";
24
+ /** Each way a manifest would use a connected account, in words. Empty when it uses none. */
25
+ export declare function accountUseIn(manifest: unknown): string[];
16
26
  export declare function checkManifest(raw: unknown, hasCode: boolean): ManifestCheck;
@@ -53,6 +53,10 @@ export interface SimulateOptions {
53
53
  * Give `connections` a fake that answers the requests your plugin makes,
54
54
  * and assert on what it was asked for — that is a better test of an
55
55
  * integration step than any simulation of a provider would be.
56
+ *
57
+ * @deprecated for `connections`: only VisualAutomate's own apps act as a
58
+ * connected account, so a step you build is never given one. Stub `fetch`
59
+ * through loadPluginCode instead.
56
60
  */
57
61
  connections?: PluginConnections;
58
62
  media?: PluginMedia;
package/dist/types.d.ts CHANGED
@@ -207,7 +207,14 @@ export interface PluginContext {
207
207
  state: PluginState;
208
208
  /** ffmpeg. Absent when the server has no sandbox or storage configured. */
209
209
  media?: PluginMedia;
210
- /** The accounts this step was configured with. Absent when it has none. */
210
+ /**
211
+ * The accounts this step was configured with. Absent when it has none.
212
+ *
213
+ * @deprecated Only VisualAutomate's own apps act as a connected account, so
214
+ * a step you build never has this: the platform refuses a step that names
215
+ * an account. Take the user's key in a property of type "secret" and send
216
+ * it to the API's own host with fetch.
217
+ */
211
218
  connections?: PluginConnections;
212
219
  }
213
220
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualautomate/plugin-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Types and a local runner for building VisualAutomate plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",