Skip to content

Commit 1e38943

Browse files
authored
Merge pull request #188 from webflow/fern-bot/12-09-2024-0501PM
🌿 Fern Regeneration -- December 9, 2024
2 parents b4c1074 + 96620d3 commit 1e38943

File tree

59 files changed

+606
-363
lines changed

Some content is hidden

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

59 files changed

+606
-363
lines changed

.fernignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Specify files that shouldn't be modified by Fern
22

33
README.md
4+
MIGRATION.md
45

56
# Oauth Helpers
67
src/api/types/OAuthScope.ts

.mock/definition/__package__.yml

Lines changed: 99 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,10 @@ types:
551551
CollectionItemFieldData:
552552
properties:
553553
name:
554-
type: optional<string>
554+
type: string
555555
docs: Name of the Item
556556
slug:
557-
type: optional<string>
557+
type: string
558558
docs: >-
559559
URL structure of the Item in your site. Note: Updates to an item slug
560560
will break all links referencing the old slug.
@@ -592,7 +592,7 @@ types:
592592
type: optional<boolean>
593593
docs: Boolean determining if the Item is set to draft
594594
default: false
595-
fieldData: optional<CollectionItemFieldData>
595+
fieldData: CollectionItemFieldData
596596
source:
597597
openapi: ../../../referenced-specs/v2.yml
598598
CollectionItemListPagination:
@@ -620,6 +620,53 @@ types:
620620
pagination: optional<CollectionItemListPagination>
621621
source:
622622
openapi: ../../../referenced-specs/v2.yml
623+
CollectionItemPostSingleFieldData:
624+
properties:
625+
name:
626+
type: string
627+
docs: Name of the Item
628+
slug:
629+
type: string
630+
docs: >-
631+
URL structure of the Item in your site. Note: Updates to an item slug
632+
will break all links referencing the old slug.
633+
extra-properties: true
634+
source:
635+
openapi: ../../../referenced-specs/v2.yml
636+
inline: true
637+
CollectionItemPostSingle:
638+
docs: >
639+
The fields that define the schema for a given Item are based on the
640+
Collection that Item belongs to. Beyond the user defined fields, there are
641+
a handful of additional fields that are automatically created for all
642+
items
643+
properties:
644+
id:
645+
type: optional<string>
646+
docs: Unique identifier for the Item
647+
cmsLocaleId:
648+
type: optional<string>
649+
docs: Identifier for the locale of the CMS item
650+
lastPublished:
651+
type: optional<string>
652+
docs: The date the item was last published
653+
lastUpdated:
654+
type: optional<string>
655+
docs: The date the item was last updated
656+
createdOn:
657+
type: optional<string>
658+
docs: The date the item was created
659+
isArchived:
660+
type: optional<boolean>
661+
docs: Boolean determining if the Item is set to archived
662+
default: false
663+
isDraft:
664+
type: optional<boolean>
665+
docs: Boolean determining if the Item is set to draft
666+
default: false
667+
fieldData: CollectionItemPostSingleFieldData
668+
source:
669+
openapi: ../../../referenced-specs/v2.yml
623670
CollectionItemWithIdInputFieldData:
624671
properties:
625672
name:
@@ -722,6 +769,53 @@ types:
722769
fieldData: optional<BulkCollectionItemFieldData>
723770
source:
724771
openapi: ../../../referenced-specs/v2.yml
772+
CollectionItemPatchSingleFieldData:
773+
properties:
774+
name:
775+
type: optional<string>
776+
docs: Name of the Item
777+
slug:
778+
type: optional<string>
779+
docs: >-
780+
URL structure of the Item in your site. Note: Updates to an item slug
781+
will break all links referencing the old slug.
782+
extra-properties: true
783+
source:
784+
openapi: ../../../referenced-specs/v2.yml
785+
inline: true
786+
CollectionItemPatchSingle:
787+
docs: >
788+
The fields that define the schema for a given Item are based on the
789+
Collection that Item belongs to. Beyond the user defined fields, there are
790+
a handful of additional fields that are automatically created for all
791+
items
792+
properties:
793+
id:
794+
type: optional<string>
795+
docs: Unique identifier for the Item
796+
cmsLocaleId:
797+
type: optional<string>
798+
docs: Identifier for the locale of the CMS item
799+
lastPublished:
800+
type: optional<string>
801+
docs: The date the item was last published
802+
lastUpdated:
803+
type: optional<string>
804+
docs: The date the item was last updated
805+
createdOn:
806+
type: optional<string>
807+
docs: The date the item was created
808+
isArchived:
809+
type: optional<boolean>
810+
docs: Boolean determining if the Item is set to archived
811+
default: false
812+
isDraft:
813+
type: optional<boolean>
814+
docs: Boolean determining if the Item is set to draft
815+
default: false
816+
fieldData: optional<CollectionItemPatchSingleFieldData>
817+
source:
818+
openapi: ../../../referenced-specs/v2.yml
725819
PageSeo:
726820
docs: SEO-related fields for the Page
727821
properties:
@@ -1280,7 +1374,7 @@ types:
12801374
WebhookFilter:
12811375
docs: >-
12821376
Only supported for the `form_submission` trigger type. Filter for the form
1283-
you want Webhooks to be sent for.
1377+
you want Webhooks to be sent for.
12841378
properties:
12851379
name:
12861380
type: optional<string>
@@ -1307,7 +1401,7 @@ types:
13071401
type: optional<WebhookFilter>
13081402
docs: >-
13091403
Only supported for the `form_submission` trigger type. Filter for the
1310-
form you want Webhooks to be sent for.
1404+
form you want Webhooks to be sent for.
13111405
lastTriggered:
13121406
type: optional<datetime>
13131407
docs: Date the Webhook instance was last triggered

