Skip to content

Commit d7c27d9

Browse files
authoredDec 4, 2024··
break: release 3.0.0 (#185)
1 parent 2f92f29 commit d7c27d9

File tree

26 files changed

+234
-395
lines changed

26 files changed

+234
-395
lines changed
 

‎MIGRATION.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Migration
2+
3+
When migrating to a new major version of this SDK, please consult the notes here for breaking changes, new features, and related fixes.
4+
5+
## v2.x.x -> v3.0.0
6+
7+
There are a few breaking changes with v3.0.0 of the Webflow JS SDK
8+
9+
### Breaking
10+
11+
#### CMS APIs
12+
13+
- CHANGED: Deleting a Collection is now achieved through `client.collections.delete()`, which was previously an API used to delete a Collection field.
14+
- We've removed `client.collections.deleteCollection()`
15+
- To delete a Collection field, use `client.collections.fields.delete()`
16+
- CHANGED: Creating bulk CMS Items in multiple locales is now achieved through `client.collections.createItems()`
17+
- We've removed `client.collections.createItemForMultipleLocales()`
18+
19+
#### Pages APIs
20+
21+
- CHANGED: The `locale` query parameter is now `localeId`
22+
23+
### New Features
24+
25+
#### CMS APIs
26+
27+
- We've added Bulk API support. See [docs](https://developers.webflow.com/data/reference/cms/collection-items/bulk-items/create-items) for more on usage.
28+
- `createItems()`
29+
- `updateItems()`
30+
- `updateItemsLive()`
31+
- `deleteItems()`
32+
- `deleteItemsLive()`
33+
34+
### Fixes
35+
36+
- Some APIs that created resources (i.e. `collections.items.createItem()`) had types that required an `id`, which is not possible to provide. This is no longer required.
37+
- `fieldData` type in CMS Items now allows arbitrary extra key/value pairs

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webflow-api",
3-
"version": "2.5.0",
3+
"version": "3.0.0",
44
"private": false,
55
"repository": "https://github.com/webflow/js-webflow-api",
66
"main": "./index.js",

‎src/api/resources/accessGroups/client/Client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ export class AccessGroups {
7878
Authorization: await this._getAuthorizationHeader(),
7979
"X-Fern-Language": "JavaScript",
8080
"X-Fern-SDK-Name": "webflow-api",
81-
"X-Fern-SDK-Version": "2.5.0",
82-
"User-Agent": "webflow-api/2.5.0",
81+
"X-Fern-SDK-Version": "3.0.0",
82+
"User-Agent": "webflow-api/3.0.0",
8383
"X-Fern-Runtime": core.RUNTIME.type,
8484
"X-Fern-Runtime-Version": core.RUNTIME.version,
8585
...requestOptions?.headers,

‎src/api/resources/assets/client/Client.ts

+16-16
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export class Assets {
5858
Authorization: await this._getAuthorizationHeader(),
5959
"X-Fern-Language": "JavaScript",
6060
"X-Fern-SDK-Name": "webflow-api",
61-
"X-Fern-SDK-Version": "2.5.0",
62-
"User-Agent": "webflow-api/2.5.0",
61+
"X-Fern-SDK-Version": "3.0.0",
62+
"User-Agent": "webflow-api/3.0.0",
6363
"X-Fern-Runtime": core.RUNTIME.type,
6464
"X-Fern-Runtime-Version": core.RUNTIME.version,
6565
...requestOptions?.headers,
@@ -187,8 +187,8 @@ export class Assets {
187187
Authorization: await this._getAuthorizationHeader(),
188188
"X-Fern-Language": "JavaScript",
189189
"X-Fern-SDK-Name": "webflow-api",
190-
"X-Fern-SDK-Version": "2.5.0",
191-
"User-Agent": "webflow-api/2.5.0",
190+
"X-Fern-SDK-Version": "3.0.0",
191+
"User-Agent": "webflow-api/3.0.0",
192192
"X-Fern-Runtime": core.RUNTIME.type,
193193
"X-Fern-Runtime-Version": core.RUNTIME.version,
194194
...requestOptions?.headers,
@@ -309,8 +309,8 @@ export class Assets {
309309
Authorization: await this._getAuthorizationHeader(),
310310
"X-Fern-Language": "JavaScript",
311311
"X-Fern-SDK-Name": "webflow-api",
312-
"X-Fern-SDK-Version": "2.5.0",
313-
"User-Agent": "webflow-api/2.5.0",
312+
"X-Fern-SDK-Version": "3.0.0",
313+
"User-Agent": "webflow-api/3.0.0",
314314
"X-Fern-Runtime": core.RUNTIME.type,
315315
"X-Fern-Runtime-Version": core.RUNTIME.version,
316316
...requestOptions?.headers,
@@ -426,8 +426,8 @@ export class Assets {
426426
Authorization: await this._getAuthorizationHeader(),
427427
"X-Fern-Language": "JavaScript",
428428
"X-Fern-SDK-Name": "webflow-api",
429-
"X-Fern-SDK-Version": "2.5.0",
430-
"User-Agent": "webflow-api/2.5.0",
429+
"X-Fern-SDK-Version": "3.0.0",
430+
"User-Agent": "webflow-api/3.0.0",
431431
"X-Fern-Runtime": core.RUNTIME.type,
432432
"X-Fern-Runtime-Version": core.RUNTIME.version,
433433
...requestOptions?.headers,
@@ -542,8 +542,8 @@ export class Assets {
542542
Authorization: await this._getAuthorizationHeader(),
543543
"X-Fern-Language": "JavaScript",
544544
"X-Fern-SDK-Name": "webflow-api",
545-
"X-Fern-SDK-Version": "2.5.0",
546-
"User-Agent": "webflow-api/2.5.0",
545+
"X-Fern-SDK-Version": "3.0.0",
546+
"User-Agent": "webflow-api/3.0.0",
547547
"X-Fern-Runtime": core.RUNTIME.type,
548548
"X-Fern-Runtime-Version": core.RUNTIME.version,
549549
...requestOptions?.headers,
@@ -664,8 +664,8 @@ export class Assets {
664664
Authorization: await this._getAuthorizationHeader(),
665665
"X-Fern-Language": "JavaScript",
666666
"X-Fern-SDK-Name": "webflow-api",
667-
"X-Fern-SDK-Version": "2.5.0",
668-
"User-Agent": "webflow-api/2.5.0",
667+
"X-Fern-SDK-Version": "3.0.0",
668+
"User-Agent": "webflow-api/3.0.0",
669669
"X-Fern-Runtime": core.RUNTIME.type,
670670
"X-Fern-Runtime-Version": core.RUNTIME.version,
671671
...requestOptions?.headers,
@@ -790,8 +790,8 @@ export class Assets {
790790
Authorization: await this._getAuthorizationHeader(),
791791
"X-Fern-Language": "JavaScript",
792792
"X-Fern-SDK-Name": "webflow-api",
793-
"X-Fern-SDK-Version": "2.5.0",
794-
"User-Agent": "webflow-api/2.5.0",
793+
"X-Fern-SDK-Version": "3.0.0",
794+
"User-Agent": "webflow-api/3.0.0",
795795
"X-Fern-Runtime": core.RUNTIME.type,
796796
"X-Fern-Runtime-Version": core.RUNTIME.version,
797797
...requestOptions?.headers,
@@ -917,8 +917,8 @@ export class Assets {
917917
Authorization: await this._getAuthorizationHeader(),
918918
"X-Fern-Language": "JavaScript",
919919
"X-Fern-SDK-Name": "webflow-api",
920-
"X-Fern-SDK-Version": "2.5.0",
921-
"User-Agent": "webflow-api/2.5.0",
920+
"X-Fern-SDK-Version": "3.0.0",
921+
"User-Agent": "webflow-api/3.0.0",
922922
"X-Fern-Runtime": core.RUNTIME.type,
923923
"X-Fern-Runtime-Version": core.RUNTIME.version,
924924
...requestOptions?.headers,

‎src/api/resources/collections/client/Client.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export class Collections {
6060
Authorization: await this._getAuthorizationHeader(),
6161
"X-Fern-Language": "JavaScript",
6262
"X-Fern-SDK-Name": "webflow-api",
63-
"X-Fern-SDK-Version": "2.5.0",
64-
"User-Agent": "webflow-api/2.5.0",
63+
"X-Fern-SDK-Version": "3.0.0",
64+
"User-Agent": "webflow-api/3.0.0",
6565
"X-Fern-Runtime": core.RUNTIME.type,
6666
"X-Fern-Runtime-Version": core.RUNTIME.version,
6767
...requestOptions?.headers,
@@ -186,8 +186,8 @@ export class Collections {
186186
Authorization: await this._getAuthorizationHeader(),
187187
"X-Fern-Language": "JavaScript",
188188
"X-Fern-SDK-Name": "webflow-api",
189-
"X-Fern-SDK-Version": "2.5.0",
190-
"User-Agent": "webflow-api/2.5.0",
189+
"X-Fern-SDK-Version": "3.0.0",
190+
"User-Agent": "webflow-api/3.0.0",
191191
"X-Fern-Runtime": core.RUNTIME.type,
192192
"X-Fern-Runtime-Version": core.RUNTIME.version,
193193
...requestOptions?.headers,
@@ -310,8 +310,8 @@ export class Collections {
310310
Authorization: await this._getAuthorizationHeader(),
311311
"X-Fern-Language": "JavaScript",
312312
"X-Fern-SDK-Name": "webflow-api",
313-
"X-Fern-SDK-Version": "2.5.0",
314-
"User-Agent": "webflow-api/2.5.0",
313+
"X-Fern-SDK-Version": "3.0.0",
314+
"User-Agent": "webflow-api/3.0.0",
315315
"X-Fern-Runtime": core.RUNTIME.type,
316316
"X-Fern-Runtime-Version": core.RUNTIME.version,
317317
...requestOptions?.headers,
@@ -427,8 +427,8 @@ export class Collections {
427427
Authorization: await this._getAuthorizationHeader(),
428428
"X-Fern-Language": "JavaScript",
429429
"X-Fern-SDK-Name": "webflow-api",
430-
"X-Fern-SDK-Version": "2.5.0",
431-
"User-Agent": "webflow-api/2.5.0",
430+
"X-Fern-SDK-Version": "3.0.0",
431+
"User-Agent": "webflow-api/3.0.0",
432432
"X-Fern-Runtime": core.RUNTIME.type,
433433
"X-Fern-Runtime-Version": core.RUNTIME.version,
434434
...requestOptions?.headers,

‎src/api/resources/collections/resources/fields/client/Client.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ export class Fields {
7575
Authorization: await this._getAuthorizationHeader(),
7676
"X-Fern-Language": "JavaScript",
7777
"X-Fern-SDK-Name": "webflow-api",
78-
"X-Fern-SDK-Version": "2.5.0",
79-
"User-Agent": "webflow-api/2.5.0",
78+
"X-Fern-SDK-Version": "3.0.0",
79+
"User-Agent": "webflow-api/3.0.0",
8080
"X-Fern-Runtime": core.RUNTIME.type,
8181
"X-Fern-Runtime-Version": core.RUNTIME.version,
8282
...requestOptions?.headers,
@@ -200,8 +200,8 @@ export class Fields {
200200
Authorization: await this._getAuthorizationHeader(),
201201
"X-Fern-Language": "JavaScript",
202202
"X-Fern-SDK-Name": "webflow-api",
203-
"X-Fern-SDK-Version": "2.5.0",
204-
"User-Agent": "webflow-api/2.5.0",
203+
"X-Fern-SDK-Version": "3.0.0",
204+
"User-Agent": "webflow-api/3.0.0",
205205
"X-Fern-Runtime": core.RUNTIME.type,
206206
"X-Fern-Runtime-Version": core.RUNTIME.version,
207207
...requestOptions?.headers,
@@ -324,8 +324,8 @@ export class Fields {
324324
Authorization: await this._getAuthorizationHeader(),
325325
"X-Fern-Language": "JavaScript",
326326
"X-Fern-SDK-Name": "webflow-api",
327-
"X-Fern-SDK-Version": "2.5.0",
328-
"User-Agent": "webflow-api/2.5.0",
327+
"X-Fern-SDK-Version": "3.0.0",
328+
"User-Agent": "webflow-api/3.0.0",
329329
"X-Fern-Runtime": core.RUNTIME.type,
330330
"X-Fern-Runtime-Version": core.RUNTIME.version,
331331
...requestOptions?.headers,

‎src/api/resources/collections/resources/items/client/Client.ts

+32-32
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ export class Items {
9393
Authorization: await this._getAuthorizationHeader(),
9494
"X-Fern-Language": "JavaScript",
9595
"X-Fern-SDK-Name": "webflow-api",
96-
"X-Fern-SDK-Version": "2.5.0",
97-
"User-Agent": "webflow-api/2.5.0",
96+
"X-Fern-SDK-Version": "3.0.0",
97+
"User-Agent": "webflow-api/3.0.0",
9898
"X-Fern-Runtime": core.RUNTIME.type,
9999
"X-Fern-Runtime-Version": core.RUNTIME.version,
100100
...requestOptions?.headers,
@@ -246,8 +246,8 @@ export class Items {
246246
Authorization: await this._getAuthorizationHeader(),
247247
"X-Fern-Language": "JavaScript",
248248
"X-Fern-SDK-Name": "webflow-api",
249-
"X-Fern-SDK-Version": "2.5.0",
250-
"User-Agent": "webflow-api/2.5.0",
249+
"X-Fern-SDK-Version": "3.0.0",
250+
"User-Agent": "webflow-api/3.0.0",
251251
"X-Fern-Runtime": core.RUNTIME.type,
252252
"X-Fern-Runtime-Version": core.RUNTIME.version,
253253
...requestOptions?.headers,
@@ -377,8 +377,8 @@ export class Items {
377377
Authorization: await this._getAuthorizationHeader(),
378378
"X-Fern-Language": "JavaScript",
379379
"X-Fern-SDK-Name": "webflow-api",
380-
"X-Fern-SDK-Version": "2.5.0",
381-
"User-Agent": "webflow-api/2.5.0",
380+
"X-Fern-SDK-Version": "3.0.0",
381+
"User-Agent": "webflow-api/3.0.0",
382382
"X-Fern-Runtime": core.RUNTIME.type,
383383
"X-Fern-Runtime-Version": core.RUNTIME.version,
384384
...requestOptions?.headers,
@@ -553,8 +553,8 @@ export class Items {
553553
Authorization: await this._getAuthorizationHeader(),
554554
"X-Fern-Language": "JavaScript",
555555
"X-Fern-SDK-Name": "webflow-api",
556-
"X-Fern-SDK-Version": "2.5.0",
557-
"User-Agent": "webflow-api/2.5.0",
556+
"X-Fern-SDK-Version": "3.0.0",
557+
"User-Agent": "webflow-api/3.0.0",
558558
"X-Fern-Runtime": core.RUNTIME.type,
559559
"X-Fern-Runtime-Version": core.RUNTIME.version,
560560
...requestOptions?.headers,
@@ -712,8 +712,8 @@ export class Items {
712712
Authorization: await this._getAuthorizationHeader(),
713713
"X-Fern-Language": "JavaScript",
714714
"X-Fern-SDK-Name": "webflow-api",
715-
"X-Fern-SDK-Version": "2.5.0",
716-
"User-Agent": "webflow-api/2.5.0",
715+
"X-Fern-SDK-Version": "3.0.0",
716+
"User-Agent": "webflow-api/3.0.0",
717717
"X-Fern-Runtime": core.RUNTIME.type,
718718
"X-Fern-Runtime-Version": core.RUNTIME.version,
719719
...requestOptions?.headers,
@@ -865,8 +865,8 @@ export class Items {
865865
Authorization: await this._getAuthorizationHeader(),
866866
"X-Fern-Language": "JavaScript",
867867
"X-Fern-SDK-Name": "webflow-api",
868-
"X-Fern-SDK-Version": "2.5.0",
869-
"User-Agent": "webflow-api/2.5.0",
868+
"X-Fern-SDK-Version": "3.0.0",
869+
"User-Agent": "webflow-api/3.0.0",
870870
"X-Fern-Runtime": core.RUNTIME.type,
871871
"X-Fern-Runtime-Version": core.RUNTIME.version,
872872
...requestOptions?.headers,
@@ -996,8 +996,8 @@ export class Items {
996996
Authorization: await this._getAuthorizationHeader(),
997997
"X-Fern-Language": "JavaScript",
998998
"X-Fern-SDK-Name": "webflow-api",
999-
"X-Fern-SDK-Version": "2.5.0",
1000-
"User-Agent": "webflow-api/2.5.0",
999+
"X-Fern-SDK-Version": "3.0.0",
1000+
"User-Agent": "webflow-api/3.0.0",
10011001
"X-Fern-Runtime": core.RUNTIME.type,
10021002
"X-Fern-Runtime-Version": core.RUNTIME.version,
10031003
...requestOptions?.headers,
@@ -1172,8 +1172,8 @@ export class Items {
11721172
Authorization: await this._getAuthorizationHeader(),
11731173
"X-Fern-Language": "JavaScript",
11741174
"X-Fern-SDK-Name": "webflow-api",
1175-
"X-Fern-SDK-Version": "2.5.0",
1176-
"User-Agent": "webflow-api/2.5.0",
1175+
"X-Fern-SDK-Version": "3.0.0",
1176+
"User-Agent": "webflow-api/3.0.0",
11771177
"X-Fern-Runtime": core.RUNTIME.type,
11781178
"X-Fern-Runtime-Version": core.RUNTIME.version,
11791179
...requestOptions?.headers,
@@ -1328,8 +1328,8 @@ export class Items {
13281328
Authorization: await this._getAuthorizationHeader(),
13291329
"X-Fern-Language": "JavaScript",
13301330
"X-Fern-SDK-Name": "webflow-api",
1331-
"X-Fern-SDK-Version": "2.5.0",
1332-
"User-Agent": "webflow-api/2.5.0",
1331+
"X-Fern-SDK-Version": "3.0.0",
1332+
"User-Agent": "webflow-api/3.0.0",
13331333
"X-Fern-Runtime": core.RUNTIME.type,
13341334
"X-Fern-Runtime-Version": core.RUNTIME.version,
13351335
...requestOptions?.headers,
@@ -1465,8 +1465,8 @@ export class Items {
14651465
Authorization: await this._getAuthorizationHeader(),
14661466
"X-Fern-Language": "JavaScript",
14671467
"X-Fern-SDK-Name": "webflow-api",
1468-
"X-Fern-SDK-Version": "2.5.0",
1469-
"User-Agent": "webflow-api/2.5.0",
1468+
"X-Fern-SDK-Version": "3.0.0",
1469+
"User-Agent": "webflow-api/3.0.0",
14701470
"X-Fern-Runtime": core.RUNTIME.type,
14711471
"X-Fern-Runtime-Version": core.RUNTIME.version,
14721472
...requestOptions?.headers,
@@ -1598,8 +1598,8 @@ export class Items {
15981598
Authorization: await this._getAuthorizationHeader(),
15991599
"X-Fern-Language": "JavaScript",
16001600
"X-Fern-SDK-Name": "webflow-api",
1601-
"X-Fern-SDK-Version": "2.5.0",
1602-
"User-Agent": "webflow-api/2.5.0",
1601+
"X-Fern-SDK-Version": "3.0.0",
1602+
"User-Agent": "webflow-api/3.0.0",
16031603
"X-Fern-Runtime": core.RUNTIME.type,
16041604
"X-Fern-Runtime-Version": core.RUNTIME.version,
16051605
...requestOptions?.headers,
@@ -1731,8 +1731,8 @@ export class Items {
17311731
Authorization: await this._getAuthorizationHeader(),
17321732
"X-Fern-Language": "JavaScript",
17331733
"X-Fern-SDK-Name": "webflow-api",
1734-
"X-Fern-SDK-Version": "2.5.0",
1735-
"User-Agent": "webflow-api/2.5.0",
1734+
"X-Fern-SDK-Version": "3.0.0",
1735+
"User-Agent": "webflow-api/3.0.0",
17361736
"X-Fern-Runtime": core.RUNTIME.type,
17371737
"X-Fern-Runtime-Version": core.RUNTIME.version,
17381738
...requestOptions?.headers,
@@ -1868,8 +1868,8 @@ export class Items {
18681868
Authorization: await this._getAuthorizationHeader(),
18691869
"X-Fern-Language": "JavaScript",
18701870
"X-Fern-SDK-Name": "webflow-api",
1871-
"X-Fern-SDK-Version": "2.5.0",
1872-
"User-Agent": "webflow-api/2.5.0",
1871+
"X-Fern-SDK-Version": "3.0.0",
1872+
"User-Agent": "webflow-api/3.0.0",
18731873
"X-Fern-Runtime": core.RUNTIME.type,
18741874
"X-Fern-Runtime-Version": core.RUNTIME.version,
18751875
...requestOptions?.headers,
@@ -2003,8 +2003,8 @@ export class Items {
20032003
Authorization: await this._getAuthorizationHeader(),
20042004
"X-Fern-Language": "JavaScript",
20052005
"X-Fern-SDK-Name": "webflow-api",
2006-
"X-Fern-SDK-Version": "2.5.0",
2007-
"User-Agent": "webflow-api/2.5.0",
2006+
"X-Fern-SDK-Version": "3.0.0",
2007+
"User-Agent": "webflow-api/3.0.0",
20082008
"X-Fern-Runtime": core.RUNTIME.type,
20092009
"X-Fern-Runtime-Version": core.RUNTIME.version,
20102010
...requestOptions?.headers,
@@ -2136,8 +2136,8 @@ export class Items {
21362136
Authorization: await this._getAuthorizationHeader(),
21372137
"X-Fern-Language": "JavaScript",
21382138
"X-Fern-SDK-Name": "webflow-api",
2139-
"X-Fern-SDK-Version": "2.5.0",
2140-
"User-Agent": "webflow-api/2.5.0",
2139+
"X-Fern-SDK-Version": "3.0.0",
2140+
"User-Agent": "webflow-api/3.0.0",
21412141
"X-Fern-Runtime": core.RUNTIME.type,
21422142
"X-Fern-Runtime-Version": core.RUNTIME.version,
21432143
...requestOptions?.headers,
@@ -2268,8 +2268,8 @@ export class Items {
22682268
Authorization: await this._getAuthorizationHeader(),
22692269
"X-Fern-Language": "JavaScript",
22702270
"X-Fern-SDK-Name": "webflow-api",
2271-
"X-Fern-SDK-Version": "2.5.0",
2272-
"User-Agent": "webflow-api/2.5.0",
2271+
"X-Fern-SDK-Version": "3.0.0",
2272+
"User-Agent": "webflow-api/3.0.0",
22732273
"X-Fern-Runtime": core.RUNTIME.type,
22742274
"X-Fern-Runtime-Version": core.RUNTIME.version,
22752275
...requestOptions?.headers,

0 commit comments

Comments
 (0)
Please sign in to comment.