Skip to content

Commit 8784fec

Browse files
committed
SDK regeneration
1 parent b40a6a1 commit 8784fec

File tree

50 files changed

+525
-806
lines changed

Some content is hidden

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

50 files changed

+525
-806
lines changed

.mock/definition/api.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ error-discrimination:
33
strategy: status-code
44
display-name: Data API
55
environments:
6-
Default: https://api.webflow.com/v2
7-
default-environment: Default
6+
Data API:
7+
urls:
8+
Base: https://api.webflow.com/v2
9+
Data API: https://api.webflow.com/v2
10+
Content Delivery API: https://api-cdn.webflow.com/v2
11+
Production: https://api.webflow.com/v2
12+
CDN: https://api-cdn.webflow.com/v2
13+
default-environment: Data API
14+
default-url: Base
815
auth-schemes:
916
BearerToken:
1017
scheme: bearer

.mock/definition/collections/items.yml

+13
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,11 @@ service:
568568
docs: |
569569
List all published items in a collection.
570570
571+
<Note title="Serve data with the Content Delivery API">
572+
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.
573+
574+
</Note>
575+
571576
Required scope | `CMS:read`
572577
source:
573578
openapi: ../../../openapi/referenced-specs/v2.yml
@@ -610,6 +615,7 @@ service:
610615
docs: Request was successful
611616
type: root.CollectionItemList
612617
status-code: 200
618+
url: Data API
613619
errors:
614620
- root.BadRequestError
615621
- root.UnauthorizedError
@@ -1323,6 +1329,7 @@ service:
13231329
docs: Request was successful
13241330
type: root.CollectionItem
13251331
status-code: 200
1332+
url: Production
13261333
errors:
13271334
- root.BadRequestError
13281335
- root.UnauthorizedError
@@ -1452,6 +1459,11 @@ service:
14521459
docs: |
14531460
Get details of a selected Collection live Item.
14541461
1462+
<Note title="Serve data with the Content Delivery API">
1463+
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.
1464+
1465+
</Note>
1466+
14551467
Required scope | `CMS:read`
14561468
source:
14571469
openapi: ../../../openapi/referenced-specs/v2.yml
@@ -1477,6 +1489,7 @@ service:
14771489
docs: Request was successful
14781490
type: root.CollectionItem
14791491
status-code: 200
1492+
url: Data API
14801493
errors:
14811494
- root.BadRequestError
14821495
- root.UnauthorizedError

.mock/definition/products.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,6 @@ service:
401401
- {}
402402
response:
403403
body:
404-
required:
405-
key: value
406404
skus:
407405
- id: 580e63fc8c9a982ac9b8b745
408406
cmsLocaleId: 653ad57de882f528b32e810e
@@ -503,7 +501,6 @@ service:
503501
types:
504502
ProductsCreateSkuResponse:
505503
properties:
506-
required: optional<unknown>
507-
skus: optional<list<root.Sku>>
504+
skus: list<root.Sku>
508505
source:
509506
openapi: ../../../openapi/referenced-specs/v2.yml

package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webflow-api",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"private": false,
55
"repository": "https://github.com/webflow/js-webflow-api",
66
"main": "./index.js",
@@ -18,8 +18,7 @@
1818
"node-fetch": "2.7.0",
1919
"qs": "6.11.2",
2020
"readable-stream": "^4.5.2",
21-
"js-base64": "3.7.2",
22-
"crypto-browserify": "^3.12.1"
21+
"js-base64": "3.7.2"
2322
},
2423
"devDependencies": {
2524
"@types/url-join": "4.0.1",
@@ -39,7 +38,6 @@
3938
"browser": {
4039
"fs": false,
4140
"os": false,
42-
"path": false,
43-
"crypto": false
41+
"path": false
4442
}
4543
}

reference.md

+14
Original file line numberDiff line numberDiff line change
@@ -5064,6 +5064,7 @@ Required scope | `cms:write`
50645064

