Skip to content

Commit eb39cd4

Browse files
committed
SDK regeneration
1 parent 47496a1 commit eb39cd4

File tree

117 files changed

+2844
-1057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+2844
-1057
lines changed

.mock/definition/__package__.yml

+207-78
Large diffs are not rendered by default.

.mock/definition/assets.yml

+79-44
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ service:
99
method: GET
1010
auth: true
1111
docs: |
12-
List assets for a given site
12+
List of assets uploaded to a site
1313
1414
Required scope | `assets:read`
1515
source:
@@ -55,35 +55,64 @@ service:
5555
width: 500
5656
height: 900
5757
quality: 100
58-
altText: A red chair
58+
altText: A single candy wrapper
59+
- id: 63e5889e7fe4eafa7384cea5
60+
contentType: image/png
61+
size: 2212772
62+
siteId: 63938b302ea6b0aa6f3d8745
63+
hostedUrl: >-
64+
https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg
65+
originalFileName: Gum-Wrapper.svg
66+
displayName: 63e5889e7fe4eafa7384cea5_Gum-Wrapper.png
67+
lastUpdated: '2023-03-01T23:42:57Z'
68+
createdOn: '2023-02-09T23:58:22Z'
69+
variants:
70+
- hostedUrl: >-
71+
https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
72+
originalFileName: >-
73+
Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
74+
displayName: >-
75+
660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
76+
format: png
77+
width: 500
78+
height: 900
79+
quality: 100
80+
altText: A single gum wrapper
81+
pagination:
82+
limit: 2
83+
offset: 0
84+
total: 2
5985
create:
6086
path: /sites/{site_id}/assets
6187
method: POST
6288
auth: true
6389
docs: >
64-
Create a new asset entry.
90+
The first step in uploading an asset to a site.
6591
6692
6793
6894
This endpoint generates a response with the following information:
69-
`uploadUrl` and `uploadDetails`.
95+
`uploadUrl` and `uploadDetails`.
7096
71-
You can use these two properties to [upload the file to Amazon s3 by
72-
making a
73-
POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html)
7497
75-
request to the `uploadUrl` with the `uploadDetails` object as your
76-
header information in the request.
7798
78-
79-
Required scope | `assets:write`
99+
Use these properties in the header of a [POST request to Amazson
100+
s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html)
101+
to complete the upload.
102+
103+
104+
105+
To learn more about how to upload assets to Webflow, see our [assets
106+
guide](/data/docs/working-with-assets).
107+
108+
Required scope | `assets:write`
80109
source:
81110
openapi: ../../../openapi/referenced-specs/v2.yml
82111
path-parameters:
83112
site_id:
84113
type: string
85114
docs: Unique identifier for a Site
86-
display-name: Create Asset Metadata
115+
display-name: Upload Asset
87116
request:
88117
name: AssetsCreateRequest
89118
body:
@@ -146,7 +175,7 @@ service:
146175
method: GET
147176
auth: true
148177
docs: |
149-
Get an Asset
178+
Get details about an asset
150179
151180
Required scope | `assets:read`
152181
source:
@@ -170,25 +199,28 @@ service:
170199
asset_id: 580e63fc8c9a982ac9b8b745
171200
response:
172201
body:
173-
id: 55131cd036c09f7d07883dfc
202+
id: 63e5889e7fe4eafa7384cea4
174203
contentType: image/png
175-
size: 1500
176-
siteId: 62749158efef318abc8d5a0f
177-
hostedUrl: example.com/hostedimage.png
178-
originalFileName: image.png
179-
displayName: example-image-123.png
180-
lastUpdated: '2016-09-06T21:12:22Z'
181-
createdOn: '2016-09-02T23:26:22Z'
204+
size: 2212772
205+
siteId: 63938b302ea6b0aa6f3d8745
206+
hostedUrl: >-
207+
https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg
208+
originalFileName: Candy-Wrapper.svg
209+
displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png
210+
lastUpdated: '2023-03-01T23:42:57Z'
211+
createdOn: '2023-02-09T23:58:22Z'
182212
variants:
183-
- hostedUrl: example.com/hostedimage.png
184-
originalFileName: image.png
185-
displayName: A brown dog
186-
format: format
187-
width: 1500
213+
- hostedUrl: >-
214+
https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
215+
originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
216+
displayName: >-
217+
660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
218+
format: png
219+
width: 500
188220
height: 900
189-
quality: 1
221+
quality: 100
190222
error: error
191-
altText: A red chair
223+
altText: A single candy wrapper
192224
delete:
193225
path: /assets/{asset_id}
194226
method: DELETE
@@ -218,7 +250,7 @@ service:
218250
method: PATCH
219251
auth: true
220252
docs: |
221-
Update an Asset
253+
Update details of an Asset.
222254
223255
Required scope | `assets:write`
224256
source:
@@ -256,25 +288,28 @@ service:
256288
request: {}
257289
response:
258290
body:
259-
id: 55131cd036c09f7d07883dfc
291+
id: 63e5889e7fe4eafa7384cea4
260292
contentType: image/png
261-
size: 1500
262-
siteId: 62749158efef318abc8d5a0f
263-
hostedUrl: example.com/hostedimage.png
264-
originalFileName: image.png
265-
displayName: example-image-123.png
266-
lastUpdated: '2016-09-06T21:12:22Z'
267-
createdOn: '2016-09-02T23:26:22Z'
293+
size: 2212772
294+
siteId: 63938b302ea6b0aa6f3d8745
295+
hostedUrl: >-
296+
https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg
297+
originalFileName: Candy-Wrapper.svg
298+
displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png
299+
lastUpdated: '2023-03-01T23:42:57Z'
300+
createdOn: '2023-02-09T23:58:22Z'
268301
variants:
269-
- hostedUrl: example.com/hostedimage.png
270-
originalFileName: image.png
271-
displayName: A brown dog
272-
format: format
273-
width: 1500
302+
- hostedUrl: >-
303+
https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
304+
originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
305+
displayName: >-
306+
660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
307+
format: png
308+
width: 500
274309
height: 900
275-
quality: 1
310+
quality: 100
276311
error: error
277-
altText: A red chair
312+
altText: A single candy wrapper
278313
list-folders:
279314
path: /sites/{site_id}/asset_folders
280315
method: GET

