@webstudio-is/protocol 0.274.4 → 0.275.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/README.md +22 -0
- package/lib/fixtures.js +14958 -4359
- package/lib/index.js +52051 -5929
- package/lib/schema.js +16212 -0
- package/lib/types/builder-api/__generated__/server-only-router-operation-metadata.d.ts +364 -0
- package/lib/types/builder-api/errors.d.ts +1 -1
- package/lib/types/builder-api/local-operation-inputs.d.ts +18 -0
- package/lib/types/builder-api/operation-docs.d.ts +1 -1
- package/lib/types/builder-api/operations.d.ts +14 -482
- package/lib/types/builder-api/runtime-contracts.d.ts +14 -1
- package/lib/types/schema.d.ts +7742 -9592
- package/package.json +15 -6
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { publicApiOperationDocumentation } from "./operation-docs";
|
|
2
|
+
import { type InputJsonSchema, type PublicApiOperationNamespace, type PublicApiOperationPermit, type PublicRuntimeOperationId } from "./runtime-contracts";
|
|
3
|
+
export type { PublicApiOperationNamespace, PublicApiOperationPermit, } from "./runtime-contracts";
|
|
3
4
|
export type PublicApiOperationMethod = "query" | "mutation";
|
|
4
|
-
export type
|
|
5
|
-
type PublicApiOperationInput = {
|
|
6
|
-
command:
|
|
5
|
+
export type PublicApiCommand = (typeof publicApiOperationDocumentation)[number]["command"];
|
|
6
|
+
type PublicApiOperationInput<Command extends string = string> = {
|
|
7
|
+
command: Command;
|
|
7
8
|
id: string;
|
|
8
9
|
method: PublicApiOperationMethod;
|
|
9
10
|
path?: string;
|
|
10
11
|
client: string;
|
|
11
12
|
permit?: PublicApiOperationPermit;
|
|
12
13
|
invalidatesNamespaces?: readonly PublicApiOperationNamespace[];
|
|
14
|
+
inputSchema?: InputJsonSchema;
|
|
13
15
|
};
|
|
14
16
|
export type PublicApiOperation<Command extends string = string> = Omit<PublicApiOperationInput, "command" | "permit"> & {
|
|
15
17
|
command: Command;
|
|
16
18
|
permit: PublicApiOperationPermit;
|
|
17
19
|
description: string;
|
|
18
20
|
inputFields: readonly string[];
|
|
21
|
+
requiredInputFields: readonly string[];
|
|
22
|
+
inputFieldTypes: Partial<Record<string, "array">>;
|
|
23
|
+
inputSchema: InputJsonSchema;
|
|
19
24
|
requiredOptions?: readonly string[];
|
|
20
25
|
examples: readonly string[];
|
|
21
26
|
localCapable: boolean;
|
|
@@ -25,482 +30,9 @@ export type PublicApiOperation<Command extends string = string> = Omit<PublicApi
|
|
|
25
30
|
writeNamespaces: readonly PublicApiOperationNamespace[];
|
|
26
31
|
invalidatesNamespaces: readonly PublicApiOperationNamespace[];
|
|
27
32
|
retryOnConflict: boolean;
|
|
33
|
+
requiresAssets: boolean;
|
|
34
|
+
requiresConfirm: boolean;
|
|
28
35
|
};
|
|
29
|
-
declare const
|
|
30
|
-
|
|
31
|
-
readonly id: "auth.me";
|
|
32
|
-
readonly method: "query";
|
|
33
|
-
readonly path: "api.auth.me";
|
|
34
|
-
readonly client: "getApiTokenInfo";
|
|
35
|
-
readonly permit: "view";
|
|
36
|
-
}, {
|
|
37
|
-
readonly command: "permissions";
|
|
38
|
-
readonly id: "projects.permissions";
|
|
39
|
-
readonly method: "query";
|
|
40
|
-
readonly path: "api.projects.permissions";
|
|
41
|
-
readonly client: "getProjectPermissions";
|
|
42
|
-
}, {
|
|
43
|
-
readonly command: "inspect";
|
|
44
|
-
readonly id: "projects.get";
|
|
45
|
-
readonly method: "query";
|
|
46
|
-
readonly path: "api.projects.get";
|
|
47
|
-
readonly client: "getProjectInfo";
|
|
48
|
-
}, {
|
|
49
|
-
readonly command: "snapshot";
|
|
50
|
-
readonly id: "build.get";
|
|
51
|
-
readonly method: "query";
|
|
52
|
-
readonly path: "api.build.get";
|
|
53
|
-
readonly client: "getBuildSnapshot";
|
|
54
|
-
}, {
|
|
55
|
-
readonly command: "apply-patch";
|
|
56
|
-
readonly id: "build.patch";
|
|
57
|
-
readonly method: "mutation";
|
|
58
|
-
readonly path: "api.build.patch";
|
|
59
|
-
readonly client: "applyBuildPatch";
|
|
60
|
-
readonly invalidatesNamespaces: readonly ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "marketplaceProduct"];
|
|
61
|
-
}, {
|
|
62
|
-
readonly command: "list-pages";
|
|
63
|
-
readonly id: "pages.list";
|
|
64
|
-
readonly method: "query";
|
|
65
|
-
readonly path: "api.pages.list";
|
|
66
|
-
readonly client: "listPages";
|
|
67
|
-
}, {
|
|
68
|
-
readonly command: "get-page";
|
|
69
|
-
readonly id: "pages.get";
|
|
70
|
-
readonly method: "query";
|
|
71
|
-
readonly path: "api.pages.get";
|
|
72
|
-
readonly client: "getPage";
|
|
73
|
-
}, {
|
|
74
|
-
readonly command: "get-page-by-path";
|
|
75
|
-
readonly id: "pages.getByPath";
|
|
76
|
-
readonly method: "query";
|
|
77
|
-
readonly path: "api.pages.getByPath";
|
|
78
|
-
readonly client: "getPageByPath";
|
|
79
|
-
}, {
|
|
80
|
-
readonly command: "create-page";
|
|
81
|
-
readonly id: "pages.create";
|
|
82
|
-
readonly method: "mutation";
|
|
83
|
-
readonly path: "api.pages.create";
|
|
84
|
-
readonly client: "createPage";
|
|
85
|
-
}, {
|
|
86
|
-
readonly command: "update-page";
|
|
87
|
-
readonly id: "pages.update";
|
|
88
|
-
readonly method: "mutation";
|
|
89
|
-
readonly path: "api.pages.update";
|
|
90
|
-
readonly client: "updatePage";
|
|
91
|
-
}, {
|
|
92
|
-
readonly command: "get-project-settings";
|
|
93
|
-
readonly id: "projectSettings.get";
|
|
94
|
-
readonly method: "query";
|
|
95
|
-
readonly path: "api.projectSettings.get";
|
|
96
|
-
readonly client: "getProjectSettings";
|
|
97
|
-
}, {
|
|
98
|
-
readonly command: "update-project-settings";
|
|
99
|
-
readonly id: "projectSettings.update";
|
|
100
|
-
readonly method: "mutation";
|
|
101
|
-
readonly path: "api.projectSettings.update";
|
|
102
|
-
readonly client: "updateProjectSettings";
|
|
103
|
-
}, {
|
|
104
|
-
readonly command: "list-redirects";
|
|
105
|
-
readonly id: "redirects.list";
|
|
106
|
-
readonly method: "query";
|
|
107
|
-
readonly path: "api.redirects.list";
|
|
108
|
-
readonly client: "listRedirects";
|
|
109
|
-
}, {
|
|
110
|
-
readonly command: "create-redirect";
|
|
111
|
-
readonly id: "redirects.create";
|
|
112
|
-
readonly method: "mutation";
|
|
113
|
-
readonly path: "api.redirects.create";
|
|
114
|
-
readonly client: "createRedirect";
|
|
115
|
-
}, {
|
|
116
|
-
readonly command: "update-redirect";
|
|
117
|
-
readonly id: "redirects.update";
|
|
118
|
-
readonly method: "mutation";
|
|
119
|
-
readonly path: "api.redirects.update";
|
|
120
|
-
readonly client: "updateRedirect";
|
|
121
|
-
}, {
|
|
122
|
-
readonly command: "delete-redirect";
|
|
123
|
-
readonly id: "redirects.delete";
|
|
124
|
-
readonly method: "mutation";
|
|
125
|
-
readonly path: "api.redirects.delete";
|
|
126
|
-
readonly client: "deleteRedirect";
|
|
127
|
-
}, {
|
|
128
|
-
readonly command: "list-breakpoints";
|
|
129
|
-
readonly id: "breakpoints.list";
|
|
130
|
-
readonly method: "query";
|
|
131
|
-
readonly path: "api.breakpoints.list";
|
|
132
|
-
readonly client: "listBreakpoints";
|
|
133
|
-
}, {
|
|
134
|
-
readonly command: "create-breakpoint";
|
|
135
|
-
readonly id: "breakpoints.create";
|
|
136
|
-
readonly method: "mutation";
|
|
137
|
-
readonly path: "api.breakpoints.create";
|
|
138
|
-
readonly client: "createBreakpoint";
|
|
139
|
-
}, {
|
|
140
|
-
readonly command: "update-breakpoint";
|
|
141
|
-
readonly id: "breakpoints.update";
|
|
142
|
-
readonly method: "mutation";
|
|
143
|
-
readonly path: "api.breakpoints.update";
|
|
144
|
-
readonly client: "updateBreakpoint";
|
|
145
|
-
}, {
|
|
146
|
-
readonly command: "delete-breakpoint";
|
|
147
|
-
readonly id: "breakpoints.delete";
|
|
148
|
-
readonly method: "mutation";
|
|
149
|
-
readonly path: "api.breakpoints.delete";
|
|
150
|
-
readonly client: "deleteBreakpoint";
|
|
151
|
-
}, {
|
|
152
|
-
readonly command: "delete-page";
|
|
153
|
-
readonly id: "pages.delete";
|
|
154
|
-
readonly method: "mutation";
|
|
155
|
-
readonly path: "api.pages.delete";
|
|
156
|
-
readonly client: "deletePage";
|
|
157
|
-
}, {
|
|
158
|
-
readonly command: "duplicate-page";
|
|
159
|
-
readonly id: "pages.duplicate";
|
|
160
|
-
readonly method: "mutation";
|
|
161
|
-
readonly path: "api.pages.duplicate";
|
|
162
|
-
readonly client: "duplicatePage";
|
|
163
|
-
}, {
|
|
164
|
-
readonly command: "list-page-templates";
|
|
165
|
-
readonly id: "pageTemplates.list";
|
|
166
|
-
readonly method: "query";
|
|
167
|
-
readonly path: "api.pageTemplates.list";
|
|
168
|
-
readonly client: "listPageTemplates";
|
|
169
|
-
}, {
|
|
170
|
-
readonly command: "create-page-from-template";
|
|
171
|
-
readonly id: "pageTemplates.createPage";
|
|
172
|
-
readonly method: "mutation";
|
|
173
|
-
readonly path: "api.pageTemplates.createPage";
|
|
174
|
-
readonly client: "createPageFromTemplate";
|
|
175
|
-
}, {
|
|
176
|
-
readonly command: "list-folders";
|
|
177
|
-
readonly id: "folders.list";
|
|
178
|
-
readonly method: "query";
|
|
179
|
-
readonly path: "api.folders.list";
|
|
180
|
-
readonly client: "listFolders";
|
|
181
|
-
}, {
|
|
182
|
-
readonly command: "create-folder";
|
|
183
|
-
readonly id: "folders.create";
|
|
184
|
-
readonly method: "mutation";
|
|
185
|
-
readonly path: "api.folders.create";
|
|
186
|
-
readonly client: "createFolder";
|
|
187
|
-
}, {
|
|
188
|
-
readonly command: "update-folder";
|
|
189
|
-
readonly id: "folders.update";
|
|
190
|
-
readonly method: "mutation";
|
|
191
|
-
readonly path: "api.folders.update";
|
|
192
|
-
readonly client: "updateFolder";
|
|
193
|
-
}, {
|
|
194
|
-
readonly command: "delete-folder";
|
|
195
|
-
readonly id: "folders.delete";
|
|
196
|
-
readonly method: "mutation";
|
|
197
|
-
readonly path: "api.folders.delete";
|
|
198
|
-
readonly client: "deleteFolder";
|
|
199
|
-
}, {
|
|
200
|
-
readonly command: "list-instances";
|
|
201
|
-
readonly id: "instances.list";
|
|
202
|
-
readonly method: "query";
|
|
203
|
-
readonly path: "api.instances.list";
|
|
204
|
-
readonly client: "listInstances";
|
|
205
|
-
}, {
|
|
206
|
-
readonly command: "inspect-instance";
|
|
207
|
-
readonly id: "instances.inspect";
|
|
208
|
-
readonly method: "query";
|
|
209
|
-
readonly path: "api.instances.inspect";
|
|
210
|
-
readonly client: "inspectInstance";
|
|
211
|
-
}, {
|
|
212
|
-
readonly command: "append-instance";
|
|
213
|
-
readonly id: "instances.append";
|
|
214
|
-
readonly method: "mutation";
|
|
215
|
-
readonly path: "api.instances.append";
|
|
216
|
-
readonly client: "appendInstance";
|
|
217
|
-
}, {
|
|
218
|
-
readonly command: "move-instance";
|
|
219
|
-
readonly id: "instances.move";
|
|
220
|
-
readonly method: "mutation";
|
|
221
|
-
readonly path: "api.instances.move";
|
|
222
|
-
readonly client: "moveInstance";
|
|
223
|
-
}, {
|
|
224
|
-
readonly command: "clone-instance";
|
|
225
|
-
readonly id: "instances.clone";
|
|
226
|
-
readonly method: "mutation";
|
|
227
|
-
readonly path: "api.instances.clone";
|
|
228
|
-
readonly client: "cloneInstance";
|
|
229
|
-
}, {
|
|
230
|
-
readonly command: "delete-instance";
|
|
231
|
-
readonly id: "instances.delete";
|
|
232
|
-
readonly method: "mutation";
|
|
233
|
-
readonly path: "api.instances.delete";
|
|
234
|
-
readonly client: "deleteInstance";
|
|
235
|
-
}, {
|
|
236
|
-
readonly command: "update-props";
|
|
237
|
-
readonly id: "instances.updateProps";
|
|
238
|
-
readonly method: "mutation";
|
|
239
|
-
readonly path: "api.instances.updateProps";
|
|
240
|
-
readonly client: "updateProps";
|
|
241
|
-
readonly permit: "edit";
|
|
242
|
-
}, {
|
|
243
|
-
readonly command: "delete-props";
|
|
244
|
-
readonly id: "instances.deleteProps";
|
|
245
|
-
readonly method: "mutation";
|
|
246
|
-
readonly path: "api.instances.deleteProps";
|
|
247
|
-
readonly client: "deleteProps";
|
|
248
|
-
readonly permit: "edit";
|
|
249
|
-
}, {
|
|
250
|
-
readonly command: "bind-props";
|
|
251
|
-
readonly id: "instances.bindProps";
|
|
252
|
-
readonly method: "mutation";
|
|
253
|
-
readonly path: "api.instances.bindProps";
|
|
254
|
-
readonly client: "bindProps";
|
|
255
|
-
}, {
|
|
256
|
-
readonly command: "list-texts";
|
|
257
|
-
readonly id: "instances.listTexts";
|
|
258
|
-
readonly method: "query";
|
|
259
|
-
readonly path: "api.instances.listTexts";
|
|
260
|
-
readonly client: "listTexts";
|
|
261
|
-
}, {
|
|
262
|
-
readonly command: "update-text";
|
|
263
|
-
readonly id: "instances.updateText";
|
|
264
|
-
readonly method: "mutation";
|
|
265
|
-
readonly path: "api.instances.updateText";
|
|
266
|
-
readonly client: "updateText";
|
|
267
|
-
readonly permit: "edit";
|
|
268
|
-
}, {
|
|
269
|
-
readonly command: "get-styles";
|
|
270
|
-
readonly id: "styles.getDeclarations";
|
|
271
|
-
readonly method: "query";
|
|
272
|
-
readonly path: "api.styles.getDeclarations";
|
|
273
|
-
readonly client: "getStyleDeclarations";
|
|
274
|
-
}, {
|
|
275
|
-
readonly command: "update-styles";
|
|
276
|
-
readonly id: "styles.updateDeclarations";
|
|
277
|
-
readonly method: "mutation";
|
|
278
|
-
readonly path: "api.styles.updateDeclarations";
|
|
279
|
-
readonly client: "updateStyleDeclarations";
|
|
280
|
-
}, {
|
|
281
|
-
readonly command: "delete-styles";
|
|
282
|
-
readonly id: "styles.deleteDeclarations";
|
|
283
|
-
readonly method: "mutation";
|
|
284
|
-
readonly path: "api.styles.deleteDeclarations";
|
|
285
|
-
readonly client: "deleteStyleDeclarations";
|
|
286
|
-
}, {
|
|
287
|
-
readonly command: "replace-styles";
|
|
288
|
-
readonly id: "styles.replaceValues";
|
|
289
|
-
readonly method: "mutation";
|
|
290
|
-
readonly path: "api.styles.replaceValues";
|
|
291
|
-
readonly client: "replaceStyleValues";
|
|
292
|
-
}, {
|
|
293
|
-
readonly command: "list-design-tokens";
|
|
294
|
-
readonly id: "designTokens.list";
|
|
295
|
-
readonly method: "query";
|
|
296
|
-
readonly path: "api.designTokens.list";
|
|
297
|
-
readonly client: "listDesignTokens";
|
|
298
|
-
}, {
|
|
299
|
-
readonly command: "create-design-token";
|
|
300
|
-
readonly id: "designTokens.create";
|
|
301
|
-
readonly method: "mutation";
|
|
302
|
-
readonly path: "api.designTokens.create";
|
|
303
|
-
readonly client: "createDesignTokens";
|
|
304
|
-
}, {
|
|
305
|
-
readonly command: "update-design-token-styles";
|
|
306
|
-
readonly id: "designTokens.updateStyles";
|
|
307
|
-
readonly method: "mutation";
|
|
308
|
-
readonly path: "api.designTokens.updateStyles";
|
|
309
|
-
readonly client: "updateDesignTokenStyles";
|
|
310
|
-
}, {
|
|
311
|
-
readonly command: "delete-design-token-styles";
|
|
312
|
-
readonly id: "designTokens.deleteStyles";
|
|
313
|
-
readonly method: "mutation";
|
|
314
|
-
readonly path: "api.designTokens.deleteStyles";
|
|
315
|
-
readonly client: "deleteDesignTokenStyles";
|
|
316
|
-
}, {
|
|
317
|
-
readonly command: "attach-design-token";
|
|
318
|
-
readonly id: "designTokens.attach";
|
|
319
|
-
readonly method: "mutation";
|
|
320
|
-
readonly path: "api.designTokens.attach";
|
|
321
|
-
readonly client: "attachDesignToken";
|
|
322
|
-
}, {
|
|
323
|
-
readonly command: "detach-design-token";
|
|
324
|
-
readonly id: "designTokens.detach";
|
|
325
|
-
readonly method: "mutation";
|
|
326
|
-
readonly path: "api.designTokens.detach";
|
|
327
|
-
readonly client: "detachDesignToken";
|
|
328
|
-
}, {
|
|
329
|
-
readonly command: "extract-design-token";
|
|
330
|
-
readonly id: "designTokens.extract";
|
|
331
|
-
readonly method: "mutation";
|
|
332
|
-
readonly path: "api.designTokens.extract";
|
|
333
|
-
readonly client: "extractDesignToken";
|
|
334
|
-
}, {
|
|
335
|
-
readonly command: "list-css-variables";
|
|
336
|
-
readonly id: "cssVariables.list";
|
|
337
|
-
readonly method: "query";
|
|
338
|
-
readonly path: "api.cssVariables.list";
|
|
339
|
-
readonly client: "listCssVariables";
|
|
340
|
-
}, {
|
|
341
|
-
readonly command: "define-css-variable";
|
|
342
|
-
readonly id: "cssVariables.define";
|
|
343
|
-
readonly method: "mutation";
|
|
344
|
-
readonly path: "api.cssVariables.define";
|
|
345
|
-
readonly client: "defineCssVariables";
|
|
346
|
-
}, {
|
|
347
|
-
readonly command: "delete-css-variable";
|
|
348
|
-
readonly id: "cssVariables.delete";
|
|
349
|
-
readonly method: "mutation";
|
|
350
|
-
readonly path: "api.cssVariables.delete";
|
|
351
|
-
readonly client: "deleteCssVariables";
|
|
352
|
-
}, {
|
|
353
|
-
readonly command: "rewrite-css-variable-refs";
|
|
354
|
-
readonly id: "cssVariables.rewriteRefs";
|
|
355
|
-
readonly method: "mutation";
|
|
356
|
-
readonly path: "api.cssVariables.rewriteRefs";
|
|
357
|
-
readonly client: "rewriteCssVariableRefs";
|
|
358
|
-
}, {
|
|
359
|
-
readonly command: "list-variables";
|
|
360
|
-
readonly id: "variables.list";
|
|
361
|
-
readonly method: "query";
|
|
362
|
-
readonly path: "api.variables.list";
|
|
363
|
-
readonly client: "listVariables";
|
|
364
|
-
}, {
|
|
365
|
-
readonly command: "create-variable";
|
|
366
|
-
readonly id: "variables.create";
|
|
367
|
-
readonly method: "mutation";
|
|
368
|
-
readonly path: "api.variables.create";
|
|
369
|
-
readonly client: "createVariable";
|
|
370
|
-
}, {
|
|
371
|
-
readonly command: "update-variable";
|
|
372
|
-
readonly id: "variables.update";
|
|
373
|
-
readonly method: "mutation";
|
|
374
|
-
readonly path: "api.variables.update";
|
|
375
|
-
readonly client: "updateVariable";
|
|
376
|
-
}, {
|
|
377
|
-
readonly command: "delete-variable";
|
|
378
|
-
readonly id: "variables.delete";
|
|
379
|
-
readonly method: "mutation";
|
|
380
|
-
readonly path: "api.variables.delete";
|
|
381
|
-
readonly client: "deleteVariable";
|
|
382
|
-
}, {
|
|
383
|
-
readonly command: "list-resources";
|
|
384
|
-
readonly id: "resources.list";
|
|
385
|
-
readonly method: "query";
|
|
386
|
-
readonly path: "api.resources.list";
|
|
387
|
-
readonly client: "listResources";
|
|
388
|
-
}, {
|
|
389
|
-
readonly command: "create-resource";
|
|
390
|
-
readonly id: "resources.create";
|
|
391
|
-
readonly method: "mutation";
|
|
392
|
-
readonly path: "api.resources.create";
|
|
393
|
-
readonly client: "createResource";
|
|
394
|
-
}, {
|
|
395
|
-
readonly command: "update-resource";
|
|
396
|
-
readonly id: "resources.update";
|
|
397
|
-
readonly method: "mutation";
|
|
398
|
-
readonly path: "api.resources.update";
|
|
399
|
-
readonly client: "updateResource";
|
|
400
|
-
}, {
|
|
401
|
-
readonly command: "delete-resource";
|
|
402
|
-
readonly id: "resources.delete";
|
|
403
|
-
readonly method: "mutation";
|
|
404
|
-
readonly path: "api.resources.delete";
|
|
405
|
-
readonly client: "deleteResource";
|
|
406
|
-
}, {
|
|
407
|
-
readonly command: "publish";
|
|
408
|
-
readonly id: "publish.create";
|
|
409
|
-
readonly method: "mutation";
|
|
410
|
-
readonly path: "api.publish.create";
|
|
411
|
-
readonly client: "publish";
|
|
412
|
-
readonly permit: "edit";
|
|
413
|
-
}, {
|
|
414
|
-
readonly command: "list-publishes";
|
|
415
|
-
readonly id: "publish.list";
|
|
416
|
-
readonly method: "query";
|
|
417
|
-
readonly path: "api.publish.list";
|
|
418
|
-
readonly client: "listPublishes";
|
|
419
|
-
}, {
|
|
420
|
-
readonly command: "get-publish-job";
|
|
421
|
-
readonly id: "publish.getJob";
|
|
422
|
-
readonly method: "query";
|
|
423
|
-
readonly path: "api.publish.getJob";
|
|
424
|
-
readonly client: "getPublishJob";
|
|
425
|
-
}, {
|
|
426
|
-
readonly command: "unpublish";
|
|
427
|
-
readonly id: "publish.unpublish";
|
|
428
|
-
readonly method: "mutation";
|
|
429
|
-
readonly path: "api.publish.unpublish";
|
|
430
|
-
readonly client: "unpublish";
|
|
431
|
-
readonly permit: "edit";
|
|
432
|
-
}, {
|
|
433
|
-
readonly command: "list-domains";
|
|
434
|
-
readonly id: "domains.list";
|
|
435
|
-
readonly method: "query";
|
|
436
|
-
readonly path: "api.domains.list";
|
|
437
|
-
readonly client: "listDomains";
|
|
438
|
-
}, {
|
|
439
|
-
readonly command: "create-domain";
|
|
440
|
-
readonly id: "domains.create";
|
|
441
|
-
readonly method: "mutation";
|
|
442
|
-
readonly path: "api.domains.create";
|
|
443
|
-
readonly client: "createDomain";
|
|
444
|
-
readonly permit: "admin";
|
|
445
|
-
}, {
|
|
446
|
-
readonly command: "update-domain";
|
|
447
|
-
readonly id: "domains.update";
|
|
448
|
-
readonly method: "mutation";
|
|
449
|
-
readonly path: "api.domains.update";
|
|
450
|
-
readonly client: "updateDomain";
|
|
451
|
-
readonly permit: "admin";
|
|
452
|
-
}, {
|
|
453
|
-
readonly command: "delete-domain";
|
|
454
|
-
readonly id: "domains.delete";
|
|
455
|
-
readonly method: "mutation";
|
|
456
|
-
readonly path: "api.domains.delete";
|
|
457
|
-
readonly client: "deleteDomain";
|
|
458
|
-
readonly permit: "admin";
|
|
459
|
-
}, {
|
|
460
|
-
readonly command: "verify-domain";
|
|
461
|
-
readonly id: "domains.verify";
|
|
462
|
-
readonly method: "mutation";
|
|
463
|
-
readonly path: "api.domains.verify";
|
|
464
|
-
readonly client: "verifyDomain";
|
|
465
|
-
readonly permit: "admin";
|
|
466
|
-
}, {
|
|
467
|
-
readonly command: "list-assets";
|
|
468
|
-
readonly id: "assets.list";
|
|
469
|
-
readonly method: "query";
|
|
470
|
-
readonly path: "api.assets.list";
|
|
471
|
-
readonly client: "listAssets";
|
|
472
|
-
}, {
|
|
473
|
-
readonly command: "upload-asset";
|
|
474
|
-
readonly id: "assets.upload";
|
|
475
|
-
readonly method: "mutation";
|
|
476
|
-
readonly client: "uploadProjectAsset";
|
|
477
|
-
readonly invalidatesNamespaces: readonly ["assets"];
|
|
478
|
-
}, {
|
|
479
|
-
readonly command: "upload-assets";
|
|
480
|
-
readonly id: "assets.uploadMany";
|
|
481
|
-
readonly method: "mutation";
|
|
482
|
-
readonly client: "uploadProjectAssets";
|
|
483
|
-
readonly invalidatesNamespaces: readonly ["assets"];
|
|
484
|
-
}, {
|
|
485
|
-
readonly command: "find-asset-usage";
|
|
486
|
-
readonly id: "assets.findUsage";
|
|
487
|
-
readonly method: "query";
|
|
488
|
-
readonly path: "api.assets.findUsage";
|
|
489
|
-
readonly client: "findAssetUsage";
|
|
490
|
-
}, {
|
|
491
|
-
readonly command: "replace-asset";
|
|
492
|
-
readonly id: "assets.replace";
|
|
493
|
-
readonly method: "mutation";
|
|
494
|
-
readonly path: "api.assets.replace";
|
|
495
|
-
readonly client: "replaceAsset";
|
|
496
|
-
}, {
|
|
497
|
-
readonly command: "delete-asset";
|
|
498
|
-
readonly id: "assets.delete";
|
|
499
|
-
readonly method: "mutation";
|
|
500
|
-
readonly path: "api.assets.delete";
|
|
501
|
-
readonly client: "deleteAssets";
|
|
502
|
-
}];
|
|
503
|
-
export declare const publicApiOperations: PublicApiOperation<"whoami" | "permissions" | "inspect" | "snapshot" | "apply-patch" | "list-pages" | "get-page" | "get-page-by-path" | "create-page" | "update-page" | "get-project-settings" | "update-project-settings" | "list-redirects" | "create-redirect" | "update-redirect" | "delete-redirect" | "list-breakpoints" | "create-breakpoint" | "update-breakpoint" | "delete-breakpoint" | "delete-page" | "duplicate-page" | "list-page-templates" | "create-page-from-template" | "list-folders" | "create-folder" | "update-folder" | "delete-folder" | "list-instances" | "inspect-instance" | "append-instance" | "move-instance" | "clone-instance" | "delete-instance" | "update-props" | "delete-props" | "bind-props" | "list-texts" | "update-text" | "get-styles" | "update-styles" | "delete-styles" | "replace-styles" | "list-design-tokens" | "create-design-token" | "update-design-token-styles" | "delete-design-token-styles" | "attach-design-token" | "detach-design-token" | "extract-design-token" | "list-css-variables" | "define-css-variable" | "delete-css-variable" | "rewrite-css-variable-refs" | "list-variables" | "create-variable" | "update-variable" | "delete-variable" | "list-resources" | "create-resource" | "update-resource" | "delete-resource" | "publish" | "list-publishes" | "get-publish-job" | "unpublish" | "list-domains" | "create-domain" | "update-domain" | "delete-domain" | "verify-domain" | "list-assets" | "upload-asset" | "upload-assets" | "find-asset-usage" | "replace-asset" | "delete-asset">[];
|
|
504
|
-
export type PublicApiCommand = (typeof publicApiOperationInputs)[number]["command"];
|
|
505
|
-
export declare const getPublicApiOperation: (command: PublicApiCommand) => PublicApiOperation<"whoami" | "permissions" | "inspect" | "snapshot" | "apply-patch" | "list-pages" | "get-page" | "get-page-by-path" | "create-page" | "update-page" | "get-project-settings" | "update-project-settings" | "list-redirects" | "create-redirect" | "update-redirect" | "delete-redirect" | "list-breakpoints" | "create-breakpoint" | "update-breakpoint" | "delete-breakpoint" | "delete-page" | "duplicate-page" | "list-page-templates" | "create-page-from-template" | "list-folders" | "create-folder" | "update-folder" | "delete-folder" | "list-instances" | "inspect-instance" | "append-instance" | "move-instance" | "clone-instance" | "delete-instance" | "update-props" | "delete-props" | "bind-props" | "list-texts" | "update-text" | "get-styles" | "update-styles" | "delete-styles" | "replace-styles" | "list-design-tokens" | "create-design-token" | "update-design-token-styles" | "delete-design-token-styles" | "attach-design-token" | "detach-design-token" | "extract-design-token" | "list-css-variables" | "define-css-variable" | "delete-css-variable" | "rewrite-css-variable-refs" | "list-variables" | "create-variable" | "update-variable" | "delete-variable" | "list-resources" | "create-resource" | "update-resource" | "delete-resource" | "publish" | "list-publishes" | "get-publish-job" | "unpublish" | "list-domains" | "create-domain" | "update-domain" | "delete-domain" | "verify-domain" | "list-assets" | "upload-asset" | "upload-assets" | "find-asset-usage" | "replace-asset" | "delete-asset">;
|
|
36
|
+
export declare const publicApiOperations: PublicApiOperation<string>[];
|
|
37
|
+
export declare const getPublicApiOperation: (command: PublicApiCommand) => PublicApiOperation<string>;
|
|
506
38
|
export declare const getPublicApiOperationPath: (command: PublicApiCommand) => string;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
import { runtimeOperationContracts } from "@webstudio-is/project-build/contracts/builder-runtime";
|
|
2
|
+
import type { InputJsonSchema } from "@webstudio-is/sdk";
|
|
3
|
+
export type { InputJsonSchema };
|
|
1
4
|
export declare const publicApiOperationNamespaces: readonly ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "marketplaceProduct"];
|
|
2
5
|
export type PublicApiOperationNamespace = (typeof publicApiOperationNamespaces)[number];
|
|
3
|
-
export
|
|
6
|
+
export declare const publicApiOperationPermits: readonly ["api", "view", "edit", "build", "admin"];
|
|
7
|
+
export type PublicApiOperationPermit = (typeof publicApiOperationPermits)[number];
|
|
8
|
+
export type PublicApiOperationKind = "read" | "mutation";
|
|
9
|
+
export type PublicRuntimeOperationId = (typeof runtimeOperationContracts)[number]["id"];
|
|
4
10
|
export type PublicRuntimeOperationContract = {
|
|
5
11
|
id: PublicRuntimeOperationId;
|
|
12
|
+
command: string;
|
|
13
|
+
client: string;
|
|
14
|
+
permit?: PublicApiOperationPermit;
|
|
15
|
+
kind: PublicApiOperationKind;
|
|
16
|
+
inputSchema: InputJsonSchema;
|
|
6
17
|
readNamespaces: readonly PublicApiOperationNamespace[];
|
|
7
18
|
writeNamespaces: readonly PublicApiOperationNamespace[];
|
|
8
19
|
invalidatesNamespaces: readonly PublicApiOperationNamespace[];
|
|
9
20
|
retryOnConflict: boolean;
|
|
21
|
+
requiresAssets: boolean;
|
|
22
|
+
requiresConfirm: boolean;
|
|
10
23
|
};
|
|
11
24
|
export declare const publicRuntimeOperationContracts: readonly PublicRuntimeOperationContract[];
|