Skip to content

Commit 87aba52

Browse files
authored
Merge pull request #281 from webflow/fern-bot/2025-08-14T20-47Z
🌿 Fern Regeneration -- August 14, 2025
2 parents 6f68142 + 60598f6 commit 87aba52

File tree

18 files changed

+197
-191
lines changed

18 files changed

+197
-191
lines changed

.mock/definition/__package__.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,15 +3252,6 @@ types:
32523252
[Subscription
32533253
plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription)
32543254
for the SKU
3255-
track-inventory:
3256-
type: optional<boolean>
3257-
docs: >-
3258-
A boolean indicating whether inventory for this product should be
3259-
tracked.
3260-
default: false
3261-
quantity:
3262-
type: optional<double>
3263-
docs: Quantity of SKU that will be tracked as items are ordered.
32643255
main-image:
32653256
type: optional<string>
32663257
docs: The URL for the main image of the SKU

.mock/definition/inventory.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ service:
55
base-path: ''
66
endpoints:
77
list:
8-
path: /collections/{collection_id}/items/{item_id}/inventory
8+
path: /collections/{sku_collection_id}/items/{sku_id}/inventory
99
method: GET
1010
auth: true
1111
docs: |
@@ -15,12 +15,14 @@ service:
1515
source:
1616
openapi: ../../../openapi/referenced-specs/v2.yml
1717
path-parameters:
18-
collection_id:
18+
sku_collection_id:
1919
type: string
20-
docs: Unique identifier for a Collection
21-
item_id:
20+
docs: >-
21+
Unique identifier for a SKU collection. Use the List Collections API
22+
to find this ID.
23+
sku_id:
2224
type: string
23-
docs: Unique identifier for an Item
25+
docs: Unique identifier for a SKU
2426
display-name: List Inventory
2527
response:
2628
docs: Request was successful
@@ -36,15 +38,15 @@ service:
3638
- root.InternalServerError
3739
examples:
3840
- path-parameters:
39-
collection_id: 580e63fc8c9a982ac9b8b745
40-
item_id: 580e64008c9a982ac9b8b754
41+
sku_collection_id: 6377a7c4b7a79608c34a46f7
42+
sku_id: 5e8518516e147040726cc415
4143
response:
4244
body:
4345
id: 5bfedb42bab0ad90fa7dad39
4446
quantity: 100
4547
inventoryType: finite
4648
update:
47-
path: /collections/{collection_id}/items/{item_id}/inventory
49+
path: /collections/{sku_collection_id}/items/{sku_id}/inventory
4850
method: PATCH
4951
auth: true
5052
docs: >
@@ -65,12 +67,14 @@ service:
6567
source:
6668
openapi: ../../../openapi/referenced-specs/v2.yml
6769
path-parameters:
68-
collection_id:
70+
sku_collection_id:
6971
type: string
70-
docs: Unique identifier for a Collection
71-
item_id:
72+
docs: >-
73+
Unique identifier for a SKU collection. Use the List Collections API
74+
to find this ID.
75+
sku_id:
7276
type: string
73-
docs: Unique identifier for an Item
77+
docs: Unique identifier for a SKU
7478
display-name: Update Item Inventory
7579
request:
7680
name: InventoryUpdateRequest
@@ -100,8 +104,8 @@ service:
100104
- root.InternalServerError
101105
examples:
102106
- path-parameters:
103-
collection_id: 580e63fc8c9a982ac9b8b745
104-
item_id: 580e64008c9a982ac9b8b754
107+
sku_collection_id: 6377a7c4b7a79608c34a46f7
108+
sku_id: 5e8518516e147040726cc415
105109
request:
106110
inventoryType: infinite
107111
response:

.mock/definition/pages/scripts.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ service:
4646
path: /pages/{page_id}/custom_code
4747
method: PUT
4848
auth: true
49-
docs: |
50-
Apply scripts to a page.
49+
docs: >
50+
Apply registered scripts to a page. If you have multiple scripts your
51+
App needs to apply or maintain on a page, ensure they are always
52+
included in the request body for this endpoint. To remove individual
53+
scripts, simply call this endpoint without the script in the request
54+
body.
55+
5156
5257
<Note title="Script Registration">
5358
To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.
5459
</Note>
5560
61+
5662
Required scope | `custom_code:write`
5763
source:
5864
openapi: ../../../openapi/referenced-specs/v2.yml
@@ -108,11 +114,18 @@ service:
108114
method: DELETE
109115
auth: true
110116
docs: >
111-
Delete a custom code block that the App created on a page.
117+
Remove all scripts from a page applied by the App. This endpoint will
118+
not remove scripts from the site's registered scripts.
119+
120+
121+
To remove individual scripts applied by the App, use the [Add/Update
122+
Custom
123+
Code](/data/reference/custom-code/custom-code-pages/upsert-custom-code)
124+
endpoint.
112125
113126
114-
<Note>Access to this endpoint requires a bearer token from a [Data
115-
Client App](/data/docs/getting-started-data-clients).</Note>
127+
<Note>Access to this endpoint requires a bearer token obtained from an
128+
[OAuth Code Grant Flow](/data/reference/oauth-app).</Note>
116129
117130
118131
Required scope | `custom_code:write`

