Skip to content

Commit

Permalink
Merge pull request #188 from webflow/fern-bot/12-09-2024-0501PM
Browse files Browse the repository at this point in the history
🌿 Fern Regeneration -- December 9, 2024
  • Loading branch information
zplata authored Dec 9, 2024
2 parents b4c1074 + 96620d3 commit 1e38943
Show file tree
Hide file tree
Showing 59 changed files with 606 additions and 363 deletions.
1 change: 1 addition & 0 deletions .fernignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Specify files that shouldn't be modified by Fern

README.md
MIGRATION.md

# Oauth Helpers
src/api/types/OAuthScope.ts
Expand Down
104 changes: 99 additions & 5 deletions .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,10 @@ types:
CollectionItemFieldData:
properties:
name:
type: optional<string>
type: string
docs: Name of the Item
slug:
type: optional<string>
type: string
docs: >-
URL structure of the Item in your site. Note: Updates to an item slug
will break all links referencing the old slug.
Expand Down Expand Up @@ -592,7 +592,7 @@ types:
type: optional<boolean>
docs: Boolean determining if the Item is set to draft
default: false
fieldData: optional<CollectionItemFieldData>
fieldData: CollectionItemFieldData
source:
openapi: ../../../referenced-specs/v2.yml
CollectionItemListPagination:
Expand Down Expand Up @@ -620,6 +620,53 @@ types:
pagination: optional<CollectionItemListPagination>
source:
openapi: ../../../referenced-specs/v2.yml
CollectionItemPostSingleFieldData:
properties:
name:
type: string
docs: Name of the Item
slug:
type: string
docs: >-
URL structure of the Item in your site. Note: Updates to an item slug
will break all links referencing the old slug.
extra-properties: true
source:
openapi: ../../../referenced-specs/v2.yml
inline: true
CollectionItemPostSingle:
docs: >
The fields that define the schema for a given Item are based on the
Collection that Item belongs to. Beyond the user defined fields, there are
a handful of additional fields that are automatically created for all
items
properties:
id:
type: optional<string>
docs: Unique identifier for the Item
cmsLocaleId:
type: optional<string>
docs: Identifier for the locale of the CMS item
lastPublished:
type: optional<string>
docs: The date the item was last published
lastUpdated:
type: optional<string>
docs: The date the item was last updated
createdOn:
type: optional<string>
docs: The date the item was created
isArchived:
type: optional<boolean>
docs: Boolean determining if the Item is set to archived
default: false
isDraft:
type: optional<boolean>
docs: Boolean determining if the Item is set to draft
default: false
fieldData: CollectionItemPostSingleFieldData
source:
openapi: ../../../referenced-specs/v2.yml
CollectionItemWithIdInputFieldData:
properties:
name:
Expand Down Expand Up @@ -722,6 +769,53 @@ types:
fieldData: optional<BulkCollectionItemFieldData>
source:
openapi: ../../../referenced-specs/v2.yml
CollectionItemPatchSingleFieldData:
properties:
name:
type: optional<string>
docs: Name of the Item
slug:
type: optional<string>
docs: >-
URL structure of the Item in your site. Note: Updates to an item slug
will break all links referencing the old slug.
extra-properties: true
source:
openapi: ../../../referenced-specs/v2.yml
inline: true
CollectionItemPatchSingle:
docs: >
The fields that define the schema for a given Item are based on the
Collection that Item belongs to. Beyond the user defined fields, there are
a handful of additional fields that are automatically created for all
items
properties:
id:
type: optional<string>
docs: Unique identifier for the Item
cmsLocaleId:
type: optional<string>
docs: Identifier for the locale of the CMS item
lastPublished:
type: optional<string>
docs: The date the item was last published
lastUpdated:
type: optional<string>
docs: The date the item was last updated
createdOn:
type: optional<string>
docs: The date the item was created
isArchived:
type: optional<boolean>
docs: Boolean determining if the Item is set to archived
default: false
isDraft:
type: optional<boolean>
docs: Boolean determining if the Item is set to draft
default: false
fieldData: optional<CollectionItemPatchSingleFieldData>
source:
openapi: ../../../referenced-specs/v2.yml
PageSeo:
docs: SEO-related fields for the Page
properties:
Expand Down Expand Up @@ -1280,7 +1374,7 @@ types:
WebhookFilter:
docs: >-
Only supported for the `form_submission` trigger type. Filter for the form
you want Webhooks to be sent for.
you want Webhooks to be sent for.
properties:
name:
type: optional<string>
Expand All @@ -1307,7 +1401,7 @@ types:
type: optional<WebhookFilter>
docs: >-
Only supported for the `form_submission` trigger type. Filter for the
form you want Webhooks to be sent for.
form you want Webhooks to be sent for.
lastTriggered:
type: optional<datetime>
docs: Date the Webhook instance was last triggered
Expand Down
58 changes: 21 additions & 37 deletions .mock/definition/collections/items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ types:
- desc
source:
openapi: ../../../referenced-specs/v2.yml
ItemsCreateItemRequestItems:
Multiple Items:
properties:
items:
type: optional<list<root.CollectionItem>>
docs: An array of items to create
docs: List of collection items to create
source:
openapi: ../../../referenced-specs/v2.yml
inline: true
ItemsCreateItemRequest:
discriminated: false
union:
- root.CollectionItem
- ItemsCreateItemRequestItems
- root.CollectionItemPostSingle
- Multiple Items
source:
openapi: ../../../referenced-specs/v2.yml
ItemsDeleteItemsRequestItemsItem:
Expand All @@ -51,19 +51,11 @@ types:
- desc
source:
openapi: ../../../referenced-specs/v2.yml
ItemsCreateItemLiveRequestItems:
properties:
items:
type: optional<list<root.CollectionItem>>
docs: List of collection items to create
source:
openapi: ../../../referenced-specs/v2.yml
inline: true
ItemsCreateItemLiveRequest:
discriminated: false
union:
- root.CollectionItem
- ItemsCreateItemLiveRequestItems
- Multiple Items
source:
openapi: ../../../referenced-specs/v2.yml
ItemsDeleteItemsLiveRequestItemsItem:
Expand All @@ -77,7 +69,7 @@ types:
source:
openapi: ../../../referenced-specs/v2.yml
inline: true
CreateBulkCollectionItemRequestBodyFieldDataName:
Single CMS Item:
properties:
name:
type: string
Expand All @@ -94,6 +86,7 @@ types:
openapi: ../../../referenced-specs/v2.yml
inline: true
CreateBulkCollectionItemRequestBodyFieldDataItem:
docs: A single CMS item to create
properties:
name:
type: string
Expand All @@ -112,8 +105,9 @@ types:
CreateBulkCollectionItemRequestBodyFieldData:
discriminated: false
union:
- CreateBulkCollectionItemRequestBodyFieldDataName
- list<CreateBulkCollectionItemRequestBodyFieldDataItem>
- Single CMS Item
- docs: A list of CMS items to create
type: list<CreateBulkCollectionItemRequestBodyFieldDataItem>
source:
openapi: ../../../referenced-specs/v2.yml
inline: true
Expand Down Expand Up @@ -285,16 +279,16 @@ service:
slug: product-manager
response:
body:
id: 42b720ef280c7a7a3be8cabe
id: id
cmsLocaleId: 653ad57de882f528b32e810e
lastPublished: '2022-11-29T16:22:43.159Z'
lastUpdated: '2022-11-17T17:19:43.282Z'
createdOn: '2022-11-17T17:11:57.148Z'
isArchived: false
isDraft: false
lastPublished: '2023-03-17T18:47:35.560Z'
lastUpdated: '2023-03-17T18:47:35.560Z'
createdOn: '2023-03-17T18:47:35.560Z'
isArchived: true
isDraft: true
fieldData:
name: Pan Galactic Gargle Blaster Recipe
slug: pan-galactic-gargle-blaster
name: My new item
slug: my-new-item
delete-items:
path: /collections/{collection_id}/items
method: DELETE
Expand Down Expand Up @@ -1033,7 +1027,7 @@ service:
type: optional<boolean>
docs: Indicates whether the item is in draft state.
default: false
fieldData: optional<CreateBulkCollectionItemRequestBodyFieldData>
fieldData: CreateBulkCollectionItemRequestBodyFieldData
content-type: application/json
response:
docs: Request was successful
Expand Down Expand Up @@ -1270,7 +1264,7 @@ service:
docs: Unique identifier for an Item
display-name: Update Collection Item
request:
body: root.CollectionItem
body: root.CollectionItemPatchSingle
content-type: application/json
response:
docs: Request was successful
Expand All @@ -1286,11 +1280,6 @@ service:
collection_id: 580e63fc8c9a982ac9b8b745
item_id: 580e64008c9a982ac9b8b754
request:
id: 42b720ef280c7a7a3be8cabe
cmsLocaleId: 653ad57de882f528b32e810e
lastPublished: '2022-11-29T16:22:43.159Z'
lastUpdated: '2022-11-17T17:19:43.282Z'
createdOn: '2022-11-17T17:11:57.148Z'
isArchived: false
isDraft: false
fieldData:
Expand Down Expand Up @@ -1425,7 +1414,7 @@ service:
docs: Unique identifier for an Item
display-name: Update Live Collection Item
request:
body: root.CollectionItem
body: root.CollectionItemPatchSingle
content-type: application/json
response:
docs: Request was successful
Expand All @@ -1441,11 +1430,6 @@ service:
collection_id: 580e63fc8c9a982ac9b8b745
item_id: 580e64008c9a982ac9b8b754
request:
id: 42b720ef280c7a7a3be8cabe
cmsLocaleId: 653ad57de882f528b32e810e
lastPublished: '2022-11-29T16:22:43.159Z'
lastUpdated: '2022-11-17T17:19:43.282Z'
createdOn: '2022-11-17T17:11:57.148Z'
isArchived: false
isDraft: false
fieldData:
Expand Down
4 changes: 2 additions & 2 deletions .mock/definition/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ service:
body:
id: 5bfedb42bab0ad90fa7dad39
quantity: 100
inventoryType: infinite
inventoryType: finite
update:
path: /collections/{collection_id}/items/{item_id}/inventory
method: PATCH
Expand Down Expand Up @@ -106,7 +106,7 @@ service:
body:
id: 5bfedb42bab0ad90fa7dad39
quantity: 100
inventoryType: infinite
inventoryType: finite
source:
openapi: ../../../referenced-specs/v2.yml
display-name: Inventory
Expand Down
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ There are a few breaking changes with v3.0.0 of the Webflow JS SDK. Please see t
### Fixes

