diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 667df1ba..ae45d3a8 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -19,11 +19,24 @@ errors: message: >- OAuthForbidden: You are missing the following scopes - components:write + - value: + key: value - value: code: forbidden message: User is not authorized to perform this action + BadRequestError: + status-code: 400 + type: unknown + docs: Request body was incorrectly formatted. + examples: + - value: + code: bad_request + message: 'Bad Request: Request is malformed' - value: key: value + - value: + code: validation_error + message: 'Validation Error: Provided ID is invalid' NotFoundError: status-code: 404 type: Error @@ -43,19 +56,6 @@ errors: - value: code: too_many_requests message: Too many requests - BadRequestError: - status-code: 400 - type: unknown - docs: Request body was incorrectly formatted. - examples: - - value: - code: bad_request - message: 'Bad Request: Request is malformed' - - value: - key: value - - value: - code: validation_error - message: 'Validation Error: Provided ID is invalid' InternalServerError: status-code: 500 type: Error @@ -71,6 +71,9 @@ errors: examples: - value: message: '''Site is published to multiple domains at different times' + - value: + code: custom_code_max_registered_scripts + message: The maximum number of registered scripts has been reached. - value: code: forms_require_republish message: To access this feature, the site needs to be republished. @@ -80,27 +83,27 @@ errors: code: ecommerce_not_enabled message: Ecommerce is not yet initialized types: - BadRequestErrorBody: - discriminated: false - union: - - InvalidDomain - - NoDomains - source: - openapi: ../../../referenced-specs/v2.yml ForbiddenErrorBody: discriminated: false union: - InvalidScopes - UsersNotEnabled source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + BadRequestErrorBody: + discriminated: false + union: + - InvalidDomain + - NoDomains + source: + openapi: ../../../openapi/referenced-specs/v2.yml ConflictErrorBody: discriminated: false union: - DuplicateUserEmail - UserLimitReached source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AuthorizedUser: properties: id: @@ -118,7 +121,7 @@ types: type: optional docs: The user's last name source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ErrorCode: enum: - bad_request @@ -151,16 +154,9 @@ types: - users_not_enabled - validation_error docs: Error code - source: - openapi: ../../../referenced-specs/v2.yml - ErrorDetailsItem: - discriminated: false - union: - - string - - map - source: - openapi: ../../../referenced-specs/v2.yml inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml Error: properties: code: @@ -173,10 +169,10 @@ types: type: optional docs: Link to more information details: - type: optional> + type: optional> docs: Array of errors source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Application: unknown AuthorizationAuthorizationAuthorizedTo: properties: @@ -190,7 +186,7 @@ types: type: optional> docs: Array of Users this app is authorized to source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true AuthorizationAuthorization: docs: The Authorization object @@ -215,7 +211,7 @@ types: docs: Comma separted list of OAuth scopes corresponding to the Authorization authorizedTo: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Authorization: properties: @@ -224,7 +220,7 @@ types: docs: The Authorization object application: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Domain: properties: id: @@ -234,7 +230,7 @@ types: type: optional docs: The registered Domain name source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Locale: properties: id: @@ -264,7 +260,7 @@ types: A tag or code representing the locale, often following a standard format like 'en-US'. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Locales: properties: primary: @@ -274,15 +270,16 @@ types: type: optional> docs: A list of secondary locales available for the site or application. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SiteDataCollectionType: enum: - always - optOut - disabled docs: The type of data collection enabled for the site. + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Site: properties: id: @@ -326,19 +323,120 @@ types: type: optional docs: The type of data collection enabled for the site. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + InvalidScopes: unknown + NotEnterprisePlanWorkspace: unknown Sites: properties: sites: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + NotEnterprisePlanSite: unknown Domains: properties: customDomains: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml InvalidDomain: unknown NoDomains: unknown + Redirect: + docs: A single redirection rule, specifying a source URL and a destination URL. + properties: + id: + type: optional + docs: The ID of the specific redirect rule + fromUrl: + type: optional + docs: The source URL path that will be redirected. + toUrl: + type: optional + docs: The target URL path where the user or client will be redirected. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Pagination: + docs: Pagination object + properties: + limit: + type: optional + docs: The limit used for pagination + offset: + type: optional + docs: The offset used for pagination + total: + type: optional + docs: The total number of records + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Redirects: + docs: Site redirects response + properties: + redirects: + type: optional> + docs: List of redirects for a given site + pagination: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SitePlanId: + enum: + - value: hosting-basic-v3 + name: HostingBasicV3 + - value: hosting-cms-v3 + name: HostingCmsV3 + - value: hosting-business-v3 + name: HostingBusinessV3 + - value: hosting-ecommerce-standard-v2 + name: HostingEcommerceStandardV2 + - value: hosting-ecommerce-plus-v2 + name: HostingEcommercePlusV2 + - value: hosting-ecommerce-advanced-v2 + name: HostingEcommerceAdvancedV2 + - value: hosting-basic-v4 + name: HostingBasicV4 + - value: hosting-cms-v4 + name: HostingCmsV4 + - value: hosting-business-v4 + name: HostingBusinessV4 + - value: hosting-ecommerce-standard-v3 + name: HostingEcommerceStandardV3 + - value: hosting-ecommerce-plus-v3 + name: HostingEcommercePlusV3 + - value: hosting-ecommerce-advanced-v3 + name: HostingEcommerceAdvancedV3 + docs: ID of the hosting plan. + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SitePlanName: + enum: + - value: Basic Hosting + name: BasicHosting + - value: CMS Hosting + name: CmsHosting + - value: Business Hosting + name: BusinessHosting + - value: ECommerce Standard Hosting + name: ECommerceStandardHosting + - value: ECommerce Plus Hosting + name: ECommercePlusHosting + - value: ECommerce Advanced Hosting + name: ECommerceAdvancedHosting + docs: Name of the hosting plan. + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SitePlan: + properties: + id: + type: optional + docs: ID of the hosting plan. + name: + type: optional + docs: Name of the hosting plan. + pricingInfo: + type: optional + docs: URL for more information about Webflow hosting plan pricing. + source: + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogItemEvent: enum: - styles_modified @@ -383,8 +481,9 @@ types: - branch_review_created - branch_review_approved - branch_review_canceled + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogItemResourceOperation: enum: - CREATED @@ -396,14 +495,15 @@ types: - GROUP_CREATED - GROUP_DELETED - REORDERED + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogItemUser: properties: id: optional displayName: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SiteActivityLogItem: properties: @@ -419,29 +519,13 @@ types: previousValue: optional payload: optional> source: - openapi: ../../../referenced-specs/v2.yml - Pagination: - docs: Pagination object - properties: - limit: - type: optional - docs: The limit used for pagination - offset: - type: optional - docs: The offset used for pagination - total: - type: optional - docs: The total number of records - source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogResponse: properties: items: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml - InvalidScopes: unknown - NotEnterprisePlanSite: unknown + openapi: ../../../openapi/referenced-specs/v2.yml CollectionListArrayItem: docs: A collection object properties: @@ -466,14 +550,14 @@ types: type: optional docs: The date the collection was last updated source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionList: properties: collections: type: optional> docs: An array of Collections source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FieldType: enum: - PlainText @@ -490,8 +574,9 @@ types: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Field: docs: The details of a field in a collection properties: @@ -519,7 +604,7 @@ types: type: optional docs: Additional text to help anyone filling out this field source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Collection: docs: A collection object properties: @@ -547,7 +632,7 @@ types: docs: The list of fields in the Collection type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemFieldData: properties: name: @@ -560,7 +645,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItem: docs: > @@ -603,7 +688,7 @@ types: default: false fieldData: CollectionItemFieldData source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemListPagination: properties: limit: @@ -618,7 +703,7 @@ types: type: optional docs: Total number of items in the collection source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemList: docs: Results from collection items list @@ -628,7 +713,7 @@ types: docs: List of Items within the collection pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemPostSingleFieldData: properties: name: @@ -641,7 +726,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemPostSingle: docs: > @@ -684,7 +769,7 @@ types: default: false fieldData: CollectionItemPostSingleFieldData source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemWithIdInputFieldData: properties: name: @@ -697,7 +782,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemWithIdInput: docs: > @@ -729,7 +814,7 @@ types: docs: Boolean determining if the Item is set to draft fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemListNoPagination: docs: Results from collection items list properties: @@ -737,7 +822,7 @@ types: type: optional> docs: List of Items within the collection source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml BulkCollectionItemFieldData: properties: name: @@ -750,7 +835,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true BulkCollectionItem: docs: > @@ -784,7 +869,7 @@ types: default: false fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemPatchSingleFieldData: properties: name: @@ -797,7 +882,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemPatchSingle: docs: > @@ -829,7 +914,7 @@ types: docs: Boolean determining if the Item is set to draft fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PageSeo: docs: SEO-related fields for the Page properties: @@ -840,7 +925,7 @@ types: type: optional docs: The Page description shown in search engine results source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true PageOpenGraph: docs: Open Graph fields for the Page @@ -862,7 +947,7 @@ types: description default: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Page: docs: The Page object @@ -932,25 +1017,47 @@ types: type: optional docs: Relative path of the published page URL source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PageList: docs: The Page object properties: pages: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + TextNodeText: + properties: + html: + type: optional + docs: The HTML content of the text node. + text: + type: optional + docs: The raw text content of the text node. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true TextNode: docs: > - Represents textual content within the DOM. It contains both the raw text - and its HTML representation, allowing for flexibility in rendering and - processing. Additional attributes can be associated with the text for - styling or other purposes. + Represents text content within the DOM. It contains both the raw text and + its HTML representation. Additional attributes can be associated with the + text for styling or other purposes. properties: - html: optional - text: optional + id: + type: optional + docs: Node UUID + text: optional + attributes: + type: optional> + docs: The custom attributes of the node + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ImageNodeImage: + properties: + alt: optional + assetId: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true ImageNode: docs: > Represents an image within the DOM. It contains details about the image, @@ -958,41 +1065,97 @@ types: identifier for fetching the actual image resource. Additional attributes can be associated with the image for styling or other purposes. properties: - alt: optional - assetId: optional + id: + type: optional + docs: Node UUID + image: optional + attributes: + type: optional> + docs: The custom attributes of the node source: - openapi: ../../../referenced-specs/v2.yml - NodeType: + openapi: ../../../openapi/referenced-specs/v2.yml + Text: + properties: + html: + type: optional + docs: The HTML content of the text node. + text: + type: optional + docs: The raw text content of the text node. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentPropertyType: enum: - - text - - image + - value: Plain Text + name: PlainText + - value: Rich Text + name: RichText + - value: Alt Text + name: AltText + docs: The type of the property. + inline: true source: - openapi: ../../../referenced-specs/v2.yml - Node: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentProperty: docs: > - A generic representation of a content element within the Document Object - Model (DOM). Each node has a unique identifier and a specific type that - determines its content structure and attributes. + Represents a property of a component instance in the DOM. A property + contains a list of both the raw text and the HTML representation, allowing + for flexibility in rendering and processing. Additional attributes can be + associated with the text for styling or other purposes. + properties: + propertyId: + type: optional + docs: The ID of the property. + type: + type: optional + docs: The type of the property. + label: + type: optional + docs: The label of the property in the UI. + text: + type: optional + docs: >- + Represents text content within the DOM. It contains both the raw text + and its HTML representation. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentNode: + docs: > + Represents a component instance within the DOM. It contains details about + the component instance, such as its type and properties. properties: id: type: optional docs: Node UUID - type: optional - text: optional - image: optional - attributes: - type: optional> - docs: The custom attributes of the node + componentId: + type: optional + docs: Component ID + propertyOverrides: + type: optional> + docs: List of component properties with overrides for a component instance. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Node: + discriminant: type + base-properties: {} + docs: > + A generic representation of a content element within the Document Object + Model (DOM). Each node has a unique identifier and a specific type that + determines its content structure and attributes. + union: + text: TextNode + image: ImageNode + component-instance: ComponentNode source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Dom: docs: > The DOM (Document Object Model) schema represents the content structure of - a web page. It captures various content nodes, such as text and images, - along with their associated attributes. Each node has a unique identifier - and can be of different types like text or image. The schema also provides - pagination details for scenarios where the content nodes are too many to - be fetched in a single request. + a web page or component. It captures various content nodes along with + their associated attributes. Each node has a unique identifier and can be + of different types like text, image or component-instance. The schema also + provides pagination details for scenarios where the content nodes are too + many to be fetched in a single request. properties: pageId: type: optional @@ -1000,7 +1163,114 @@ types: nodes: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + TextNodeWrite: + docs: Update a text node + properties: + nodeId: + type: string + docs: Node UUID + text: + type: string + docs: >- + HTML content of the node, including the HTML tag. The HTML tags must + be the same as what's returned from the Get Content endpoint. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem: + properties: + propertyId: + type: string + docs: The ID of the property. + text: + type: string + docs: > + The new string or HTML value used to override the component instance + property value. + + The provided value must be compatible with the type of the component + instance property. + + For example, attempting to override a single-line plain-text property + with a multi-line + + value will result in an error. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + ComponentInstanceNodePropertyOverridesWrite: + docs: Update text property overrides of a component instance + properties: + nodeId: + type: string + docs: Node UUID + propertyOverrides: + docs: >- + A list of component instance properties to override within the + specified secondary locale. + type: list + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Component: + docs: The Component object + properties: + id: + type: string + docs: Unique identifier for the Component + name: + type: optional + docs: Component Name + group: + type: optional + docs: The group that the component belongs to + description: + type: optional + docs: Component Description + readonly: + type: optional + docs: >- + Indicates whether the component is read-only. Components that cannot + be updated within this Site are set to readonly. Workspace Libraries + are a good example. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentList: + docs: List of Components on a site. + properties: + components: optional> + pagination: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentDom: + docs: > + The Component DOM schema represents the content structure of a component. + Similar to Page DOM, it captures various content nodes and their + associated attributes, but specifically for a component's structure. Each + node has a unique identifier and can contain text, images, or nested + component instances. + properties: + componentId: + type: optional + docs: Component ID + nodes: optional> + pagination: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentProperties: + docs: > + The Component Properties schema represents a list of properties that store + text content. Each property has a unique identifier and can be of + different types like plain text or rich text. The schema also provides + pagination details for scenarios where there more properties than the + limit. + properties: + componentId: + type: optional + docs: Component ID + properties: optional> + pagination: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml ScriptApplyLocation: enum: - header @@ -1009,8 +1279,9 @@ types: Location of the script, either in the header or footer of the published site default: header + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ScriptApply: properties: id: @@ -1031,7 +1302,7 @@ types: Developer-specified key/value pairs to be applied as attributes to the script source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ScriptApplyList: properties: scripts: @@ -1044,7 +1315,7 @@ types: type: optional docs: Date when the Site's scripts were created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CustomCodeHostedResponse: docs: Registered custom code for application properties: @@ -1080,13 +1351,13 @@ types: type: optional docs: A Semantic Version (SemVer) string, denoting the version of the script source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml RegisteredScriptList: docs: A list of scripts registered to the site properties: registeredScripts: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CustomCodeInlineResponse: docs: Registered custom code for application properties: @@ -1122,7 +1393,7 @@ types: type: optional docs: A Semantic Version (SemVer) string, denoting the version of the script source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Scripts: docs: A list of scripts applied to a Site or a Page type: list @@ -1131,8 +1402,9 @@ types: - page - site docs: Whether the Custom Code script is applied at the Site-level or Page-level + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CustomCodeBlock: docs: A specific instance of Custom Code applied to a Site or Page properties: @@ -1155,14 +1427,14 @@ types: type: optional docs: The date the Block was most recently updated source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ListCustomCodeBlocks: docs: Custom Code Blocks corresponding to where scripts were applied properties: blocks: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetVariant: properties: hostedUrl: @@ -1192,7 +1464,7 @@ types: type: optional docs: Any associated validation errors source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Asset: properties: id: @@ -1229,13 +1501,13 @@ types: type: optional docs: The visual description of the asset source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Assets: docs: A list of assets properties: assets: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetUploadUploadDetails: docs: Metadata for uploading the asset binary properties: @@ -1251,7 +1523,7 @@ types: content-type: optional Cache-Control: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true AssetUpload: properties: @@ -1289,7 +1561,7 @@ types: type: optional docs: Date the asset metadata was last updated source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetFolder: docs: Asset Folder details properties: @@ -1315,7 +1587,7 @@ types: type: optional docs: Date that the Asset Folder was last updated on source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetFolderList: docs: The Asset Folders object properties: @@ -1324,7 +1596,7 @@ types: docs: A list of Asset folders pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml TriggerType: enum: - form_submission @@ -1384,7 +1656,7 @@ types: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml WebhookFilter: docs: >- Only supported for the `form_submission` trigger type. Filter for the form @@ -1394,7 +1666,7 @@ types: type: optional docs: The name of the form you'd like to recieve notifications for. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Webhook: properties: @@ -1423,13 +1695,13 @@ types: type: optional docs: Date the Webhook registration was created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml WebhookList: properties: pagination: optional webhooks: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormFieldValueType: enum: - Plain @@ -1438,8 +1710,9 @@ types: - Phone - Number docs: The field type + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormFieldValue: docs: An object containing field info for a specific fieldID. properties: @@ -1456,7 +1729,8 @@ types: type: optional docs: Whether the field is visible to the user source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true FormField: type: map docs: A collection of form fields with additional properties. @@ -1476,7 +1750,7 @@ types: type: optional docs: Whether to send an email confirmation to the user source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Form: docs: A Webflow form @@ -1518,13 +1792,13 @@ types: type: optional docs: The unique ID of the Workspace the Site belongs to source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormList: properties: forms: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormSubmission: properties: id: @@ -1546,13 +1820,13 @@ types: type: optional> docs: The data submitted in the Form source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormSubmissionList: properties: formSubmissions: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserDataData: properties: name: @@ -1575,22 +1849,23 @@ types: type: optional docs: Custom user attributes source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true UserData: docs: An object containing the User's basic info and custom fields properties: data: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserStatus: enum: - invited - verified - unverified docs: The status of the user + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserAccessGroupsItemType: enum: - admin @@ -1599,8 +1874,9 @@ types: The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserAccessGroupsItem: docs: Access group slugs and types properties: @@ -1614,7 +1890,7 @@ types: * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true User: docs: > @@ -1649,7 +1925,7 @@ types: docs: Access groups the user belongs to data: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserList: docs: The list users results properties: @@ -1671,7 +1947,7 @@ types: type: optional> docs: List of Users for a Site source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UsersNotEnabled: unknown DuplicateUserEmail: unknown UserLimitReached: unknown @@ -1697,7 +1973,7 @@ types: type: optional docs: The date the Access Group was created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AccessGroupList: docs: The list access groups results properties: @@ -1719,7 +1995,7 @@ types: type: optional> docs: List of Site Access Groups source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuPropertyListEnumItem: docs: Enumerated Product variants/Options for the SKU properties: @@ -1733,7 +2009,7 @@ types: type: string docs: Slug for the Product variant/Option in the Site URL structure source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuPropertyList: docs: A variant/option type for a SKU @@ -1750,7 +2026,7 @@ types: collection type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductFieldDataTaxCategory: enum: - value: standard-taxable @@ -1811,8 +2087,9 @@ types: - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductFieldDataEcProductType: enum: - ff42fee0113744f693a764e3431a9cc2 @@ -1824,8 +2101,9 @@ types: href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductFieldData: docs: >- Contains content-specific details for a product, covering both standard @@ -1864,7 +2142,7 @@ types: types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Product: docs: The Product object properties: @@ -1893,7 +2171,7 @@ types: default: false fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuValueList: type: map docs: > @@ -1909,7 +2187,7 @@ types: type: optional docs: Currency of Item source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldDataCompareAtPrice: docs: comparison price of SKU @@ -1921,15 +2199,16 @@ types: type: optional docs: Currency of Item source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldDataEcSkuBillingMethod: enum: - value: one-time name: OneTime - subscription + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuFieldDataEcSkuSubscriptionPlanInterval: enum: - day @@ -1937,16 +2216,18 @@ types: - month - year docs: Interval of subscription renewal + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: enum: - active - inactive - canceled docs: The status of the plan + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuFieldDataEcSkuSubscriptionPlanPlansItem: properties: platform: @@ -1959,7 +2240,7 @@ types: type: optional docs: The status of the plan source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldDataEcSkuSubscriptionPlan: properties: @@ -1974,7 +2255,7 @@ types: docs: Number of days of a trial plans: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldData: docs: Standard and Custom fields for a SKU @@ -2004,7 +2285,7 @@ types: type: optional docs: Quantity of SKU that will be tracked as items are ordered. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Sku: docs: The SKU object properties: @@ -2025,7 +2306,7 @@ types: docs: The date the Product was created fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductAndSkUs: docs: A product and its SKUs. properties: @@ -2034,7 +2315,7 @@ types: type: optional> docs: A list of SKU Objects source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductAndSkUsList: docs: Results from product list properties: @@ -2045,7 +2326,7 @@ types: keys for each Item pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PublishStatus: enum: - staging @@ -2053,7 +2334,7 @@ types: docs: Indicate whether your Product should be set as "staging" or "live" default: staging source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderPrice: properties: unit: @@ -2066,14 +2347,15 @@ types: type: optional docs: The user-facing string representation of the amount source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderAddressType: enum: - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderAddressJapanType: enum: - kana @@ -2081,8 +2363,9 @@ types: docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderAddress: docs: A customer address properties: @@ -2116,7 +2399,7 @@ types: type: optional docs: The postal code of the address source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderPurchasedItemVariantImageFileVariantsItem: properties: url: @@ -2135,7 +2418,7 @@ types: type: optional docs: The image height in pixels source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderPurchasedItemVariantImageFile: properties: @@ -2161,7 +2444,7 @@ types: type: optional> docs: Variants of the supplied image source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderPurchasedItemVariantImage: properties: @@ -2172,7 +2455,7 @@ types: format: uri file: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderPurchasedItem: docs: An Item that was purchased @@ -2221,7 +2504,7 @@ types: type: optional docs: The physical length of the variant if provided, or null source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml StripeDetails: docs: >- An object with various Stripe IDs, useful for linking into the stripe @@ -2252,7 +2535,7 @@ types: type: optional docs: Stripe-generated refund reason, or null source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml StripeCardBrand: enum: - Visa @@ -2265,8 +2548,9 @@ types: name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml StripeCardExpires: docs: The card's expiration date. properties: @@ -2277,7 +2561,7 @@ types: type: optional docs: Month that the card expires source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true StripeCard: docs: > @@ -2297,7 +2581,7 @@ types: type: optional docs: The card's expiration date. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PaypalDetails: properties: orderId: @@ -2319,7 +2603,7 @@ types: type: optional docs: PayPal dispute identifier source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderStatus: enum: - pending @@ -2331,8 +2615,9 @@ types: - refunded docs: | The status of the Order + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderDisputeLastStatus: enum: - warning_needs_response @@ -2346,8 +2631,9 @@ types: docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderCustomerInfo: docs: An object with the keys `fullName` and `email`. properties: @@ -2360,13 +2646,13 @@ types: validation: format: email source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderMetadata: properties: isBuyNow: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderTotalsExtrasItemType: enum: @@ -2376,8 +2662,9 @@ types: - shipping - tax docs: The type of extra item this is. + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderTotalsExtrasItem: docs: Extra order items, includes discounts, shipping, and taxes. properties: @@ -2394,7 +2681,7 @@ types: type: optional docs: The price for the item source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderTotals: docs: An object describing various pricing totals @@ -2409,7 +2696,7 @@ types: type: optional docs: The total price source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderDownloadFilesItem: properties: @@ -2425,7 +2712,7 @@ types: validation: format: uri source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Order: properties: @@ -2554,7 +2841,7 @@ types: type: optional> docs: An array of downloadable file objects. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderList: docs: Results from order list properties: @@ -2563,14 +2850,15 @@ types: docs: List of orders pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml InventoryItemInventoryType: enum: - infinite - finite docs: infinite or finite + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml InventoryItem: docs: The availabile inventory for an item properties: @@ -2586,7 +2874,7 @@ types: type: optional docs: infinite or finite source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml EcommerceSettings: docs: Ecommerce settings for a Webflow Site properties: @@ -2600,4 +2888,4 @@ types: type: optional docs: The three-letter ISO currency code for the Site source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/accessGroups.yml b/.mock/definition/accessGroups.yml index 662d2ed2..d8828f8d 100644 --- a/.mock/definition/accessGroups.yml +++ b/.mock/definition/accessGroups.yml @@ -8,7 +8,7 @@ types: name: CreatedOnDescending docs: Sorts users in descending order based on their created date source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: __package__.yml service: @@ -24,7 +24,7 @@ service: Required scope | `users:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -77,4 +77,4 @@ service: slug: admin createdOn: '2022-08-01T19:41:48Z' source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/assets.yml b/.mock/definition/assets.yml index 5614b78b..35392ec3 100644 --- a/.mock/definition/assets.yml +++ b/.mock/definition/assets.yml @@ -13,7 +13,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -78,7 +78,7 @@ service: Required scope | `assets:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -150,7 +150,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_id: type: string @@ -198,7 +198,7 @@ service: Required Scope: `assets: write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_id: type: string @@ -222,7 +222,7 @@ service: Required scope | `assets:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_id: type: string @@ -284,7 +284,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -327,7 +327,7 @@ service: Required scope | `assets:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -380,7 +380,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_folder_id: type: string @@ -410,5 +410,6 @@ service: createdOn: '2018-10-14T21:55:49Z' lastUpdated: '2022-12-07T16:51:37Z' source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Assets +docs: Assets are files that are uploaded to your Webflow account. diff --git a/.mock/definition/collections.yml b/.mock/definition/collections.yml index a43baffd..661b54b1 100644 --- a/.mock/definition/collections.yml +++ b/.mock/definition/collections.yml @@ -13,7 +13,7 @@ service: Required scope | `cms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -61,7 +61,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -122,7 +122,7 @@ service: Required scope | `cms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -165,7 +165,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -181,5 +181,6 @@ service: - path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Collections +docs: Collections are CMS collections of items. diff --git a/.mock/definition/collections/fields.yml b/.mock/definition/collections/fields.yml index 210ebcc6..b8a0570e 100644 --- a/.mock/definition/collections/fields.yml +++ b/.mock/definition/collections/fields.yml @@ -15,8 +15,9 @@ types: - Color - File docs: Choose these appropriate field type for your collection data + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: ../__package__.yml service: @@ -46,7 +47,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -106,7 +107,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -134,7 +135,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -184,4 +185,4 @@ service: displayName: Post Body helpText: Add the body of your post here source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/collections/items.yml b/.mock/definition/collections/items.yml index f4bf2439..9aa8169d 100644 --- a/.mock/definition/collections/items.yml +++ b/.mock/definition/collections/items.yml @@ -5,20 +5,20 @@ types: - name - slug source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsListItemsRequestSortOrder: enum: - asc - desc source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Multiple Items: properties: items: type: optional> docs: An array of items to create source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsCreateItemRequest: discriminated: false @@ -26,7 +26,7 @@ types: - root.CollectionItemPostSingle - Multiple Items source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsDeleteItemsRequestItemsItem: properties: id: @@ -36,7 +36,7 @@ types: type: optional> docs: Array of identifiers for the locales where the item will be created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsListItemsLiveRequestSortBy: enum: @@ -44,20 +44,20 @@ types: - name - slug source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsListItemsLiveRequestSortOrder: enum: - asc - desc source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Multiple Live Items: properties: items: type: optional> docs: List of collection items to create source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsCreateItemLiveRequest: discriminated: false @@ -65,7 +65,7 @@ types: - root.CollectionItem - Multiple Live Items source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsDeleteItemsLiveRequestItemsItem: properties: itemId: @@ -75,7 +75,7 @@ types: type: optional> docs: Array of identifiers for the locales where the item will be created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Single CMS Item: properties: @@ -91,7 +91,7 @@ types: slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CreateBulkCollectionItemRequestBodyFieldDataItem: docs: A single CMS item to create @@ -108,7 +108,7 @@ types: slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CreateBulkCollectionItemRequestBodyFieldData: discriminated: false @@ -117,14 +117,14 @@ types: - docs: A list of CMS items to create type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsPublishItemResponse: properties: publishedItemIds: optional> errors: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: ../__package__.yml service: @@ -140,7 +140,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -225,12 +225,12 @@ service: To create items across multiple locales, please use [this - endpoint.](/data/v2.0.0/reference/cms/collection-items/bulk-items/create-items) + endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -311,7 +311,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -348,7 +348,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -519,7 +519,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -605,13 +605,13 @@ service: To create items across multiple locales, [please use this - endpoint.](/v2.0.0/data/reference/cms/collection-items/bulk-items/create-items) + endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -695,7 +695,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -732,7 +732,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1013,7 +1013,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1170,7 +1170,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1225,7 +1225,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1263,7 +1263,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1315,7 +1315,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1373,7 +1373,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1413,7 +1413,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1465,7 +1465,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1501,4 +1501,4 @@ service: errors: - Staging item ID 643fd856d66b6528195ee2cf not found. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/components.yml b/.mock/definition/components.yml new file mode 100644 index 00000000..b9eb7d63 --- /dev/null +++ b/.mock/definition/components.yml @@ -0,0 +1,486 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /sites/{site_id}/components + method: GET + auth: true + docs: | + List of all components for a site. + + Required scope | `components:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: List Components + request: + name: ComponentsListRequest + query-parameters: + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + response: + docs: Request was successful + type: root.ComponentList + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + response: + body: + components: + - id: 6596da6045e56dee495bcbba + name: Primary Button + group: Buttons + description: A default button component that can be used across the site + readonly: true + - id: 658205daa3e8206a523b5ad4 + name: Secondary Button + group: Buttons + description: >- + A secondary button component that can be used across the + site + readonly: true + - id: 6258612d1ee792848f805dcf + name: Card + group: Buttons + description: A button component that can be used across the site + readonly: true + - id: 68a2b1d1ee792848f805dcf + name: Nav + group: Buttons + description: A button component that can be used across the site + readonly: true + pagination: + limit: 20 + offset: 0 + total: 4 + get-content: + path: /sites/{site_id}/components/{component_id}/dom + method: GET + auth: true + docs: > + Get static content from a component definition. This includes text + nodes, image nodes and nested component instances. + + To retrieve dynamic content set by component properties, use the [get + component + properties](/data/reference/pages-and-components/components/get-properties) + endpoint. + + + If you do not provide a Locale ID in your request, the response + will return any content that can be localized from the Primary + locale. + + + Required scope | `components:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + component_id: + type: string + docs: Unique identifier for a Component + display-name: Get Component Content + request: + name: ComponentsGetContentRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + response: + docs: Request was successful + type: root.ComponentDom + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - name: ComponentDOM + path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 + nodes: + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad623 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad627 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad629 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad631 + componentId: 6258612d1ee792848f805dcf + propertyOverrides: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad633 + type: Plain Text + text: + text: Don't Panic! + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad635 + type: Rich Text + text: + html:

Always know where your towel is.

+ pagination: + limit: 4 + offset: 0 + total: 4 + - name: LocalizedComponentDOM + path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 + nodes: + - type: component-instance + id: 69118560-d0bc-15fc-bbf8-b8fe5f6535b8 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: 8ebfb409-7493-3bca-5d48-0e547befb960 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: 69118560-d0bc-15fc-bbf8-b8fe5f6535c2 + componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 + propertyOverrides: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad623 + pagination: + limit: 100 + offset: 0 + total: 3 + update-content: + path: /sites/{site_id}/components/{component_id}/dom + method: POST + auth: true + docs: > + This endpoint updates content within a component defintion for + **secondary locales**. It supports updating up to 1000 nodes in a single + request. + + + Before making updates: + + 1. Use the [get component + content](/data/reference/pages-and-components/components/get-content) + endpoint to identify available content nodes and their types + + 2. If your component definition has a component instance nested within + it, retrieve the nested component instance's properties that you'll + override using the [get component + properties](/data/reference/pages-and-components/components/get-properties) + endpoint + + + + This endpoint is specifically for localizing component definitions. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. + + + + Required scope | `components:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + component_id: + type: string + docs: Unique identifier for a Component + display-name: Update Component Content + request: + name: ComponentDomWrite + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + body: + properties: + nodes: + docs: >- + List of DOM Nodes with the new content that will be updated in + each node. + type: list + content-type: application/json + response: + docs: Request was successful + type: ComponentsUpdateContentResponse + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + request: + nodes: + - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad623 + text:

The Hitchhiker's Guide to the Galaxy

+ - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad627 + text: >- +

Don't Panic!

Always know where your towel + is.

+ - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad629 + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + text:

Time is an illusion

+ - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f1 + text: Life, the Universe and Everything + response: + body: + errors: + - errors + get-properties: + path: /sites/{site_id}/components/{component_id}/properties + method: GET + auth: true + docs: > + Get the property default values of a component definition. + + + If you do not provide a Locale ID in your request, the response + will return any properties that can be localized from the Primary + locale. + + + Required scope | `components:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + component_id: + type: string + docs: Unique identifier for a Component + display-name: Get Component Properties + request: + name: ComponentsGetPropertiesRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + response: + docs: Request was successful + type: root.ComponentProperties + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + componentId: 658205daa3e8206a523b5ad4 + properties: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad623 + type: Plain Text + label: Title + text: + text: The Hitchhiker's Guide to the Galaxy + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad627 + type: Rich Text + label: Content + text: + html: >- +

Don't Panic!

Always know where your towel + is.

+ pagination: + limit: 2 + offset: 0 + total: 2 + update-properties: + path: /sites/{site_id}/components/{component_id}/properties + method: POST + auth: true + docs: > + Update the property default values of a component definition in a + specificed locale. + + + Before making updates: + + 1. Use the [get component + properties](/data/reference/pages-and-components/components/get-properties) + endpoint to identify available properties + + + The request requires a secondary locale ID. If a locale is + missing, the request will not be processed and will result in an + error. + + + Required scope | `components:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + component_id: + type: string + docs: Unique identifier for a Component + display-name: Update Component Properties + request: + name: ComponentPropertiesWrite + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + body: + properties: + properties: + docs: >- + A list of component properties to update within the specified + secondary locale. + type: list + content-type: application/json + response: + docs: Request was successful + type: ComponentsUpdatePropertiesResponse + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + request: + properties: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad623 + text: The Hitchhiker’s Guide to the Galaxy + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad627 + text: >- +

Dont Panic!

Always know where your towel + is.

+ response: + body: + errors: + - errors + source: + openapi: ../../../openapi/referenced-specs/v2.yml +types: + ComponentDomWriteNodesItem: + discriminated: false + union: + - root.TextNodeWrite + - root.ComponentInstanceNodePropertyOverridesWrite + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + ComponentsUpdateContentResponse: + properties: + errors: + docs: A list of error messages, if any. + type: list + source: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentPropertiesWritePropertiesItem: + properties: + propertyId: + type: string + docs: The ID of the property. + text: + type: string + docs: > + The new string or HTML value used to update the component property in + the secondary locale. + + + The provided value must be compatible with the type of the component + property. + + + For example, attempting to update a single-line plain-text property + with a multi-line + + value will result in an error. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + ComponentsUpdatePropertiesResponse: + properties: + errors: + docs: A list of error messages, if any. + type: list + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/ecommerce.yml b/.mock/definition/ecommerce.yml index 29529a25..1a2ca95e 100644 --- a/.mock/definition/ecommerce.yml +++ b/.mock/definition/ecommerce.yml @@ -13,7 +13,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -39,4 +39,4 @@ service: createdOn: '2018-10-04T15:21:02Z' defaultCurrency: USD source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/forms.yml b/.mock/definition/forms.yml index fad8637b..9eac1775 100644 --- a/.mock/definition/forms.yml +++ b/.mock/definition/forms.yml @@ -13,7 +13,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -99,7 +99,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_id: type: string @@ -155,7 +155,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_id: type: string @@ -217,7 +217,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_submission_id: type: string @@ -255,7 +255,7 @@ service: Required scope | `forms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_submission_id: type: string @@ -297,5 +297,6 @@ service: First Name: Arthur Last Name: Dent source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Forms +docs: Forms are forms that are created on your Webflow site. diff --git a/.mock/definition/inventory.yml b/.mock/definition/inventory.yml index 14bd5c07..5e69c298 100644 --- a/.mock/definition/inventory.yml +++ b/.mock/definition/inventory.yml @@ -13,7 +13,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -62,7 +62,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -108,13 +108,15 @@ service: quantity: 100 inventoryType: finite source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Inventory +docs: Inventory is the stock of e-commerce items in your Webflow site. types: InventoryUpdateRequestInventoryType: enum: - infinite - finite docs: infinite or finite + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/orders.yml b/.mock/definition/orders.yml index 75be2224..b2802cfd 100644 --- a/.mock/definition/orders.yml +++ b/.mock/definition/orders.yml @@ -9,15 +9,16 @@ types: - disputed - unfulfilled source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrdersRefundRequestReason: enum: - duplicate - fraudulent - requested docs: The reason for the refund + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: __package__.yml service: @@ -33,7 +34,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -423,7 +424,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -647,7 +648,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -887,7 +888,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -1119,7 +1120,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -1342,7 +1343,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -1565,5 +1566,6 @@ service: url: >- https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Orders +docs: Orders are the orders for your Webflow site. diff --git a/.mock/definition/pages.yml b/.mock/definition/pages.yml index b3fdcd1b..62de7dcb 100644 --- a/.mock/definition/pages.yml +++ b/.mock/definition/pages.yml @@ -13,7 +13,7 @@ service: Required scope | `pages:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -121,7 +121,7 @@ service: Required scope | `pages:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -187,7 +187,7 @@ service: Required scope | `pages:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -276,16 +276,23 @@ service: method: GET auth: true docs: > - Get static content from a static page. + Get static content from a static page. This includes text nodes, image + nodes and component instances. + To retrieve the contents of components in the page use the [get + component + content](/data/reference/pages-and-components/components/get-content) + endpoint. - If you do not provide a Locale ID in your request, the response will - return any content that can be localized from the Primary locale. + + If you do not provide a Locale ID in your request, the response + will return any content that can be localized from the Primary + locale. Required scope | `pages:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -318,7 +325,8 @@ service: - root.TooManyRequestsError - root.InternalServerError examples: - - path-parameters: + - name: PageDOM + path-parameters: page_id: 63c720f9347c2139b248e552 query-parameters: localeId: 65427cf400e02b306eaa04a0 @@ -326,65 +334,86 @@ service: body: pageId: 658205daa3e8206a523b5ad4 nodes: - - id: a245c12d-995b-55ee-5ec7-aa36a6cad623 - type: text - text: - html:

The Hitchhiker's Guide to the Galaxy

- text: The Hitchhiker's Guide to the Galaxy - attributes: - key: value - - id: a245c12d-995b-55ee-5ec7-aa36a6cad627 - type: text - text: - html: >- -

Don't Panic!

Always know where your towel - is.

- attributes: - key: value - - id: a245c12d-995b-55ee-5ec7-aa36a6cad629 - type: image - image: - alt: Marvin, the Paranoid Android - assetId: 659595234426a9fcbad57043 - attributes: - key: value + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad623 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad627 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad629 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad631 + componentId: 6258612d1ee792848f805dcf + propertyOverrides: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad633 + type: Plain Text + label: Catchphrase + text: + text: Don't Panic! + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad635 + type: Rich Text + label: Tagline + text: + html:

Always know where your towel is.

pagination: - limit: 3 + limit: 4 offset: 0 - total: 3 + total: 4 update-static-content: path: /pages/{page_id}/dom method: POST auth: true docs: > - This endpoint allows for updating static content on a static page within - a secondary locale. It is designed specifically for localized pages and - can handle up to 1000 nodes per request. + This endpoint updates content on a static page in **secondary locales**. + It supports updating up to 1000 nodes in a single request. + + + Before making updates: -

Note:This - endpoint is specifically for localized pages. Ensure that the locale - specified is a valid secondary locale for the site.

+ 1. Use the [get page + content](/data/reference/pages-and-components/pages/get-content) + endpoint to identify available content nodes and their types + + 2. If the page has component instances, retrieve the component's + properties that you'll override using the [get component + properties](/data/reference/pages-and-components/components/get-properties) + endpoint + + + + This endpoint is specifically for localized pages. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. + Required scope | `pages:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string docs: Unique identifier for a Page display-name: Update Page Content request: - name: DomWrite + name: PageDomWrite query-parameters: localeId: - type: optional - docs: >- - Unique identifier for a specific locale. Applicable, when using - localization. + type: string + docs: The locale identifier. body: properties: - nodes: list + nodes: + docs: >- + List of DOM Nodes with the new content that will be updated in + each node. + type: list content-type: application/json response: docs: Request was successful @@ -400,39 +429,37 @@ service: - path-parameters: page_id: 63c720f9347c2139b248e552 query-parameters: - localeId: 65427cf400e02b306eaa04a0 + localeId: localeId request: nodes: - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad623 - text:

The Hitchhiker’s Guide to the Galaxy

+ text:

The Hitchhiker's Guide to the Galaxy

- nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad627 text: >- -

Don’t Panic!

Always know where your towel +

Don't Panic!

Always know where your towel is.

- nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad629 - text: >- - Marvin, the Paranoid Android + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + text:

Time is an illusion

+ - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f1 + text: Life, the Universe and Everything response: body: errors: - errors source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Pages +docs: Pages are the pages in your Webflow site. types: - DomWriteNodesItem: - properties: - nodeId: - type: string - docs: Node UUID - text: - type: string - docs: >- - HTML content of the node, including the HTML tag. The HTML tags must - be the same as what's returned from the Get Content endpoint. + PageDomWriteNodesItem: + discriminated: false + union: + - root.TextNodeWrite + - root.ComponentInstanceNodePropertyOverridesWrite source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true UpdateStaticContentResponse: properties: @@ -440,4 +467,4 @@ types: docs: A list of error messages, if any. type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/pages/scripts.yml b/.mock/definition/pages/scripts.yml index fc0bbe5e..f8ee3287 100644 --- a/.mock/definition/pages/scripts.yml +++ b/.mock/definition/pages/scripts.yml @@ -20,15 +20,14 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -70,17 +69,19 @@ service: to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - `custom_code` endpoints. + `custom_code` endpoints. + -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ A site can have a maximum of 800 registered scripts. + + + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -96,6 +97,7 @@ service: - root.BadRequestError - root.UnauthorizedError - root.NotFoundError + - root.ConflictError - root.TooManyRequestsError - root.InternalServerError examples: @@ -142,15 +144,14 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -166,4 +167,4 @@ service: - path-parameters: page_id: 63c720f9347c2139b248e552 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/products.yml b/.mock/definition/products.yml index 076b222e..4c6fcd1d 100644 --- a/.mock/definition/products.yml +++ b/.mock/definition/products.yml @@ -21,7 +21,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -112,7 +112,7 @@ service: - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku) + - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the @@ -121,7 +121,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -202,7 +202,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -283,7 +283,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -358,7 +358,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -426,7 +426,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -491,10 +491,10 @@ service: track-inventory: true quantity: 10 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml types: ProductsCreateSkuResponse: properties: skus: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/redirects.yml b/.mock/definition/redirects.yml new file mode 100644 index 00000000..c8a25198 --- /dev/null +++ b/.mock/definition/redirects.yml @@ -0,0 +1,190 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + get: + path: /sites/{site_id}/redirects + method: GET + auth: true + docs: > + Fetch a list of all URL redirect rules configured for a specific site. + + + Use this endpoint to review, audit, or manage the redirection rules that + control how traffic is rerouted on your site. + + + + Required scope: `sites:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Get URL redirects + response: + docs: Request was successful + type: root.Redirects + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + response: + body: + redirects: + - id: 42e1a2b7aa1a13f768a0042a + fromUrl: /mostly-harmless + toUrl: /earth + - id: 6x9e7f8d9a4b1c2d3e4f5678 + fromUrl: /babel-fish + toUrl: /translate + pagination: + limit: 100 + offset: 0 + total: 2 + create: + path: /sites/{site_id}/redirects + method: POST + auth: true + docs: > + Add a new URL redirection rule to a site. + + + This endpoint allows you to define a source path (`fromUrl`) and its + corresponding destination path (`toUrl`), which will dictate how traffic + is rerouted on your site. This is useful for managing site changes, + restructuring URLs, or handling outdated links. + + + Required scope: `sites:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Create a URL redirect + request: + body: root.Redirect + content-type: application/json + response: + docs: Request was successful + type: root.Redirect + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: + id: 42e1a2b7aa1a13f768a0042a + fromUrl: /mostly-harmless + toUrl: /earth + response: + body: + id: 42e1a2b7aa1a13f768a0042a + fromUrl: /mostly-harmless + toUrl: /earth + delete: + path: /sites/{site_id}/redirects/{redirect_id} + method: DELETE + auth: true + docs: > + Remove a URL redirection rule from a site. + + This is useful for cleaning up outdated or unnecessary redirects, + ensuring that your site's routing behavior remains efficient and + up-to-date. + + Required scope: `sites:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + redirect_id: + type: string + docs: Unique identifier site rediect + display-name: Delete URL redirects + response: + docs: Request was successful + type: root.Redirects + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + redirect_id: 66c4cb9a20cac35ed19500e6 + response: + body: + redirects: + - id: 42e1a2b7aa1a13f768a0042a + fromUrl: /mostly-harmless + toUrl: /earth + - id: 6x9e7f8d9a4b1c2d3e4f5678 + fromUrl: /babel-fish + toUrl: /translate + pagination: + limit: 100 + offset: 0 + total: 2 + patch: + path: /sites/{site_id}/redirects/{redirect_id} + method: PATCH + auth: true + docs: | + Update a URL redirection rule from a site. + Required scope: `sites:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + redirect_id: + type: string + docs: Unique identifier site rediect + display-name: Update URL redirect + request: + body: root.Redirect + content-type: application/json + response: + docs: Request was successful + type: root.Redirect + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + redirect_id: 66c4cb9a20cac35ed19500e6 + request: + id: 42e1a2b7aa1a13f768a0042a + fromUrl: /mostly-harmless + toUrl: /earth + response: + body: + id: 42e1a2b7aa1a13f768a0042a + fromUrl: /mostly-harmless + toUrl: /earth + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/scripts.yml b/.mock/definition/scripts.yml index 7fde1147..8236ed29 100644 --- a/.mock/definition/scripts.yml +++ b/.mock/definition/scripts.yml @@ -23,15 +23,14 @@ service: Additionally, Scripts can be remotely hosted, or registered as inline snippets. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -96,15 +95,14 @@ service: Additionally, Scripts can be remotely hosted, or registered as inline snippets. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -183,15 +181,13 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -254,4 +250,4 @@ service: lastUpdated: lastUpdated version: 0.0.1 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sitePlan.yml b/.mock/definition/sitePlan.yml new file mode 100644 index 00000000..925ca15e --- /dev/null +++ b/.mock/definition/sitePlan.yml @@ -0,0 +1,40 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + get: + path: /sites/{site_id}/plan + method: GET + auth: true + docs: | + Get site plan details for the specified Site. + + Required scope | `sites:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Get Site Plan + response: + docs: Request was successful + type: root.SitePlan + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + response: + body: + id: hosting-business-v4 + name: Business Hosting + pricingInfo: https://webflow.com/pricing + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml index 31a7f313..736d0771 100644 --- a/.mock/definition/sites.yml +++ b/.mock/definition/sites.yml @@ -4,6 +4,87 @@ service: auth: false base-path: '' endpoints: + create: + path: /workspaces/{workspace_id}/sites + method: POST + auth: true + docs: | + Create a site. This endpoint requires an Enterprise workspace. + + Required scope | `workspace:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + workspace_id: + type: string + docs: Unique identifier for a Workspace + display-name: Create Site + request: + name: SitesCreateRequest + body: + properties: + name: + type: string + docs: The name of the site + templateName: + type: optional + docs: The workspace or marketplace template to use + parentFolderId: + type: optional + docs: MegaDodo Publications - Potential Book Ideas + content-type: application/json + response: + docs: Request was successful + type: root.Site + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - name: NewlyCreatedSite + path-parameters: + workspace_id: 580e63e98c9a982ac9b8b741 + request: + name: The Hitchhiker's Guide to the Galaxy + response: + body: + id: 670ecf86817e3cc7a510eb6a + workspaceId: 625860a7a6c16d624927122f + createdOn: '2024-10-15T20:24:38Z' + displayName: The Hitchiker‘s Guide + shortName: hitchikers-guide + lastPublished: '2016-10-24T19:43:17Z' + lastUpdated: '2024-10-15T20:24:38Z' + previewUrl: >- + https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241243.png + timeZone: America/Los_Angeles + parentFolderId: 670ece123598db72d9648be1 + customDomains: + - id: 589a331aa51e760df7ccb89d + url: test-api-domain.com + locales: + primary: + id: 653fd9af6a07fc9cfd7a5e57 + cmsLocaleId: 653ad57de882f528b32e810e + enabled: false + displayName: English (United States) + displayImageId: displayImageId + redirect: true + subdirectory: '' + tag: en-US + secondary: + - id: 653fd9af6a07fc9cfd7a5e57 + cmsLocaleId: 653ad57de882f528b32e810e + enabled: false + displayName: English (United States) + redirect: true + subdirectory: '' + tag: en-US + dataCollectionEnabled: false + dataCollectionType: always list: path: /sites method: GET @@ -13,7 +94,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: List Sites response: docs: Request was successful @@ -141,7 +222,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -197,6 +278,109 @@ service: tag: en-US dataCollectionEnabled: true dataCollectionType: always + delete: + path: /sites/{site_id} + method: DELETE + auth: true + docs: | + Delete a site. This endpoint requires an Enterprise workspace. + + Required scope | `sites:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Delete Site + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + update: + path: /sites/{site_id} + method: PATCH + auth: true + docs: | + Update a site. This endpoint requires an Enterprise workspace. + + Required scope | `sites:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Update Site + request: + name: SitesUpdateRequest + body: + properties: + name: + type: optional + docs: The name of the site + parentFolderId: + type: optional + docs: The parent folder ID of the site + content-type: application/json + response: + docs: Request was successful + type: root.Site + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: {} + response: + body: + id: 42e98c9a982ac9b8b742 + workspaceId: 42e63e98c9a982ac9b8b742 + createdOn: '1979-10-12T12:00:00Z' + displayName: The Hitchhiker's Guide to the Galaxy + shortName: hitchhikers-guide + lastPublished: '2023-04-02T12:42:00Z' + lastUpdated: '2023-04-02T12:42:00Z' + previewUrl: >- + https://screenshots.webflow.com/sites/6258612d1ee792848f805dcf/20231219211811_d5990556c743f33b7071300a03bf67e6.png + timeZone: Magrathea/FactoryFloor + parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 + customDomains: + - id: 589a331aa51e760df7ccb89d + url: hitchhikersguide.galaxy + - id: 589a331aa51e760df7ccb89e + url: heartofgold.spaceship + locales: + primary: + id: 653fd9af6a07fc9cfd7a5e57 + cmsLocaleId: 653ad57de882f528b32e810e + enabled: false + displayName: English (United States) + displayImageId: displayImageId + redirect: true + subdirectory: '' + tag: en-US + secondary: + - id: 653fd9af6a07fc9cfd7a5e57 + cmsLocaleId: 653ad57de882f528b32e810e + enabled: false + displayName: English (United States) + redirect: true + subdirectory: '' + tag: en-US + dataCollectionEnabled: true + dataCollectionType: always get-custom-domain: path: /sites/{site_id}/custom_domains method: GET @@ -206,7 +390,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -245,7 +429,7 @@ service: Required scope | `sites:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -283,8 +467,9 @@ service: url: test-api-domain.com publishToWebflowSubdomain: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Sites +docs: Sites are the sites in your Webflow workspace. types: SitesPublishResponse: properties: @@ -296,4 +481,4 @@ types: docs: Flag for publishing to webflow.io subdomain default: false source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/activityLogs.yml b/.mock/definition/sites/activityLogs.yml index 1e264119..1468f52e 100644 --- a/.mock/definition/sites/activityLogs.yml +++ b/.mock/definition/sites/activityLogs.yml @@ -12,7 +12,7 @@ service: Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -62,4 +62,4 @@ service: offset: 0 total: 1 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/scripts.yml b/.mock/definition/sites/scripts.yml index eef5e634..92ad0e41 100644 --- a/.mock/definition/sites/scripts.yml +++ b/.mock/definition/sites/scripts.yml @@ -11,15 +11,14 @@ service: docs: > Get all registered scripts that have been applied to a specific Site. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -68,15 +67,14 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -130,15 +128,13 @@ service: Delete the custom code block that an app created for a Site -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -160,15 +156,14 @@ service: docs: > Get all instances of Custom Code applied to a Site or Pages. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -225,4 +220,4 @@ service: offset: 0 total: 1 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/token.yml b/.mock/definition/token.yml index 17b11888..033c5c36 100644 --- a/.mock/definition/token.yml +++ b/.mock/definition/token.yml @@ -13,7 +13,7 @@ service: Required Scope | `authorized_user:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Get Authorization User Info response: docs: Request was successful @@ -35,10 +35,11 @@ service: docs: > Information about the authorization token - Access to this endpoint requires a bearer token from a []>Data + + Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Get Authorization Info response: docs: Request was successful @@ -68,4 +69,4 @@ service: homepage: https://webflow.com displayName: My Amazing App source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/users.yml b/.mock/definition/users.yml index 6c8b266f..19a17cc3 100644 --- a/.mock/definition/users.yml +++ b/.mock/definition/users.yml @@ -32,7 +32,7 @@ types: name: UpdatedOnDescending docs: Sorts users in descending order based on their update date source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UsersUpdateRequestData: properties: name: @@ -48,7 +48,7 @@ types: docs: | Boolean indicating if the user has accepted to receive communications source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true imports: root: __package__.yml @@ -65,7 +65,7 @@ service: Required scope | `users:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -169,7 +169,7 @@ service: Required scope | `users:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -220,7 +220,7 @@ service: Required scope | `users:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -252,7 +252,7 @@ service: The email and password fields cannot be updated using this endpoint source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -329,7 +329,7 @@ service: Required scope | `users:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -389,4 +389,4 @@ service: accept-communications: true additionalProperties: additionalProperties source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/webhooks.yml b/.mock/definition/webhooks.yml index e32db3df..d40e3e4c 100644 --- a/.mock/definition/webhooks.yml +++ b/.mock/definition/webhooks.yml @@ -13,7 +13,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -75,14 +75,13 @@ service: Limit of 75 registrations per `triggerType`, per site. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `sites:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -131,7 +130,7 @@ service: Required scope: `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: webhook_id: type: string @@ -169,7 +168,7 @@ service: Required scope: `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: webhook_id: type: string @@ -185,5 +184,6 @@ service: - path-parameters: webhook_id: 580e64008c9a982ac9b8b754 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Webhooks +docs: Webhooks are the webhooks in your Webflow site. diff --git a/.mock/fern.config.json b/.mock/fern.config.json index 757dd2f7..c26f56af 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "webflow", - "version" : "0.45.3" + "version" : "0.46.14" } \ No newline at end of file diff --git a/reference.md b/reference.md index bf9f6049..727d66e9 100644 --- a/reference.md +++ b/reference.md @@ -72,7 +72,8 @@ await client.token.authorizedBy();
Information about the authorization token -Access to this endpoint requires a bearer token from a []>Data Client App](/data/docs/getting-started-data-clients). + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).
@@ -117,6 +118,81 @@ await client.token.introspect(); ## Sites +
client.sites.create(workspaceId, { ...params }) -> Webflow.Site +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a site. This endpoint requires an Enterprise workspace. + +Required scope | `workspace:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.create("580e63e98c9a982ac9b8b741", { + name: "The Hitchhiker's Guide to the Galaxy", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**workspaceId:** `string` — Unique identifier for a Workspace + +
+
+ +
+
+ +**request:** `Webflow.SitesCreateRequest` + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ +
+
+
+
client.sites.list() -> Webflow.Sites
@@ -239,6 +315,144 @@ await client.sites.get("580e63e98c9a982ac9b8b741");
+
client.sites.delete(siteId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a site. This endpoint requires an Enterprise workspace. + +Required scope | `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.delete("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.update(siteId, { ...params }) -> Webflow.Site +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a site. This endpoint requires an Enterprise workspace. + +Required scope | `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.update("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.SitesUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ +
+
+
+
client.sites.getCustomDomain(siteId) -> Webflow.Domains
@@ -285,7 +499,728 @@ await client.sites.getCustomDomain("580e63e98c9a982ac9b8b741");
-**siteId:** `string` — Unique identifier for a Site +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ + + +
+ +
client.sites.publish(siteId, { ...params }) -> Webflow.SitesPublishResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Publishes a site to one or more more domains. + +This endpoint has a limit of one successful publish queue per minute. + +Required scope | `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.publish("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.SitesPublishRequest` + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Redirects + +
client.redirects.get(siteId) -> Webflow.Redirects +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Fetch a list of all URL redirect rules configured for a specific site. + +Use this endpoint to review, audit, or manage the redirection rules that control how traffic is rerouted on your site. + +Required scope: `sites:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.redirects.get("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `Redirects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.redirects.create(siteId, { ...params }) -> Webflow.Redirect +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add a new URL redirection rule to a site. + +This endpoint allows you to define a source path (`fromUrl`) and its corresponding destination path (`toUrl`), which will dictate how traffic is rerouted on your site. This is useful for managing site changes, restructuring URLs, or handling outdated links. + +Required scope: `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.redirects.create("580e63e98c9a982ac9b8b741", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.Redirect` + +
+
+ +
+
+ +**requestOptions:** `Redirects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.redirects.delete(siteId, redirectId) -> Webflow.Redirects +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove a URL redirection rule from a site. +This is useful for cleaning up outdated or unnecessary redirects, ensuring that your site's routing behavior remains efficient and up-to-date. +Required scope: `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**redirectId:** `string` — Unique identifier site rediect + +
+
+ +
+
+ +**requestOptions:** `Redirects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.redirects.patch(siteId, redirectId, { ...params }) -> Webflow.Redirect +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a URL redirection rule from a site. +Required scope: `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.redirects.patch("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**redirectId:** `string` — Unique identifier site rediect + +
+
+ +
+
+ +**request:** `Webflow.Redirect` + +
+
+ +
+
+ +**requestOptions:** `Redirects.RequestOptions` + +
+
+
+
+ +
+
+
+ +## SitePlan + +
client.sitePlan.get(siteId) -> Webflow.SitePlan +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get site plan details for the specified Site. + +Required scope | `sites:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sitePlan.get("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `SitePlan.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Collections + +
client.collections.list(siteId) -> Webflow.CollectionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List of all Collections within a Site. + +Required scope | `cms:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.list("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `Collections.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.create(siteId, { ...params }) -> Webflow.Collection +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a Collection for a site. + +Required scope | `cms:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.create("580e63e98c9a982ac9b8b741", { + displayName: "Blog Posts", + singularName: "Blog Post", + slug: "posts", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.CollectionsCreateRequest` + +
+
+ +
+
+ +**requestOptions:** `Collections.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.get(collectionId) -> Webflow.Collection +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the full details of a collection from its ID. + +Required scope | `cms:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.get("580e63fc8c9a982ac9b8b745"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**requestOptions:** `Collections.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.delete(collectionId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a collection using its ID. + +Required scope | `cms:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.delete("580e63fc8c9a982ac9b8b745"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection
@@ -293,7 +1228,7 @@ await client.sites.getCustomDomain("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Sites.RequestOptions` +**requestOptions:** `Collections.RequestOptions`
@@ -304,7 +1239,9 @@ await client.sites.getCustomDomain("580e63e98c9a982ac9b8b741");
-
client.sites.publish(siteId, { ...params }) -> Webflow.SitesPublishResponse +## Pages + +
client.pages.list(siteId, { ...params }) -> Webflow.PageList
@@ -316,11 +1253,9 @@ await client.sites.getCustomDomain("580e63e98c9a982ac9b8b741");
-Publishes a site to one or more more domains. - -This endpoint has a limit of one successful publish queue per minute. +List of all pages for a site. -Required scope | `sites:write` +Required scope | `pages:read`
@@ -336,7 +1271,9 @@ Required scope | `sites:write`
```typescript -await client.sites.publish("580e63e98c9a982ac9b8b741"); +await client.pages.list("580e63e98c9a982ac9b8b741", { + localeId: "65427cf400e02b306eaa04a0", +}); ```
@@ -360,7 +1297,7 @@ await client.sites.publish("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.SitesPublishRequest` +**request:** `Webflow.PagesListRequest`
@@ -368,7 +1305,7 @@ await client.sites.publish("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Sites.RequestOptions` +**requestOptions:** `Pages.RequestOptions`
@@ -379,9 +1316,7 @@ await client.sites.publish("580e63e98c9a982ac9b8b741");
-## Collections - -
client.collections.list(siteId) -> Webflow.CollectionList +
client.pages.getMetadata(pageId, { ...params }) -> Webflow.Page
@@ -393,9 +1328,9 @@ await client.sites.publish("580e63e98c9a982ac9b8b741");
-List of all Collections within a Site. +Get metadata information for a single page. -Required scope | `cms:read` +Required scope | `pages:read`
@@ -411,7 +1346,9 @@ Required scope | `cms:read`
```typescript -await client.collections.list("580e63e98c9a982ac9b8b741"); +await client.pages.getMetadata("63c720f9347c2139b248e552", { + localeId: "65427cf400e02b306eaa04a0", +}); ```
@@ -427,7 +1364,7 @@ await client.collections.list("580e63e98c9a982ac9b8b741");
-**siteId:** `string` — Unique identifier for a Site +**pageId:** `string` — Unique identifier for a Page
@@ -435,7 +1372,15 @@ await client.collections.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Collections.RequestOptions` +**request:** `Webflow.PagesGetMetadataRequest` + +
+
+ +
+
+ +**requestOptions:** `Pages.RequestOptions`
@@ -446,7 +1391,7 @@ await client.collections.list("580e63e98c9a982ac9b8b741");
-
client.collections.create(siteId, { ...params }) -> Webflow.Collection +
client.pages.updatePageSettings(pageId, { ...params }) -> Webflow.Page
@@ -458,9 +1403,9 @@ await client.collections.list("580e63e98c9a982ac9b8b741");
-Create a Collection for a site. +Update Page-level metadata, including SEO and Open Graph fields. -Required scope | `cms:write` +Required scope | `pages:write`
@@ -476,10 +1421,33 @@ Required scope | `cms:write`
```typescript -await client.collections.create("580e63e98c9a982ac9b8b741", { - displayName: "Blog Posts", - singularName: "Blog Post", - slug: "posts", +await client.pages.updatePageSettings("63c720f9347c2139b248e552", { + localeId: "65427cf400e02b306eaa04a0", + body: { + id: "6596da6045e56dee495bcbba", + siteId: "6258612d1ee792848f805dcf", + title: "Guide to the Galaxy", + slug: "guide-to-the-galaxy", + createdOn: "2024-03-11T10:42:00Z", + lastUpdated: "2024-03-11T10:42:42Z", + archived: false, + draft: false, + canBranch: true, + isBranch: false, + seo: { + title: "The Ultimate Hitchhiker's Guide to the Galaxy", + description: + "Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.", + }, + openGraph: { + title: "Explore the Cosmos with The Ultimate Guide", + titleCopied: false, + description: "Dive deep into the mysteries of the universe with your guide to everything galactic.", + descriptionCopied: false, + }, + localeId: "653fd9af6a07fc9cfd7a5e57", + publishedPath: "/en-us/guide-to-the-galaxy", + }, }); ``` @@ -496,7 +1464,7 @@ await client.collections.create("580e63e98c9a982ac9b8b741", {
-**siteId:** `string` — Unique identifier for a Site +**pageId:** `string` — Unique identifier for a Page
@@ -504,7 +1472,7 @@ await client.collections.create("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.CollectionsCreateRequest` +**request:** `Webflow.UpdatePageSettingsRequest`
@@ -512,7 +1480,7 @@ await client.collections.create("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `Collections.RequestOptions` +**requestOptions:** `Pages.RequestOptions`
@@ -523,7 +1491,7 @@ await client.collections.create("580e63e98c9a982ac9b8b741", {
-
client.collections.get(collectionId) -> Webflow.Collection +
client.pages.getContent(pageId, { ...params }) -> Webflow.Dom
@@ -535,9 +1503,12 @@ await client.collections.create("580e63e98c9a982ac9b8b741", {
-Get the full details of a collection from its ID. +Get static content from a static page. This includes text nodes, image nodes and component instances. +To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint. -Required scope | `cms:read` +If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. + +Required scope | `pages:read`
@@ -553,7 +1524,9 @@ Required scope | `cms:read`
```typescript -await client.collections.get("580e63fc8c9a982ac9b8b745"); +await client.pages.getContent("63c720f9347c2139b248e552", { + localeId: "65427cf400e02b306eaa04a0", +}); ```
@@ -569,7 +1542,7 @@ await client.collections.get("580e63fc8c9a982ac9b8b745");
-**collectionId:** `string` — Unique identifier for a Collection +**pageId:** `string` — Unique identifier for a Page
@@ -577,7 +1550,15 @@ await client.collections.get("580e63fc8c9a982ac9b8b745");
-**requestOptions:** `Collections.RequestOptions` +**request:** `Webflow.PagesGetContentRequest` + +
+
+ +
+
+ +**requestOptions:** `Pages.RequestOptions`
@@ -588,7 +1569,7 @@ await client.collections.get("580e63fc8c9a982ac9b8b745");
-
client.collections.delete(collectionId) -> void +
client.pages.updateStaticContent(pageId, { ...params }) -> Webflow.UpdateStaticContentResponse
@@ -600,9 +1581,18 @@ await client.collections.get("580e63fc8c9a982ac9b8b745");
-Delete a collection using its ID. +This endpoint updates content on a static page in **secondary locales**. It supports updating up to 1000 nodes in a single request. -Required scope | `cms:write` +Before making updates: + +1. Use the [get page content](/data/reference/pages-and-components/pages/get-content) endpoint to identify available content nodes and their types +2. If the page has component instances, retrieve the component's properties that you'll override using the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint + + + This endpoint is specifically for localized pages. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. + + +Required scope | `pages:write`
@@ -618,7 +1608,32 @@ Required scope | `cms:write`
```typescript -await client.collections.delete("580e63fc8c9a982ac9b8b745"); +await client.pages.updateStaticContent("63c720f9347c2139b248e552", { + localeId: "localeId", + nodes: [ + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + text: "

The Hitchhiker's Guide to the Galaxy

", + }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + text: "

Don't Panic!

Always know where your towel is.

", + }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", + propertyOverrides: [ + { + propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + text: "

Time is an illusion

", + }, + { + propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + text: "Life, the Universe and Everything", + }, + ], + }, + ], +}); ```
@@ -634,7 +1649,7 @@ await client.collections.delete("580e63fc8c9a982ac9b8b745");
-**collectionId:** `string` — Unique identifier for a Collection +**pageId:** `string` — Unique identifier for a Page
@@ -642,7 +1657,15 @@ await client.collections.delete("580e63fc8c9a982ac9b8b745");
-**requestOptions:** `Collections.RequestOptions` +**request:** `Webflow.PageDomWrite` + +
+
+ +
+
+ +**requestOptions:** `Pages.RequestOptions`
@@ -653,9 +1676,9 @@ await client.collections.delete("580e63fc8c9a982ac9b8b745");
-## Pages +## Components -
client.pages.list(siteId, { ...params }) -> Webflow.PageList +
client.components.list(siteId, { ...params }) -> Webflow.ComponentList
@@ -667,9 +1690,9 @@ await client.collections.delete("580e63fc8c9a982ac9b8b745");
-List of all pages for a site. +List of all components for a site. -Required scope | `pages:read` +Required scope | `components:read`
@@ -685,9 +1708,7 @@ Required scope | `pages:read`
```typescript -await client.pages.list("580e63e98c9a982ac9b8b741", { - localeId: "65427cf400e02b306eaa04a0", -}); +await client.components.list("580e63e98c9a982ac9b8b741"); ```
@@ -711,7 +1732,7 @@ await client.pages.list("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.PagesListRequest` +**request:** `Webflow.ComponentsListRequest`
@@ -719,7 +1740,7 @@ await client.pages.list("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `Pages.RequestOptions` +**requestOptions:** `Components.RequestOptions`
@@ -730,7 +1751,7 @@ await client.pages.list("580e63e98c9a982ac9b8b741", {
-
client.pages.getMetadata(pageId, { ...params }) -> Webflow.Page +
client.components.getContent(siteId, componentId, { ...params }) -> Webflow.ComponentDom
@@ -742,9 +1763,12 @@ await client.pages.list("580e63e98c9a982ac9b8b741", {
-Get metadata information for a single page. +Get static content from a component definition. This includes text nodes, image nodes and nested component instances. +To retrieve dynamic content set by component properties, use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint. -Required scope | `pages:read` +If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. + +Required scope | `components:read`
@@ -760,7 +1784,7 @@ Required scope | `pages:read`
```typescript -await client.pages.getMetadata("63c720f9347c2139b248e552", { +await client.components.getContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { localeId: "65427cf400e02b306eaa04a0", }); ``` @@ -778,7 +1802,7 @@ await client.pages.getMetadata("63c720f9347c2139b248e552", {
-**pageId:** `string` — Unique identifier for a Page +**siteId:** `string` — Unique identifier for a Site
@@ -786,7 +1810,7 @@ await client.pages.getMetadata("63c720f9347c2139b248e552", {
-**request:** `Webflow.PagesGetMetadataRequest` +**componentId:** `string` — Unique identifier for a Component
@@ -794,7 +1818,15 @@ await client.pages.getMetadata("63c720f9347c2139b248e552", {
-**requestOptions:** `Pages.RequestOptions` +**request:** `Webflow.ComponentsGetContentRequest` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -805,7 +1837,7 @@ await client.pages.getMetadata("63c720f9347c2139b248e552", {
-
client.pages.updatePageSettings(pageId, { ...params }) -> Webflow.Page +
client.components.updateContent(siteId, componentId, { ...params }) -> Webflow.ComponentsUpdateContentResponse
@@ -817,9 +1849,18 @@ await client.pages.getMetadata("63c720f9347c2139b248e552", {
-Update Page-level metadata, including SEO and Open Graph fields. +This endpoint updates content within a component defintion for **secondary locales**. It supports updating up to 1000 nodes in a single request. -Required scope | `pages:write` +Before making updates: + +1. Use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint to identify available content nodes and their types +2. If your component definition has a component instance nested within it, retrieve the nested component instance's properties that you'll override using the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint + + + This endpoint is specifically for localizing component definitions. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. + + +Required scope | `components:write`
@@ -835,33 +1876,31 @@ Required scope | `pages:write`
```typescript -await client.pages.updatePageSettings("63c720f9347c2139b248e552", { +await client.components.updateContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { localeId: "65427cf400e02b306eaa04a0", - body: { - id: "6596da6045e56dee495bcbba", - siteId: "6258612d1ee792848f805dcf", - title: "Guide to the Galaxy", - slug: "guide-to-the-galaxy", - createdOn: "2024-03-11T10:42:00Z", - lastUpdated: "2024-03-11T10:42:42Z", - archived: false, - draft: false, - canBranch: true, - isBranch: false, - seo: { - title: "The Ultimate Hitchhiker's Guide to the Galaxy", - description: - "Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.", + nodes: [ + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + text: "

The Hitchhiker's Guide to the Galaxy

", }, - openGraph: { - title: "Explore the Cosmos with The Ultimate Guide", - titleCopied: false, - description: "Dive deep into the mysteries of the universe with your guide to everything galactic.", - descriptionCopied: false, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + text: "

Don't Panic!

Always know where your towel is.

", }, - localeId: "653fd9af6a07fc9cfd7a5e57", - publishedPath: "/en-us/guide-to-the-galaxy", - }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", + propertyOverrides: [ + { + propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + text: "

Time is an illusion

", + }, + { + propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + text: "Life, the Universe and Everything", + }, + ], + }, + ], }); ``` @@ -878,7 +1917,7 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-**pageId:** `string` — Unique identifier for a Page +**siteId:** `string` — Unique identifier for a Site
@@ -886,7 +1925,7 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-**request:** `Webflow.UpdatePageSettingsRequest` +**componentId:** `string` — Unique identifier for a Component
@@ -894,7 +1933,15 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-**requestOptions:** `Pages.RequestOptions` +**request:** `Webflow.ComponentDomWrite` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -905,7 +1952,7 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-
client.pages.getContent(pageId, { ...params }) -> Webflow.Dom +
client.components.getProperties(siteId, componentId, { ...params }) -> Webflow.ComponentProperties
@@ -917,11 +1964,11 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-Get static content from a static page. +Get the property default values of a component definition. -If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. +If you do not provide a Locale ID in your request, the response will return any properties that can be localized from the Primary locale. -Required scope | `pages:read` +Required scope | `components:read`
@@ -937,7 +1984,7 @@ Required scope | `pages:read`
```typescript -await client.pages.getContent("63c720f9347c2139b248e552", { +await client.components.getProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { localeId: "65427cf400e02b306eaa04a0", }); ``` @@ -955,7 +2002,7 @@ await client.pages.getContent("63c720f9347c2139b248e552", {
-**pageId:** `string` — Unique identifier for a Page +**siteId:** `string` — Unique identifier for a Site
@@ -963,7 +2010,7 @@ await client.pages.getContent("63c720f9347c2139b248e552", {
-**request:** `Webflow.PagesGetContentRequest` +**componentId:** `string` — Unique identifier for a Component
@@ -971,7 +2018,15 @@ await client.pages.getContent("63c720f9347c2139b248e552", {
-**requestOptions:** `Pages.RequestOptions` +**request:** `Webflow.ComponentsGetPropertiesRequest` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -982,7 +2037,7 @@ await client.pages.getContent("63c720f9347c2139b248e552", {
-
client.pages.updateStaticContent(pageId, { ...params }) -> Webflow.UpdateStaticContentResponse +
client.components.updateProperties(siteId, componentId, { ...params }) -> Webflow.ComponentsUpdatePropertiesResponse
@@ -994,11 +2049,15 @@ await client.pages.getContent("63c720f9347c2139b248e552", {
-This endpoint allows for updating static content on a static page within a secondary locale. It is designed specifically for localized pages and can handle up to 1000 nodes per request. +Update the property default values of a component definition in a specificed locale. -

Note:This endpoint is specifically for localized pages. Ensure that the locale specified is a valid secondary locale for the site.

+Before making updates: -Required scope | `pages:write` +1. Use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify available properties + +The request requires a secondary locale ID. If a locale is missing, the request will not be processed and will result in an error. + +Required scope | `components:write`
@@ -1014,20 +2073,16 @@ Required scope | `pages:write`
```typescript -await client.pages.updateStaticContent("63c720f9347c2139b248e552", { +await client.components.updateProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { localeId: "65427cf400e02b306eaa04a0", - nodes: [ - { - nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", - text: "

The Hitchhiker\u2019s Guide to the Galaxy

", - }, + properties: [ { - nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", - text: "

Don\u2019t Panic!

Always know where your towel is.

", + propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + text: "The Hitchhiker\u2019s Guide to the Galaxy", }, { - nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", - text: 'Marvin, the Paranoid Android', + propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + text: "

Dont Panic!

Always know where your towel is.

", }, ], }); @@ -1046,7 +2101,7 @@ await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
-**pageId:** `string` — Unique identifier for a Page +**siteId:** `string` — Unique identifier for a Site
@@ -1054,7 +2109,7 @@ await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
-**request:** `Webflow.DomWrite` +**componentId:** `string` — Unique identifier for a Component
@@ -1062,7 +2117,15 @@ await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
-**requestOptions:** `Pages.RequestOptions` +**request:** `Webflow.ComponentPropertiesWrite` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -1094,7 +2157,7 @@ to a Site via the `registered_scripts` endpoints, and then applied to a Site or `custom_code` endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` @@ -1166,7 +2229,7 @@ to a Site via the `registered_scripts` endpoints, and then applied to a Site or `custom_code` endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -1250,7 +2313,7 @@ In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts mu to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -1953,8 +3016,9 @@ Create a new Webhook. Limit of 75 registrations per `triggerType`, per site. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `sites:write` +
@@ -3066,7 +4130,7 @@ To create a Product with multiple SKUs - for example a T-shirt in sizes small, m - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. -- After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku) +- After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. @@ -4496,7 +5560,7 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745"); Create Item(s) in a Collection. -To create items across multiple locales, please use [this endpoint.](/data/v2.0.0/reference/cms/collection-items/bulk-items/create-items) +To create items across multiple locales, please use [this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` @@ -4836,7 +5900,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745"); Create live Item(s) in a Collection. The Item(s) will be published to the live site. -To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/bulk-items/create-items) +To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` @@ -5772,7 +6836,7 @@ In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts mu to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` @@ -5843,7 +6907,9 @@ In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts mu to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. -
Access to this endpoint requires a bearer token from a Data Client App.
+A site can have a maximum of 800 registered scripts. + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -5938,7 +7004,7 @@ In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts mu to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -6080,7 +7146,7 @@ await client.sites.activityLogs.list("580e63e98c9a982ac9b8b741"); Get all registered scripts that have been applied to a specific Site. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` @@ -6151,7 +7217,7 @@ In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts mu to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -6242,7 +7308,7 @@ await client.sites.scripts.upsertCustomCode("580e63e98c9a982ac9b8b741", { Delete the custom code block that an app created for a Site -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -6309,7 +7375,7 @@ await client.sites.scripts.deleteCustomCode("580e63e98c9a982ac9b8b741"); Get all instances of Custom Code applied to a Site or Pages. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` diff --git a/src/Client.ts b/src/Client.ts index e4cb5550..8f6e8f90 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -6,8 +6,11 @@ import * as environments from "./environments"; import * as core from "./core"; import { Token } from "./api/resources/token/client/Client"; import { Sites } from "./api/resources/sites/client/Client"; +import { Redirects } from "./api/resources/redirects/client/Client"; +import { SitePlan } from "./api/resources/sitePlan/client/Client"; import { Collections } from "./api/resources/collections/client/Client"; import { Pages } from "./api/resources/pages/client/Client"; +import { Components } from "./api/resources/components/client/Client"; import { Scripts } from "./api/resources/scripts/client/Client"; import { Assets } from "./api/resources/assets/client/Client"; import { Webhooks } from "./api/resources/webhooks/client/Client"; @@ -52,6 +55,18 @@ export class WebflowClient { return (this._sites ??= new Sites(this._options)); } + protected _redirects: Redirects | undefined; + + public get redirects(): Redirects { + return (this._redirects ??= new Redirects(this._options)); + } + + protected _sitePlan: SitePlan | undefined; + + public get sitePlan(): SitePlan { + return (this._sitePlan ??= new SitePlan(this._options)); + } + protected _collections: Collections | undefined; public get collections(): Collections { @@ -64,6 +79,12 @@ export class WebflowClient { return (this._pages ??= new Pages(this._options)); } + protected _components: Components | undefined; + + public get components(): Components { + return (this._components ??= new Components(this._options)); + } + protected _scripts: Scripts | undefined; public get scripts(): Scripts { diff --git a/src/api/errors/index.ts b/src/api/errors/index.ts index 12de3c09..764085c5 100644 --- a/src/api/errors/index.ts +++ b/src/api/errors/index.ts @@ -1,7 +1,7 @@ export * from "./UnauthorizedError"; export * from "./ForbiddenError"; +export * from "./BadRequestError"; export * from "./NotFoundError"; export * from "./TooManyRequestsError"; -export * from "./BadRequestError"; export * from "./InternalServerError"; export * from "./ConflictError"; diff --git a/src/api/resources/assets/client/Client.ts b/src/api/resources/assets/client/Client.ts index 54cc69d7..a56d307f 100644 --- a/src/api/resources/assets/client/Client.ts +++ b/src/api/resources/assets/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Assets { } } +/** + * Assets are files that are uploaded to your Webflow account. + */ export class Assets { constructor(protected readonly _options: Assets.Options) {} @@ -150,10 +153,12 @@ export class Assets { /** * Create a new asset entry. * + * * This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. * You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) * request to the `uploadUrl` with the `uploadDetails` object as your header information in the request. * + * * Required scope | `assets:write` * * @param {string} siteId - Unique identifier for a Site diff --git a/src/api/resources/collections/client/Client.ts b/src/api/resources/collections/client/Client.ts index 5b27a92e..60a4f28c 100644 --- a/src/api/resources/collections/client/Client.ts +++ b/src/api/resources/collections/client/Client.ts @@ -29,6 +29,9 @@ export declare namespace Collections { } } +/** + * Collections are CMS collections of items. + */ export class Collections { constructor(protected readonly _options: Collections.Options) {} diff --git a/src/api/resources/collections/resources/items/client/Client.ts b/src/api/resources/collections/resources/items/client/Client.ts index dcbe7333..cfdd07f8 100644 --- a/src/api/resources/collections/resources/items/client/Client.ts +++ b/src/api/resources/collections/resources/items/client/Client.ts @@ -188,7 +188,8 @@ export class Items { /** * Create Item(s) in a Collection. * - * To create items across multiple locales, please use [this endpoint.](/data/v2.0.0/reference/cms/collection-items/bulk-items/create-items) + * + * To create items across multiple locales, please use [this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) * * Required scope | `CMS:write` * @@ -810,7 +811,9 @@ export class Items { /** * Create live Item(s) in a Collection. The Item(s) will be published to the live site. * - * To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/bulk-items/create-items) + * + * To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) + * * * Required scope | `CMS:write` * @@ -1275,9 +1278,8 @@ export class Items { * Create an item or multiple items in a CMS Collection across multiple corresponding locales. * * **Notes:** - * - * - This endpoint can create up to 100 items in a request. - * - If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. + * - This endpoint can create up to 100 items in a request. + * - If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. * * Required scope | `CMS:write` * diff --git a/src/api/resources/components/client/Client.ts b/src/api/resources/components/client/Client.ts new file mode 100644 index 00000000..97e0916f --- /dev/null +++ b/src/api/resources/components/client/Client.ts @@ -0,0 +1,779 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Webflow from "../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace Components { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Components { + constructor(protected readonly _options: Components.Options) {} + + /** + * List of all components for a site. + * + * Required scope | `components:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.ComponentsListRequest} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.list("580e63e98c9a982ac9b8b741") + */ + public async list( + siteId: string, + request: Webflow.ComponentsListRequest = {}, + requestOptions?: Components.RequestOptions + ): Promise { + const { limit, offset } = request; + const _queryParams: Record = {}; + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/components."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get static content from a component definition. This includes text nodes, image nodes and nested component instances. + * To retrieve dynamic content set by component properties, use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint. + * + * If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. + * + * Required scope | `components:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentsGetContentRequest} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.getContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async getContent( + siteId: string, + componentId: string, + request: Webflow.ComponentsGetContentRequest = {}, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, limit, offset } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentDom.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/components/{component_id}/dom." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * This endpoint updates content within a component defintion for **secondary locales**. It supports updating up to 1000 nodes in a single request. + * + * Before making updates: + * 1. Use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint to identify available content nodes and their types + * 2. If your component definition has a component instance nested within it, retrieve the nested component instance's properties that you'll override using the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint + * + * + * This endpoint is specifically for localizing component definitions. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. + * + * + * Required scope | `components:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentDomWrite} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.updateContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0", + * nodes: [{ + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + * text: "

The Hitchhiker's Guide to the Galaxy

" + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + * text: "

Don't Panic!

Always know where your towel is.

" + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", + * propertyOverrides: [{ + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + * text: "

Time is an illusion

" + * }, { + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + * text: "Life, the Universe and Everything" + * }] + * }] + * }) + */ + public async updateContent( + siteId: string, + componentId: string, + request: Webflow.ComponentDomWrite, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, ..._body } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.ComponentDomWrite.jsonOrThrow(_body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentsUpdateContentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling POST /sites/{site_id}/components/{component_id}/dom." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get the property default values of a component definition. + * + * If you do not provide a Locale ID in your request, the response will return any properties that can be localized from the Primary locale. + * + * Required scope | `components:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentsGetPropertiesRequest} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.getProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async getProperties( + siteId: string, + componentId: string, + request: Webflow.ComponentsGetPropertiesRequest = {}, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, limit, offset } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentProperties.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/components/{component_id}/properties." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update the property default values of a component definition in a specificed locale. + * + * Before making updates: + * 1. Use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify available properties + * + * The request requires a secondary locale ID. If a locale is missing, the request will not be processed and will result in an error. + * + * Required scope | `components:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentPropertiesWrite} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.updateProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0", + * properties: [{ + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + * text: "The Hitchhiker\u2019s Guide to the Galaxy" + * }, { + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + * text: "

Dont Panic!

Always know where your towel is.

" + * }] + * }) + */ + public async updateProperties( + siteId: string, + componentId: string, + request: Webflow.ComponentPropertiesWrite, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, ..._body } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.ComponentPropertiesWrite.jsonOrThrow(_body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentsUpdatePropertiesResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling POST /sites/{site_id}/components/{component_id}/properties." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/components/client/index.ts b/src/api/resources/components/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/components/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/components/client/requests/ComponentDomWrite.ts b/src/api/resources/components/client/requests/ComponentDomWrite.ts new file mode 100644 index 00000000..0a7b7b99 --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentDomWrite.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0", + * nodes: [{ + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + * text: "

The Hitchhiker's Guide to the Galaxy

" + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + * text: "

Don't Panic!

Always know where your towel is.

" + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", + * propertyOverrides: [{ + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + * text: "

Time is an illusion

" + * }, { + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + * text: "Life, the Universe and Everything" + * }] + * }] + * } + */ +export interface ComponentDomWrite { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** List of DOM Nodes with the new content that will be updated in each node. */ + nodes: Webflow.ComponentDomWriteNodesItem[]; +} diff --git a/src/api/resources/components/client/requests/ComponentPropertiesWrite.ts b/src/api/resources/components/client/requests/ComponentPropertiesWrite.ts new file mode 100644 index 00000000..9c64e279 --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentPropertiesWrite.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0", + * properties: [{ + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + * text: "The Hitchhiker\u2019s Guide to the Galaxy" + * }, { + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + * text: "

Dont Panic!

Always know where your towel is.

" + * }] + * } + */ +export interface ComponentPropertiesWrite { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** A list of component properties to update within the specified secondary locale. */ + properties: Webflow.ComponentPropertiesWritePropertiesItem[]; +} diff --git a/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts b/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts new file mode 100644 index 00000000..043c8f2b --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + * + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface ComponentsGetContentRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; +} diff --git a/src/api/resources/components/client/requests/ComponentsGetPropertiesRequest.ts b/src/api/resources/components/client/requests/ComponentsGetPropertiesRequest.ts new file mode 100644 index 00000000..d8d9ce7d --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentsGetPropertiesRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface ComponentsGetPropertiesRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; +} diff --git a/src/api/resources/components/client/requests/ComponentsListRequest.ts b/src/api/resources/components/client/requests/ComponentsListRequest.ts new file mode 100644 index 00000000..c1090ce9 --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentsListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface ComponentsListRequest { + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; +} diff --git a/src/api/resources/components/client/requests/index.ts b/src/api/resources/components/client/requests/index.ts new file mode 100644 index 00000000..c8f88ea5 --- /dev/null +++ b/src/api/resources/components/client/requests/index.ts @@ -0,0 +1,5 @@ +export { type ComponentsListRequest } from "./ComponentsListRequest"; +export { type ComponentsGetContentRequest } from "./ComponentsGetContentRequest"; +export { type ComponentDomWrite } from "./ComponentDomWrite"; +export { type ComponentsGetPropertiesRequest } from "./ComponentsGetPropertiesRequest"; +export { type ComponentPropertiesWrite } from "./ComponentPropertiesWrite"; diff --git a/src/api/resources/components/index.ts b/src/api/resources/components/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/components/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/components/types/ComponentDomWriteNodesItem.ts b/src/api/resources/components/types/ComponentDomWriteNodesItem.ts new file mode 100644 index 00000000..f9884a29 --- /dev/null +++ b/src/api/resources/components/types/ComponentDomWriteNodesItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export type ComponentDomWriteNodesItem = Webflow.TextNodeWrite | Webflow.ComponentInstanceNodePropertyOverridesWrite; diff --git a/src/api/resources/components/types/ComponentPropertiesWritePropertiesItem.ts b/src/api/resources/components/types/ComponentPropertiesWritePropertiesItem.ts new file mode 100644 index 00000000..dac54dc0 --- /dev/null +++ b/src/api/resources/components/types/ComponentPropertiesWritePropertiesItem.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentPropertiesWritePropertiesItem { + /** The ID of the property. */ + propertyId: string; + /** + * The new string or HTML value used to update the component property in the secondary locale. + * + * The provided value must be compatible with the type of the component property. + * + * For example, attempting to update a single-line plain-text property with a multi-line + * value will result in an error. + */ + text: string; +} diff --git a/src/api/resources/components/types/ComponentsUpdateContentResponse.ts b/src/api/resources/components/types/ComponentsUpdateContentResponse.ts new file mode 100644 index 00000000..3bb712bd --- /dev/null +++ b/src/api/resources/components/types/ComponentsUpdateContentResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentsUpdateContentResponse { + /** A list of error messages, if any. */ + errors: string[]; +} diff --git a/src/api/resources/components/types/ComponentsUpdatePropertiesResponse.ts b/src/api/resources/components/types/ComponentsUpdatePropertiesResponse.ts new file mode 100644 index 00000000..8c1f4142 --- /dev/null +++ b/src/api/resources/components/types/ComponentsUpdatePropertiesResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentsUpdatePropertiesResponse { + /** A list of error messages, if any. */ + errors: string[]; +} diff --git a/src/api/resources/components/types/index.ts b/src/api/resources/components/types/index.ts new file mode 100644 index 00000000..1bdf297c --- /dev/null +++ b/src/api/resources/components/types/index.ts @@ -0,0 +1,4 @@ +export * from "./ComponentDomWriteNodesItem"; +export * from "./ComponentsUpdateContentResponse"; +export * from "./ComponentPropertiesWritePropertiesItem"; +export * from "./ComponentsUpdatePropertiesResponse"; diff --git a/src/api/resources/forms/client/Client.ts b/src/api/resources/forms/client/Client.ts index ac032aa3..9ce7f0bc 100644 --- a/src/api/resources/forms/client/Client.ts +++ b/src/api/resources/forms/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Forms { } } +/** + * Forms are forms that are created on your Webflow site. + */ export class Forms { constructor(protected readonly _options: Forms.Options) {} diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 45832f7c..bde95436 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -2,6 +2,8 @@ export * as sites from "./sites"; export * from "./sites/types"; export * as pages from "./pages"; export * from "./pages/types"; +export * as components from "./components"; +export * from "./components/types"; export * as users from "./users"; export * from "./users/types"; export * as accessGroups from "./accessGroups"; @@ -14,6 +16,8 @@ export * as inventory from "./inventory"; export * from "./inventory/types"; export * as collections from "./collections"; export * as token from "./token"; +export * as redirects from "./redirects"; +export * as sitePlan from "./sitePlan"; export * as scripts from "./scripts"; export * as assets from "./assets"; export * as webhooks from "./webhooks"; @@ -22,6 +26,7 @@ export * as ecommerce from "./ecommerce"; export * from "./sites/client/requests"; export * from "./collections/client/requests"; export * from "./pages/client/requests"; +export * from "./components/client/requests"; export * from "./scripts/client/requests"; export * from "./assets/client/requests"; export * from "./forms/client/requests"; diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts index fa344820..e310e61a 100644 --- a/src/api/resources/inventory/client/Client.ts +++ b/src/api/resources/inventory/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Inventory { } } +/** + * Inventory is the stock of e-commerce items in your Webflow site. + */ export class Inventory { constructor(protected readonly _options: Inventory.Options) {} @@ -164,7 +167,6 @@ export class Inventory { * Updates the current inventory levels for a particular SKU item. * * Updates may be given in one or two methods, absolutely or incrementally. - * * - Absolute updates are done by setting `quantity` directly. * - Incremental updates are by specifying the inventory delta in `updateQuantity` which is then added to the `quantity` stored on the server. * diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index 3ab1064e..9a1e5e70 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Orders { } } +/** + * Orders are the orders for your Webflow site. + */ export class Orders { constructor(protected readonly _options: Orders.Options) {} diff --git a/src/api/resources/pages/client/Client.ts b/src/api/resources/pages/client/Client.ts index 8181172e..9a24137c 100644 --- a/src/api/resources/pages/client/Client.ts +++ b/src/api/resources/pages/client/Client.ts @@ -28,6 +28,9 @@ export declare namespace Pages { } } +/** + * Pages are the pages in your Webflow site. + */ export class Pages { constructor(protected readonly _options: Pages.Options) {} @@ -462,9 +465,10 @@ export class Pages { } /** - * Get static content from a static page. + * Get static content from a static page. This includes text nodes, image nodes and component instances. + * To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint. * - * If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. + * If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. * * Required scope | `pages:read` * @@ -606,14 +610,20 @@ export class Pages { } /** - * This endpoint allows for updating static content on a static page within a secondary locale. It is designed specifically for localized pages and can handle up to 1000 nodes per request. + * This endpoint updates content on a static page in **secondary locales**. It supports updating up to 1000 nodes in a single request. * - *

Note:This endpoint is specifically for localized pages. Ensure that the locale specified is a valid secondary locale for the site.

+ * Before making updates: + * 1. Use the [get page content](/data/reference/pages-and-components/pages/get-content) endpoint to identify available content nodes and their types + * 2. If the page has component instances, retrieve the component's properties that you'll override using the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint + * + * + * This endpoint is specifically for localized pages. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. + * * * Required scope | `pages:write` * * @param {string} pageId - Unique identifier for a Page - * @param {Webflow.DomWrite} request + * @param {Webflow.PageDomWrite} request * @param {Pages.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} @@ -625,30 +635,33 @@ export class Pages { * * @example * await client.pages.updateStaticContent("63c720f9347c2139b248e552", { - * localeId: "65427cf400e02b306eaa04a0", + * localeId: "localeId", * nodes: [{ * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", - * text: "

The Hitchhiker\u2019s Guide to the Galaxy

" + * text: "

The Hitchhiker's Guide to the Galaxy

" * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", - * text: "

Don\u2019t Panic!

Always know where your towel is.

" + * text: "

Don't Panic!

Always know where your towel is.

" * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", - * text: "\"Marvin," + * propertyOverrides: [{ + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + * text: "

Time is an illusion

" + * }, { + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + * text: "Life, the Universe and Everything" + * }] * }] * }) */ public async updateStaticContent( pageId: string, - request: Webflow.DomWrite, + request: Webflow.PageDomWrite, requestOptions?: Pages.RequestOptions ): Promise { const { localeId, ..._body } = request; const _queryParams: Record = {}; - if (localeId != null) { - _queryParams["localeId"] = localeId; - } - + _queryParams["localeId"] = localeId; const _response = await core.fetcher({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, @@ -668,7 +681,7 @@ export class Pages { contentType: "application/json", queryParameters: _queryParams, requestType: "json", - body: serializers.DomWrite.jsonOrThrow(_body, { + body: serializers.PageDomWrite.jsonOrThrow(_body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, diff --git a/src/api/resources/pages/client/requests/DomWrite.ts b/src/api/resources/pages/client/requests/DomWrite.ts deleted file mode 100644 index 0f0d95ff..00000000 --- a/src/api/resources/pages/client/requests/DomWrite.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Webflow from "../../../../index"; - -/** - * @example - * { - * localeId: "65427cf400e02b306eaa04a0", - * nodes: [{ - * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", - * text: "

The Hitchhiker\u2019s Guide to the Galaxy

" - * }, { - * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", - * text: "

Don\u2019t Panic!

Always know where your towel is.

" - * }, { - * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", - * text: "\"Marvin," - * }] - * } - */ -export interface DomWrite { - /** - * Unique identifier for a specific locale. Applicable, when using localization. - */ - localeId?: string; - nodes: Webflow.DomWriteNodesItem[]; -} diff --git a/src/api/resources/pages/client/requests/PageDomWrite.ts b/src/api/resources/pages/client/requests/PageDomWrite.ts new file mode 100644 index 00000000..9a4c0adc --- /dev/null +++ b/src/api/resources/pages/client/requests/PageDomWrite.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../index"; + +/** + * @example + * { + * localeId: "localeId", + * nodes: [{ + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + * text: "

The Hitchhiker's Guide to the Galaxy

" + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + * text: "

Don't Panic!

Always know where your towel is.

" + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", + * propertyOverrides: [{ + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + * text: "

Time is an illusion

" + * }, { + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + * text: "Life, the Universe and Everything" + * }] + * }] + * } + */ +export interface PageDomWrite { + /** + * The locale identifier. + */ + localeId: string; + /** List of DOM Nodes with the new content that will be updated in each node. */ + nodes: Webflow.PageDomWriteNodesItem[]; +} diff --git a/src/api/resources/pages/client/requests/index.ts b/src/api/resources/pages/client/requests/index.ts index f979def7..93bd2381 100644 --- a/src/api/resources/pages/client/requests/index.ts +++ b/src/api/resources/pages/client/requests/index.ts @@ -2,4 +2,4 @@ export { type PagesListRequest } from "./PagesListRequest"; export { type PagesGetMetadataRequest } from "./PagesGetMetadataRequest"; export { type UpdatePageSettingsRequest } from "./UpdatePageSettingsRequest"; export { type PagesGetContentRequest } from "./PagesGetContentRequest"; -export { type DomWrite } from "./DomWrite"; +export { type PageDomWrite } from "./PageDomWrite"; diff --git a/src/api/resources/pages/resources/scripts/client/Client.ts b/src/api/resources/pages/resources/scripts/client/Client.ts index e1ff1f19..8de1241a 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -37,7 +37,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * @@ -163,7 +163,9 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * A site can have a maximum of 800 registered scripts. + * + * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -174,6 +176,7 @@ export class Scripts { * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * @@ -259,6 +262,8 @@ export class Scripts { breadcrumbsPrefix: ["response"], }) ); + case 409: + throw new Webflow.ConflictError(_response.error.body); case 429: throw new Webflow.TooManyRequestsError( serializers.Error_.parseOrThrow(_response.error.body, { @@ -309,7 +314,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * diff --git a/src/api/resources/pages/types/PageDomWriteNodesItem.ts b/src/api/resources/pages/types/PageDomWriteNodesItem.ts new file mode 100644 index 00000000..037cfcbf --- /dev/null +++ b/src/api/resources/pages/types/PageDomWriteNodesItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export type PageDomWriteNodesItem = Webflow.TextNodeWrite | Webflow.ComponentInstanceNodePropertyOverridesWrite; diff --git a/src/api/resources/pages/types/index.ts b/src/api/resources/pages/types/index.ts index 943c3715..b9ce1b58 100644 --- a/src/api/resources/pages/types/index.ts +++ b/src/api/resources/pages/types/index.ts @@ -1,2 +1,2 @@ -export * from "./DomWriteNodesItem"; +export * from "./PageDomWriteNodesItem"; export * from "./UpdateStaticContentResponse"; diff --git a/src/api/resources/products/client/Client.ts b/src/api/resources/products/client/Client.ts index e75102c0..ad31d5d2 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -178,12 +178,11 @@ export class Products { * When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. * * To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: - * - * - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). - * - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - * - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - * - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - * - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku) + * - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). + * - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. + * - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. + * - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. + * - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) * * Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. * diff --git a/src/api/resources/redirects/client/Client.ts b/src/api/resources/redirects/client/Client.ts new file mode 100644 index 00000000..c4813d0b --- /dev/null +++ b/src/api/resources/redirects/client/Client.ts @@ -0,0 +1,547 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Webflow from "../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace Redirects { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Redirects { + constructor(protected readonly _options: Redirects.Options) {} + + /** + * Fetch a list of all URL redirect rules configured for a specific site. + * + * Use this endpoint to review, audit, or manage the redirection rules that control how traffic is rerouted on your site. + * + * + * Required scope: `sites:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.redirects.get("580e63e98c9a982ac9b8b741") + */ + public async get(siteId: string, requestOptions?: Redirects.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirects.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/redirects."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Add a new URL redirection rule to a site. + * + * This endpoint allows you to define a source path (`fromUrl`) and its corresponding destination path (`toUrl`), which will dictate how traffic is rerouted on your site. This is useful for managing site changes, restructuring URLs, or handling outdated links. + * + * Required scope: `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.Redirect} request + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.redirects.create("580e63e98c9a982ac9b8b741", { + * id: "42e1a2b7aa1a13f768a0042a", + * fromUrl: "/mostly-harmless", + * toUrl: "/earth" + * }) + */ + public async create( + siteId: string, + request: Webflow.Redirect, + requestOptions?: Redirects.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.Redirect.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirect.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/redirects."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Remove a URL redirection rule from a site. + * This is useful for cleaning up outdated or unnecessary redirects, ensuring that your site's routing behavior remains efficient and up-to-date. + * Required scope: `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} redirectId - Unique identifier site rediect + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6") + */ + public async delete( + siteId: string, + redirectId: string, + requestOptions?: Redirects.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirects.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling DELETE /sites/{site_id}/redirects/{redirect_id}." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update a URL redirection rule from a site. + * Required scope: `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} redirectId - Unique identifier site rediect + * @param {Webflow.Redirect} request + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.redirects.patch("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6", { + * id: "42e1a2b7aa1a13f768a0042a", + * fromUrl: "/mostly-harmless", + * toUrl: "/earth" + * }) + */ + public async patch( + siteId: string, + redirectId: string, + request: Webflow.Redirect, + requestOptions?: Redirects.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` + ), + method: "PATCH", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.Redirect.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirect.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling PATCH /sites/{site_id}/redirects/{redirect_id}." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/redirects/client/index.ts b/src/api/resources/redirects/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/redirects/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/redirects/index.ts b/src/api/resources/redirects/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/redirects/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index 5c476ab4..c68c159e 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -38,7 +38,7 @@ export class Scripts { * `custom_code` endpoints. * Additionally, Scripts can be remotely hosted, or registered as inline snippets. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * @@ -164,7 +164,7 @@ export class Scripts { * `custom_code` endpoints. * Additionally, Scripts can be remotely hosted, or registered as inline snippets. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -304,7 +304,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * diff --git a/src/api/resources/sitePlan/client/Client.ts b/src/api/resources/sitePlan/client/Client.ts new file mode 100644 index 00000000..7322080f --- /dev/null +++ b/src/api/resources/sitePlan/client/Client.ts @@ -0,0 +1,153 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Webflow from "../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace SitePlan { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class SitePlan { + constructor(protected readonly _options: SitePlan.Options) {} + + /** + * Get site plan details for the specified Site. + * + * Required scope | `sites:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {SitePlan.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sitePlan.get("580e63e98c9a982ac9b8b741") + */ + public async get(siteId: string, requestOptions?: SitePlan.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/plan` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SitePlan.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/plan."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/sitePlan/client/index.ts b/src/api/resources/sitePlan/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/sitePlan/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/sitePlan/index.ts b/src/api/resources/sitePlan/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/sitePlan/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index 9e04812e..c56a894e 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -5,8 +5,8 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Webflow from "../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../errors/index"; import { ActivityLogs } from "../resources/activityLogs/client/Client"; import { Scripts } from "../resources/scripts/client/Client"; @@ -29,9 +29,146 @@ export declare namespace Sites { } } +/** + * Sites are the sites in your Webflow workspace. + */ export class Sites { constructor(protected readonly _options: Sites.Options) {} + /** + * Create a site. This endpoint requires an Enterprise workspace. + * + * Required scope | `workspace:write` + * + * @param {string} workspaceId - Unique identifier for a Workspace + * @param {Webflow.SitesCreateRequest} request + * @param {Sites.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.create("580e63e98c9a982ac9b8b741", { + * name: "The Hitchhiker's Guide to the Galaxy" + * }) + */ + public async create( + workspaceId: string, + request: Webflow.SitesCreateRequest, + requestOptions?: Sites.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `workspaces/${encodeURIComponent(workspaceId)}/sites` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.SitesCreateRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Site.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling POST /workspaces/{workspace_id}/sites." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + /** * List of all sites the provided access token is able to access. * @@ -251,6 +388,250 @@ export class Sites { } } + /** + * Delete a site. This endpoint requires an Enterprise workspace. + * + * Required scope | `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Sites.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.delete("580e63e98c9a982ac9b8b741") + */ + public async delete(siteId: string, requestOptions?: Sites.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update a site. This endpoint requires an Enterprise workspace. + * + * Required scope | `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.SitesUpdateRequest} request + * @param {Sites.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.update("580e63e98c9a982ac9b8b741") + */ + public async update( + siteId: string, + request: Webflow.SitesUpdateRequest = {}, + requestOptions?: Sites.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}` + ), + method: "PATCH", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.0.2", + "User-Agent": "webflow-api/3.0.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.SitesUpdateRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Site.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + /** * Get a list of all custom domains related to site. * diff --git a/src/api/resources/sites/client/requests/SitesCreateRequest.ts b/src/api/resources/sites/client/requests/SitesCreateRequest.ts new file mode 100644 index 00000000..c7911a56 --- /dev/null +++ b/src/api/resources/sites/client/requests/SitesCreateRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * name: "The Hitchhiker's Guide to the Galaxy" + * } + */ +export interface SitesCreateRequest { + /** The name of the site */ + name: string; + /** The workspace or marketplace template to use */ + templateName?: string; + /** MegaDodo Publications - Potential Book Ideas */ + parentFolderId?: string; +} diff --git a/src/api/resources/sites/client/requests/SitesUpdateRequest.ts b/src/api/resources/sites/client/requests/SitesUpdateRequest.ts new file mode 100644 index 00000000..99058677 --- /dev/null +++ b/src/api/resources/sites/client/requests/SitesUpdateRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface SitesUpdateRequest { + /** The name of the site */ + name?: string; + /** The parent folder ID of the site */ + parentFolderId?: string; +} diff --git a/src/api/resources/sites/client/requests/index.ts b/src/api/resources/sites/client/requests/index.ts index 9dc259ab..b802fad3 100644 --- a/src/api/resources/sites/client/requests/index.ts +++ b/src/api/resources/sites/client/requests/index.ts @@ -1 +1,3 @@ +export { type SitesCreateRequest } from "./SitesCreateRequest"; +export { type SitesUpdateRequest } from "./SitesUpdateRequest"; export { type SitesPublishRequest } from "./SitesPublishRequest"; diff --git a/src/api/resources/sites/resources/activityLogs/client/Client.ts b/src/api/resources/sites/resources/activityLogs/client/Client.ts index d8ca510e..7147f43e 100644 --- a/src/api/resources/sites/resources/activityLogs/client/Client.ts +++ b/src/api/resources/sites/resources/activityLogs/client/Client.ts @@ -31,7 +31,7 @@ export class ActivityLogs { constructor(protected readonly _options: ActivityLogs.Options) {} /** - * Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` + * Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.sites.ActivityLogsListRequest} request diff --git a/src/api/resources/sites/resources/scripts/client/Client.ts b/src/api/resources/sites/resources/scripts/client/Client.ts index 04d7f9e7..56da0ce3 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -33,7 +33,7 @@ export class Scripts { /** * Get all registered scripts that have been applied to a specific Site. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * @@ -159,7 +159,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -301,7 +301,7 @@ export class Scripts { /** * Delete the custom code block that an app created for a Site * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -416,7 +416,7 @@ export class Scripts { /** * Get all instances of Custom Code applied to a Site or Pages. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index 0eeec4fe..67e99941 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -115,7 +115,8 @@ export class Token { /** * Information about the authorization token - * Access to this endpoint requires a bearer token from a []>Data Client App](/data/docs/getting-started-data-clients). + * + * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * @param {Token.RequestOptions} requestOptions - Request-specific configuration. * diff --git a/src/api/resources/users/client/Client.ts b/src/api/resources/users/client/Client.ts index 451c894e..5356ff39 100644 --- a/src/api/resources/users/client/Client.ts +++ b/src/api/resources/users/client/Client.ts @@ -413,7 +413,7 @@ export class Users { /** * Update a User by ID * - * Required scope | `users:write` + * Required scope | `users:write` * * The email and password * fields cannot be updated using this endpoint diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index ea8c6c05..b95ce78d 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Webhooks { } } +/** + * Webhooks are the webhooks in your Webflow site. + */ export class Webhooks { constructor(protected readonly _options: Webhooks.Options) {} @@ -152,7 +155,7 @@ export class Webhooks { * * Limit of 75 registrations per `triggerType`, per site. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * Required scope | `sites:write` * * @param {string} siteId - Unique identifier for a Site diff --git a/src/api/types/Component.ts b/src/api/types/Component.ts new file mode 100644 index 00000000..f90eff53 --- /dev/null +++ b/src/api/types/Component.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The Component object + */ +export interface Component { + /** Unique identifier for the Component */ + id: string; + /** Component Name */ + name?: string; + /** The group that the component belongs to */ + group?: string; + /** Component Description */ + description?: string; + /** Indicates whether the component is read-only. Components that cannot be updated within this Site are set to readonly. Workspace Libraries are a good example. */ + readonly?: boolean; +} diff --git a/src/api/types/ComponentDom.ts b/src/api/types/ComponentDom.ts new file mode 100644 index 00000000..aaf5e2a8 --- /dev/null +++ b/src/api/types/ComponentDom.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * The Component DOM schema represents the content structure of a component. Similar to Page DOM, it captures various content nodes and their associated attributes, but specifically for a component's structure. Each node has a unique identifier and can contain text, images, or nested component instances. + */ +export interface ComponentDom { + /** Component ID */ + componentId?: string; + nodes?: Webflow.Node[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ComponentInstanceNodePropertyOverridesWrite.ts b/src/api/types/ComponentInstanceNodePropertyOverridesWrite.ts new file mode 100644 index 00000000..2fe7cd3b --- /dev/null +++ b/src/api/types/ComponentInstanceNodePropertyOverridesWrite.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Update text property overrides of a component instance + */ +export interface ComponentInstanceNodePropertyOverridesWrite { + /** Node UUID */ + nodeId: string; + /** A list of component instance properties to override within the specified secondary locale. */ + propertyOverrides: Webflow.ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem[]; +} diff --git a/src/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts b/src/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts new file mode 100644 index 00000000..a69d7028 --- /dev/null +++ b/src/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem { + /** The ID of the property. */ + propertyId: string; + /** + * The new string or HTML value used to override the component instance property value. + * The provided value must be compatible with the type of the component instance property. + * For example, attempting to override a single-line plain-text property with a multi-line + * value will result in an error. + */ + text: string; +} diff --git a/src/api/types/ComponentList.ts b/src/api/types/ComponentList.ts new file mode 100644 index 00000000..8af4f455 --- /dev/null +++ b/src/api/types/ComponentList.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * List of Components on a site. + */ +export interface ComponentList { + components?: Webflow.Component[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ComponentNode.ts b/src/api/types/ComponentNode.ts new file mode 100644 index 00000000..052cbab9 --- /dev/null +++ b/src/api/types/ComponentNode.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Represents a component instance within the DOM. It contains details about the component instance, such as its type and properties. + */ +export interface ComponentNode { + /** Node UUID */ + id?: string; + /** Component ID */ + componentId?: string; + /** List of component properties with overrides for a component instance. */ + propertyOverrides?: Webflow.ComponentProperty[]; +} diff --git a/src/api/types/ComponentProperties.ts b/src/api/types/ComponentProperties.ts new file mode 100644 index 00000000..e2e33ecb --- /dev/null +++ b/src/api/types/ComponentProperties.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * The Component Properties schema represents a list of properties that store text content. Each property has a unique identifier and can be of different types like plain text or rich text. The schema also provides pagination details for scenarios where there more properties than the limit. + */ +export interface ComponentProperties { + /** Component ID */ + componentId?: string; + properties?: Webflow.ComponentProperty[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ComponentProperty.ts b/src/api/types/ComponentProperty.ts new file mode 100644 index 00000000..fffc0323 --- /dev/null +++ b/src/api/types/ComponentProperty.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Represents a property of a component instance in the DOM. A property contains a list of both the raw text and the HTML representation, allowing for flexibility in rendering and processing. Additional attributes can be associated with the text for styling or other purposes. + */ +export interface ComponentProperty { + /** The ID of the property. */ + propertyId?: string; + /** The type of the property. */ + type?: Webflow.ComponentPropertyType; + /** The label of the property in the UI. */ + label?: string; + /** Represents text content within the DOM. It contains both the raw text and its HTML representation. */ + text?: Webflow.Text; +} diff --git a/src/api/types/ComponentPropertyType.ts b/src/api/types/ComponentPropertyType.ts new file mode 100644 index 00000000..68a03600 --- /dev/null +++ b/src/api/types/ComponentPropertyType.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The type of the property. + */ +export type ComponentPropertyType = "Plain Text" | "Rich Text" | "Alt Text"; + +export const ComponentPropertyType = { + PlainText: "Plain Text", + RichText: "Rich Text", + AltText: "Alt Text", +} as const; diff --git a/src/api/types/Dom.ts b/src/api/types/Dom.ts index ff5f7c0b..b02c0628 100644 --- a/src/api/types/Dom.ts +++ b/src/api/types/Dom.ts @@ -5,7 +5,7 @@ import * as Webflow from "../index"; /** - * The DOM (Document Object Model) schema represents the content structure of a web page. It captures various content nodes, such as text and images, along with their associated attributes. Each node has a unique identifier and can be of different types like text or image. The schema also provides pagination details for scenarios where the content nodes are too many to be fetched in a single request. + * The DOM (Document Object Model) schema represents the content structure of a web page or component. It captures various content nodes along with their associated attributes. Each node has a unique identifier and can be of different types like text, image or component-instance. The schema also provides pagination details for scenarios where the content nodes are too many to be fetched in a single request. */ export interface Dom { /** Page ID */ diff --git a/src/api/types/Error_.ts b/src/api/types/Error_.ts index 9a223848..6295f0e4 100644 --- a/src/api/types/Error_.ts +++ b/src/api/types/Error_.ts @@ -12,5 +12,5 @@ export interface Error_ { /** Link to more information */ externalReference?: string; /** Array of errors */ - details?: Webflow.ErrorDetailsItem[]; + details?: unknown[]; } diff --git a/src/api/types/ImageNode.ts b/src/api/types/ImageNode.ts index 11ff84db..d1b45fc7 100644 --- a/src/api/types/ImageNode.ts +++ b/src/api/types/ImageNode.ts @@ -2,10 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Webflow from "../index"; + /** * Represents an image within the DOM. It contains details about the image, such as its alternative text (alt) for accessibility and an asset identifier for fetching the actual image resource. Additional attributes can be associated with the image for styling or other purposes. */ export interface ImageNode { - alt?: string; - assetId?: string; + /** Node UUID */ + id?: string; + image?: Webflow.ImageNodeImage; + /** The custom attributes of the node */ + attributes?: Record; } diff --git a/src/api/types/ImageNodeImage.ts b/src/api/types/ImageNodeImage.ts new file mode 100644 index 00000000..74f51a90 --- /dev/null +++ b/src/api/types/ImageNodeImage.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ImageNodeImage { + alt?: string; + assetId?: string; +} diff --git a/src/api/types/Node.ts b/src/api/types/Node.ts index 4f8f21c3..74e961bd 100644 --- a/src/api/types/Node.ts +++ b/src/api/types/Node.ts @@ -7,12 +7,18 @@ import * as Webflow from "../index"; /** * A generic representation of a content element within the Document Object Model (DOM). Each node has a unique identifier and a specific type that determines its content structure and attributes. */ -export interface Node { - /** Node UUID */ - id?: string; - type?: Webflow.NodeType; - text?: Webflow.TextNode; - image?: Webflow.ImageNode; - /** The custom attributes of the node */ - attributes?: Record; +export type Node = Webflow.Node.Text | Webflow.Node.Image | Webflow.Node.ComponentInstance; + +export declare namespace Node { + interface Text extends Webflow.TextNode { + type: "text"; + } + + interface Image extends Webflow.ImageNode { + type: "image"; + } + + interface ComponentInstance extends Webflow.ComponentNode { + type: "component-instance"; + } } diff --git a/src/api/types/NodeType.ts b/src/api/types/NodeType.ts deleted file mode 100644 index 30b5f886..00000000 --- a/src/api/types/NodeType.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type NodeType = "text" | "image"; - -export const NodeType = { - Text: "text", - Image: "image", -} as const; diff --git a/src/api/types/ErrorDetailsItem.ts b/src/api/types/NotEnterprisePlanWorkspace.ts similarity index 53% rename from src/api/types/ErrorDetailsItem.ts rename to src/api/types/NotEnterprisePlanWorkspace.ts index d02087ac..fbd758af 100644 --- a/src/api/types/ErrorDetailsItem.ts +++ b/src/api/types/NotEnterprisePlanWorkspace.ts @@ -2,4 +2,4 @@ * This file was auto-generated by Fern from our API Definition. */ -export type ErrorDetailsItem = string | Record; +export type NotEnterprisePlanWorkspace = unknown; diff --git a/src/api/types/ProductFieldData.ts b/src/api/types/ProductFieldData.ts index a8c49373..977fe806 100644 --- a/src/api/types/ProductFieldData.ts +++ b/src/api/types/ProductFieldData.ts @@ -5,7 +5,7 @@ import * as Webflow from "../index"; /** - * Contains content-specific details for a product, covering both standard (e.g., title, description) and custom fields tailored to the product setup. + * Contains content-specific details for a product, covering both standard (e.g., title, description) and custom fields tailored to the product setup. */ export interface ProductFieldData { /** Name of the Product */ diff --git a/src/api/types/Redirect.ts b/src/api/types/Redirect.ts new file mode 100644 index 00000000..d0a7a9fc --- /dev/null +++ b/src/api/types/Redirect.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * A single redirection rule, specifying a source URL and a destination URL. + */ +export interface Redirect { + /** The ID of the specific redirect rule */ + id?: string; + /** The source URL path that will be redirected. */ + fromUrl?: string; + /** The target URL path where the user or client will be redirected. */ + toUrl?: string; +} diff --git a/src/api/types/Redirects.ts b/src/api/types/Redirects.ts new file mode 100644 index 00000000..f6da48d3 --- /dev/null +++ b/src/api/types/Redirects.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Site redirects response + */ +export interface Redirects { + /** List of redirects for a given site */ + redirects?: Webflow.Redirect[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ScriptApply.ts b/src/api/types/ScriptApply.ts index bc8c0d7f..309a6bc0 100644 --- a/src/api/types/ScriptApply.ts +++ b/src/api/types/ScriptApply.ts @@ -9,7 +9,7 @@ export interface ScriptApply { id: string; /** Location of the script, either in the header or footer of the published site */ location: Webflow.ScriptApplyLocation; - /** Semantic Version String for the registered script _e.g. 0.0.1_ */ + /** Semantic Version String for the registered script *e.g. 0.0.1* */ version: string; /** Developer-specified key/value pairs to be applied as attributes to the script */ attributes?: Record; diff --git a/src/api/types/SitePlan.ts b/src/api/types/SitePlan.ts new file mode 100644 index 00000000..3a1c50cf --- /dev/null +++ b/src/api/types/SitePlan.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface SitePlan { + /** ID of the hosting plan. */ + id?: Webflow.SitePlanId; + /** Name of the hosting plan. */ + name?: Webflow.SitePlanName; + /** URL for more information about Webflow hosting plan pricing. */ + pricingInfo?: string; +} diff --git a/src/api/types/SitePlanId.ts b/src/api/types/SitePlanId.ts new file mode 100644 index 00000000..9d65463a --- /dev/null +++ b/src/api/types/SitePlanId.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * ID of the hosting plan. + */ +export type SitePlanId = + | "hosting-basic-v3" + | "hosting-cms-v3" + | "hosting-business-v3" + | "hosting-ecommerce-standard-v2" + | "hosting-ecommerce-plus-v2" + | "hosting-ecommerce-advanced-v2" + | "hosting-basic-v4" + | "hosting-cms-v4" + | "hosting-business-v4" + | "hosting-ecommerce-standard-v3" + | "hosting-ecommerce-plus-v3" + | "hosting-ecommerce-advanced-v3"; + +export const SitePlanId = { + HostingBasicV3: "hosting-basic-v3", + HostingCmsV3: "hosting-cms-v3", + HostingBusinessV3: "hosting-business-v3", + HostingEcommerceStandardV2: "hosting-ecommerce-standard-v2", + HostingEcommercePlusV2: "hosting-ecommerce-plus-v2", + HostingEcommerceAdvancedV2: "hosting-ecommerce-advanced-v2", + HostingBasicV4: "hosting-basic-v4", + HostingCmsV4: "hosting-cms-v4", + HostingBusinessV4: "hosting-business-v4", + HostingEcommerceStandardV3: "hosting-ecommerce-standard-v3", + HostingEcommercePlusV3: "hosting-ecommerce-plus-v3", + HostingEcommerceAdvancedV3: "hosting-ecommerce-advanced-v3", +} as const; diff --git a/src/api/types/SitePlanName.ts b/src/api/types/SitePlanName.ts new file mode 100644 index 00000000..925eaa9b --- /dev/null +++ b/src/api/types/SitePlanName.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Name of the hosting plan. + */ +export type SitePlanName = + | "Basic Hosting" + | "CMS Hosting" + | "Business Hosting" + | "ECommerce Standard Hosting" + | "ECommerce Plus Hosting" + | "ECommerce Advanced Hosting"; + +export const SitePlanName = { + BasicHosting: "Basic Hosting", + CmsHosting: "CMS Hosting", + BusinessHosting: "Business Hosting", + ECommerceStandardHosting: "ECommerce Standard Hosting", + ECommercePlusHosting: "ECommerce Plus Hosting", + ECommerceAdvancedHosting: "ECommerce Advanced Hosting", +} as const; diff --git a/src/api/types/Text.ts b/src/api/types/Text.ts new file mode 100644 index 00000000..3bb0c2ab --- /dev/null +++ b/src/api/types/Text.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface Text { + /** The HTML content of the text node. */ + html?: string; + /** The raw text content of the text node. */ + text?: string; +} diff --git a/src/api/types/TextNode.ts b/src/api/types/TextNode.ts index d40e72c5..d3bb2e5f 100644 --- a/src/api/types/TextNode.ts +++ b/src/api/types/TextNode.ts @@ -2,10 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Webflow from "../index"; + /** - * Represents textual content within the DOM. It contains both the raw text and its HTML representation, allowing for flexibility in rendering and processing. Additional attributes can be associated with the text for styling or other purposes. + * Represents text content within the DOM. It contains both the raw text and its HTML representation. Additional attributes can be associated with the text for styling or other purposes. */ export interface TextNode { - html?: string; - text?: string; + /** Node UUID */ + id?: string; + text?: Webflow.TextNodeText; + /** The custom attributes of the node */ + attributes?: Record; } diff --git a/src/api/types/TextNodeText.ts b/src/api/types/TextNodeText.ts new file mode 100644 index 00000000..b65c6adf --- /dev/null +++ b/src/api/types/TextNodeText.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface TextNodeText { + /** The HTML content of the text node. */ + html?: string; + /** The raw text content of the text node. */ + text?: string; +} diff --git a/src/api/resources/pages/types/DomWriteNodesItem.ts b/src/api/types/TextNodeWrite.ts similarity index 81% rename from src/api/resources/pages/types/DomWriteNodesItem.ts rename to src/api/types/TextNodeWrite.ts index 907de6eb..0c52cf2c 100644 --- a/src/api/resources/pages/types/DomWriteNodesItem.ts +++ b/src/api/types/TextNodeWrite.ts @@ -2,7 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -export interface DomWriteNodesItem { +/** + * Update a text node + */ +export interface TextNodeWrite { /** Node UUID */ nodeId: string; /** HTML content of the node, including the HTML tag. The HTML tags must be the same as what's returned from the Get Content endpoint. */ diff --git a/src/api/types/TriggerType.ts b/src/api/types/TriggerType.ts index 771c4e92..345bf260 100644 --- a/src/api/types/TriggerType.ts +++ b/src/api/types/TriggerType.ts @@ -3,21 +3,21 @@ */ /** - * - `form_submission` - Sends the [form_submission](#form_submission) event - * - `site_publish` - Sends a [site_publish](#site_publish) event - * - `page_created` - Send the [page_created](#page_created) event - * - `page_metadata_updated` - Sends the [page_metadata_updated](#page_metadata_updated) event - * - `page_deleted` - Sends the [page_deleted](#page_deleted) event - * - `ecomm_new_order` - Sends the new [ecomm_new_order](#ecomm_new_order) event - * - `ecomm_order_changed` - Sends the [ecomm_order_changed](#ecomm_order_changed) event - * - `ecomm_inventory_changed` - Sends the [ecomm_inventory_changed](#ecomm_inventory_changed) event - * - `user_account_added` - Sends the [user_account_added](#user_account_added) event - * - `user_account_updated` - Sends the [user_account_updated](#user_account_updated) event - * - `user_account_deleted` - Sends the [user_account_deleted](#user_account_deleted) event - * - `collection_item_created` - Sends the [collection_item_created](#collection_item_created) event - * - `collection_item_changed` - Sends the [collection_item_changed](#collection_item_changed) event - * - `collection_item_deleted` - Sends the [collection_item_deleted](#collection_item_deleted) event - * - `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + * * `form_submission` - Sends the [form_submission](#form_submission) event + * * `site_publish` - Sends a [site_publish](#site_publish) event + * * `page_created` - Send the [page_created](#page_created) event + * * `page_metadata_updated` - Sends the [page_metadata_updated](#page_metadata_updated) event + * * `page_deleted` - Sends the [page_deleted](#page_deleted) event + * * `ecomm_new_order` - Sends the new [ecomm_new_order](#ecomm_new_order) event + * * `ecomm_order_changed` - Sends the [ecomm_order_changed](#ecomm_order_changed) event + * * `ecomm_inventory_changed` - Sends the [ecomm_inventory_changed](#ecomm_inventory_changed) event + * * `user_account_added` - Sends the [user_account_added](#user_account_added) event + * * `user_account_updated` - Sends the [user_account_updated](#user_account_updated) event + * * `user_account_deleted` - Sends the [user_account_deleted](#user_account_deleted) event + * * `collection_item_created` - Sends the [collection_item_created](#collection_item_created) event + * * `collection_item_changed` - Sends the [collection_item_changed](#collection_item_changed) event + * * `collection_item_deleted` - Sends the [collection_item_deleted](#collection_item_deleted) event + * * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event */ export type TriggerType = | "form_submission" diff --git a/src/api/types/UserAccessGroupsItem.ts b/src/api/types/UserAccessGroupsItem.ts index 80ae6d9f..637d39f3 100644 --- a/src/api/types/UserAccessGroupsItem.ts +++ b/src/api/types/UserAccessGroupsItem.ts @@ -12,9 +12,8 @@ export interface UserAccessGroupsItem { slug?: string; /** * The type of access group based on how it was assigned to the user. - * - * - `admin` - Assigned to the user via API or in the designer - * - `ecommerce` - Assigned to the user via an ecommerce purchase + * * `admin` - Assigned to the user via API or in the designer + * * `ecommerce` - Assigned to the user via an ecommerce purchase */ type?: Webflow.UserAccessGroupsItemType; } diff --git a/src/api/types/UserAccessGroupsItemType.ts b/src/api/types/UserAccessGroupsItemType.ts index 0057bea9..aa4eda82 100644 --- a/src/api/types/UserAccessGroupsItemType.ts +++ b/src/api/types/UserAccessGroupsItemType.ts @@ -4,9 +4,8 @@ /** * The type of access group based on how it was assigned to the user. - * - * - `admin` - Assigned to the user via API or in the designer - * - `ecommerce` - Assigned to the user via an ecommerce purchase + * * `admin` - Assigned to the user via API or in the designer + * * `ecommerce` - Assigned to the user via an ecommerce purchase */ export type UserAccessGroupsItemType = "admin" | "ecommerce"; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index cd6788c7..7e2d33ff 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,9 +1,8 @@ -export * from "./BadRequestErrorBody"; export * from "./ForbiddenErrorBody"; +export * from "./BadRequestErrorBody"; export * from "./ConflictErrorBody"; export * from "./AuthorizedUser"; export * from "./ErrorCode"; -export * from "./ErrorDetailsItem"; export * from "./Error_"; export * from "./Application"; export * from "./AuthorizationAuthorizationAuthorizedTo"; @@ -14,18 +13,24 @@ export * from "./Locale"; export * from "./Locales"; export * from "./SiteDataCollectionType"; export * from "./Site"; +export * from "./InvalidScopes"; +export * from "./NotEnterprisePlanWorkspace"; export * from "./Sites"; +export * from "./NotEnterprisePlanSite"; export * from "./Domains"; export * from "./InvalidDomain"; export * from "./NoDomains"; +export * from "./Redirect"; +export * from "./Pagination"; +export * from "./Redirects"; +export * from "./SitePlanId"; +export * from "./SitePlanName"; +export * from "./SitePlan"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; export * from "./SiteActivityLogItemUser"; export * from "./SiteActivityLogItem"; -export * from "./Pagination"; export * from "./SiteActivityLogResponse"; -export * from "./InvalidScopes"; -export * from "./NotEnterprisePlanSite"; export * from "./CollectionListArrayItem"; export * from "./CollectionList"; export * from "./FieldType"; @@ -48,11 +53,23 @@ export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; export * from "./PageList"; +export * from "./TextNodeText"; export * from "./TextNode"; +export * from "./ImageNodeImage"; export * from "./ImageNode"; -export * from "./NodeType"; +export * from "./Text"; +export * from "./ComponentPropertyType"; +export * from "./ComponentProperty"; +export * from "./ComponentNode"; export * from "./Node"; export * from "./Dom"; +export * from "./TextNodeWrite"; +export * from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; +export * from "./ComponentInstanceNodePropertyOverridesWrite"; +export * from "./Component"; +export * from "./ComponentList"; +export * from "./ComponentDom"; +export * from "./ComponentProperties"; export * from "./ScriptApplyLocation"; export * from "./ScriptApply"; export * from "./ScriptApplyList"; diff --git a/src/serialization/resources/components/client/index.ts b/src/serialization/resources/components/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/serialization/resources/components/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/components/client/requests/ComponentDomWrite.ts b/src/serialization/resources/components/client/requests/ComponentDomWrite.ts new file mode 100644 index 00000000..efcca33f --- /dev/null +++ b/src/serialization/resources/components/client/requests/ComponentDomWrite.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ComponentDomWriteNodesItem } from "../../types/ComponentDomWriteNodesItem"; + +export const ComponentDomWrite: core.serialization.Schema< + serializers.ComponentDomWrite.Raw, + Omit +> = core.serialization.object({ + nodes: core.serialization.list(ComponentDomWriteNodesItem), +}); + +export declare namespace ComponentDomWrite { + interface Raw { + nodes: ComponentDomWriteNodesItem.Raw[]; + } +} diff --git a/src/serialization/resources/components/client/requests/ComponentPropertiesWrite.ts b/src/serialization/resources/components/client/requests/ComponentPropertiesWrite.ts new file mode 100644 index 00000000..0b5ace7a --- /dev/null +++ b/src/serialization/resources/components/client/requests/ComponentPropertiesWrite.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ComponentPropertiesWritePropertiesItem } from "../../types/ComponentPropertiesWritePropertiesItem"; + +export const ComponentPropertiesWrite: core.serialization.Schema< + serializers.ComponentPropertiesWrite.Raw, + Omit +> = core.serialization.object({ + properties: core.serialization.list(ComponentPropertiesWritePropertiesItem), +}); + +export declare namespace ComponentPropertiesWrite { + interface Raw { + properties: ComponentPropertiesWritePropertiesItem.Raw[]; + } +} diff --git a/src/serialization/resources/components/client/requests/index.ts b/src/serialization/resources/components/client/requests/index.ts new file mode 100644 index 00000000..ce5a0aaf --- /dev/null +++ b/src/serialization/resources/components/client/requests/index.ts @@ -0,0 +1,2 @@ +export { ComponentDomWrite } from "./ComponentDomWrite"; +export { ComponentPropertiesWrite } from "./ComponentPropertiesWrite"; diff --git a/src/serialization/resources/components/index.ts b/src/serialization/resources/components/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/serialization/resources/components/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts b/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts new file mode 100644 index 00000000..5aaf2383 --- /dev/null +++ b/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import { TextNodeWrite } from "../../../types/TextNodeWrite"; +import { ComponentInstanceNodePropertyOverridesWrite } from "../../../types/ComponentInstanceNodePropertyOverridesWrite"; + +export const ComponentDomWriteNodesItem: core.serialization.Schema< + serializers.ComponentDomWriteNodesItem.Raw, + Webflow.ComponentDomWriteNodesItem +> = core.serialization.undiscriminatedUnion([TextNodeWrite, ComponentInstanceNodePropertyOverridesWrite]); + +export declare namespace ComponentDomWriteNodesItem { + type Raw = TextNodeWrite.Raw | ComponentInstanceNodePropertyOverridesWrite.Raw; +} diff --git a/src/serialization/resources/pages/types/DomWriteNodesItem.ts b/src/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.ts similarity index 50% rename from src/serialization/resources/pages/types/DomWriteNodesItem.ts rename to src/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.ts index 507c8108..cc1b20e8 100644 --- a/src/serialization/resources/pages/types/DomWriteNodesItem.ts +++ b/src/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.ts @@ -6,17 +6,17 @@ import * as serializers from "../../../index"; import * as Webflow from "../../../../api/index"; import * as core from "../../../../core"; -export const DomWriteNodesItem: core.serialization.ObjectSchema< - serializers.DomWriteNodesItem.Raw, - Webflow.DomWriteNodesItem +export const ComponentPropertiesWritePropertiesItem: core.serialization.ObjectSchema< + serializers.ComponentPropertiesWritePropertiesItem.Raw, + Webflow.ComponentPropertiesWritePropertiesItem > = core.serialization.object({ - nodeId: core.serialization.string(), + propertyId: core.serialization.string(), text: core.serialization.string(), }); -export declare namespace DomWriteNodesItem { +export declare namespace ComponentPropertiesWritePropertiesItem { interface Raw { - nodeId: string; + propertyId: string; text: string; } } diff --git a/src/serialization/resources/components/types/ComponentsUpdateContentResponse.ts b/src/serialization/resources/components/types/ComponentsUpdateContentResponse.ts new file mode 100644 index 00000000..418f1082 --- /dev/null +++ b/src/serialization/resources/components/types/ComponentsUpdateContentResponse.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; + +export const ComponentsUpdateContentResponse: core.serialization.ObjectSchema< + serializers.ComponentsUpdateContentResponse.Raw, + Webflow.ComponentsUpdateContentResponse +> = core.serialization.object({ + errors: core.serialization.list(core.serialization.string()), +}); + +export declare namespace ComponentsUpdateContentResponse { + interface Raw { + errors: string[]; + } +} diff --git a/src/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.ts b/src/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.ts new file mode 100644 index 00000000..2d25e7d7 --- /dev/null +++ b/src/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; + +export const ComponentsUpdatePropertiesResponse: core.serialization.ObjectSchema< + serializers.ComponentsUpdatePropertiesResponse.Raw, + Webflow.ComponentsUpdatePropertiesResponse +> = core.serialization.object({ + errors: core.serialization.list(core.serialization.string()), +}); + +export declare namespace ComponentsUpdatePropertiesResponse { + interface Raw { + errors: string[]; + } +} diff --git a/src/serialization/resources/components/types/index.ts b/src/serialization/resources/components/types/index.ts new file mode 100644 index 00000000..1bdf297c --- /dev/null +++ b/src/serialization/resources/components/types/index.ts @@ -0,0 +1,4 @@ +export * from "./ComponentDomWriteNodesItem"; +export * from "./ComponentsUpdateContentResponse"; +export * from "./ComponentPropertiesWritePropertiesItem"; +export * from "./ComponentsUpdatePropertiesResponse"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 54a413ab..daa4176c 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -2,6 +2,8 @@ export * as sites from "./sites"; export * from "./sites/types"; export * as pages from "./pages"; export * from "./pages/types"; +export * as components from "./components"; +export * from "./components/types"; export * as users from "./users"; export * from "./users/types"; export * as accessGroups from "./accessGroups"; @@ -16,6 +18,7 @@ export * as collections from "./collections"; export * from "./sites/client/requests"; export * from "./collections/client/requests"; export * from "./pages/client/requests"; +export * from "./components/client/requests"; export * as scripts from "./scripts"; export * from "./scripts/client/requests"; export * as assets from "./assets"; diff --git a/src/serialization/resources/pages/client/requests/DomWrite.ts b/src/serialization/resources/pages/client/requests/DomWrite.ts deleted file mode 100644 index 7ec432f7..00000000 --- a/src/serialization/resources/pages/client/requests/DomWrite.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../index"; -import * as Webflow from "../../../../../api/index"; -import * as core from "../../../../../core"; -import { DomWriteNodesItem } from "../../types/DomWriteNodesItem"; - -export const DomWrite: core.serialization.Schema< - serializers.DomWrite.Raw, - Omit -> = core.serialization.object({ - nodes: core.serialization.list(DomWriteNodesItem), -}); - -export declare namespace DomWrite { - interface Raw { - nodes: DomWriteNodesItem.Raw[]; - } -} diff --git a/src/serialization/resources/pages/client/requests/PageDomWrite.ts b/src/serialization/resources/pages/client/requests/PageDomWrite.ts new file mode 100644 index 00000000..6d1e1b76 --- /dev/null +++ b/src/serialization/resources/pages/client/requests/PageDomWrite.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { PageDomWriteNodesItem } from "../../types/PageDomWriteNodesItem"; + +export const PageDomWrite: core.serialization.Schema< + serializers.PageDomWrite.Raw, + Omit +> = core.serialization.object({ + nodes: core.serialization.list(PageDomWriteNodesItem), +}); + +export declare namespace PageDomWrite { + interface Raw { + nodes: PageDomWriteNodesItem.Raw[]; + } +} diff --git a/src/serialization/resources/pages/client/requests/index.ts b/src/serialization/resources/pages/client/requests/index.ts index a4b8aef6..ce50f647 100644 --- a/src/serialization/resources/pages/client/requests/index.ts +++ b/src/serialization/resources/pages/client/requests/index.ts @@ -1 +1 @@ -export { DomWrite } from "./DomWrite"; +export { PageDomWrite } from "./PageDomWrite"; diff --git a/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts b/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts new file mode 100644 index 00000000..4d32f518 --- /dev/null +++ b/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import { TextNodeWrite } from "../../../types/TextNodeWrite"; +import { ComponentInstanceNodePropertyOverridesWrite } from "../../../types/ComponentInstanceNodePropertyOverridesWrite"; + +export const PageDomWriteNodesItem: core.serialization.Schema< + serializers.PageDomWriteNodesItem.Raw, + Webflow.PageDomWriteNodesItem +> = core.serialization.undiscriminatedUnion([TextNodeWrite, ComponentInstanceNodePropertyOverridesWrite]); + +export declare namespace PageDomWriteNodesItem { + type Raw = TextNodeWrite.Raw | ComponentInstanceNodePropertyOverridesWrite.Raw; +} diff --git a/src/serialization/resources/pages/types/index.ts b/src/serialization/resources/pages/types/index.ts index 943c3715..b9ce1b58 100644 --- a/src/serialization/resources/pages/types/index.ts +++ b/src/serialization/resources/pages/types/index.ts @@ -1,2 +1,2 @@ -export * from "./DomWriteNodesItem"; +export * from "./PageDomWriteNodesItem"; export * from "./UpdateStaticContentResponse"; diff --git a/src/serialization/resources/sites/client/requests/SitesCreateRequest.ts b/src/serialization/resources/sites/client/requests/SitesCreateRequest.ts new file mode 100644 index 00000000..83339694 --- /dev/null +++ b/src/serialization/resources/sites/client/requests/SitesCreateRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; + +export const SitesCreateRequest: core.serialization.Schema< + serializers.SitesCreateRequest.Raw, + Webflow.SitesCreateRequest +> = core.serialization.object({ + name: core.serialization.string(), + templateName: core.serialization.string().optional(), + parentFolderId: core.serialization.string().optional(), +}); + +export declare namespace SitesCreateRequest { + interface Raw { + name: string; + templateName?: string | null; + parentFolderId?: string | null; + } +} diff --git a/src/serialization/resources/sites/client/requests/SitesUpdateRequest.ts b/src/serialization/resources/sites/client/requests/SitesUpdateRequest.ts new file mode 100644 index 00000000..5b3291a3 --- /dev/null +++ b/src/serialization/resources/sites/client/requests/SitesUpdateRequest.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; + +export const SitesUpdateRequest: core.serialization.Schema< + serializers.SitesUpdateRequest.Raw, + Webflow.SitesUpdateRequest +> = core.serialization.object({ + name: core.serialization.string().optional(), + parentFolderId: core.serialization.string().optional(), +}); + +export declare namespace SitesUpdateRequest { + interface Raw { + name?: string | null; + parentFolderId?: string | null; + } +} diff --git a/src/serialization/resources/sites/client/requests/index.ts b/src/serialization/resources/sites/client/requests/index.ts index dddc2657..1a807906 100644 --- a/src/serialization/resources/sites/client/requests/index.ts +++ b/src/serialization/resources/sites/client/requests/index.ts @@ -1 +1,3 @@ +export { SitesCreateRequest } from "./SitesCreateRequest"; +export { SitesUpdateRequest } from "./SitesUpdateRequest"; export { SitesPublishRequest } from "./SitesPublishRequest"; diff --git a/src/serialization/types/Component.ts b/src/serialization/types/Component.ts new file mode 100644 index 00000000..2f2366aa --- /dev/null +++ b/src/serialization/types/Component.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const Component: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + name: core.serialization.string().optional(), + group: core.serialization.string().optional(), + description: core.serialization.string().optional(), + readonly: core.serialization.boolean().optional(), + }); + +export declare namespace Component { + interface Raw { + id: string; + name?: string | null; + group?: string | null; + description?: string | null; + readonly?: boolean | null; + } +} diff --git a/src/serialization/types/ComponentDom.ts b/src/serialization/types/ComponentDom.ts new file mode 100644 index 00000000..80a30810 --- /dev/null +++ b/src/serialization/types/ComponentDom.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { Node } from "./Node"; +import { Pagination } from "./Pagination"; + +export const ComponentDom: core.serialization.ObjectSchema = + core.serialization.object({ + componentId: core.serialization.string().optional(), + nodes: core.serialization.list(Node).optional(), + pagination: Pagination.optional(), + }); + +export declare namespace ComponentDom { + interface Raw { + componentId?: string | null; + nodes?: Node.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/ComponentInstanceNodePropertyOverridesWrite.ts b/src/serialization/types/ComponentInstanceNodePropertyOverridesWrite.ts new file mode 100644 index 00000000..d87995d2 --- /dev/null +++ b/src/serialization/types/ComponentInstanceNodePropertyOverridesWrite.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem } from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; + +export const ComponentInstanceNodePropertyOverridesWrite: core.serialization.ObjectSchema< + serializers.ComponentInstanceNodePropertyOverridesWrite.Raw, + Webflow.ComponentInstanceNodePropertyOverridesWrite +> = core.serialization.object({ + nodeId: core.serialization.string(), + propertyOverrides: core.serialization.list(ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem), +}); + +export declare namespace ComponentInstanceNodePropertyOverridesWrite { + interface Raw { + nodeId: string; + propertyOverrides: ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.Raw[]; + } +} diff --git a/src/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts b/src/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts new file mode 100644 index 00000000..0648f7db --- /dev/null +++ b/src/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem: core.serialization.ObjectSchema< + serializers.ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.Raw, + Webflow.ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem +> = core.serialization.object({ + propertyId: core.serialization.string(), + text: core.serialization.string(), +}); + +export declare namespace ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem { + interface Raw { + propertyId: string; + text: string; + } +} diff --git a/src/serialization/types/ComponentList.ts b/src/serialization/types/ComponentList.ts new file mode 100644 index 00000000..54f963af --- /dev/null +++ b/src/serialization/types/ComponentList.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { Component } from "./Component"; +import { Pagination } from "./Pagination"; + +export const ComponentList: core.serialization.ObjectSchema = + core.serialization.object({ + components: core.serialization.list(Component).optional(), + pagination: Pagination.optional(), + }); + +export declare namespace ComponentList { + interface Raw { + components?: Component.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/ComponentNode.ts b/src/serialization/types/ComponentNode.ts new file mode 100644 index 00000000..4118e39d --- /dev/null +++ b/src/serialization/types/ComponentNode.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentProperty } from "./ComponentProperty"; + +export const ComponentNode: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + componentId: core.serialization.string().optional(), + propertyOverrides: core.serialization.list(ComponentProperty).optional(), + }); + +export declare namespace ComponentNode { + interface Raw { + id?: string | null; + componentId?: string | null; + propertyOverrides?: ComponentProperty.Raw[] | null; + } +} diff --git a/src/serialization/types/ComponentProperties.ts b/src/serialization/types/ComponentProperties.ts new file mode 100644 index 00000000..f347c485 --- /dev/null +++ b/src/serialization/types/ComponentProperties.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentProperty } from "./ComponentProperty"; +import { Pagination } from "./Pagination"; + +export const ComponentProperties: core.serialization.ObjectSchema< + serializers.ComponentProperties.Raw, + Webflow.ComponentProperties +> = core.serialization.object({ + componentId: core.serialization.string().optional(), + properties: core.serialization.list(ComponentProperty).optional(), + pagination: Pagination.optional(), +}); + +export declare namespace ComponentProperties { + interface Raw { + componentId?: string | null; + properties?: ComponentProperty.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/ComponentProperty.ts b/src/serialization/types/ComponentProperty.ts new file mode 100644 index 00000000..2955104c --- /dev/null +++ b/src/serialization/types/ComponentProperty.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentPropertyType } from "./ComponentPropertyType"; +import { Text } from "./Text"; + +export const ComponentProperty: core.serialization.ObjectSchema< + serializers.ComponentProperty.Raw, + Webflow.ComponentProperty +> = core.serialization.object({ + propertyId: core.serialization.string().optional(), + type: ComponentPropertyType.optional(), + label: core.serialization.string().optional(), + text: Text.optional(), +}); + +export declare namespace ComponentProperty { + interface Raw { + propertyId?: string | null; + type?: ComponentPropertyType.Raw | null; + label?: string | null; + text?: Text.Raw | null; + } +} diff --git a/src/serialization/types/ComponentPropertyType.ts b/src/serialization/types/ComponentPropertyType.ts new file mode 100644 index 00000000..5ace7091 --- /dev/null +++ b/src/serialization/types/ComponentPropertyType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const ComponentPropertyType: core.serialization.Schema< + serializers.ComponentPropertyType.Raw, + Webflow.ComponentPropertyType +> = core.serialization.enum_(["Plain Text", "Rich Text", "Alt Text"]); + +export declare namespace ComponentPropertyType { + type Raw = "Plain Text" | "Rich Text" | "Alt Text"; +} diff --git a/src/serialization/types/ErrorDetailsItem.ts b/src/serialization/types/ErrorDetailsItem.ts deleted file mode 100644 index fbe2f0fa..00000000 --- a/src/serialization/types/ErrorDetailsItem.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as Webflow from "../../api/index"; -import * as core from "../../core"; - -export const ErrorDetailsItem: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.record(core.serialization.string(), core.serialization.unknown()), - ]); - -export declare namespace ErrorDetailsItem { - type Raw = string | Record; -} diff --git a/src/serialization/types/Error_.ts b/src/serialization/types/Error_.ts index 604d9399..a07108ba 100644 --- a/src/serialization/types/Error_.ts +++ b/src/serialization/types/Error_.ts @@ -6,14 +6,13 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; import { ErrorCode } from "./ErrorCode"; -import { ErrorDetailsItem } from "./ErrorDetailsItem"; export const Error_: core.serialization.ObjectSchema = core.serialization.object({ code: ErrorCode.optional(), message: core.serialization.string().optional(), externalReference: core.serialization.string().optional(), - details: core.serialization.list(ErrorDetailsItem).optional(), + details: core.serialization.list(core.serialization.unknown()).optional(), }); export declare namespace Error_ { @@ -21,6 +20,6 @@ export declare namespace Error_ { code?: ErrorCode.Raw | null; message?: string | null; externalReference?: string | null; - details?: ErrorDetailsItem.Raw[] | null; + details?: unknown[] | null; } } diff --git a/src/serialization/types/ImageNode.ts b/src/serialization/types/ImageNode.ts index 0f059779..b83e26f9 100644 --- a/src/serialization/types/ImageNode.ts +++ b/src/serialization/types/ImageNode.ts @@ -5,16 +5,19 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; +import { ImageNodeImage } from "./ImageNodeImage"; export const ImageNode: core.serialization.ObjectSchema = core.serialization.object({ - alt: core.serialization.string().optional(), - assetId: core.serialization.string().optional(), + id: core.serialization.string().optional(), + image: ImageNodeImage.optional(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace ImageNode { interface Raw { - alt?: string | null; - assetId?: string | null; + id?: string | null; + image?: ImageNodeImage.Raw | null; + attributes?: Record | null; } } diff --git a/src/serialization/types/ImageNodeImage.ts b/src/serialization/types/ImageNodeImage.ts new file mode 100644 index 00000000..05cd07c2 --- /dev/null +++ b/src/serialization/types/ImageNodeImage.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const ImageNodeImage: core.serialization.ObjectSchema = + core.serialization.object({ + alt: core.serialization.string().optional(), + assetId: core.serialization.string().optional(), + }); + +export declare namespace ImageNodeImage { + interface Raw { + alt?: string | null; + assetId?: string | null; + } +} diff --git a/src/serialization/types/Node.ts b/src/serialization/types/Node.ts index 49a8f26b..311ff02b 100644 --- a/src/serialization/types/Node.ts +++ b/src/serialization/types/Node.ts @@ -5,24 +5,33 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; -import { NodeType } from "./NodeType"; import { TextNode } from "./TextNode"; import { ImageNode } from "./ImageNode"; +import { ComponentNode } from "./ComponentNode"; -export const Node: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - type: NodeType.optional(), - text: TextNode.optional(), - image: ImageNode.optional(), - attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), -}); +export const Node: core.serialization.Schema = core.serialization + .union("type", { + text: TextNode, + image: ImageNode, + "component-instance": ComponentNode, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); export declare namespace Node { - interface Raw { - id?: string | null; - type?: NodeType.Raw | null; - text?: TextNode.Raw | null; - image?: ImageNode.Raw | null; - attributes?: Record | null; + type Raw = Node.Text | Node.Image | Node.ComponentInstance; + + interface Text extends TextNode.Raw { + type: "text"; + } + + interface Image extends ImageNode.Raw { + type: "image"; + } + + interface ComponentInstance extends ComponentNode.Raw { + type: "component-instance"; } } diff --git a/src/serialization/types/NodeType.ts b/src/serialization/types/NodeType.ts deleted file mode 100644 index e3e70f16..00000000 --- a/src/serialization/types/NodeType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as Webflow from "../../api/index"; -import * as core from "../../core"; - -export const NodeType: core.serialization.Schema = core.serialization.enum_( - ["text", "image"] -); - -export declare namespace NodeType { - type Raw = "text" | "image"; -} diff --git a/src/serialization/types/NotEnterprisePlanWorkspace.ts b/src/serialization/types/NotEnterprisePlanWorkspace.ts new file mode 100644 index 00000000..23ba9a43 --- /dev/null +++ b/src/serialization/types/NotEnterprisePlanWorkspace.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const NotEnterprisePlanWorkspace: core.serialization.Schema< + serializers.NotEnterprisePlanWorkspace.Raw, + Webflow.NotEnterprisePlanWorkspace +> = core.serialization.unknown(); + +export declare namespace NotEnterprisePlanWorkspace { + type Raw = unknown; +} diff --git a/src/serialization/types/Redirect.ts b/src/serialization/types/Redirect.ts new file mode 100644 index 00000000..1f7e72cf --- /dev/null +++ b/src/serialization/types/Redirect.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const Redirect: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + fromUrl: core.serialization.string().optional(), + toUrl: core.serialization.string().optional(), + }); + +export declare namespace Redirect { + interface Raw { + id?: string | null; + fromUrl?: string | null; + toUrl?: string | null; + } +} diff --git a/src/serialization/types/Redirects.ts b/src/serialization/types/Redirects.ts new file mode 100644 index 00000000..b8481248 --- /dev/null +++ b/src/serialization/types/Redirects.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { Redirect } from "./Redirect"; +import { Pagination } from "./Pagination"; + +export const Redirects: core.serialization.ObjectSchema = + core.serialization.object({ + redirects: core.serialization.list(Redirect).optional(), + pagination: Pagination.optional(), + }); + +export declare namespace Redirects { + interface Raw { + redirects?: Redirect.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/SitePlan.ts b/src/serialization/types/SitePlan.ts new file mode 100644 index 00000000..37dca864 --- /dev/null +++ b/src/serialization/types/SitePlan.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { SitePlanId } from "./SitePlanId"; +import { SitePlanName } from "./SitePlanName"; + +export const SitePlan: core.serialization.ObjectSchema = + core.serialization.object({ + id: SitePlanId.optional(), + name: SitePlanName.optional(), + pricingInfo: core.serialization.string().optional(), + }); + +export declare namespace SitePlan { + interface Raw { + id?: SitePlanId.Raw | null; + name?: SitePlanName.Raw | null; + pricingInfo?: string | null; + } +} diff --git a/src/serialization/types/SitePlanId.ts b/src/serialization/types/SitePlanId.ts new file mode 100644 index 00000000..f6c32dd5 --- /dev/null +++ b/src/serialization/types/SitePlanId.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SitePlanId: core.serialization.Schema = + core.serialization.enum_([ + "hosting-basic-v3", + "hosting-cms-v3", + "hosting-business-v3", + "hosting-ecommerce-standard-v2", + "hosting-ecommerce-plus-v2", + "hosting-ecommerce-advanced-v2", + "hosting-basic-v4", + "hosting-cms-v4", + "hosting-business-v4", + "hosting-ecommerce-standard-v3", + "hosting-ecommerce-plus-v3", + "hosting-ecommerce-advanced-v3", + ]); + +export declare namespace SitePlanId { + type Raw = + | "hosting-basic-v3" + | "hosting-cms-v3" + | "hosting-business-v3" + | "hosting-ecommerce-standard-v2" + | "hosting-ecommerce-plus-v2" + | "hosting-ecommerce-advanced-v2" + | "hosting-basic-v4" + | "hosting-cms-v4" + | "hosting-business-v4" + | "hosting-ecommerce-standard-v3" + | "hosting-ecommerce-plus-v3" + | "hosting-ecommerce-advanced-v3"; +} diff --git a/src/serialization/types/SitePlanName.ts b/src/serialization/types/SitePlanName.ts new file mode 100644 index 00000000..870550ad --- /dev/null +++ b/src/serialization/types/SitePlanName.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SitePlanName: core.serialization.Schema = + core.serialization.enum_([ + "Basic Hosting", + "CMS Hosting", + "Business Hosting", + "ECommerce Standard Hosting", + "ECommerce Plus Hosting", + "ECommerce Advanced Hosting", + ]); + +export declare namespace SitePlanName { + type Raw = + | "Basic Hosting" + | "CMS Hosting" + | "Business Hosting" + | "ECommerce Standard Hosting" + | "ECommerce Plus Hosting" + | "ECommerce Advanced Hosting"; +} diff --git a/src/serialization/types/Text.ts b/src/serialization/types/Text.ts new file mode 100644 index 00000000..df4ffe6b --- /dev/null +++ b/src/serialization/types/Text.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const Text: core.serialization.ObjectSchema = core.serialization.object({ + html: core.serialization.string().optional(), + text: core.serialization.string().optional(), +}); + +export declare namespace Text { + interface Raw { + html?: string | null; + text?: string | null; + } +} diff --git a/src/serialization/types/TextNode.ts b/src/serialization/types/TextNode.ts index abf03e06..b97e6956 100644 --- a/src/serialization/types/TextNode.ts +++ b/src/serialization/types/TextNode.ts @@ -5,16 +5,19 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; +import { TextNodeText } from "./TextNodeText"; export const TextNode: core.serialization.ObjectSchema = core.serialization.object({ - html: core.serialization.string().optional(), - text: core.serialization.string().optional(), + id: core.serialization.string().optional(), + text: TextNodeText.optional(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace TextNode { interface Raw { - html?: string | null; - text?: string | null; + id?: string | null; + text?: TextNodeText.Raw | null; + attributes?: Record | null; } } diff --git a/src/serialization/types/TextNodeText.ts b/src/serialization/types/TextNodeText.ts new file mode 100644 index 00000000..d83f5aae --- /dev/null +++ b/src/serialization/types/TextNodeText.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const TextNodeText: core.serialization.ObjectSchema = + core.serialization.object({ + html: core.serialization.string().optional(), + text: core.serialization.string().optional(), + }); + +export declare namespace TextNodeText { + interface Raw { + html?: string | null; + text?: string | null; + } +} diff --git a/src/serialization/types/TextNodeWrite.ts b/src/serialization/types/TextNodeWrite.ts new file mode 100644 index 00000000..2c961026 --- /dev/null +++ b/src/serialization/types/TextNodeWrite.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const TextNodeWrite: core.serialization.ObjectSchema = + core.serialization.object({ + nodeId: core.serialization.string(), + text: core.serialization.string(), + }); + +export declare namespace TextNodeWrite { + interface Raw { + nodeId: string; + text: string; + } +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index cd6788c7..7e2d33ff 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -1,9 +1,8 @@ -export * from "./BadRequestErrorBody"; export * from "./ForbiddenErrorBody"; +export * from "./BadRequestErrorBody"; export * from "./ConflictErrorBody"; export * from "./AuthorizedUser"; export * from "./ErrorCode"; -export * from "./ErrorDetailsItem"; export * from "./Error_"; export * from "./Application"; export * from "./AuthorizationAuthorizationAuthorizedTo"; @@ -14,18 +13,24 @@ export * from "./Locale"; export * from "./Locales"; export * from "./SiteDataCollectionType"; export * from "./Site"; +export * from "./InvalidScopes"; +export * from "./NotEnterprisePlanWorkspace"; export * from "./Sites"; +export * from "./NotEnterprisePlanSite"; export * from "./Domains"; export * from "./InvalidDomain"; export * from "./NoDomains"; +export * from "./Redirect"; +export * from "./Pagination"; +export * from "./Redirects"; +export * from "./SitePlanId"; +export * from "./SitePlanName"; +export * from "./SitePlan"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; export * from "./SiteActivityLogItemUser"; export * from "./SiteActivityLogItem"; -export * from "./Pagination"; export * from "./SiteActivityLogResponse"; -export * from "./InvalidScopes"; -export * from "./NotEnterprisePlanSite"; export * from "./CollectionListArrayItem"; export * from "./CollectionList"; export * from "./FieldType"; @@ -48,11 +53,23 @@ export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; export * from "./PageList"; +export * from "./TextNodeText"; export * from "./TextNode"; +export * from "./ImageNodeImage"; export * from "./ImageNode"; -export * from "./NodeType"; +export * from "./Text"; +export * from "./ComponentPropertyType"; +export * from "./ComponentProperty"; +export * from "./ComponentNode"; export * from "./Node"; export * from "./Dom"; +export * from "./TextNodeWrite"; +export * from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; +export * from "./ComponentInstanceNodePropertyOverridesWrite"; +export * from "./Component"; +export * from "./ComponentList"; +export * from "./ComponentDom"; +export * from "./ComponentProperties"; export * from "./ScriptApplyLocation"; export * from "./ScriptApply"; export * from "./ScriptApplyList"; diff --git a/yarn.lock b/yarn.lock index 525154e7..96cbaff1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -513,7 +513,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -642,7 +642,7 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -877,11 +877,25 @@ agent-base@6: dependencies: debug "4" +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== +ajv-keywords@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -892,6 +906,16 @@ ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.0, ajv@^8.9.0: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -1025,13 +1049,13 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0: - version "4.24.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" - integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== + version "4.24.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.3.tgz#5fc2725ca8fb3c1432e13dac278c7cc103e026d2" + integrity sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA== dependencies: - caniuse-lite "^1.0.30001669" - electron-to-chromium "^1.5.41" - node-releases "^2.0.18" + caniuse-lite "^1.0.30001688" + electron-to-chromium "^1.5.73" + node-releases "^2.0.19" update-browserslist-db "^1.1.1" bs-logger@0.x: @@ -1061,7 +1085,7 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: +call-bind-apply-helpers@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== @@ -1069,23 +1093,13 @@ call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: es-errors "^1.3.0" function-bind "^1.1.2" -call-bind@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" - integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== - dependencies: - call-bind-apply-helpers "^1.0.0" - es-define-property "^1.0.0" - get-intrinsic "^1.2.4" - set-function-length "^1.2.2" - call-bound@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.2.tgz#9dbd4daf9f5f753bec3e4c8fbb8a2ecc4de6c39b" - integrity sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== dependencies: - call-bind "^1.0.8" - get-intrinsic "^1.2.5" + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" callsites@^3.0.0: version "3.1.0" @@ -1102,10 +1116,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001669: - version "1.0.30001688" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz#f9d3ede749f083ce0db4c13db9d828adaf2e8d0a" - integrity sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA== +caniuse-lite@^1.0.30001688: + version "1.0.30001690" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz#f2d15e3aaf8e18f76b2b8c1481abde063b8104c8" + integrity sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1258,15 +1272,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -1290,18 +1295,18 @@ domexception@^4.0.0: webidl-conversions "^7.0.0" dunder-proto@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.0.tgz#c2fce098b3c8f8899554905f4377b6d85dabaa80" - integrity sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A== + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== dependencies: - call-bind-apply-helpers "^1.0.0" + call-bind-apply-helpers "^1.0.1" es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.41: - version "1.5.73" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz#f32956ce40947fa3c8606726a96cd8fb5bb5f720" - integrity sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg== +electron-to-chromium@^1.5.73: + version "1.5.76" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.76.tgz#db20295c5061b68f07c8ea4dfcbd701485d94a3d" + integrity sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ== emittery@^0.13.1: version "0.13.1" @@ -1314,9 +1319,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: - version "5.17.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" - integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + version "5.18.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz#91eb1db193896b9801251eeff1c6980278b1e404" + integrity sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -1333,7 +1338,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-define-property@^1.0.0, es-define-property@^1.0.1: +es-define-property@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== @@ -1344,9 +1349,9 @@ es-errors@^1.3.0: integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-module-lexer@^1.2.1: - version "1.5.4" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" - integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== + version "1.6.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.6.0.tgz#da49f587fd9e68ee2404fe4e256c0c7d3a81be21" + integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ== es-object-atoms@^1.0.0: version "1.0.0" @@ -1452,7 +1457,7 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -1462,6 +1467,11 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-uri@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241" + integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw== + fb-watchman@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" @@ -1523,7 +1533,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.2.4, get-intrinsic@^1.2.5: +get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== @@ -1571,7 +1581,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -gopd@^1.0.1, gopd@^1.2.0: +gopd@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== @@ -1586,13 +1596,6 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - has-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" @@ -1682,10 +1685,10 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-core-module@^2.13.0: - version "2.15.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" - integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== +is-core-module@^2.16.0: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== dependencies: hasown "^2.0.2" @@ -2218,6 +2221,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -2282,9 +2290,9 @@ makeerror@1.0.12: tmpl "1.0.5" math-intrinsics@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.0.0.tgz#4e04bf87c85aa51e90d078dac2252b4eb5260817" - integrity sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== merge-stream@^2.0.0: version "2.0.0" @@ -2350,7 +2358,7 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.18: +node-releases@^2.0.19: version "2.0.19" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== @@ -2545,9 +2553,9 @@ react-is@^18.0.0: integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== readable-stream@^4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" - integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + version "4.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.6.0.tgz#ce412dfb19c04efde1c5936d99c27f37a1ff94c9" + integrity sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw== dependencies: abort-controller "^3.0.0" buffer "^6.0.3" @@ -2560,6 +2568,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -2583,11 +2596,11 @@ resolve.exports@^2.0.0: integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + version "1.22.10" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" + integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== dependencies: - is-core-module "^2.13.0" + is-core-module "^2.16.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -2613,7 +2626,7 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -schema-utils@^3.1.1, schema-utils@^3.2.0: +schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -2622,6 +2635,16 @@ schema-utils@^3.1.1, schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" +schema-utils@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0" + integrity sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -2632,25 +2655,13 @@ semver@^7.3.4, semver@^7.5.3, semver@^7.5.4: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -serialize-javascript@^6.0.1: +serialize-javascript@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" -set-function-length@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" - integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2832,17 +2843,17 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== terser-webpack-plugin@^5.3.10: - version "5.3.10" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" - integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + version "5.3.11" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz#93c21f44ca86634257cac176f884f942b7ba3832" + integrity sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ== dependencies: - "@jridgewell/trace-mapping" "^0.3.20" + "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.26.0" + schema-utils "^4.3.0" + serialize-javascript "^6.0.2" + terser "^5.31.1" -terser@^5.26.0: +terser@^5.31.1: version "5.37.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.37.0.tgz#38aa66d1cfc43d0638fab54e43ff8a4f72a21ba3" integrity sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==