@sanoma-ai/workflows 0.9.1 → 0.10.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.
- package/README.md +193 -50
- package/SECRET-SUPPORT.md +33 -0
- package/dist/apply-steps.js +5 -2
- package/dist/apply-steps.js.map +1 -1
- package/dist/apply.d.ts +3 -0
- package/dist/apply.js +27 -13
- package/dist/apply.js.map +1 -1
- package/dist/approvals.d.ts +1 -0
- package/dist/approvals.js +6 -1
- package/dist/approvals.js.map +1 -1
- package/dist/apps.d.ts +13 -24
- package/dist/apps.js +69 -68
- package/dist/apps.js.map +1 -1
- package/dist/ast.d.ts +9 -7
- package/dist/ast.js +2 -0
- package/dist/ast.js.map +1 -1
- package/dist/authentication.d.ts +54 -0
- package/dist/authentication.js +138 -0
- package/dist/authentication.js.map +1 -0
- package/dist/call-workflow.d.ts +5 -0
- package/dist/call-workflow.js +4 -3
- package/dist/call-workflow.js.map +1 -1
- package/dist/call.d.ts +3 -2
- package/dist/call.js +36 -7
- package/dist/call.js.map +1 -1
- package/dist/cedar.js +14 -1
- package/dist/cedar.js.map +1 -1
- package/dist/change-steps.js +7 -5
- package/dist/change-steps.js.map +1 -1
- package/dist/change.d.ts +7 -0
- package/dist/change.js +7 -0
- package/dist/change.js.map +1 -1
- package/dist/client.d.ts +62 -10
- package/dist/client.js +272 -47
- package/dist/client.js.map +1 -1
- package/dist/collection.d.ts +7 -0
- package/dist/collection.js +5 -2
- package/dist/collection.js.map +1 -1
- package/dist/config.d.ts +16 -4
- package/dist/config.js +89 -21
- package/dist/config.js.map +1 -1
- package/dist/connection.d.ts +389 -0
- package/dist/connection.js +657 -0
- package/dist/connection.js.map +1 -0
- package/dist/credentials.d.ts +7 -53
- package/dist/credentials.js +84 -247
- package/dist/credentials.js.map +1 -1
- package/dist/db.js +34 -2
- package/dist/db.js.map +1 -1
- package/dist/define.d.ts +9 -2
- package/dist/define.js.map +1 -1
- package/dist/definitions.d.ts +20 -0
- package/dist/definitions.js +16 -0
- package/dist/definitions.js.map +1 -0
- package/dist/deployment-key.d.ts +2 -0
- package/dist/deployment-key.js +22 -0
- package/dist/deployment-key.js.map +1 -0
- package/dist/describe.d.ts +15 -175
- package/dist/describe.js +122 -35
- package/dist/describe.js.map +1 -1
- package/dist/description.d.ts +532 -0
- package/dist/description.js +381 -0
- package/dist/description.js.map +1 -0
- package/dist/direct.js +7 -0
- package/dist/direct.js.map +1 -1
- package/dist/drift.d.ts +1 -1
- package/dist/drift.js +1 -1
- package/dist/drift.js.map +1 -1
- package/dist/env.d.ts +2 -0
- package/dist/env.js +2 -2
- package/dist/env.js.map +1 -1
- package/dist/fake.d.ts +13 -1
- package/dist/fake.js +70 -0
- package/dist/fake.js.map +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/ledger.d.ts +2 -0
- package/dist/ledger.js +1 -1
- package/dist/ledger.js.map +1 -1
- package/dist/lint.d.ts +0 -9
- package/dist/lint.js +2 -17
- package/dist/lint.js.map +1 -1
- package/dist/load.d.ts +85 -0
- package/dist/load.js +391 -0
- package/dist/load.js.map +1 -0
- package/dist/lockfile.d.ts +2 -0
- package/dist/lockfile.js +8 -3
- package/dist/lockfile.js.map +1 -1
- package/dist/op.d.ts +22 -5
- package/dist/op.js +20 -2
- package/dist/op.js.map +1 -1
- package/dist/outline.d.ts +5 -0
- package/dist/outline.js +46 -5
- package/dist/outline.js.map +1 -1
- package/dist/paths.d.ts +18 -2
- package/dist/paths.js +19 -7
- package/dist/paths.js.map +1 -1
- package/dist/plugin.d.ts +0 -11
- package/dist/plugin.js +3 -18
- package/dist/plugin.js.map +1 -1
- package/dist/policy.d.ts +2 -0
- package/dist/policy.js.map +1 -1
- package/dist/resource.d.ts +10 -4
- package/dist/resource.js +11 -4
- package/dist/resource.js.map +1 -1
- package/dist/resources.d.ts +33 -76
- package/dist/resources.js +219 -227
- package/dist/resources.js.map +1 -1
- package/dist/run.d.ts +4 -0
- package/dist/run.js.map +1 -1
- package/dist/sandbox.d.ts +5 -2
- package/dist/sandbox.js +56 -7
- package/dist/sandbox.js.map +1 -1
- package/dist/scenario.d.ts +5 -0
- package/dist/scenario.js +3 -2
- package/dist/scenario.js.map +1 -1
- package/dist/scenarios.js +7 -1
- package/dist/scenarios.js.map +1 -1
- package/dist/schema.js +8 -0
- package/dist/schema.js.map +1 -1
- package/dist/secret-store-check.d.ts +11 -0
- package/dist/secret-store-check.js +76 -0
- package/dist/secret-store-check.js.map +1 -0
- package/dist/secret-store.d.ts +106 -0
- package/dist/secret-store.js +228 -0
- package/dist/secret-store.js.map +1 -0
- package/dist/secret.d.ts +2 -0
- package/dist/secret.js +32 -0
- package/dist/secret.js.map +1 -1
- package/dist/shared.d.ts +21 -11
- package/dist/shared.js +41 -7
- package/dist/shared.js.map +1 -1
- package/dist/sites.d.ts +4 -93
- package/dist/sites.js +76 -84
- package/dist/sites.js.map +1 -1
- package/dist/steps.d.ts +3 -0
- package/dist/steps.js.map +1 -1
- package/dist/version.d.ts +2 -1
- package/dist/version.js +2 -1
- package/dist/version.js.map +1 -1
- package/dist/wakeup-driver.js +15 -6
- package/dist/wakeup-driver.js.map +1 -1
- package/dist/worker.js +12 -8
- package/dist/worker.js.map +1 -1
- package/dist/writer.d.ts +53 -14
- package/dist/writer.js +113 -43
- package/dist/writer.js.map +1 -1
- package/oxlint.json +1 -5
- package/package.json +6 -1
- package/src/apply-steps.ts +5 -2
- package/src/apply.ts +54 -21
- package/src/approvals.ts +7 -1
- package/src/apps.ts +71 -86
- package/src/ast.ts +6 -6
- package/src/authentication.ts +191 -0
- package/src/call-workflow.ts +5 -4
- package/src/call.ts +52 -9
- package/src/cedar.ts +14 -1
- package/src/change-steps.ts +7 -4
- package/src/change.ts +10 -0
- package/src/client.ts +346 -45
- package/src/collection.ts +10 -2
- package/src/config.ts +107 -19
- package/src/connection.ts +912 -0
- package/src/credentials.ts +94 -281
- package/src/db.ts +34 -2
- package/src/define.ts +7 -2
- package/src/definitions.ts +31 -0
- package/src/deployment-key.ts +23 -0
- package/src/describe.ts +150 -227
- package/src/description.ts +426 -0
- package/src/direct.ts +7 -0
- package/src/drift.ts +10 -2
- package/src/env.ts +4 -2
- package/src/fake.ts +71 -0
- package/src/index.ts +53 -1
- package/src/ledger.ts +3 -1
- package/src/lint.ts +2 -17
- package/src/load.ts +466 -0
- package/src/lockfile.ts +10 -3
- package/src/op.ts +41 -7
- package/src/outline.ts +53 -7
- package/src/paths.ts +21 -6
- package/src/plugin.ts +3 -24
- package/src/policy.ts +2 -0
- package/src/resource.ts +24 -6
- package/src/resources.ts +246 -301
- package/src/run.ts +4 -0
- package/src/sandbox.ts +61 -7
- package/src/scenario.ts +24 -6
- package/src/scenarios.ts +7 -1
- package/src/schema.ts +10 -0
- package/src/secret-store-check.ts +93 -0
- package/src/secret-store.ts +314 -0
- package/src/secret.ts +29 -0
- package/src/shared.ts +44 -10
- package/src/sites.ts +85 -179
- package/src/steps.ts +3 -2
- package/src/version.ts +2 -1
- package/src/wakeup-driver.ts +22 -6
- package/src/worker.ts +12 -8
- package/src/writer.ts +145 -56
- package/dist/datafile.d.ts +0 -97
- package/dist/datafile.js +0 -479
- package/dist/datafile.js.map +0 -1
- package/src/datafile.ts +0 -601
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Outline } from "./outline.ts";
|
|
3
|
+
import type { ResourceFields } from "./resource.ts";
|
|
4
|
+
/** Where a declaration is: its file, relative to the root with `/`, and the export that holds it (`default` for a default export). */
|
|
5
|
+
export declare const AtSchema: z.ZodObject<{
|
|
6
|
+
file: z.ZodString;
|
|
7
|
+
export: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type At = z.infer<typeof AtSchema>;
|
|
10
|
+
/** Something wrong in a file, at a line and column from 1 (UTF-16 code units). */
|
|
11
|
+
export declare const LintProblemSchema: z.ZodObject<{
|
|
12
|
+
line: z.ZodNumber;
|
|
13
|
+
column: z.ZodNumber;
|
|
14
|
+
message: z.ZodString;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export type LintProblem = z.infer<typeof LintProblemSchema>;
|
|
17
|
+
/**
|
|
18
|
+
* Something wrong in a company's files (a data file, an app's `app.ts`, a site's `site.ts`), or in
|
|
19
|
+
* finding them: at a place in the file when an error's stack gives one, else at an export.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ResourceProblemSchema: z.ZodObject<{
|
|
22
|
+
file: z.ZodOptional<z.ZodString>;
|
|
23
|
+
export: z.ZodOptional<z.ZodString>;
|
|
24
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
message: z.ZodString;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
export type ResourceProblem = z.infer<typeof ResourceProblemSchema>;
|
|
29
|
+
/** A resource a data file declares, as loading the file made it. */
|
|
30
|
+
export declare const DeclaredResourceSchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
file: z.ZodString;
|
|
33
|
+
vendor: z.ZodString;
|
|
34
|
+
type: z.ZodString;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
37
|
+
binding: z.ZodOptional<z.ZodString>;
|
|
38
|
+
at: z.ZodObject<{
|
|
39
|
+
file: z.ZodString;
|
|
40
|
+
export: z.ZodString;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
desired: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
43
|
+
connection: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
$connection: z.ZodString;
|
|
45
|
+
vendor: z.ZodString;
|
|
46
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
refs: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
export type DeclaredResource = z.infer<typeof DeclaredResourceSchema>;
|
|
51
|
+
/**
|
|
52
|
+
* A collection `resources/data.ts` declares: where it is, for its declaration on Hosting. Its fields are
|
|
53
|
+
* the collection's own (`describeConfig`'s `collections`), from the same file, which the runtime
|
|
54
|
+
* imports.
|
|
55
|
+
*/
|
|
56
|
+
export declare const DeclaredCollectionSchema: z.ZodObject<{
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
file: z.ZodString;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
at: z.ZodObject<{
|
|
61
|
+
file: z.ZodString;
|
|
62
|
+
export: z.ZodString;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
export type DeclaredCollection = z.infer<typeof DeclaredCollectionSchema>;
|
|
66
|
+
/** An app: a folder of `apps/`, and what its `app.ts` declares. */
|
|
67
|
+
export declare const AppEntrySchema: z.ZodObject<{
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
dir: z.ZodString;
|
|
70
|
+
source: z.ZodOptional<z.ZodString>;
|
|
71
|
+
at: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
file: z.ZodString;
|
|
73
|
+
export: z.ZodString;
|
|
74
|
+
}, z.core.$strict>>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export type AppEntry = z.infer<typeof AppEntrySchema>;
|
|
77
|
+
/** A call a site's code makes: `<RunForm workflow="…" />`, or a use of `api`. */
|
|
78
|
+
export declare const SiteCallSchema: z.ZodObject<{
|
|
79
|
+
kind: z.ZodEnum<{
|
|
80
|
+
collection: "collection";
|
|
81
|
+
op: "op";
|
|
82
|
+
workflow: "workflow";
|
|
83
|
+
}>;
|
|
84
|
+
target: z.ZodString;
|
|
85
|
+
method: z.ZodOptional<z.ZodString>;
|
|
86
|
+
via: z.ZodEnum<{
|
|
87
|
+
RunForm: "RunForm";
|
|
88
|
+
api: "api";
|
|
89
|
+
}>;
|
|
90
|
+
file: z.ZodString;
|
|
91
|
+
line: z.ZodNumber;
|
|
92
|
+
column: z.ZodNumber;
|
|
93
|
+
page: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
export type SiteCall = z.infer<typeof SiteCallSchema>;
|
|
96
|
+
/** A page of a site: a route file's path, and for a page per content entry the kind it reads. */
|
|
97
|
+
export declare const SitePageSchema: z.ZodObject<{
|
|
98
|
+
path: z.ZodString;
|
|
99
|
+
content: z.ZodOptional<z.ZodString>;
|
|
100
|
+
sitemap: z.ZodOptional<z.ZodLiteral<false>>;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
export type SitePage = z.infer<typeof SitePageSchema>;
|
|
103
|
+
/** A site, `sites/<name>/` or an app's `apps/<app>/sites/<name>/`, and what it calls. */
|
|
104
|
+
export declare const SiteEntrySchema: z.ZodObject<{
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
app: z.ZodOptional<z.ZodString>;
|
|
107
|
+
at: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
file: z.ZodString;
|
|
109
|
+
export: z.ZodString;
|
|
110
|
+
}, z.core.$strict>>;
|
|
111
|
+
title: z.ZodOptional<z.ZodString>;
|
|
112
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
113
|
+
public: z.ZodOptional<z.ZodLiteral<true>>;
|
|
114
|
+
login: z.ZodOptional<z.ZodString>;
|
|
115
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
116
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
117
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
118
|
+
path: z.ZodString;
|
|
119
|
+
content: z.ZodOptional<z.ZodString>;
|
|
120
|
+
sitemap: z.ZodOptional<z.ZodLiteral<false>>;
|
|
121
|
+
}, z.core.$strict>>;
|
|
122
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
123
|
+
kind: z.ZodEnum<{
|
|
124
|
+
collection: "collection";
|
|
125
|
+
op: "op";
|
|
126
|
+
workflow: "workflow";
|
|
127
|
+
}>;
|
|
128
|
+
target: z.ZodString;
|
|
129
|
+
method: z.ZodOptional<z.ZodString>;
|
|
130
|
+
via: z.ZodEnum<{
|
|
131
|
+
RunForm: "RunForm";
|
|
132
|
+
api: "api";
|
|
133
|
+
}>;
|
|
134
|
+
file: z.ZodString;
|
|
135
|
+
line: z.ZodNumber;
|
|
136
|
+
column: z.ZodNumber;
|
|
137
|
+
page: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, z.core.$strict>>;
|
|
139
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
140
|
+
export: z.ZodOptional<z.ZodString>;
|
|
141
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
message: z.ZodString;
|
|
144
|
+
file: z.ZodString;
|
|
145
|
+
}, z.core.$strict>>;
|
|
146
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
147
|
+
line: z.ZodNumber;
|
|
148
|
+
column: z.ZodNumber;
|
|
149
|
+
message: z.ZodString;
|
|
150
|
+
file: z.ZodString;
|
|
151
|
+
}, z.core.$strict>>;
|
|
152
|
+
}, z.core.$strict>;
|
|
153
|
+
export type SiteEntry = z.infer<typeof SiteEntrySchema>;
|
|
154
|
+
/** What a workflow is, read from its definition: enough to draw a start form and show what it may call. */
|
|
155
|
+
export declare const WorkflowEntrySchema: z.ZodObject<{
|
|
156
|
+
name: z.ZodString;
|
|
157
|
+
app: z.ZodOptional<z.ZodString>;
|
|
158
|
+
title: z.ZodOptional<z.ZodString>;
|
|
159
|
+
trigger: z.ZodUnion<readonly [z.ZodLiteral<"manual">, z.ZodObject<{
|
|
160
|
+
schedule: z.ZodString;
|
|
161
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strict>]>;
|
|
163
|
+
builtin: z.ZodOptional<z.ZodLiteral<true>>;
|
|
164
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
165
|
+
ops: z.ZodArray<z.ZodString>;
|
|
166
|
+
builtins: z.ZodArray<z.ZodEnum<{
|
|
167
|
+
all: "all";
|
|
168
|
+
approval: "approval";
|
|
169
|
+
sleep: "sleep";
|
|
170
|
+
}>>;
|
|
171
|
+
file: z.ZodString;
|
|
172
|
+
outline: z.ZodCustom<Outline, Outline>;
|
|
173
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
174
|
+
line: z.ZodNumber;
|
|
175
|
+
column: z.ZodNumber;
|
|
176
|
+
message: z.ZodString;
|
|
177
|
+
}, z.core.$strict>>;
|
|
178
|
+
source: z.ZodOptional<z.ZodString>;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
export type WorkflowEntry = z.infer<typeof WorkflowEntrySchema>;
|
|
181
|
+
/** What an operation is, read from its connector: enough to badge it and show its contract. */
|
|
182
|
+
export declare const OpEntrySchema: z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
vendor: z.ZodString;
|
|
185
|
+
resource: z.ZodString;
|
|
186
|
+
name: z.ZodString;
|
|
187
|
+
effect: z.ZodEnum<{
|
|
188
|
+
access: "access";
|
|
189
|
+
money: "money";
|
|
190
|
+
publish: "publish";
|
|
191
|
+
read: "read";
|
|
192
|
+
send: "send";
|
|
193
|
+
write: "write";
|
|
194
|
+
}>;
|
|
195
|
+
idempotent: z.ZodBoolean;
|
|
196
|
+
description: z.ZodOptional<z.ZodString>;
|
|
197
|
+
phrases: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
given: z.ZodOptional<z.ZodString>;
|
|
199
|
+
expect: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$strict>>;
|
|
201
|
+
direct: z.ZodBoolean;
|
|
202
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
203
|
+
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
export type OpEntry = z.infer<typeof OpEntrySchema>;
|
|
206
|
+
/** Who a vendor is, from its connector's `VendorInfo`: enough to name it, show its logo and link to its connector. */
|
|
207
|
+
export declare const VendorEntrySchema: z.ZodObject<{
|
|
208
|
+
title: z.ZodString;
|
|
209
|
+
logo: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
src: z.ZodString;
|
|
211
|
+
dark: z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, z.core.$strict>>;
|
|
213
|
+
package: z.ZodOptional<z.ZodString>;
|
|
214
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
215
|
+
fake: z.ZodBoolean;
|
|
216
|
+
credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
description: z.ZodOptional<z.ZodString>;
|
|
219
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
220
|
+
}, z.core.$strict>>>;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
export type VendorEntry = z.infer<typeof VendorEntrySchema>;
|
|
223
|
+
/**
|
|
224
|
+
* The contracts a resource type meets, from its spec: `host`, `database` and `wakeup` (`Host`,
|
|
225
|
+
* `Database`, `Wakeup`), and `source` for a type a host's `source` names (the repository it clones).
|
|
226
|
+
*/
|
|
227
|
+
export declare const CAPABILITIES: readonly ["host", "database", "wakeup", "source"];
|
|
228
|
+
/** A resource type a connector declares with `defineResource`. */
|
|
229
|
+
export declare const ResourceTypeEntrySchema: z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
vendor: z.ZodString;
|
|
232
|
+
type: z.ZodString;
|
|
233
|
+
title: z.ZodString;
|
|
234
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
235
|
+
fields: z.ZodCustom<ResourceFields, ResourceFields>;
|
|
236
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
237
|
+
ops: z.ZodArray<z.ZodString>;
|
|
238
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
239
|
+
database: "database";
|
|
240
|
+
host: "host";
|
|
241
|
+
source: "source";
|
|
242
|
+
wakeup: "wakeup";
|
|
243
|
+
}>>>;
|
|
244
|
+
}, z.core.$strict>;
|
|
245
|
+
export type ResourceTypeEntry = z.infer<typeof ResourceTypeEntrySchema>;
|
|
246
|
+
/** A collection the config declares (`collection()`). */
|
|
247
|
+
export declare const CollectionEntrySchema: z.ZodObject<{
|
|
248
|
+
name: z.ZodString;
|
|
249
|
+
app: z.ZodOptional<z.ZodString>;
|
|
250
|
+
title: z.ZodOptional<z.ZodString>;
|
|
251
|
+
key: z.ZodString;
|
|
252
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
|
253
|
+
boolean: "boolean";
|
|
254
|
+
date: "date";
|
|
255
|
+
number: "number";
|
|
256
|
+
person: "person";
|
|
257
|
+
text: "text";
|
|
258
|
+
}>, z.ZodObject<{
|
|
259
|
+
type: z.ZodEnum<{
|
|
260
|
+
boolean: "boolean";
|
|
261
|
+
date: "date";
|
|
262
|
+
number: "number";
|
|
263
|
+
person: "person";
|
|
264
|
+
text: "text";
|
|
265
|
+
}>;
|
|
266
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
267
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
+
enum: z.ZodReadonly<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
269
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
270
|
+
}, z.core.$strict>]>>;
|
|
271
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
272
|
+
ops: z.ZodArray<z.ZodString>;
|
|
273
|
+
declared: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
id: z.ZodString;
|
|
275
|
+
file: z.ZodString;
|
|
276
|
+
name: z.ZodString;
|
|
277
|
+
at: z.ZodObject<{
|
|
278
|
+
file: z.ZodString;
|
|
279
|
+
export: z.ZodString;
|
|
280
|
+
}, z.core.$strict>;
|
|
281
|
+
}, z.core.$strict>>;
|
|
282
|
+
}, z.core.$strict>;
|
|
283
|
+
export type CollectionEntry = z.infer<typeof CollectionEntrySchema>;
|
|
284
|
+
/**
|
|
285
|
+
* A plain-JSON description of what a config can do: its workflows, the operations they call,
|
|
286
|
+
* and whether a policy gates them. The app server builds it from the config and sends it to the
|
|
287
|
+
* browser, so the UI shows exactly what the worker enforces. Never written by hand.
|
|
288
|
+
*/
|
|
289
|
+
export declare const ConfigDescriptionSchema: z.ZodObject<{
|
|
290
|
+
secrets: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
store: z.ZodString;
|
|
292
|
+
namespace: z.ZodString;
|
|
293
|
+
bindings: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
294
|
+
path: z.ZodString;
|
|
295
|
+
management: z.ZodEnum<{
|
|
296
|
+
external: "external";
|
|
297
|
+
sanoma: "sanoma";
|
|
298
|
+
}>;
|
|
299
|
+
store: z.ZodString;
|
|
300
|
+
}, z.core.$strict>>;
|
|
301
|
+
}, z.core.$strict>>;
|
|
302
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
vendor: z.ZodString;
|
|
305
|
+
method: z.ZodString;
|
|
306
|
+
scopes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
307
|
+
account: z.ZodOptional<z.ZodString>;
|
|
308
|
+
default: z.ZodBoolean;
|
|
309
|
+
}, z.core.$strict>>>;
|
|
310
|
+
appName: z.ZodString;
|
|
311
|
+
version: z.ZodString;
|
|
312
|
+
workflows: z.ZodArray<z.ZodObject<{
|
|
313
|
+
name: z.ZodString;
|
|
314
|
+
app: z.ZodOptional<z.ZodString>;
|
|
315
|
+
title: z.ZodOptional<z.ZodString>;
|
|
316
|
+
trigger: z.ZodUnion<readonly [z.ZodLiteral<"manual">, z.ZodObject<{
|
|
317
|
+
schedule: z.ZodString;
|
|
318
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
319
|
+
}, z.core.$strict>]>;
|
|
320
|
+
builtin: z.ZodOptional<z.ZodLiteral<true>>;
|
|
321
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
322
|
+
ops: z.ZodArray<z.ZodString>;
|
|
323
|
+
builtins: z.ZodArray<z.ZodEnum<{
|
|
324
|
+
all: "all";
|
|
325
|
+
approval: "approval";
|
|
326
|
+
sleep: "sleep";
|
|
327
|
+
}>>;
|
|
328
|
+
file: z.ZodString;
|
|
329
|
+
outline: z.ZodCustom<Outline, Outline>;
|
|
330
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
331
|
+
line: z.ZodNumber;
|
|
332
|
+
column: z.ZodNumber;
|
|
333
|
+
message: z.ZodString;
|
|
334
|
+
}, z.core.$strict>>;
|
|
335
|
+
source: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strict>>;
|
|
337
|
+
ops: z.ZodArray<z.ZodObject<{
|
|
338
|
+
id: z.ZodString;
|
|
339
|
+
vendor: z.ZodString;
|
|
340
|
+
resource: z.ZodString;
|
|
341
|
+
name: z.ZodString;
|
|
342
|
+
effect: z.ZodEnum<{
|
|
343
|
+
access: "access";
|
|
344
|
+
money: "money";
|
|
345
|
+
publish: "publish";
|
|
346
|
+
read: "read";
|
|
347
|
+
send: "send";
|
|
348
|
+
write: "write";
|
|
349
|
+
}>;
|
|
350
|
+
idempotent: z.ZodBoolean;
|
|
351
|
+
description: z.ZodOptional<z.ZodString>;
|
|
352
|
+
phrases: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
given: z.ZodOptional<z.ZodString>;
|
|
354
|
+
expect: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strict>>;
|
|
356
|
+
direct: z.ZodBoolean;
|
|
357
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
358
|
+
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
359
|
+
}, z.core.$strict>>;
|
|
360
|
+
vendors: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
361
|
+
title: z.ZodString;
|
|
362
|
+
logo: z.ZodOptional<z.ZodObject<{
|
|
363
|
+
src: z.ZodString;
|
|
364
|
+
dark: z.ZodOptional<z.ZodString>;
|
|
365
|
+
}, z.core.$strict>>;
|
|
366
|
+
package: z.ZodOptional<z.ZodString>;
|
|
367
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
368
|
+
fake: z.ZodBoolean;
|
|
369
|
+
credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
370
|
+
name: z.ZodString;
|
|
371
|
+
description: z.ZodOptional<z.ZodString>;
|
|
372
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
373
|
+
}, z.core.$strict>>>;
|
|
374
|
+
}, z.core.$strict>>;
|
|
375
|
+
resourceTypes: z.ZodArray<z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
vendor: z.ZodString;
|
|
378
|
+
type: z.ZodString;
|
|
379
|
+
title: z.ZodString;
|
|
380
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
381
|
+
fields: z.ZodCustom<ResourceFields, ResourceFields>;
|
|
382
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
383
|
+
ops: z.ZodArray<z.ZodString>;
|
|
384
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
385
|
+
database: "database";
|
|
386
|
+
host: "host";
|
|
387
|
+
source: "source";
|
|
388
|
+
wakeup: "wakeup";
|
|
389
|
+
}>>>;
|
|
390
|
+
}, z.core.$strict>>;
|
|
391
|
+
collections: z.ZodArray<z.ZodObject<{
|
|
392
|
+
name: z.ZodString;
|
|
393
|
+
app: z.ZodOptional<z.ZodString>;
|
|
394
|
+
title: z.ZodOptional<z.ZodString>;
|
|
395
|
+
key: z.ZodString;
|
|
396
|
+
fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
|
397
|
+
boolean: "boolean";
|
|
398
|
+
date: "date";
|
|
399
|
+
number: "number";
|
|
400
|
+
person: "person";
|
|
401
|
+
text: "text";
|
|
402
|
+
}>, z.ZodObject<{
|
|
403
|
+
type: z.ZodEnum<{
|
|
404
|
+
boolean: "boolean";
|
|
405
|
+
date: "date";
|
|
406
|
+
number: "number";
|
|
407
|
+
person: "person";
|
|
408
|
+
text: "text";
|
|
409
|
+
}>;
|
|
410
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
411
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
412
|
+
enum: z.ZodReadonly<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
413
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
414
|
+
}, z.core.$strict>]>>;
|
|
415
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
416
|
+
ops: z.ZodArray<z.ZodString>;
|
|
417
|
+
declared: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
id: z.ZodString;
|
|
419
|
+
file: z.ZodString;
|
|
420
|
+
name: z.ZodString;
|
|
421
|
+
at: z.ZodObject<{
|
|
422
|
+
file: z.ZodString;
|
|
423
|
+
export: z.ZodString;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
}, z.core.$strict>>;
|
|
426
|
+
}, z.core.$strict>>;
|
|
427
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
428
|
+
id: z.ZodString;
|
|
429
|
+
file: z.ZodString;
|
|
430
|
+
vendor: z.ZodString;
|
|
431
|
+
type: z.ZodString;
|
|
432
|
+
name: z.ZodString;
|
|
433
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
434
|
+
binding: z.ZodOptional<z.ZodString>;
|
|
435
|
+
at: z.ZodObject<{
|
|
436
|
+
file: z.ZodString;
|
|
437
|
+
export: z.ZodString;
|
|
438
|
+
}, z.core.$strict>;
|
|
439
|
+
desired: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
440
|
+
connection: z.ZodOptional<z.ZodObject<{
|
|
441
|
+
$connection: z.ZodString;
|
|
442
|
+
vendor: z.ZodString;
|
|
443
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
444
|
+
}, z.core.$strict>>;
|
|
445
|
+
refs: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
446
|
+
}, z.core.$strict>>;
|
|
447
|
+
orphans: z.ZodArray<z.ZodObject<{
|
|
448
|
+
key: z.ZodString;
|
|
449
|
+
type: z.ZodString;
|
|
450
|
+
id: z.ZodString;
|
|
451
|
+
connection: z.ZodOptional<z.ZodObject<{
|
|
452
|
+
$connection: z.ZodString;
|
|
453
|
+
vendor: z.ZodString;
|
|
454
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, z.core.$strict>>;
|
|
456
|
+
}, z.core.$strict>>;
|
|
457
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
458
|
+
file: z.ZodOptional<z.ZodString>;
|
|
459
|
+
export: z.ZodOptional<z.ZodString>;
|
|
460
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
461
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
462
|
+
message: z.ZodString;
|
|
463
|
+
}, z.core.$strict>>;
|
|
464
|
+
apps: z.ZodArray<z.ZodObject<{
|
|
465
|
+
name: z.ZodString;
|
|
466
|
+
dir: z.ZodString;
|
|
467
|
+
source: z.ZodOptional<z.ZodString>;
|
|
468
|
+
at: z.ZodOptional<z.ZodObject<{
|
|
469
|
+
file: z.ZodString;
|
|
470
|
+
export: z.ZodString;
|
|
471
|
+
}, z.core.$strict>>;
|
|
472
|
+
}, z.core.$strict>>;
|
|
473
|
+
policy: z.ZodObject<{
|
|
474
|
+
defined: z.ZodBoolean;
|
|
475
|
+
version: z.ZodOptional<z.ZodString>;
|
|
476
|
+
problems: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
477
|
+
files: z.ZodArray<z.ZodObject<{
|
|
478
|
+
file: z.ZodString;
|
|
479
|
+
text: z.ZodString;
|
|
480
|
+
}, z.core.$strict>>;
|
|
481
|
+
}, z.core.$strict>;
|
|
482
|
+
sites: z.ZodArray<z.ZodObject<{
|
|
483
|
+
name: z.ZodString;
|
|
484
|
+
app: z.ZodOptional<z.ZodString>;
|
|
485
|
+
at: z.ZodOptional<z.ZodObject<{
|
|
486
|
+
file: z.ZodString;
|
|
487
|
+
export: z.ZodString;
|
|
488
|
+
}, z.core.$strict>>;
|
|
489
|
+
title: z.ZodOptional<z.ZodString>;
|
|
490
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
491
|
+
public: z.ZodOptional<z.ZodLiteral<true>>;
|
|
492
|
+
login: z.ZodOptional<z.ZodString>;
|
|
493
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
494
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
495
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
496
|
+
path: z.ZodString;
|
|
497
|
+
content: z.ZodOptional<z.ZodString>;
|
|
498
|
+
sitemap: z.ZodOptional<z.ZodLiteral<false>>;
|
|
499
|
+
}, z.core.$strict>>;
|
|
500
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
501
|
+
kind: z.ZodEnum<{
|
|
502
|
+
collection: "collection";
|
|
503
|
+
op: "op";
|
|
504
|
+
workflow: "workflow";
|
|
505
|
+
}>;
|
|
506
|
+
target: z.ZodString;
|
|
507
|
+
method: z.ZodOptional<z.ZodString>;
|
|
508
|
+
via: z.ZodEnum<{
|
|
509
|
+
RunForm: "RunForm";
|
|
510
|
+
api: "api";
|
|
511
|
+
}>;
|
|
512
|
+
file: z.ZodString;
|
|
513
|
+
line: z.ZodNumber;
|
|
514
|
+
column: z.ZodNumber;
|
|
515
|
+
page: z.ZodOptional<z.ZodString>;
|
|
516
|
+
}, z.core.$strict>>;
|
|
517
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
518
|
+
export: z.ZodOptional<z.ZodString>;
|
|
519
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
520
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
521
|
+
message: z.ZodString;
|
|
522
|
+
file: z.ZodString;
|
|
523
|
+
}, z.core.$strict>>;
|
|
524
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
525
|
+
line: z.ZodNumber;
|
|
526
|
+
column: z.ZodNumber;
|
|
527
|
+
message: z.ZodString;
|
|
528
|
+
file: z.ZodString;
|
|
529
|
+
}, z.core.$strict>>;
|
|
530
|
+
}, z.core.$strict>>;
|
|
531
|
+
}, z.core.$strict>;
|
|
532
|
+
export type ConfigDescription = z.infer<typeof ConfigDescriptionSchema>;
|