.mock/definition/products.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ service:
9292
value: 2499
9393
unit: USD
9494
currency: USD
95-
quantity: 10
9695
main-image: https://www.example.com/image.jpg
9796
sku: '1234567890'
9897
sku-properties:
@@ -243,7 +242,6 @@ service:
243242
value: 2499
244243
unit: USD
245244
currency: USD
246-
quantity: 10
247245
main-image: https://www.example.com/image.jpg
248246
sku: '1234567890'
249247
sku-properties:
@@ -331,7 +329,6 @@ service:
331329
value: 2499
332330
unit: USD
333331
currency: USD
334-
quantity: 10
335332
main-image: https://www.example.com/image.jpg
336333
sku: '1234567890'
337334
sku-properties:
@@ -498,7 +495,6 @@ service:
498495
value: 2499
499496
unit: USD
500497
currency: USD
501-
quantity: 10
502498
main-image: https://www.example.com/image.jpg
503499
sku: '1234567890'
504500
sku-properties:
@@ -600,8 +596,6 @@ service:
600596
trial: 7
601597
plans:
602598
- {}
603-
track-inventory: true
604-
quantity: 10
605599
main-image: https://www.example.com/image.jpg
606600
sku: '1234567890'
607601
sku-properties:

.mock/definition/sites/scripts.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,19 @@ service:
5555
path: /sites/{site_id}/custom_code
5656
method: PUT
5757
auth: true
58-
docs: |
59-
Apply registered scripts to a site.
58+
docs: >
59+
Apply registered scripts to a site. If you have multiple scripts your
60+
App needs to apply or maintain on a site, ensure they are always
61+
included in the request body for this endpoint. To remove individual
62+
scripts, simply call this endpoint without the script in the request
63+
body.
64+
6065
6166
<Note title="Script Registration">
6267
To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.
6368
</Note>
6469
70+
6571
Required scope | `custom_code:write`
6672
source:
6773
openapi: ../../../openapi/referenced-specs/v2.yml
@@ -116,8 +122,18 @@ service:
116122
method: DELETE
117123
auth: true
118124
docs: >
119-
Remove scripts from a site applied by the App. This endpoint will not
120-
remove scripts from the site's registered scripts.
125+
Remove all scripts from a site applied by the App. This endpoint will
126+
not remove scripts from the site's registered scripts.
127+
128+
129+
To remove individual scripts applied by the App, use the [Add/Update
130+
Custom
131+
Code](/data/reference/custom-code/custom-code-sites/upsert-custom-code)
132+
endpoint.
133+
134+
135+
<Note>Access to this endpoint requires a bearer token obtained from an
136+
[OAuth Code Grant Flow](/data/reference/oauth-app).</Note>
121137
122138
123139
Required scope | `custom_code:write`

jest.config.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@ export default {
66
"^(\.{1,2}/.*)\.js$": "$1",
77
},
88
setupFilesAfterEnv: ["<rootDir>/tests/mock-server/setup.ts"],
9-
testPathIgnorePatterns: [
10-
"/node_modules/",
11-
"tests/wire/workspaces/auditLogs.test.ts" // TODO: See why expected response is a subset of the actual response
12-
],
139
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webflow-api",
3-
"version": "3.2.0",
3+
"version": "3.2.1",
44
"private": false,
55
"repository": "https://github.com/webflow/js-webflow-api",
66
"main": "./index.js",
@@ -9,7 +9,7 @@
99
"format": "prettier . --write --ignore-unknown",
1010
"build": "tsc",
1111
"prepack": "cp -rv dist/. .",
12-
"test": "jest",
12+
"test": "jest tests/unit --passWithNoTests",
1313
"test:wire": "jest tests/wire --passWithNoTests",
1414
"wire:test": "yarn test:wire"
1515
},

reference.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4944,7 +4944,7 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
49444944

49454945
## Inventory
49464946

4947-
<details><summary><code>client.inventory.<a href="/src/api/resources/inventory/client/Client.ts">list</a>(collectionId, itemId) -> Webflow.InventoryItem</code></summary>
4947+
<details><summary><code>client.inventory.<a href="/src/api/resources/inventory/client/Client.ts">list</a>(skuCollectionId, skuId) -> Webflow.InventoryItem</code></summary>
49484948
<dl>
49494949
<dd>
49504950

@@ -4974,7 +4974,7 @@ Required scope | `ecommerce:read`
49744974
<dd>
49754975

