Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- March 20, 2025 #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .mock/definition/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ error-discrimination:
strategy: status-code
display-name: Data API
environments:
Default: https://api.webflow.com/v2
default-environment: Default
Data API:
urls:
Base: https://api.webflow.com/v2
Data API: https://api.webflow.com/v2
Content Delivery API: https://api-cdn.webflow.com/v2
Production: https://api.webflow.com/v2
CDN: https://api-cdn.webflow.com/v2
default-environment: Data API
default-url: Base
auth-schemes:
BearerToken:
scheme: bearer
Expand Down
13 changes: 13 additions & 0 deletions .mock/definition/collections/items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,11 @@ service:
docs: |
List all published items in a collection.

<Note title="Serve data with the Content Delivery API">
To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-cdn), available at api-cdn.webflow.com.

</Note>

Required scope | `CMS:read`
source:
openapi: ../../../openapi/referenced-specs/v2.yml
Expand Down Expand Up @@ -610,6 +615,7 @@ service:
docs: Request was successful
type: root.CollectionItemList
status-code: 200
url: Data API
errors:
- root.BadRequestError
- root.UnauthorizedError
Expand Down Expand Up @@ -1323,6 +1329,7 @@ service:
docs: Request was successful
type: root.CollectionItem
status-code: 200
url: Production
errors:
- root.BadRequestError
- root.UnauthorizedError
Expand Down Expand Up @@ -1452,6 +1459,11 @@ service:
docs: |
Get details of a selected Collection live Item.

<Note title="Serve data with the Content Delivery API">
To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-cdn), available at api-cdn.webflow.com.

</Note>

Required scope | `CMS:read`
source:
openapi: ../../../openapi/referenced-specs/v2.yml
Expand All @@ -1477,6 +1489,7 @@ service:
docs: Request was successful
type: root.CollectionItem
status-code: 200
url: Data API
errors:
- root.BadRequestError
- root.UnauthorizedError
Expand Down
5 changes: 1 addition & 4 deletions .mock/definition/products.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,6 @@ service:
- {}
response:
body:
required:
key: value
skus:
- id: 580e63fc8c9a982ac9b8b745
cmsLocaleId: 653ad57de882f528b32e810e
Expand Down Expand Up @@ -503,7 +501,6 @@ service:
types:
ProductsCreateSkuResponse:
properties:
required: optional<unknown>
skus: optional<list<root.Sku>>
skus: list<root.Sku>
source:
openapi: ../../../openapi/referenced-specs/v2.yml
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webflow-api",
"version": "3.1.1",
"version": "3.1.2",
"private": false,
"repository": "https://github.com/webflow/js-webflow-api",
"main": "./index.js",
Expand All @@ -18,8 +18,7 @@
"node-fetch": "2.7.0",
"qs": "6.11.2",
"readable-stream": "^4.5.2",
"js-base64": "3.7.2",
"crypto-browserify": "^3.12.1"
"js-base64": "3.7.2"
},
"devDependencies": {
"@types/url-join": "4.0.1",
Expand All @@ -39,7 +38,6 @@
"browser": {
"fs": false,
"os": false,
"path": false,
"crypto": false
"path": false
}
}
14 changes: 14 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5064,6 +5064,7 @@ Required scope | `cms:write`

```typescript
await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
id: "562ac0395358780a1f5e6fbc",
isEditable: true,
isRequired: false,
type: "RichText",
Expand Down Expand Up @@ -5628,6 +5629,11 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {

List all published items in a collection.

<Note title="Serve data with the Content Delivery API">
To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-cdn), available at api-cdn.webflow.com.

</Note>

Required scope | `CMS:read`

</dd>
Expand Down Expand Up @@ -5720,6 +5726,9 @@ Required scope | `CMS:write`

```typescript
await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
lastPublished: "2023-03-17T18:47:35.560Z",
lastUpdated: "2023-03-17T18:47:35.560Z",
createdOn: "2023-03-17T18:47:35.560Z",
isArchived: false,
isDraft: false,
fieldData: {
Expand Down Expand Up @@ -6306,6 +6315,11 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008

Get details of a selected Collection live Item.

<Note title="Serve data with the Content Delivery API">
To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-cdn), available at api-cdn.webflow.com.

</Note>

Required scope | `CMS:read`

</dd>
Expand Down
2 changes: 1 addition & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Ecommerce } from "./api/resources/ecommerce/client/Client";

export declare namespace WebflowClient {
interface Options {
environment?: core.Supplier<environments.WebflowEnvironment | string>;
environment?: core.Supplier<environments.WebflowEnvironment | environments.WebflowEnvironmentUrls>;
accessToken: core.Supplier<core.BearerToken>;
}

Expand Down
8 changes: 4 additions & 4 deletions src/api/resources/accessGroups/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index";

export declare namespace AccessGroups {
interface Options {
environment?: core.Supplier<environments.WebflowEnvironment | string>;
environment?: core.Supplier<environments.WebflowEnvironment | environments.WebflowEnvironmentUrls>;
accessToken: core.Supplier<core.BearerToken>;
}

Expand Down Expand Up @@ -70,16 +70,16 @@ export class AccessGroups {

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`sites/${encodeURIComponent(siteId)}/accessgroups`
),
method: "GET",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down
50 changes: 25 additions & 25 deletions src/api/resources/assets/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index";

export declare namespace Assets {
interface Options {
environment?: core.Supplier<environments.WebflowEnvironment | string>;
environment?: core.Supplier<environments.WebflowEnvironment | environments.WebflowEnvironmentUrls>;
accessToken: core.Supplier<core.BearerToken>;
}

Expand Down Expand Up @@ -53,16 +53,16 @@ export class Assets {
public async list(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Assets> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`sites/${encodeURIComponent(siteId)}/assets`
),
method: "GET",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down Expand Up @@ -187,16 +187,16 @@ export class Assets {
): Promise<Webflow.AssetUpload> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`sites/${encodeURIComponent(siteId)}/assets`
),
method: "POST",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down Expand Up @@ -309,16 +309,16 @@ export class Assets {
public async get(assetId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`assets/${encodeURIComponent(assetId)}`
),
method: "GET",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down Expand Up @@ -426,16 +426,16 @@ export class Assets {
public async delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise<void> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`assets/${encodeURIComponent(assetId)}`
),
method: "DELETE",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down Expand Up @@ -542,16 +542,16 @@ export class Assets {
): Promise<Webflow.Asset> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`assets/${encodeURIComponent(assetId)}`
),
method: "PATCH",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down Expand Up @@ -664,16 +664,16 @@ export class Assets {
public async listFolders(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolderList> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`sites/${encodeURIComponent(siteId)}/asset_folders`
),
method: "GET",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down Expand Up @@ -790,16 +790,16 @@ export class Assets {
): Promise<Webflow.AssetFolder> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`sites/${encodeURIComponent(siteId)}/asset_folders`
),
method: "POST",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down Expand Up @@ -917,16 +917,16 @@ export class Assets {
): Promise<Webflow.AssetFolder> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
`asset_folders/${encodeURIComponent(assetFolderId)}`
),
method: "GET",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
"X-Fern-SDK-Version": "3.1.1",
"User-Agent": "webflow-api/3.1.1",
"X-Fern-SDK-Version": "3.1.2",
"User-Agent": "webflow-api/3.1.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
Expand Down
Loading
Loading