.mock/definition/collections.yml

+39-6
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ service:
8080
slug:
8181
type: optional<string>
8282
docs: Part of a URL that identifier
83+
fields:
84+
type: optional<list<root.FieldCreate>>
85+
docs: An array of custom fields to add to the collection
8386
content-type: application/json
8487
response:
8588
docs: Request was successful
@@ -88,6 +91,7 @@ service:
8891
- root.BadRequestError
8992
- root.UnauthorizedError
9093
- root.NotFoundError
94+
- root.ConflictError
9195
- root.TooManyRequestsError
9296
- root.InternalServerError
9397
examples:
@@ -97,22 +101,51 @@ service:
97101
displayName: Blog Posts
98102
singularName: Blog Post
99103
slug: posts
104+
fields:
105+
- isRequired: true
106+
type: PlainText
107+
displayName: Title
108+
helpText: The title of the blog post
109+
- isRequired: true
110+
type: RichText
111+
displayName: Content
112+
helpText: The content of the blog post
113+
- isRequired: true
114+
type: Reference
115+
displayName: Author
116+
helpText: The author of the blog post
117+
metadata:
118+
collectionId: 23cc2d952d4e4631ffd4345d2743db4e
100119
response:
101120
body:
102-
id: 580e63fc8c9a982ac9b8b745
121+
id: 562ac0395358780a1f5e6fbd
103122
displayName: Blog Posts
104123
singularName: Blog Post
105-
slug: post
124+
slug: posts
106125
createdOn: '2016-10-24T19:41:48Z'
107126
lastUpdated: '2016-10-24T19:42:38Z'
108127
fields:
109-
- id: 23cc2d952d4e4631ffd4345d2743db4e
128+
- id: id
110129
isRequired: true
111130
isEditable: true
112131
type: PlainText
113-
slug: name
114-
displayName: Name
115-
helpText: helpText
132+
slug: title
133+
displayName: Title
134+
helpText: The title of the blog post
135+
- id: id
136+
isRequired: true
137+
isEditable: true
138+
type: RichText
139+
slug: content
140+
displayName: Content
141+
helpText: The content of the blog post
142+
- id: id
143+
isRequired: true
144+
isEditable: true
145+
type: Reference
146+
slug: author
147+
displayName: Author
148+
helpText: The author of the blog post
116149
get:
117150
path: /collections/{collection_id}
118151
method: GET

.mock/definition/collections/fields.yml

+6-45
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
types:
2-
FieldCreateType:
3-
enum:
4-
- Color
5-
- DateTime
6-
- Email
7-
- ExtFileRef
8-
- File
9-
- Image
10-
- Link
11-
- MultiImage
12-
- Number
13-
- Phone
14-
- PlainText
15-
- RichText
16-
- Switch
17-
- Video
18-
docs: Choose these appropriate field type for your collection data
19-
inline: true
20-
source:
21-
openapi: ../../../openapi/referenced-specs/v2.yml
221
imports:
232
root: ../__package__.yml
243
service:
@@ -30,7 +9,7 @@ service:
309
method: POST
3110
auth: true
3211
docs: >
33-
Create a custom field in a collection.
12+
Create a custom field in a collection.
3413
3514
3615
Slugs must be all lowercase letters without spaces.
@@ -40,10 +19,7 @@ service:
4019
4120
convert the slug to lowercase and replace spaces with "-."
4221
43-
44-
Only some field types can be created through the API.
45-
46-
This endpoint does not currently support bulk creation.
22+
This endpoint does not currently support bulk creation.
4723
4824
4925
Required scope | `cms:write`
@@ -55,21 +31,7 @@ service:
5531
docs: Unique identifier for a Collection
5632
display-name: Create Collection Field
5733
request:
58-
name: FieldCreate
59-
body:
60-
properties:
61-
isRequired:
62-
type: optional<boolean>
63-
docs: define whether a field is required in a collection
64-
type:
65-
type: FieldCreateType
66-
docs: Choose these appropriate field type for your collection data
67-
displayName:
68-
type: string
69-
docs: The name of a field
70-
helpText:
71-
type: optional<string>
72-
docs: Additional text to help anyone filling out this field
34+
body: root.FieldCreate
7335
content-type: application/json
7436
response:
7537
docs: Request was successful
@@ -78,16 +40,15 @@ service:
7840
- root.BadRequestError
7941
- root.UnauthorizedError
8042
- root.NotFoundError
43+
- root.ConflictError
8144
- root.TooManyRequestsError
8245
- root.InternalServerError
8346
examples:
8447
- path-parameters:
8548
collection_id: 580e63fc8c9a982ac9b8b745
8649
request:
87-
isRequired: false
88-
type: RichText
89-
displayName: Post Body
90-
helpText: Add the body of your post here
50+
type: Color
51+
displayName: displayName
9152
response:
9253
body:
9354
id: 75821f618da60c18383330bcc0ca488b

0 commit comments

Comments
 (0)