49764976
```typescript
4977-
await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754");
4977+
await client.inventory.list("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc415");
49784978
```
49794979

49804980
</dd>
@@ -4990,15 +4990,15 @@ await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b75
49904990
<dl>
49914991
<dd>
49924992

4993-
**collectionId:** `string` — Unique identifier for a Collection
4993+
**skuCollectionId:** `string` — Unique identifier for a SKU collection. Use the List Collections API to find this ID.
49944994

49954995
</dd>
49964996
</dl>
49974997

49984998
<dl>
49994999
<dd>
50005000

5001-
**itemId:** `string` — Unique identifier for an Item
5001+
**skuId:** `string` — Unique identifier for a SKU
50025002

50035003
</dd>
50045004
</dl>
@@ -5017,7 +5017,7 @@ await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b75
50175017
</dl>
50185018
</details>
50195019

5020-
<details><summary><code>client.inventory.<a href="/src/api/resources/inventory/client/Client.ts">update</a>(collectionId, itemId, { ...params }) -> Webflow.InventoryItem</code></summary>
5020+
<details><summary><code>client.inventory.<a href="/src/api/resources/inventory/client/Client.ts">update</a>(skuCollectionId, skuId, { ...params }) -> Webflow.InventoryItem</code></summary>
50215021
<dl>
50225022
<dd>
50235023

@@ -5052,7 +5052,7 @@ Required scope | `ecommerce:write`
50525052
<dd>
50535053

50545054
```typescript
5055-
await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", {
5055+
await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc415", {
50565056
inventoryType: "infinite",
50575057
});
50585058
```
@@ -5070,15 +5070,15 @@ await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b
50705070
<dl>
50715071
<dd>
50725072

5073-
**collectionId:** `string` — Unique identifier for a Collection
5073+
**skuCollectionId:** `string` — Unique identifier for a SKU collection. Use the List Collections API to find this ID.
50745074

50755075
</dd>
50765076
</dl>
50775077

50785078
<dl>
50795079
<dd>
50805080

5081-
**itemId:** `string` — Unique identifier for an Item
5081+
**skuId:** `string` — Unique identifier for a SKU
50825082

50835083
</dd>
50845084
</dl>
@@ -6872,7 +6872,7 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
68726872
<dl>
68736873
<dd>
68746874

6875-
Apply scripts to a page.
6875+
Apply registered scripts to a page. If you have multiple scripts your App needs to apply or maintain on a page, ensure they are always included in the request body for this endpoint. To remove individual scripts, simply call this endpoint without the script in the request body.
68766876

68776877
<Note title="Script Registration">
68786878
To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.
@@ -6965,9 +6965,11 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
69656965
<dl>
69666966
<dd>
69676967

6968-
Delete a custom code block that the App created on a page.
6968+
Remove all scripts from a page applied by the App. This endpoint will not remove scripts from the site's registered scripts.
69696969

6970-
<Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
6970+
To remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-pages/upsert-custom-code) endpoint.
6971+
6972+
<Note>Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).</Note>
69716973

69726974
Required scope | `custom_code:write`
69736975

@@ -8307,7 +8309,7 @@ await client.sites.scripts.getCustomCode("580e63e98c9a982ac9b8b741");
83078309
<dl>
83088310
<dd>
83098311

8310-
Apply registered scripts to a site.
8312+
Apply registered scripts to a site. If you have multiple scripts your App needs to apply or maintain on a site, ensure they are always included in the request body for this endpoint. To remove individual scripts, simply call this endpoint without the script in the request body.
83118313

83128314
<Note title="Script Registration">
83138315
To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.
@@ -8400,7 +8402,11 @@ await client.sites.scripts.upsertCustomCode("580e63e98c9a982ac9b8b741", {
84008402
<dl>
84018403
<dd>
84028404

8403-
Remove scripts from a site applied by the App. This endpoint will not remove scripts from the site's registered scripts.
8405+
Remove all scripts from a site applied by the App. This endpoint will not remove scripts from the site's registered scripts.
8406+
8407+
To remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-sites/upsert-custom-code) endpoint.
8408+
8409+
<Note>Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).</Note>
84048410

84058411
Required scope | `custom_code:write`
84068412

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export class WebflowClient {
7070
{
7171
"X-Fern-Language": "JavaScript",
7272
"X-Fern-SDK-Name": "webflow-api",
73-
"X-Fern-SDK-Version": "3.2.0",
74-
"User-Agent": "webflow-api/3.2.0",
73+
"X-Fern-SDK-Version": "3.2.1",
74+
"User-Agent": "webflow-api/3.2.1",
7575
"X-Fern-Runtime": core.RUNTIME.type,
7676
"X-Fern-Runtime-Version": core.RUNTIME.version,
7777
},

0 commit comments

Comments
 (0)