.mock/definition/collections/items.yml

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ types:
1212
- desc
1313
source:
1414
openapi: ../../../referenced-specs/v2.yml
15-
ItemsCreateItemRequestItems:
15+
Multiple Items:
1616
properties:
1717
items:
1818
type: optional<list<root.CollectionItem>>
19-
docs: An array of items to create
19+
docs: List of collection items to create
2020
source:
2121
openapi: ../../../referenced-specs/v2.yml
2222
inline: true
2323
ItemsCreateItemRequest:
2424
discriminated: false
2525
union:
26-
- root.CollectionItem
27-
- ItemsCreateItemRequestItems
26+
- root.CollectionItemPostSingle
27+
- Multiple Items
2828
source:
2929
openapi: ../../../referenced-specs/v2.yml
3030
ItemsDeleteItemsRequestItemsItem:
@@ -51,19 +51,11 @@ types:
5151
- desc
5252
source:
5353
openapi: ../../../referenced-specs/v2.yml
54-
ItemsCreateItemLiveRequestItems:
55-
properties:
56-
items:
57-
type: optional<list<root.CollectionItem>>
58-
docs: List of collection items to create
59-
source:
60-
openapi: ../../../referenced-specs/v2.yml
61-
inline: true
6254
ItemsCreateItemLiveRequest:
6355
discriminated: false
6456
union:
6557
- root.CollectionItem
66-
- ItemsCreateItemLiveRequestItems
58+
- Multiple Items
6759
source:
6860
openapi: ../../../referenced-specs/v2.yml
6961
ItemsDeleteItemsLiveRequestItemsItem:
@@ -77,7 +69,7 @@ types:
7769
source:
7870
openapi: ../../../referenced-specs/v2.yml
7971
inline: true
80-
CreateBulkCollectionItemRequestBodyFieldDataName:
72+
Single CMS Item:
8173
properties:
8274
name:
8375
type: string
@@ -94,6 +86,7 @@ types:
9486
openapi: ../../../referenced-specs/v2.yml
9587
inline: true
9688
CreateBulkCollectionItemRequestBodyFieldDataItem:
89+
docs: A single CMS item to create
9790
properties:
9891
name:
9992
type: string
@@ -112,8 +105,9 @@ types:
112105
CreateBulkCollectionItemRequestBodyFieldData:
113106
discriminated: false
114107
union:
115-
- CreateBulkCollectionItemRequestBodyFieldDataName
116-
- list<CreateBulkCollectionItemRequestBodyFieldDataItem>
108+
- Single CMS Item
109+
- docs: A list of CMS items to create
110+
type: list<CreateBulkCollectionItemRequestBodyFieldDataItem>
117111
source:
118112
openapi: ../../../referenced-specs/v2.yml
119113
inline: true
@@ -285,16 +279,16 @@ service:
285279
slug: product-manager
286280
response:
287281
body:
288-
id: 42b720ef280c7a7a3be8cabe
282+
id: id
289283
cmsLocaleId: 653ad57de882f528b32e810e
290-
lastPublished: '2022-11-29T16:22:43.159Z'
291-
lastUpdated: '2022-11-17T17:19:43.282Z'
292-
createdOn: '2022-11-17T17:11:57.148Z'
293-
isArchived: false
294-
isDraft: false
284+
lastPublished: '2023-03-17T18:47:35.560Z'
285+
lastUpdated: '2023-03-17T18:47:35.560Z'
286+
createdOn: '2023-03-17T18:47:35.560Z'
287+
isArchived: true
288+
isDraft: true
295289
fieldData:
296-
name: Pan Galactic Gargle Blaster Recipe
297-
slug: pan-galactic-gargle-blaster
290+
name: My new item
291+
slug: my-new-item
298292
delete-items:
299293
path: /collections/{collection_id}/items
300294
method: DELETE
@@ -1033,7 +1027,7 @@ service:
10331027
type: optional<boolean>
10341028
docs: Indicates whether the item is in draft state.
10351029
default: false
1036-
fieldData: optional<CreateBulkCollectionItemRequestBodyFieldData>
1030+
fieldData: CreateBulkCollectionItemRequestBodyFieldData
10371031
content-type: application/json
10381032
response:
10391033
docs: Request was successful
@@ -1270,7 +1264,7 @@ service:
12701264
docs: Unique identifier for an Item
12711265
display-name: Update Collection Item
12721266
request:
1273-
body: root.CollectionItem
1267+
body: root.CollectionItemPatchSingle
12741268
content-type: application/json
12751269
response:
12761270
docs: Request was successful
@@ -1286,11 +1280,6 @@ service:
12861280
collection_id: 580e63fc8c9a982ac9b8b745
12871281
item_id: 580e64008c9a982ac9b8b754
12881282
request:
1289-
id: 42b720ef280c7a7a3be8cabe
1290-
cmsLocaleId: 653ad57de882f528b32e810e
1291-
lastPublished: '2022-11-29T16:22:43.159Z'
1292-
lastUpdated: '2022-11-17T17:19:43.282Z'
1293-
createdOn: '2022-11-17T17:11:57.148Z'
12941283
isArchived: false
12951284
isDraft: false
12961285
fieldData:
@@ -1425,7 +1414,7 @@ service:
14251414
docs: Unique identifier for an Item
14261415
display-name: Update Live Collection Item
14271416
request:
1428-
body: root.CollectionItem
1417+
body: root.CollectionItemPatchSingle
14291418
content-type: application/json
14301419
response:
14311420
docs: Request was successful
@@ -1441,11 +1430,6 @@ service:
14411430
collection_id: 580e63fc8c9a982ac9b8b745
14421431
item_id: 580e64008c9a982ac9b8b754
14431432
request:
1444-
id: 42b720ef280c7a7a3be8cabe
1445-
cmsLocaleId: 653ad57de882f528b32e810e
1446-
lastPublished: '2022-11-29T16:22:43.159Z'
1447-
lastUpdated: '2022-11-17T17:19:43.282Z'
1448-
createdOn: '2022-11-17T17:11:57.148Z'
14491433
isArchived: false
14501434
isDraft: false
14511435
fieldData:

