webflow-api 2.0.0-beta → 2.0.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 +30 -2
- package/api/resources/accessGroups/client/Client.d.ts +1 -1
- package/api/resources/accessGroups/client/Client.js +1 -1
- package/api/resources/assets/client/Client.d.ts +7 -7
- package/api/resources/assets/client/Client.js +7 -7
- package/api/resources/collections/client/Client.d.ts +11 -4
- package/api/resources/collections/client/Client.js +11 -4
- package/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +8 -0
- package/api/resources/collections/resources/fields/client/Client.d.ts +11 -0
- package/api/resources/collections/resources/fields/client/Client.js +11 -0
- package/api/resources/collections/resources/fields/client/requests/FieldUpdate.d.ts +4 -0
- package/api/resources/collections/resources/items/client/Client.d.ts +10 -8
- package/api/resources/collections/resources/items/client/Client.js +10 -8
- package/api/resources/ecommerce/client/Client.d.ts +1 -1
- package/api/resources/ecommerce/client/Client.js +1 -1
- package/api/resources/forms/client/Client.d.ts +5 -5
- package/api/resources/forms/client/Client.js +5 -5
- package/api/resources/inventory/client/Client.d.ts +2 -2
- package/api/resources/inventory/client/Client.js +2 -2
- package/api/resources/orders/client/Client.d.ts +6 -6
- package/api/resources/orders/client/Client.js +6 -6
- package/api/resources/pages/client/Client.d.ts +2 -2
- package/api/resources/pages/client/Client.js +2 -2
- package/api/resources/pages/resources/scripts/client/Client.d.ts +12 -3
- package/api/resources/pages/resources/scripts/client/Client.js +12 -3
- package/api/resources/products/client/Client.d.ts +6 -6
- package/api/resources/products/client/Client.js +6 -6
- package/api/resources/scripts/client/Client.d.ts +16 -1
- package/api/resources/scripts/client/Client.js +16 -1
- package/api/resources/scripts/client/requests/CustomCodeHostedRequest.d.ts +9 -0
- package/api/resources/scripts/client/requests/CustomCodeInlineRequest.d.ts +8 -0
- package/api/resources/sites/client/Client.d.ts +3 -3
- package/api/resources/sites/client/Client.js +3 -3
- package/api/resources/sites/resources/scripts/client/Client.d.ts +13 -4
- package/api/resources/sites/resources/scripts/client/Client.js +13 -4
- package/api/resources/users/client/Client.d.ts +9 -6
- package/api/resources/users/client/Client.js +9 -6
- package/api/resources/webhooks/client/Client.d.ts +4 -4
- package/api/resources/webhooks/client/Client.js +4 -4
- package/core/fetcher/Fetcher.js +19 -18
- package/dist/api/resources/accessGroups/client/Client.d.ts +1 -1
- package/dist/api/resources/accessGroups/client/Client.js +1 -1
- package/dist/api/resources/assets/client/Client.d.ts +7 -7
- package/dist/api/resources/assets/client/Client.js +7 -7
- package/dist/api/resources/collections/client/Client.d.ts +11 -4
- package/dist/api/resources/collections/client/Client.js +11 -4
- package/dist/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +8 -0
- package/dist/api/resources/collections/resources/fields/client/Client.d.ts +11 -0
- package/dist/api/resources/collections/resources/fields/client/Client.js +11 -0
- package/dist/api/resources/collections/resources/fields/client/requests/FieldUpdate.d.ts +4 -0
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +10 -8
- package/dist/api/resources/collections/resources/items/client/Client.js +10 -8
- package/dist/api/resources/ecommerce/client/Client.d.ts +1 -1
- package/dist/api/resources/ecommerce/client/Client.js +1 -1
- package/dist/api/resources/forms/client/Client.d.ts +5 -5
- package/dist/api/resources/forms/client/Client.js +5 -5
- package/dist/api/resources/inventory/client/Client.d.ts +2 -2
- package/dist/api/resources/inventory/client/Client.js +2 -2
- package/dist/api/resources/orders/client/Client.d.ts +6 -6
- package/dist/api/resources/orders/client/Client.js +6 -6
- package/dist/api/resources/pages/client/Client.d.ts +2 -2
- package/dist/api/resources/pages/client/Client.js +2 -2
- package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +12 -3
- package/dist/api/resources/pages/resources/scripts/client/Client.js +12 -3
- package/dist/api/resources/products/client/Client.d.ts +6 -6
- package/dist/api/resources/products/client/Client.js +6 -6
- package/dist/api/resources/scripts/client/Client.d.ts +16 -1
- package/dist/api/resources/scripts/client/Client.js +16 -1
- package/dist/api/resources/scripts/client/requests/CustomCodeHostedRequest.d.ts +9 -0
- package/dist/api/resources/scripts/client/requests/CustomCodeInlineRequest.d.ts +8 -0
- package/dist/api/resources/sites/client/Client.d.ts +3 -3
- package/dist/api/resources/sites/client/Client.js +3 -3
- package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +13 -4
- package/dist/api/resources/sites/resources/scripts/client/Client.js +13 -4
- package/dist/api/resources/users/client/Client.d.ts +9 -6
- package/dist/api/resources/users/client/Client.js +9 -6
- package/dist/api/resources/webhooks/client/Client.d.ts +4 -4
- package/dist/api/resources/webhooks/client/Client.js +4 -4
- package/dist/core/fetcher/Fetcher.js +19 -18
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/environments.d.ts +1 -1
- package/environments.js +1 -1
- package/package.json +2 -4
- package/dist/oauth.d.ts +0 -27
- package/dist/oauth.js +0 -113
- package/oauth.d.ts +0 -27
- package/oauth.js +0 -113
package/README.md
CHANGED
|
@@ -7,7 +7,35 @@ The SDK contains typings and request builders for the Webflow Data API.
|
|
|
7
7
|
|
|
8
8
|
## Documentation
|
|
9
9
|
|
|
10
|
-
Explore the API reference documentation
|
|
10
|
+
Explore the [API reference documentation](https://developers.webflow.com/reference/rest-introduction).
|
|
11
|
+
|
|
12
|
+
## V2 Migration Guide
|
|
13
|
+
|
|
14
|
+
> The SDK was rewritten in V2 and is now programatically generated from our OpenAPI spec. As part of this release there are some breaking changes.
|
|
15
|
+
|
|
16
|
+
#### Client Instantiation
|
|
17
|
+
The SDK exports `WebflowClient` instead of `Webflow`. The client now takes `accessToken` instead of `token`.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
const webflow = new WebflowClient({ accessToken: "..." });
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Oauth
|
|
24
|
+
The `WebflowClient` exports static methods that you can use for OAuth. These were previously on `Webflow`.
|
|
25
|
+
|
|
26
|
+
`webflow.authorizeUrl` -> `WebflowClient.authorizeURL`
|
|
27
|
+
|
|
28
|
+
`webflow.accessToken` -> `WebflowClient.getAccessToken`
|
|
29
|
+
|
|
30
|
+
`webflow.revokeToken` -> `WebflowClient.revokeToken`
|
|
31
|
+
|
|
32
|
+
#### HTTP Client
|
|
33
|
+
The SDK no longer uses Axios and defaults to fetch. The SDK supports multiple runtimes and will handle
|
|
34
|
+
using a fetch implementation if available or will default to `node-fetch`.
|
|
35
|
+
|
|
36
|
+
### Resources
|
|
37
|
+
Previously the SDK only supported the most important resources, such as site and user. Now the SDK supports
|
|
38
|
+
methods on a variety of different endpoints such as `collections`, `assets`, `forms`, `inventory`, `orders`, etc.
|
|
11
39
|
|
|
12
40
|
## Installation
|
|
13
41
|
|
|
@@ -133,7 +161,7 @@ You can configure the retries by setting maxRetries.
|
|
|
133
161
|
import { WebflowClient } from 'webflow';
|
|
134
162
|
|
|
135
163
|
const sites = await webflow.sites.get(..., {
|
|
136
|
-
maxRetries: 10 // override the
|
|
164
|
+
maxRetries: 10 // override the retries
|
|
137
165
|
});
|
|
138
166
|
```
|
|
139
167
|
|
|
@@ -27,7 +27,7 @@ export declare class AccessGroups {
|
|
|
27
27
|
* @throws {@link Webflow.InternalServerError}
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
|
-
* await webflow.accessGroups.list("
|
|
30
|
+
* await webflow.accessGroups.list("string", {
|
|
31
31
|
* sort: Webflow.AccessGroupsListRequestSort.CreatedOnAscending
|
|
32
32
|
* })
|
|
33
33
|
*/
|
|
@@ -59,7 +59,7 @@ class AccessGroups {
|
|
|
59
59
|
* @throws {@link Webflow.InternalServerError}
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
|
-
* await webflow.accessGroups.list("
|
|
62
|
+
* await webflow.accessGroups.list("string", {
|
|
63
63
|
* sort: Webflow.AccessGroupsListRequestSort.CreatedOnAscending
|
|
64
64
|
* })
|
|
65
65
|
*/
|
|
@@ -26,7 +26,7 @@ export declare class Assets {
|
|
|
26
26
|
* @throws {@link Webflow.InternalServerError}
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* await webflow.assets.list("
|
|
29
|
+
* await webflow.assets.list("string")
|
|
30
30
|
*/
|
|
31
31
|
list(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset[]>;
|
|
32
32
|
/**
|
|
@@ -38,7 +38,7 @@ export declare class Assets {
|
|
|
38
38
|
* @throws {@link Webflow.InternalServerError}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* await webflow.assets.create("
|
|
41
|
+
* await webflow.assets.create("string", {
|
|
42
42
|
* fileName: "file.png",
|
|
43
43
|
* fileHash: "3c7d87c9575702bc3b1e991f4d3c638e",
|
|
44
44
|
* parentFolder: "6436b1ce5281cace05b65aea"
|
|
@@ -54,7 +54,7 @@ export declare class Assets {
|
|
|
54
54
|
* @throws {@link Webflow.InternalServerError}
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
|
-
* await webflow.assets.get("
|
|
57
|
+
* await webflow.assets.get("string")
|
|
58
58
|
*/
|
|
59
59
|
get(assetId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset>;
|
|
60
60
|
/**
|
|
@@ -66,7 +66,7 @@ export declare class Assets {
|
|
|
66
66
|
* @throws {@link Webflow.InternalServerError}
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
|
-
* await webflow.assets.delete("
|
|
69
|
+
* await webflow.assets.delete("string")
|
|
70
70
|
*/
|
|
71
71
|
delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise<void>;
|
|
72
72
|
/**
|
|
@@ -78,7 +78,7 @@ export declare class Assets {
|
|
|
78
78
|
* @throws {@link Webflow.InternalServerError}
|
|
79
79
|
*
|
|
80
80
|
* @example
|
|
81
|
-
* await webflow.assets.listFolders("
|
|
81
|
+
* await webflow.assets.listFolders("string")
|
|
82
82
|
*/
|
|
83
83
|
listFolders(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolderList>;
|
|
84
84
|
/**
|
|
@@ -90,7 +90,7 @@ export declare class Assets {
|
|
|
90
90
|
* @throws {@link Webflow.InternalServerError}
|
|
91
91
|
*
|
|
92
92
|
* @example
|
|
93
|
-
* await webflow.assets.createFolder("
|
|
93
|
+
* await webflow.assets.createFolder("string", {
|
|
94
94
|
* displayName: "my asset folder",
|
|
95
95
|
* parentFolder: "6390c49774a71f99f21a08eb"
|
|
96
96
|
* })
|
|
@@ -105,7 +105,7 @@ export declare class Assets {
|
|
|
105
105
|
* @throws {@link Webflow.InternalServerError}
|
|
106
106
|
*
|
|
107
107
|
* @example
|
|
108
|
-
* await webflow.assets.getFolder("
|
|
108
|
+
* await webflow.assets.getFolder("string")
|
|
109
109
|
*/
|
|
110
110
|
getFolder(assetFolderId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolder>;
|
|
111
111
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -58,7 +58,7 @@ class Assets {
|
|
|
58
58
|
* @throws {@link Webflow.InternalServerError}
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
|
-
* await webflow.assets.list("
|
|
61
|
+
* await webflow.assets.list("string")
|
|
62
62
|
*/
|
|
63
63
|
list(siteId, requestOptions) {
|
|
64
64
|
var _a;
|
|
@@ -128,7 +128,7 @@ class Assets {
|
|
|
128
128
|
* @throws {@link Webflow.InternalServerError}
|
|
129
129
|
*
|
|
130
130
|
* @example
|
|
131
|
-
* await webflow.assets.create("
|
|
131
|
+
* await webflow.assets.create("string", {
|
|
132
132
|
* fileName: "file.png",
|
|
133
133
|
* fileHash: "3c7d87c9575702bc3b1e991f4d3c638e",
|
|
134
134
|
* parentFolder: "6436b1ce5281cace05b65aea"
|
|
@@ -203,7 +203,7 @@ class Assets {
|
|
|
203
203
|
* @throws {@link Webflow.InternalServerError}
|
|
204
204
|
*
|
|
205
205
|
* @example
|
|
206
|
-
* await webflow.assets.get("
|
|
206
|
+
* await webflow.assets.get("string")
|
|
207
207
|
*/
|
|
208
208
|
get(assetId, requestOptions) {
|
|
209
209
|
var _a;
|
|
@@ -273,7 +273,7 @@ class Assets {
|
|
|
273
273
|
* @throws {@link Webflow.InternalServerError}
|
|
274
274
|
*
|
|
275
275
|
* @example
|
|
276
|
-
* await webflow.assets.delete("
|
|
276
|
+
* await webflow.assets.delete("string")
|
|
277
277
|
*/
|
|
278
278
|
delete(assetId, requestOptions) {
|
|
279
279
|
var _a;
|
|
@@ -337,7 +337,7 @@ class Assets {
|
|
|
337
337
|
* @throws {@link Webflow.InternalServerError}
|
|
338
338
|
*
|
|
339
339
|
* @example
|
|
340
|
-
* await webflow.assets.listFolders("
|
|
340
|
+
* await webflow.assets.listFolders("string")
|
|
341
341
|
*/
|
|
342
342
|
listFolders(siteId, requestOptions) {
|
|
343
343
|
var _a;
|
|
@@ -407,7 +407,7 @@ class Assets {
|
|
|
407
407
|
* @throws {@link Webflow.InternalServerError}
|
|
408
408
|
*
|
|
409
409
|
* @example
|
|
410
|
-
* await webflow.assets.createFolder("
|
|
410
|
+
* await webflow.assets.createFolder("string", {
|
|
411
411
|
* displayName: "my asset folder",
|
|
412
412
|
* parentFolder: "6390c49774a71f99f21a08eb"
|
|
413
413
|
* })
|
|
@@ -481,7 +481,7 @@ class Assets {
|
|
|
481
481
|
* @throws {@link Webflow.InternalServerError}
|
|
482
482
|
*
|
|
483
483
|
* @example
|
|
484
|
-
* await webflow.assets.getFolder("
|
|
484
|
+
* await webflow.assets.getFolder("string")
|
|
485
485
|
*/
|
|
486
486
|
getFolder(assetFolderId, requestOptions) {
|
|
487
487
|
var _a;
|
|
@@ -28,7 +28,7 @@ export declare class Collections {
|
|
|
28
28
|
* @throws {@link Webflow.InternalServerError}
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
|
-
* await webflow.collections.list("
|
|
31
|
+
* await webflow.collections.list("string")
|
|
32
32
|
*/
|
|
33
33
|
list(siteId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.CollectionList>;
|
|
34
34
|
/**
|
|
@@ -38,6 +38,13 @@ export declare class Collections {
|
|
|
38
38
|
* @throws {@link Webflow.NotFoundError}
|
|
39
39
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
40
40
|
* @throws {@link Webflow.InternalServerError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await webflow.collections.create("string", {
|
|
44
|
+
* displayName: "Blog Posts",
|
|
45
|
+
* singularName: "Blog Post",
|
|
46
|
+
* slug: "posts"
|
|
47
|
+
* })
|
|
41
48
|
*/
|
|
42
49
|
create(siteId: string, request: Webflow.CollectionsCreateRequest, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
|
|
43
50
|
/**
|
|
@@ -49,7 +56,7 @@ export declare class Collections {
|
|
|
49
56
|
* @throws {@link Webflow.InternalServerError}
|
|
50
57
|
*
|
|
51
58
|
* @example
|
|
52
|
-
* await webflow.collections.get("
|
|
59
|
+
* await webflow.collections.get("string")
|
|
53
60
|
*/
|
|
54
61
|
get(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
|
|
55
62
|
/**
|
|
@@ -61,7 +68,7 @@ export declare class Collections {
|
|
|
61
68
|
* @throws {@link Webflow.InternalServerError}
|
|
62
69
|
*
|
|
63
70
|
* @example
|
|
64
|
-
* await webflow.collections.deleteCollection("
|
|
71
|
+
* await webflow.collections.deleteCollection("string")
|
|
65
72
|
*/
|
|
66
73
|
deleteCollection(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
|
|
67
74
|
/**
|
|
@@ -73,7 +80,7 @@ export declare class Collections {
|
|
|
73
80
|
* @throws {@link Webflow.InternalServerError}
|
|
74
81
|
*
|
|
75
82
|
* @example
|
|
76
|
-
* await webflow.collections.delete("
|
|
83
|
+
* await webflow.collections.delete("string", "string")
|
|
77
84
|
*/
|
|
78
85
|
delete(collectionId: string, fieldId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
|
|
79
86
|
protected _fields: Fields | undefined;
|
|
@@ -60,7 +60,7 @@ class Collections {
|
|
|
60
60
|
* @throws {@link Webflow.InternalServerError}
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
|
-
* await webflow.collections.list("
|
|
63
|
+
* await webflow.collections.list("string")
|
|
64
64
|
*/
|
|
65
65
|
list(siteId, requestOptions) {
|
|
66
66
|
var _a;
|
|
@@ -128,6 +128,13 @@ class Collections {
|
|
|
128
128
|
* @throws {@link Webflow.NotFoundError}
|
|
129
129
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
130
130
|
* @throws {@link Webflow.InternalServerError}
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* await webflow.collections.create("string", {
|
|
134
|
+
* displayName: "Blog Posts",
|
|
135
|
+
* singularName: "Blog Post",
|
|
136
|
+
* slug: "posts"
|
|
137
|
+
* })
|
|
131
138
|
*/
|
|
132
139
|
create(siteId, request, requestOptions) {
|
|
133
140
|
var _a;
|
|
@@ -198,7 +205,7 @@ class Collections {
|
|
|
198
205
|
* @throws {@link Webflow.InternalServerError}
|
|
199
206
|
*
|
|
200
207
|
* @example
|
|
201
|
-
* await webflow.collections.get("
|
|
208
|
+
* await webflow.collections.get("string")
|
|
202
209
|
*/
|
|
203
210
|
get(collectionId, requestOptions) {
|
|
204
211
|
var _a;
|
|
@@ -268,7 +275,7 @@ class Collections {
|
|
|
268
275
|
* @throws {@link Webflow.InternalServerError}
|
|
269
276
|
*
|
|
270
277
|
* @example
|
|
271
|
-
* await webflow.collections.deleteCollection("
|
|
278
|
+
* await webflow.collections.deleteCollection("string")
|
|
272
279
|
*/
|
|
273
280
|
deleteCollection(collectionId, requestOptions) {
|
|
274
281
|
var _a;
|
|
@@ -332,7 +339,7 @@ class Collections {
|
|
|
332
339
|
* @throws {@link Webflow.InternalServerError}
|
|
333
340
|
*
|
|
334
341
|
* @example
|
|
335
|
-
* await webflow.collections.delete("
|
|
342
|
+
* await webflow.collections.delete("string", "string")
|
|
336
343
|
*/
|
|
337
344
|
delete(collectionId, fieldId, requestOptions) {
|
|
338
345
|
var _a;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* displayName: "Blog Posts",
|
|
8
|
+
* singularName: "Blog Post",
|
|
9
|
+
* slug: "posts"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
4
12
|
export interface CollectionsCreateRequest {
|
|
5
13
|
/** Name of the collection. Each collection name must be distinct. */
|
|
6
14
|
displayName: string;
|
|
@@ -24,6 +24,14 @@ export declare class Fields {
|
|
|
24
24
|
* @throws {@link Webflow.NotFoundError}
|
|
25
25
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
26
26
|
* @throws {@link Webflow.InternalServerError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await webflow.collections.fields.create("string", {
|
|
30
|
+
* id: "string",
|
|
31
|
+
* isRequired: true,
|
|
32
|
+
* type: Webflow.FieldType.PlainText,
|
|
33
|
+
* displayName: "string"
|
|
34
|
+
* })
|
|
27
35
|
*/
|
|
28
36
|
create(collectionId: string, request: Webflow.Field, requestOptions?: Fields.RequestOptions): Promise<Webflow.Field>;
|
|
29
37
|
/**
|
|
@@ -33,6 +41,9 @@ export declare class Fields {
|
|
|
33
41
|
* @throws {@link Webflow.NotFoundError}
|
|
34
42
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
35
43
|
* @throws {@link Webflow.InternalServerError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await webflow.collections.fields.update("string", "string", {})
|
|
36
47
|
*/
|
|
37
48
|
update(collectionId: string, fieldId: string, request?: Webflow.collections.FieldUpdate, requestOptions?: Fields.RequestOptions): Promise<Webflow.Field>;
|
|
38
49
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -56,6 +56,14 @@ class Fields {
|
|
|
56
56
|
* @throws {@link Webflow.NotFoundError}
|
|
57
57
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
58
58
|
* @throws {@link Webflow.InternalServerError}
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* await webflow.collections.fields.create("string", {
|
|
62
|
+
* id: "string",
|
|
63
|
+
* isRequired: true,
|
|
64
|
+
* type: Webflow.FieldType.PlainText,
|
|
65
|
+
* displayName: "string"
|
|
66
|
+
* })
|
|
59
67
|
*/
|
|
60
68
|
create(collectionId, request, requestOptions) {
|
|
61
69
|
var _a;
|
|
@@ -124,6 +132,9 @@ class Fields {
|
|
|
124
132
|
* @throws {@link Webflow.NotFoundError}
|
|
125
133
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
126
134
|
* @throws {@link Webflow.InternalServerError}
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* await webflow.collections.fields.update("string", "string", {})
|
|
127
138
|
*/
|
|
128
139
|
update(collectionId, fieldId, request = {}, requestOptions) {
|
|
129
140
|
var _a;
|
|
@@ -26,7 +26,7 @@ export declare class Items {
|
|
|
26
26
|
* @throws {@link Webflow.InternalServerError}
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* await webflow.collections.items.listItems("
|
|
29
|
+
* await webflow.collections.items.listItems("string", {})
|
|
30
30
|
*/
|
|
31
31
|
listItems(collectionId: string, request?: Webflow.collections.ItemsListItemsRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItemList>;
|
|
32
32
|
/**
|
|
@@ -38,11 +38,12 @@ export declare class Items {
|
|
|
38
38
|
* @throws {@link Webflow.InternalServerError}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* await webflow.collections.items.createItem("
|
|
41
|
+
* await webflow.collections.items.createItem("string", {
|
|
42
42
|
* id: "580e64008c9a982ac9b8b754",
|
|
43
43
|
* lastPublished: "2023-03-17T18:47:35.560Z",
|
|
44
44
|
* lastUpdated: "2023-03-17T18:47:35.560Z",
|
|
45
|
-
* createdOn: "2023-03-17T18:47:35.560Z"
|
|
45
|
+
* createdOn: "2023-03-17T18:47:35.560Z",
|
|
46
|
+
* fieldData: {}
|
|
46
47
|
* })
|
|
47
48
|
*/
|
|
48
49
|
createItem(collectionId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<void>;
|
|
@@ -55,7 +56,7 @@ export declare class Items {
|
|
|
55
56
|
* @throws {@link Webflow.InternalServerError}
|
|
56
57
|
*
|
|
57
58
|
* @example
|
|
58
|
-
* await webflow.collections.items.getItem("
|
|
59
|
+
* await webflow.collections.items.getItem("string", "string")
|
|
59
60
|
*/
|
|
60
61
|
getItem(collectionId: string, itemId: string, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
61
62
|
/**
|
|
@@ -67,7 +68,7 @@ export declare class Items {
|
|
|
67
68
|
* @throws {@link Webflow.InternalServerError}
|
|
68
69
|
*
|
|
69
70
|
* @example
|
|
70
|
-
* await webflow.collections.items.deleteItem("
|
|
71
|
+
* await webflow.collections.items.deleteItem("string", "string")
|
|
71
72
|
*/
|
|
72
73
|
deleteItem(collectionId: string, itemId: string, requestOptions?: Items.RequestOptions): Promise<void>;
|
|
73
74
|
/**
|
|
@@ -79,11 +80,12 @@ export declare class Items {
|
|
|
79
80
|
* @throws {@link Webflow.InternalServerError}
|
|
80
81
|
*
|
|
81
82
|
* @example
|
|
82
|
-
* await webflow.collections.items.updateItem("
|
|
83
|
+
* await webflow.collections.items.updateItem("string", "string", {
|
|
83
84
|
* id: "580e64008c9a982ac9b8b754",
|
|
84
85
|
* lastPublished: "2023-03-17T18:47:35.560Z",
|
|
85
86
|
* lastUpdated: "2023-03-17T18:47:35.560Z",
|
|
86
|
-
* createdOn: "2023-03-17T18:47:35.560Z"
|
|
87
|
+
* createdOn: "2023-03-17T18:47:35.560Z",
|
|
88
|
+
* fieldData: {}
|
|
87
89
|
* })
|
|
88
90
|
*/
|
|
89
91
|
updateItem(collectionId: string, itemId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
@@ -96,7 +98,7 @@ export declare class Items {
|
|
|
96
98
|
* @throws {@link Webflow.InternalServerError}
|
|
97
99
|
*
|
|
98
100
|
* @example
|
|
99
|
-
* await webflow.collections.items.publishItem("
|
|
101
|
+
* await webflow.collections.items.publishItem("string", {
|
|
100
102
|
* itemIds: []
|
|
101
103
|
* })
|
|
102
104
|
*/
|
|
@@ -58,7 +58,7 @@ class Items {
|
|
|
58
58
|
* @throws {@link Webflow.InternalServerError}
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
|
-
* await webflow.collections.items.listItems("
|
|
61
|
+
* await webflow.collections.items.listItems("string", {})
|
|
62
62
|
*/
|
|
63
63
|
listItems(collectionId, request = {}, requestOptions) {
|
|
64
64
|
var _a;
|
|
@@ -137,11 +137,12 @@ class Items {
|
|
|
137
137
|
* @throws {@link Webflow.InternalServerError}
|
|
138
138
|
*
|
|
139
139
|
* @example
|
|
140
|
-
* await webflow.collections.items.createItem("
|
|
140
|
+
* await webflow.collections.items.createItem("string", {
|
|
141
141
|
* id: "580e64008c9a982ac9b8b754",
|
|
142
142
|
* lastPublished: "2023-03-17T18:47:35.560Z",
|
|
143
143
|
* lastUpdated: "2023-03-17T18:47:35.560Z",
|
|
144
|
-
* createdOn: "2023-03-17T18:47:35.560Z"
|
|
144
|
+
* createdOn: "2023-03-17T18:47:35.560Z",
|
|
145
|
+
* fieldData: {}
|
|
145
146
|
* })
|
|
146
147
|
*/
|
|
147
148
|
createItem(collectionId, request, requestOptions) {
|
|
@@ -207,7 +208,7 @@ class Items {
|
|
|
207
208
|
* @throws {@link Webflow.InternalServerError}
|
|
208
209
|
*
|
|
209
210
|
* @example
|
|
210
|
-
* await webflow.collections.items.getItem("
|
|
211
|
+
* await webflow.collections.items.getItem("string", "string")
|
|
211
212
|
*/
|
|
212
213
|
getItem(collectionId, itemId, requestOptions) {
|
|
213
214
|
var _a;
|
|
@@ -277,7 +278,7 @@ class Items {
|
|
|
277
278
|
* @throws {@link Webflow.InternalServerError}
|
|
278
279
|
*
|
|
279
280
|
* @example
|
|
280
|
-
* await webflow.collections.items.deleteItem("
|
|
281
|
+
* await webflow.collections.items.deleteItem("string", "string")
|
|
281
282
|
*/
|
|
282
283
|
deleteItem(collectionId, itemId, requestOptions) {
|
|
283
284
|
var _a;
|
|
@@ -341,11 +342,12 @@ class Items {
|
|
|
341
342
|
* @throws {@link Webflow.InternalServerError}
|
|
342
343
|
*
|
|
343
344
|
* @example
|
|
344
|
-
* await webflow.collections.items.updateItem("
|
|
345
|
+
* await webflow.collections.items.updateItem("string", "string", {
|
|
345
346
|
* id: "580e64008c9a982ac9b8b754",
|
|
346
347
|
* lastPublished: "2023-03-17T18:47:35.560Z",
|
|
347
348
|
* lastUpdated: "2023-03-17T18:47:35.560Z",
|
|
348
|
-
* createdOn: "2023-03-17T18:47:35.560Z"
|
|
349
|
+
* createdOn: "2023-03-17T18:47:35.560Z",
|
|
350
|
+
* fieldData: {}
|
|
349
351
|
* })
|
|
350
352
|
*/
|
|
351
353
|
updateItem(collectionId, itemId, request, requestOptions) {
|
|
@@ -417,7 +419,7 @@ class Items {
|
|
|
417
419
|
* @throws {@link Webflow.InternalServerError}
|
|
418
420
|
*
|
|
419
421
|
* @example
|
|
420
|
-
* await webflow.collections.items.publishItem("
|
|
422
|
+
* await webflow.collections.items.publishItem("string", {
|
|
421
423
|
* itemIds: []
|
|
422
424
|
* })
|
|
423
425
|
*/
|
|
@@ -30,7 +30,7 @@ export declare class Ecommerce {
|
|
|
30
30
|
* @throws {@link Webflow.InternalServerError}
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
|
-
* await webflow.ecommerce.getSettings("
|
|
33
|
+
* await webflow.ecommerce.getSettings("string")
|
|
34
34
|
*/
|
|
35
35
|
getSettings(siteId: string, requestOptions?: Ecommerce.RequestOptions): Promise<Webflow.EcommerceSettings>;
|
|
36
36
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -28,7 +28,7 @@ export declare class Forms {
|
|
|
28
28
|
* @throws {@link Webflow.InternalServerError}
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
|
-
* await webflow.forms.list("
|
|
31
|
+
* await webflow.forms.list("string")
|
|
32
32
|
*/
|
|
33
33
|
list(siteId: string, requestOptions?: Forms.RequestOptions): Promise<Webflow.FormList>;
|
|
34
34
|
/**
|
|
@@ -41,7 +41,7 @@ export declare class Forms {
|
|
|
41
41
|
* @throws {@link Webflow.InternalServerError}
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
44
|
-
* await webflow.forms.get("
|
|
44
|
+
* await webflow.forms.get("string")
|
|
45
45
|
*/
|
|
46
46
|
get(formId: string, requestOptions?: Forms.RequestOptions): Promise<Webflow.Form>;
|
|
47
47
|
/**
|
|
@@ -54,7 +54,7 @@ export declare class Forms {
|
|
|
54
54
|
* @throws {@link Webflow.InternalServerError}
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
|
-
* await webflow.forms.listSubmissions("
|
|
57
|
+
* await webflow.forms.listSubmissions("string")
|
|
58
58
|
*/
|
|
59
59
|
listSubmissions(formId: string, requestOptions?: Forms.RequestOptions): Promise<Webflow.FormSubmissionList>;
|
|
60
60
|
/**
|
|
@@ -67,7 +67,7 @@ export declare class Forms {
|
|
|
67
67
|
* @throws {@link Webflow.InternalServerError}
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
|
-
* await webflow.forms.getSubmission("
|
|
70
|
+
* await webflow.forms.getSubmission("string")
|
|
71
71
|
*/
|
|
72
72
|
getSubmission(formSubmissionId: string, requestOptions?: Forms.RequestOptions): Promise<Webflow.FormSubmission>;
|
|
73
73
|
/**
|
|
@@ -81,7 +81,7 @@ export declare class Forms {
|
|
|
81
81
|
* @throws {@link Webflow.InternalServerError}
|
|
82
82
|
*
|
|
83
83
|
* @example
|
|
84
|
-
* await webflow.forms.updateSubmission("
|
|
84
|
+
* await webflow.forms.updateSubmission("string", {})
|
|
85
85
|
*/
|
|
86
86
|
updateSubmission(formSubmissionId: string, request?: Webflow.FormsUpdateSubmissionRequest, requestOptions?: Forms.RequestOptions): Promise<Webflow.FormSubmission>;
|
|
87
87
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -60,7 +60,7 @@ class Forms {
|
|
|
60
60
|
* @throws {@link Webflow.InternalServerError}
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
|
-
* await webflow.forms.list("
|
|
63
|
+
* await webflow.forms.list("string")
|
|
64
64
|
*/
|
|
65
65
|
list(siteId, requestOptions) {
|
|
66
66
|
var _a;
|
|
@@ -135,7 +135,7 @@ class Forms {
|
|
|
135
135
|
* @throws {@link Webflow.InternalServerError}
|
|
136
136
|
*
|
|
137
137
|
* @example
|
|
138
|
-
* await webflow.forms.get("
|
|
138
|
+
* await webflow.forms.get("string")
|
|
139
139
|
*/
|
|
140
140
|
get(formId, requestOptions) {
|
|
141
141
|
var _a;
|
|
@@ -208,7 +208,7 @@ class Forms {
|
|
|
208
208
|
* @throws {@link Webflow.InternalServerError}
|
|
209
209
|
*
|
|
210
210
|
* @example
|
|
211
|
-
* await webflow.forms.listSubmissions("
|
|
211
|
+
* await webflow.forms.listSubmissions("string")
|
|
212
212
|
*/
|
|
213
213
|
listSubmissions(formId, requestOptions) {
|
|
214
214
|
var _a;
|
|
@@ -281,7 +281,7 @@ class Forms {
|
|
|
281
281
|
* @throws {@link Webflow.InternalServerError}
|
|
282
282
|
*
|
|
283
283
|
* @example
|
|
284
|
-
* await webflow.forms.getSubmission("
|
|
284
|
+
* await webflow.forms.getSubmission("string")
|
|
285
285
|
*/
|
|
286
286
|
getSubmission(formSubmissionId, requestOptions) {
|
|
287
287
|
var _a;
|
|
@@ -355,7 +355,7 @@ class Forms {
|
|
|
355
355
|
* @throws {@link Webflow.InternalServerError}
|
|
356
356
|
*
|
|
357
357
|
* @example
|
|
358
|
-
* await webflow.forms.updateSubmission("
|
|
358
|
+
* await webflow.forms.updateSubmission("string", {})
|
|
359
359
|
*/
|
|
360
360
|
updateSubmission(formSubmissionId, request = {}, requestOptions) {
|
|
361
361
|
var _a;
|
|
@@ -30,7 +30,7 @@ export declare class Inventory {
|
|
|
30
30
|
* @throws {@link Webflow.InternalServerError}
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
|
-
* await webflow.inventory.list("
|
|
33
|
+
* await webflow.inventory.list("string", "string")
|
|
34
34
|
*/
|
|
35
35
|
list(collectionId: string, itemId: string, requestOptions?: Inventory.RequestOptions): Promise<Webflow.InventoryItem>;
|
|
36
36
|
/**
|
|
@@ -46,7 +46,7 @@ export declare class Inventory {
|
|
|
46
46
|
* @throws {@link Webflow.InternalServerError}
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
|
-
* await webflow.inventory.update("
|
|
49
|
+
* await webflow.inventory.update("string", "string", {
|
|
50
50
|
* inventoryType: Webflow.InventoryUpdateRequestInventoryType.Infinite,
|
|
51
51
|
* updateQuantity: 1,
|
|
52
52
|
* quantity: 100
|
|
@@ -62,7 +62,7 @@ class Inventory {
|
|
|
62
62
|
* @throws {@link Webflow.InternalServerError}
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
|
-
* await webflow.inventory.list("
|
|
65
|
+
* await webflow.inventory.list("string", "string")
|
|
66
66
|
*/
|
|
67
67
|
list(collectionId, itemId, requestOptions) {
|
|
68
68
|
var _a;
|
|
@@ -140,7 +140,7 @@ class Inventory {
|
|
|
140
140
|
* @throws {@link Webflow.InternalServerError}
|
|
141
141
|
*
|
|
142
142
|
* @example
|
|
143
|
-
* await webflow.inventory.update("
|
|
143
|
+
* await webflow.inventory.update("string", "string", {
|
|
144
144
|
* inventoryType: Webflow.InventoryUpdateRequestInventoryType.Infinite,
|
|
145
145
|
* updateQuantity: 1,
|
|
146
146
|
* quantity: 100
|