Skip to content
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
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
}
}
},
"originGitCommit": "998225e70e3e266cc158f022dfdd12904d54da2d",
"originGitCommit": "ea5e12dbe0a04d27de0335f2ccbaba0d8595753c",
"sdkVersion": "3.3.5"
}
5 changes: 4 additions & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,15 @@ await client.sites.getCustomDomain("580e63e98c9a982ac9b8b741");
<dl>
<dd>

Publishes a site to one or more more domains.
Publishes a site or an individual page to one or more domains.
If multiple individual pages are published to staging, publishing from staging to production publishes all staged changes.

To publish to a specific custom domain, use the domain IDs from the [Get Custom Domains](/data/reference/sites/get-custom-domain) endpoint.

You must include at least one of the `customDomains` or `publishToWebflowSubdomain` properties in the request body.

To publish an individual page instead of the entire site, provide the ID of the page in the `pageId` parameter.

<Note title="Rate limit: 1 publish per minute">This endpoint has a specific rate limit of one successful publish queue per minute.</Note>

Required scope | `sites:write`
Expand Down
5 changes: 4 additions & 1 deletion src/api/resources/sites/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,15 @@ export class SitesClient {
}

/**
* Publishes a site to one or more more domains.
* Publishes a site or an individual page to one or more domains.
* If multiple individual pages are published to staging, publishing from staging to production publishes all staged changes.
*
* To publish to a specific custom domain, use the domain IDs from the [Get Custom Domains](/data/reference/sites/get-custom-domain) endpoint.
*
* You must include at least one of the `customDomains` or `publishToWebflowSubdomain` properties in the request body.
*
* To publish an individual page instead of the entire site, provide the ID of the page in the `pageId` parameter.
*
* <Note title="Rate limit: 1 publish per minute">This endpoint has a specific rate limit of one successful publish queue per minute.</Note>
*
* Required scope | `sites:write`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ export interface SitesPublishRequest {
customDomains?: string[];
/** Choice of whether to publish to the default Webflow Subdomain */
publishToWebflowSubdomain?: boolean;
/** The ID of the page to publish */
pageId?: string;
}
2 changes: 2 additions & 0 deletions src/api/resources/sites/types/SitesPublishResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ export interface SitesPublishResponse {
customDomains?: Webflow.Domain[];
/** Flag for publishing to webflow.io subdomain */
publishToWebflowSubdomain?: boolean;
/** Whether the site or an individual page was published */
publishScope?: Webflow.SitesPublishResponsePublishScope;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file was auto-generated by Fern from our API Definition.

/** Whether the site or an individual page was published */
export const SitesPublishResponsePublishScope = {
Site: "site",
Page: "page",
} as const;
export type SitesPublishResponsePublishScope =
(typeof SitesPublishResponsePublishScope)[keyof typeof SitesPublishResponsePublishScope];
1 change: 1 addition & 0 deletions src/api/resources/sites/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./SitesPublishResponse";
export * from "./SitesPublishResponsePublishScope";
6 changes: 6 additions & 0 deletions src/api/types/SitePublishPayload.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// This file was auto-generated by Fern from our API Definition.

import type * as Webflow from "../index";

/**
* The payload of data sent from Webflow
*/
Expand All @@ -12,4 +14,8 @@ export interface SitePublishPayload {
domains?: string[];
/** The name and ID of the user who published the site */
publishedBy?: Record<string, unknown>;
/** Whether the entire site or an individual page was published */
publishScope?: Webflow.SitePublishPayloadPublishScope;
/** The ID of the page that was published */
pageId?: string;
}
9 changes: 9 additions & 0 deletions src/api/types/SitePublishPayloadPublishScope.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file was auto-generated by Fern from our API Definition.

/** Whether the entire site or an individual page was published */
export const SitePublishPayloadPublishScope = {
Page: "page",
Site: "site",
} as const;
export type SitePublishPayloadPublishScope =
(typeof SitePublishPayloadPublishScope)[keyof typeof SitePublishPayloadPublishScope];
1 change: 1 addition & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export * from "./SitePlanId";
export * from "./SitePlanName";
export * from "./SitePublish";
export * from "./SitePublishPayload";
export * from "./SitePublishPayloadPublishScope";
export * from "./Sites";
export * from "./Sku";
export * from "./SkuFieldData";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ export const SitesPublishRequest: core.serialization.Schema<
> = core.serialization.object({
customDomains: core.serialization.list(core.serialization.string()).optional(),
publishToWebflowSubdomain: core.serialization.boolean().optional(),
pageId: core.serialization.string().optional(),
});

export declare namespace SitesPublishRequest {
export interface Raw {
customDomains?: string[] | null;
publishToWebflowSubdomain?: boolean | null;
pageId?: string | null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ import type * as Webflow from "../../../../api/index";
import * as core from "../../../../core";
import type * as serializers from "../../../index";
import { Domain } from "../../../types/Domain";
import { SitesPublishResponsePublishScope } from "./SitesPublishResponsePublishScope";

export const SitesPublishResponse: core.serialization.ObjectSchema<
serializers.SitesPublishResponse.Raw,
Webflow.SitesPublishResponse
> = core.serialization.object({
customDomains: core.serialization.list(Domain).optional(),
publishToWebflowSubdomain: core.serialization.boolean().optional(),
publishScope: SitesPublishResponsePublishScope.optional(),
});

export declare namespace SitesPublishResponse {
export interface Raw {
customDomains?: Domain.Raw[] | null;
publishToWebflowSubdomain?: boolean | null;
publishScope?: SitesPublishResponsePublishScope.Raw | null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.

import type * as Webflow from "../../../../api/index";
import * as core from "../../../../core";
import type * as serializers from "../../../index";

export const SitesPublishResponsePublishScope: core.serialization.Schema<
serializers.SitesPublishResponsePublishScope.Raw,
Webflow.SitesPublishResponsePublishScope
> = core.serialization.enum_(["site", "page"]);

export declare namespace SitesPublishResponsePublishScope {
export type Raw = "site" | "page";
}
1 change: 1 addition & 0 deletions src/serialization/resources/sites/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./SitesPublishResponse";
export * from "./SitesPublishResponsePublishScope";
5 changes: 5 additions & 0 deletions src/serialization/types/SitePublishPayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import type * as Webflow from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
import { SitePublishPayloadPublishScope } from "./SitePublishPayloadPublishScope";

export const SitePublishPayload: core.serialization.ObjectSchema<
serializers.SitePublishPayload.Raw,
Expand All @@ -12,6 +13,8 @@ export const SitePublishPayload: core.serialization.ObjectSchema<
publishedOn: core.serialization.date().optional(),
domains: core.serialization.list(core.serialization.string()).optional(),
publishedBy: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
publishScope: SitePublishPayloadPublishScope.optional(),
pageId: core.serialization.string().optional(),
});

export declare namespace SitePublishPayload {
Expand All @@ -20,5 +23,7 @@ export declare namespace SitePublishPayload {
publishedOn?: string | null;
domains?: string[] | null;
publishedBy?: Record<string, unknown> | null;
publishScope?: SitePublishPayloadPublishScope.Raw | null;
pageId?: string | null;
}
}
14 changes: 14 additions & 0 deletions src/serialization/types/SitePublishPayloadPublishScope.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.

import type * as Webflow from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";

export const SitePublishPayloadPublishScope: core.serialization.Schema<
serializers.SitePublishPayloadPublishScope.Raw,
Webflow.SitePublishPayloadPublishScope
> = core.serialization.enum_(["page", "site"]);

export declare namespace SitePublishPayloadPublishScope {
export type Raw = "page" | "site";
}
1 change: 1 addition & 0 deletions src/serialization/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export * from "./SitePlanId";
export * from "./SitePlanName";
export * from "./SitePublish";
export * from "./SitePublishPayload";
export * from "./SitePublishPayloadPublishScope";
export * from "./Sites";
export * from "./Sku";
export * from "./SkuFieldData";
Expand Down
2 changes: 2 additions & 0 deletions tests/wire/sites.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ describe("SitesClient", () => {
{ id: "589a331aa51e760df7ccb89d", url: "test-api-domain.com", lastPublished: "2022-12-07T16:51:37Z" },
],
publishToWebflowSubdomain: true,
publishScope: "site",
};
server
.mockEndpoint()
Expand All @@ -1303,6 +1304,7 @@ describe("SitesClient", () => {
},
],
publishToWebflowSubdomain: true,
publishScope: "site",
});
});

Expand Down
Loading