.mock/definition/inventory.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ service:
4141
body:
4242
id: 5bfedb42bab0ad90fa7dad39
4343
quantity: 100
44-
inventoryType: infinite
44+
inventoryType: finite
4545
update:
4646
path: /collections/{collection_id}/items/{item_id}/inventory
4747
method: PATCH
@@ -106,7 +106,7 @@ service:
106106
body:
107107
id: 5bfedb42bab0ad90fa7dad39
108108
quantity: 100
109-
inventoryType: infinite
109+
inventoryType: finite
110110
source:
111111
openapi: ../../../referenced-specs/v2.yml
112112
display-name: Inventory

MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ There are a few breaking changes with v3.0.0 of the Webflow JS SDK. Please see t
5151
### Fixes
5252

5353
- Some APIs that created resources (i.e. `collections.items.createItem()`) had request payload types that required an `id`, which is not possible to provide. This is no longer required.
54-
- `fieldData` type in CMS Items now allows arbitrary extra key/value pairs
54+
- `fieldData` type in CMS Items now allows arbitrary extra key/value pairs

package.json

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

reference.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5368,11 +5368,6 @@ Required scope | `CMS:write`
53685368

53695369
```typescript
53705370
await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", {
5371-
id: "42b720ef280c7a7a3be8cabe",
5372-
cmsLocaleId: "653ad57de882f528b32e810e",
5373-
lastPublished: "2022-11-29T16:22:43.159Z",
5374-
lastUpdated: "2022-11-17T17:19:43.282Z",
5375-
createdOn: "2022-11-17T17:11:57.148Z",
53765371
isArchived: false,
53775372
isDraft: false,
53785373
fieldData: {
@@ -5411,7 +5406,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
54115406
<dl>
54125407
<dd>
54135408

5414-
**request:** `Webflow.CollectionItem`
5409+
**request:** `Webflow.CollectionItemPatchSingle`
54155410

54165411
</dd>
54175412
</dl>
@@ -5625,11 +5620,6 @@ Required scope | `CMS:write`
56255620

56265621
```typescript
56275622
await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", {
5628-
id: "42b720ef280c7a7a3be8cabe",
5629-
cmsLocaleId: "653ad57de882f528b32e810e",
5630-
lastPublished: "2022-11-29T16:22:43.159Z",
5631-
lastUpdated: "2022-11-17T17:19:43.282Z",
5632-
createdOn: "2022-11-17T17:11:57.148Z",
56335623
isArchived: false,
56345624
isDraft: false,
56355625
fieldData: {
@@ -5668,7 +5658,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
56685658
<dl>
56695659
<dd>
56705660

5671-
**request:** `Webflow.CollectionItem`
5661+
**request:** `Webflow.CollectionItemPatchSingle`
56725662

56735663
</dd>
56745664
</dl>

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

Lines changed: 2 additions & 2 deletions
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": "3.0.0",
82-
"User-Agent": "webflow-api/3.0.0",
81+
"X-Fern-SDK-Version": "3.0.1",
82+
"User-Agent": "webflow-api/3.0.1",
8383
"X-Fern-Runtime": core.RUNTIME.type,
8484
"X-Fern-Runtime-Version": core.RUNTIME.version,
8585
...requestOptions?.headers,

0 commit comments

Comments
 (0)