@webstudio-is/protocol 0.274.5 → 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 +52449 -6344
- 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 +13 -532
- package/lib/types/builder-api/runtime-contracts.d.ts +14 -1
- package/lib/types/schema.d.ts +7742 -9592
- package/package.json +15 -6
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
export declare const serverOnlyRouterOperationMetadata: {
|
|
2
|
+
readonly "auth.me": {
|
|
3
|
+
readonly id: "auth.me";
|
|
4
|
+
readonly command: "whoami";
|
|
5
|
+
readonly method: "query";
|
|
6
|
+
readonly path: "api.auth.me";
|
|
7
|
+
readonly client: "getApiTokenInfo";
|
|
8
|
+
readonly permit: "view";
|
|
9
|
+
readonly inputSchema: {
|
|
10
|
+
readonly type: "object";
|
|
11
|
+
readonly additionalProperties: true;
|
|
12
|
+
readonly properties: {};
|
|
13
|
+
readonly required: [];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
readonly "projects.permissions": {
|
|
17
|
+
readonly id: "projects.permissions";
|
|
18
|
+
readonly command: "permissions";
|
|
19
|
+
readonly method: "query";
|
|
20
|
+
readonly path: "api.projects.permissions";
|
|
21
|
+
readonly client: "getProjectPermissions";
|
|
22
|
+
readonly permit: "view";
|
|
23
|
+
readonly inputSchema: {
|
|
24
|
+
readonly type: "object";
|
|
25
|
+
readonly properties: {};
|
|
26
|
+
readonly required: [];
|
|
27
|
+
readonly additionalProperties: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly "projects.get": {
|
|
31
|
+
readonly id: "projects.get";
|
|
32
|
+
readonly command: "inspect";
|
|
33
|
+
readonly method: "query";
|
|
34
|
+
readonly path: "api.projects.get";
|
|
35
|
+
readonly client: "getProjectInfo";
|
|
36
|
+
readonly permit: "view";
|
|
37
|
+
readonly inputSchema: {
|
|
38
|
+
readonly type: "object";
|
|
39
|
+
readonly properties: {};
|
|
40
|
+
readonly required: [];
|
|
41
|
+
readonly additionalProperties: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly "build.get": {
|
|
45
|
+
readonly id: "build.get";
|
|
46
|
+
readonly command: "snapshot";
|
|
47
|
+
readonly method: "query";
|
|
48
|
+
readonly path: "api.build.get";
|
|
49
|
+
readonly client: "getBuildSnapshot";
|
|
50
|
+
readonly permit: "view";
|
|
51
|
+
readonly inputSchema: {
|
|
52
|
+
readonly type: "object";
|
|
53
|
+
readonly properties: {
|
|
54
|
+
readonly include: {
|
|
55
|
+
readonly type: "array";
|
|
56
|
+
readonly items: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly enum: ["pages", "folders", "instances", "props", "styles", "styleSources", "styleSourceSelections", "designTokens", "assets", "resources", "variables", "breakpoints", "marketplaceProduct"];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly version: {
|
|
62
|
+
readonly type: "integer";
|
|
63
|
+
readonly minimum: -9007199254740991;
|
|
64
|
+
readonly maximum: 9007199254740991;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
readonly required: [];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly "build.patch": {
|
|
71
|
+
readonly id: "build.patch";
|
|
72
|
+
readonly command: "apply-patch";
|
|
73
|
+
readonly method: "mutation";
|
|
74
|
+
readonly path: "api.build.patch";
|
|
75
|
+
readonly client: "applyBuildPatch";
|
|
76
|
+
readonly permit: "build";
|
|
77
|
+
readonly invalidatesNamespaces: readonly ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "marketplaceProduct"];
|
|
78
|
+
readonly inputSchema: {
|
|
79
|
+
readonly type: "object";
|
|
80
|
+
readonly properties: {
|
|
81
|
+
readonly baseVersion: {
|
|
82
|
+
readonly type: "integer";
|
|
83
|
+
readonly minimum: -9007199254740991;
|
|
84
|
+
readonly maximum: 9007199254740991;
|
|
85
|
+
};
|
|
86
|
+
readonly transactions: {
|
|
87
|
+
readonly minItems: 1;
|
|
88
|
+
readonly type: "array";
|
|
89
|
+
readonly items: {
|
|
90
|
+
readonly type: "object";
|
|
91
|
+
readonly properties: {
|
|
92
|
+
readonly id: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly minLength: 1;
|
|
95
|
+
};
|
|
96
|
+
readonly payload: {
|
|
97
|
+
readonly type: "array";
|
|
98
|
+
readonly items: {
|
|
99
|
+
readonly type: "object";
|
|
100
|
+
readonly properties: {
|
|
101
|
+
readonly namespace: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly enum: ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "marketplaceProduct"];
|
|
104
|
+
};
|
|
105
|
+
readonly patches: {
|
|
106
|
+
readonly type: "array";
|
|
107
|
+
readonly items: {
|
|
108
|
+
readonly anyOf: [{
|
|
109
|
+
readonly type: "object";
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly op: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
readonly const: "add";
|
|
114
|
+
};
|
|
115
|
+
readonly path: {
|
|
116
|
+
readonly type: "array";
|
|
117
|
+
readonly items: {
|
|
118
|
+
readonly anyOf: [{
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
}, {
|
|
121
|
+
readonly type: "number";
|
|
122
|
+
}];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly value: {};
|
|
126
|
+
};
|
|
127
|
+
readonly required: ["op", "path"];
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "object";
|
|
130
|
+
readonly properties: {
|
|
131
|
+
readonly op: {
|
|
132
|
+
readonly type: "string";
|
|
133
|
+
readonly const: "replace";
|
|
134
|
+
};
|
|
135
|
+
readonly path: {
|
|
136
|
+
readonly type: "array";
|
|
137
|
+
readonly items: {
|
|
138
|
+
readonly anyOf: [{
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
}, {
|
|
141
|
+
readonly type: "number";
|
|
142
|
+
}];
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
readonly value: {};
|
|
146
|
+
};
|
|
147
|
+
readonly required: ["op", "path"];
|
|
148
|
+
}, {
|
|
149
|
+
readonly type: "object";
|
|
150
|
+
readonly properties: {
|
|
151
|
+
readonly op: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
readonly const: "remove";
|
|
154
|
+
};
|
|
155
|
+
readonly path: {
|
|
156
|
+
readonly type: "array";
|
|
157
|
+
readonly items: {
|
|
158
|
+
readonly anyOf: [{
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
}, {
|
|
161
|
+
readonly type: "number";
|
|
162
|
+
}];
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly required: ["op", "path"];
|
|
167
|
+
}];
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
readonly required: ["namespace", "patches"];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
readonly required: ["id", "payload"];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly required: ["baseVersion", "transactions"];
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
readonly "publish.list": {
|
|
183
|
+
readonly id: "publish.list";
|
|
184
|
+
readonly command: "list-publishes";
|
|
185
|
+
readonly method: "query";
|
|
186
|
+
readonly path: "api.publish.list";
|
|
187
|
+
readonly client: "listPublishes";
|
|
188
|
+
readonly permit: "view";
|
|
189
|
+
readonly inputSchema: {
|
|
190
|
+
readonly type: "object";
|
|
191
|
+
readonly properties: {};
|
|
192
|
+
readonly required: [];
|
|
193
|
+
readonly additionalProperties: true;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
readonly "publish.create": {
|
|
197
|
+
readonly id: "publish.create";
|
|
198
|
+
readonly command: "publish";
|
|
199
|
+
readonly method: "mutation";
|
|
200
|
+
readonly path: "api.publish.create";
|
|
201
|
+
readonly client: "publish";
|
|
202
|
+
readonly permit: "edit";
|
|
203
|
+
readonly inputSchema: {
|
|
204
|
+
readonly type: "object";
|
|
205
|
+
readonly properties: {
|
|
206
|
+
readonly target: {
|
|
207
|
+
readonly type: "string";
|
|
208
|
+
readonly enum: ["staging", "production"];
|
|
209
|
+
};
|
|
210
|
+
readonly domains: {
|
|
211
|
+
readonly type: "array";
|
|
212
|
+
readonly items: {
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
readonly message: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
};
|
|
219
|
+
readonly idempotencyKey: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly required: ["target"];
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
readonly "publish.getJob": {
|
|
227
|
+
readonly id: "publish.getJob";
|
|
228
|
+
readonly command: "get-publish-job";
|
|
229
|
+
readonly method: "query";
|
|
230
|
+
readonly path: "api.publish.getJob";
|
|
231
|
+
readonly client: "getPublishJob";
|
|
232
|
+
readonly permit: "view";
|
|
233
|
+
readonly inputSchema: {
|
|
234
|
+
readonly type: "object";
|
|
235
|
+
readonly properties: {
|
|
236
|
+
readonly jobId: {
|
|
237
|
+
readonly type: "string";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
readonly required: ["jobId"];
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
readonly "publish.unpublish": {
|
|
244
|
+
readonly id: "publish.unpublish";
|
|
245
|
+
readonly command: "unpublish";
|
|
246
|
+
readonly method: "mutation";
|
|
247
|
+
readonly path: "api.publish.unpublish";
|
|
248
|
+
readonly client: "unpublish";
|
|
249
|
+
readonly permit: "edit";
|
|
250
|
+
readonly inputSchema: {
|
|
251
|
+
readonly type: "object";
|
|
252
|
+
readonly properties: {
|
|
253
|
+
readonly target: {
|
|
254
|
+
readonly type: "string";
|
|
255
|
+
readonly enum: ["staging", "production"];
|
|
256
|
+
};
|
|
257
|
+
readonly domains: {
|
|
258
|
+
readonly type: "array";
|
|
259
|
+
readonly items: {
|
|
260
|
+
readonly type: "string";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
readonly message: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
};
|
|
266
|
+
readonly idempotencyKey: {
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly required: ["target"];
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
readonly "domains.list": {
|
|
274
|
+
readonly id: "domains.list";
|
|
275
|
+
readonly command: "list-domains";
|
|
276
|
+
readonly method: "query";
|
|
277
|
+
readonly path: "api.domains.list";
|
|
278
|
+
readonly client: "listDomains";
|
|
279
|
+
readonly permit: "view";
|
|
280
|
+
readonly inputSchema: {
|
|
281
|
+
readonly type: "object";
|
|
282
|
+
readonly properties: {};
|
|
283
|
+
readonly required: [];
|
|
284
|
+
readonly additionalProperties: true;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
readonly "domains.create": {
|
|
288
|
+
readonly id: "domains.create";
|
|
289
|
+
readonly command: "create-domain";
|
|
290
|
+
readonly method: "mutation";
|
|
291
|
+
readonly path: "api.domains.create";
|
|
292
|
+
readonly client: "createDomain";
|
|
293
|
+
readonly permit: "admin";
|
|
294
|
+
readonly inputSchema: {
|
|
295
|
+
readonly type: "object";
|
|
296
|
+
readonly properties: {
|
|
297
|
+
readonly domain: {
|
|
298
|
+
readonly type: "string";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly required: ["domain"];
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
readonly "domains.update": {
|
|
305
|
+
readonly id: "domains.update";
|
|
306
|
+
readonly command: "update-domain";
|
|
307
|
+
readonly method: "mutation";
|
|
308
|
+
readonly path: "api.domains.update";
|
|
309
|
+
readonly client: "updateDomain";
|
|
310
|
+
readonly permit: "admin";
|
|
311
|
+
readonly inputSchema: {
|
|
312
|
+
readonly type: "object";
|
|
313
|
+
readonly properties: {
|
|
314
|
+
readonly domainId: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
};
|
|
317
|
+
readonly updates: {
|
|
318
|
+
readonly type: "object";
|
|
319
|
+
readonly properties: {
|
|
320
|
+
readonly domain: {
|
|
321
|
+
readonly type: "string";
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
readonly required: [];
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly required: ["domainId", "updates"];
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
readonly "domains.delete": {
|
|
331
|
+
readonly id: "domains.delete";
|
|
332
|
+
readonly command: "delete-domain";
|
|
333
|
+
readonly method: "mutation";
|
|
334
|
+
readonly path: "api.domains.delete";
|
|
335
|
+
readonly client: "deleteDomain";
|
|
336
|
+
readonly permit: "admin";
|
|
337
|
+
readonly inputSchema: {
|
|
338
|
+
readonly type: "object";
|
|
339
|
+
readonly properties: {
|
|
340
|
+
readonly domainId: {
|
|
341
|
+
readonly type: "string";
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
readonly required: ["domainId"];
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
readonly "domains.verify": {
|
|
348
|
+
readonly id: "domains.verify";
|
|
349
|
+
readonly command: "verify-domain";
|
|
350
|
+
readonly method: "mutation";
|
|
351
|
+
readonly path: "api.domains.verify";
|
|
352
|
+
readonly client: "verifyDomain";
|
|
353
|
+
readonly permit: "admin";
|
|
354
|
+
readonly inputSchema: {
|
|
355
|
+
readonly type: "object";
|
|
356
|
+
readonly properties: {
|
|
357
|
+
readonly domainId: {
|
|
358
|
+
readonly type: "string";
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
readonly required: ["domainId"];
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const publicApiRemoteErrorCodes: readonly ["BAD_REQUEST", "CONFLICT", "FORBIDDEN", "INTERNAL_SERVER_ERROR", "NOT_FOUND", "UNAUTHORIZED"];
|
|
1
|
+
declare const publicApiRemoteErrorCodes: readonly ["BAD_REQUEST", "CONFLICT", "FORBIDDEN", "INTERNAL_SERVER_ERROR", "NOT_FOUND", "PROJECT_NOT_PUBLISHED", "UNAUTHORIZED"];
|
|
2
2
|
export type PublicApiRemoteErrorCode = (typeof publicApiRemoteErrorCodes)[number];
|
|
3
3
|
export declare const isPublicApiRemoteErrorCode: (code: string) => code is PublicApiRemoteErrorCode;
|
|
4
4
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { InputJsonSchema } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const localOnlyOperationInputs: readonly [{
|
|
3
|
+
readonly command: "upload-asset";
|
|
4
|
+
readonly id: "assets.upload";
|
|
5
|
+
readonly method: "mutation";
|
|
6
|
+
readonly client: "uploadProjectAsset";
|
|
7
|
+
readonly invalidatesNamespaces: readonly ["assets"];
|
|
8
|
+
} & {
|
|
9
|
+
inputSchema: InputJsonSchema;
|
|
10
|
+
}, {
|
|
11
|
+
readonly command: "upload-assets";
|
|
12
|
+
readonly id: "assets.uploadMany";
|
|
13
|
+
readonly method: "mutation";
|
|
14
|
+
readonly client: "uploadProjectAssets";
|
|
15
|
+
readonly invalidatesNamespaces: readonly ["assets"];
|
|
16
|
+
} & {
|
|
17
|
+
inputSchema: InputJsonSchema;
|
|
18
|
+
}];
|
|
@@ -4,4 +4,4 @@ export type PublicApiOperationDocumentation = {
|
|
|
4
4
|
requiredOptions?: readonly string[];
|
|
5
5
|
examples: readonly string[];
|
|
6
6
|
};
|
|
7
|
-
export declare const publicApiOperationDocumentation:
|
|
7
|
+
export declare const publicApiOperationDocumentation: PublicApiOperationDocumentation[];
|