- 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.
- `fieldData` type in CMS Items now allows arbitrary extra key/value pairs
- `fieldData` type in CMS Items now allows arbitrary extra key/value pairs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webflow-api",
"version": "3.0.0",
"version": "3.0.1",
"private": false,
"repository": "https://github.com/webflow/js-webflow-api",
"main": "./index.js",
Expand Down
14 changes: 2 additions & 12 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5368,11 +5368,6 @@ Required scope | `CMS:write`

```typescript
await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", {
id: "42b720ef280c7a7a3be8cabe",
cmsLocaleId: "653ad57de882f528b32e810e",
lastPublished: "2022-11-29T16:22:43.159Z",
lastUpdated: "2022-11-17T17:19:43.282Z",
createdOn: "2022-11-17T17:11:57.148Z",
isArchived: false,
isDraft: false,
fieldData: {
Expand Down Expand Up @@ -5411,7 +5406,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
<dl>
<dd>

**request:** `Webflow.CollectionItem`
**request:** `Webflow.CollectionItemPatchSingle`

</dd>
</dl>
Expand Down Expand Up @@ -5625,11 +5620,6 @@ Required scope | `CMS:write`

```typescript
await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", {
id: "42b720ef280c7a7a3be8cabe",
cmsLocaleId: "653ad57de882f528b32e810e",
lastPublished: "2022-11-29T16:22:43.159Z",
lastUpdated: "2022-11-17T17:19:43.282Z",
createdOn: "2022-11-17T17:11:57.148Z",
isArchived: false,
isDraft: false,
fieldData: {
Expand Down Expand Up @@ -5668,7 +5658,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
<dl>
<dd>

**request:** `Webflow.CollectionItem`
**request:** `Webflow.CollectionItemPatchSingle`

</dd>
</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/accessGroups/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export class AccessGroups {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.0.0",
"User-Agent": "webflow-api/3.0.0",
"X-Fern-SDK-Version": "3.0.1",
"User-Agent": "webflow-api/3.0.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down
Loading

0 comments on commit 1e38943

Please sign in to comment.