50655065
```typescript
50665066
await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
5067+
id: "562ac0395358780a1f5e6fbc",
50675068
isEditable: true,
50685069
isRequired: false,
50695070
type: "RichText",
@@ -5628,6 +5629,11 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
56285629

56295630
List all published items in a collection.
56305631

5632+
<Note title="Serve data with the Content Delivery API">
5633+
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.
5634+
5635+
</Note>
5636+
56315637
Required scope | `CMS:read`
56325638

56335639
</dd>
@@ -5720,6 +5726,9 @@ Required scope | `CMS:write`
57205726

57215727
```typescript
57225728
await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
5729+
lastPublished: "2023-03-17T18:47:35.560Z",
5730+
lastUpdated: "2023-03-17T18:47:35.560Z",
5731+
createdOn: "2023-03-17T18:47:35.560Z",
57235732
isArchived: false,
57245733
isDraft: false,
57255734
fieldData: {
@@ -6306,6 +6315,11 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
63066315

63076316
Get details of a selected Collection live Item.
63086317

6318+
<Note title="Serve data with the Content Delivery API">
6319+
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.
6320+
6321+
</Note>
6322+
63096323
Required scope | `CMS:read`
63106324

63116325
</dd>

src/Client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { Ecommerce } from "./api/resources/ecommerce/client/Client";
2222

2323
export declare namespace WebflowClient {
2424
interface Options {
25-
environment?: core.Supplier<environments.WebflowEnvironment | string>;
25+
environment?: core.Supplier<environments.WebflowEnvironment | environments.WebflowEnvironmentUrls>;
2626
accessToken: core.Supplier<core.BearerToken>;
2727
}
2828

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index";
1111

1212
export declare namespace AccessGroups {
1313
interface Options {
14-
environment?: core.Supplier<environments.WebflowEnvironment | string>;
14+
environment?: core.Supplier<environments.WebflowEnvironment | environments.WebflowEnvironmentUrls>;
1515
accessToken: core.Supplier<core.BearerToken>;
1616
}
1717

@@ -70,16 +70,16 @@ export class AccessGroups {
7070

7171
const _response = await core.fetcher({
7272
url: urlJoin(
73-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
73+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
7474
`sites/${encodeURIComponent(siteId)}/accessgroups`
7575
),
7676
method: "GET",
7777
headers: {
7878
Authorization: await this._getAuthorizationHeader(),
7979
"X-Fern-Language": "JavaScript",
8080
"X-Fern-SDK-Name": "webflow-api",
81-
"X-Fern-SDK-Version": "3.1.1",
82-
"User-Agent": "webflow-api/3.1.1",
81+
"X-Fern-SDK-Version": "3.1.2",
82+
"User-Agent": "webflow-api/3.1.2",
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

+25-25
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index";
1111

1212
export declare namespace Assets {
1313
interface Options {
14-
environment?: core.Supplier<environments.WebflowEnvironment | string>;
14+
environment?: core.Supplier<environments.WebflowEnvironment | environments.WebflowEnvironmentUrls>;
1515
accessToken: core.Supplier<core.BearerToken>;
1616
}
1717

@@ -53,16 +53,16 @@ export class Assets {
5353
public async list(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Assets> {
5454
const _response = await core.fetcher({
5555
url: urlJoin(
56-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
56+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
5757
`sites/${encodeURIComponent(siteId)}/assets`
5858
),
5959
method: "GET",
6060
headers: {
6161
Authorization: await this._getAuthorizationHeader(),
6262
"X-Fern-Language": "JavaScript",
6363
"X-Fern-SDK-Name": "webflow-api",
64-
"X-Fern-SDK-Version": "3.1.1",
65-
"User-Agent": "webflow-api/3.1.1",
64+
"X-Fern-SDK-Version": "3.1.2",
65+
"User-Agent": "webflow-api/3.1.2",
6666
"X-Fern-Runtime": core.RUNTIME.type,
6767
"X-Fern-Runtime-Version": core.RUNTIME.version,
6868
...requestOptions?.headers,
@@ -187,16 +187,16 @@ export class Assets {
187187
): Promise<Webflow.AssetUpload> {
188188
const _response = await core.fetcher({
189189
url: urlJoin(
190-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
190+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
191191
`sites/${encodeURIComponent(siteId)}/assets`
192192
),
193193
method: "POST",
194194
headers: {
195195
Authorization: await this._getAuthorizationHeader(),
196196
"X-Fern-Language": "JavaScript",
197197
"X-Fern-SDK-Name": "webflow-api",
198-
"X-Fern-SDK-Version": "3.1.1",
199-
"User-Agent": "webflow-api/3.1.1",
198+
"X-Fern-SDK-Version": "3.1.2",
199+
"User-Agent": "webflow-api/3.1.2",
200200
"X-Fern-Runtime": core.RUNTIME.type,
201201
"X-Fern-Runtime-Version": core.RUNTIME.version,
202202
...requestOptions?.headers,
@@ -309,16 +309,16 @@ export class Assets {
309309
public async get(assetId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset> {
310310
const _response = await core.fetcher({
311311
url: urlJoin(
312-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
312+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
313313
`assets/${encodeURIComponent(assetId)}`
314314
),
315315
method: "GET",
316316
headers: {
317317
Authorization: await this._getAuthorizationHeader(),
318318
"X-Fern-Language": "JavaScript",
319319
"X-Fern-SDK-Name": "webflow-api",
320-
"X-Fern-SDK-Version": "3.1.1",
321-
"User-Agent": "webflow-api/3.1.1",
320+
"X-Fern-SDK-Version": "3.1.2",
321+
"User-Agent": "webflow-api/3.1.2",
322322
"X-Fern-Runtime": core.RUNTIME.type,
323323
"X-Fern-Runtime-Version": core.RUNTIME.version,
324324
...requestOptions?.headers,
@@ -426,16 +426,16 @@ export class Assets {
426426
public async delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise<void> {
427427
const _response = await core.fetcher({
428428
url: urlJoin(
429-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
429+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
430430
`assets/${encodeURIComponent(assetId)}`
431431
),
432432
method: "DELETE",
433433
headers: {
434434
Authorization: await this._getAuthorizationHeader(),
435435
"X-Fern-Language": "JavaScript",
436436
"X-Fern-SDK-Name": "webflow-api",
437-
"X-Fern-SDK-Version": "3.1.1",
438-
"User-Agent": "webflow-api/3.1.1",
437+
"X-Fern-SDK-Version": "3.1.2",
438+
"User-Agent": "webflow-api/3.1.2",
439439
"X-Fern-Runtime": core.RUNTIME.type,
440440
"X-Fern-Runtime-Version": core.RUNTIME.version,
441441
...requestOptions?.headers,
@@ -542,16 +542,16 @@ export class Assets {
542542
): Promise<Webflow.Asset> {
543543
const _response = await core.fetcher({
544544
url: urlJoin(
545-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
545+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
546546
`assets/${encodeURIComponent(assetId)}`
547547
),
548548
method: "PATCH",
549549
headers: {
550550
Authorization: await this._getAuthorizationHeader(),
551551
"X-Fern-Language": "JavaScript",
552552
"X-Fern-SDK-Name": "webflow-api",
553-
"X-Fern-SDK-Version": "3.1.1",
554-
"User-Agent": "webflow-api/3.1.1",
553+
"X-Fern-SDK-Version": "3.1.2",
554+
"User-Agent": "webflow-api/3.1.2",
555555
"X-Fern-Runtime": core.RUNTIME.type,
556556
"X-Fern-Runtime-Version": core.RUNTIME.version,
557557
...requestOptions?.headers,
@@ -664,16 +664,16 @@ export class Assets {
664664
public async listFolders(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolderList> {
665665
const _response = await core.fetcher({
666666
url: urlJoin(
667-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
667+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
668668
`sites/${encodeURIComponent(siteId)}/asset_folders`
669669
),
670670
method: "GET",
671671
headers: {
672672
Authorization: await this._getAuthorizationHeader(),
673673
"X-Fern-Language": "JavaScript",
674674
"X-Fern-SDK-Name": "webflow-api",
675-
"X-Fern-SDK-Version": "3.1.1",
676-
"User-Agent": "webflow-api/3.1.1",
675+
"X-Fern-SDK-Version": "3.1.2",
676+
"User-Agent": "webflow-api/3.1.2",
677677
"X-Fern-Runtime": core.RUNTIME.type,
678678
"X-Fern-Runtime-Version": core.RUNTIME.version,
679679
...requestOptions?.headers,
@@ -790,16 +790,16 @@ export class Assets {
790790
): Promise<Webflow.AssetFolder> {
791791
const _response = await core.fetcher({
792792
url: urlJoin(
793-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
793+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
794794
`sites/${encodeURIComponent(siteId)}/asset_folders`
795795
),
796796
method: "POST",
797797
headers: {
798798
Authorization: await this._getAuthorizationHeader(),
799799
"X-Fern-Language": "JavaScript",
800800
"X-Fern-SDK-Name": "webflow-api",
801-
"X-Fern-SDK-Version": "3.1.1",
802-
"User-Agent": "webflow-api/3.1.1",
801+
"X-Fern-SDK-Version": "3.1.2",
802+
"User-Agent": "webflow-api/3.1.2",
803803
"X-Fern-Runtime": core.RUNTIME.type,
804804
"X-Fern-Runtime-Version": core.RUNTIME.version,
805805
...requestOptions?.headers,
@@ -917,16 +917,16 @@ export class Assets {
917917
): Promise<Webflow.AssetFolder> {
918918
const _response = await core.fetcher({
919919
url: urlJoin(
920-
(await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default,
920+
((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base,
921921
`asset_folders/${encodeURIComponent(assetFolderId)}`
922922
),
923923
method: "GET",
924924
headers: {
925925
Authorization: await this._getAuthorizationHeader(),
926926
"X-Fern-Language": "JavaScript",
927927
"X-Fern-SDK-Name": "webflow-api",
928-
"X-Fern-SDK-Version": "3.1.1",
929-
"User-Agent": "webflow-api/3.1.1",
928+
"X-Fern-SDK-Version": "3.1.2",
929+
"User-Agent": "webflow-api/3.1.2",
930930
"X-Fern-Runtime": core.RUNTIME.type,
931931
"X-Fern-Runtime-Version": core.RUNTIME.version,
932932
...requestOptions?.headers,

0 commit comments

Comments
 (0)