webflow-api 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mock/definition/__package__.yml +363 -79
- package/.mock/definition/accessGroups.yml +1 -0
- package/.mock/definition/assets.yml +86 -47
- package/.mock/definition/collections/fields.yml +63 -46
- package/.mock/definition/collections/items.yml +58 -30
- package/.mock/definition/collections.yml +42 -7
- package/.mock/definition/components.yml +43 -50
- package/.mock/definition/ecommerce.yml +1 -0
- package/.mock/definition/forms.yml +114 -2
- package/.mock/definition/inventory.yml +2 -0
- package/.mock/definition/orders.yml +6 -68
- package/.mock/definition/pages/scripts.yml +10 -44
- package/.mock/definition/pages.yml +36 -41
- package/.mock/definition/products.yml +9 -0
- package/.mock/definition/scripts.yml +18 -49
- package/.mock/definition/sites/activityLogs.yml +10 -7
- package/.mock/definition/sites/plans.yml +7 -1
- package/.mock/definition/sites/redirects.yml +24 -1
- package/.mock/definition/sites/robotsTxt.yml +202 -0
- package/.mock/definition/sites/scripts.yml +22 -30
- package/.mock/definition/sites.yml +27 -30
- package/.mock/definition/token.yml +2 -0
- package/.mock/definition/users.yml +4 -0
- package/.mock/definition/webhooks.yml +7 -8
- package/.mock/fern.config.json +1 -1
- package/api/resources/accessGroups/client/Client.js +1 -1
- package/api/resources/assets/client/Client.d.ts +10 -7
- package/api/resources/assets/client/Client.js +18 -15
- package/api/resources/collections/client/Client.d.ts +21 -1
- package/api/resources/collections/client/Client.js +27 -5
- package/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +23 -1
- package/api/resources/collections/resources/fields/client/Client.d.ts +34 -4
- package/api/resources/collections/resources/fields/client/Client.js +40 -8
- package/api/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
- package/api/resources/collections/resources/fields/index.d.ts +0 -1
- package/api/resources/collections/resources/fields/index.js +0 -1
- package/api/resources/collections/resources/index.d.ts +1 -2
- package/api/resources/collections/resources/index.js +2 -3
- package/api/resources/collections/resources/items/client/Client.d.ts +19 -12
- package/api/resources/collections/resources/items/client/Client.js +39 -28
- package/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
- package/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
- package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
- package/api/resources/components/client/Client.d.ts +5 -6
- package/api/resources/components/client/Client.js +10 -11
- package/api/resources/ecommerce/client/Client.js +1 -1
- package/api/resources/forms/client/Client.d.ts +51 -0
- package/api/resources/forms/client/Client.js +226 -5
- package/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.d.ts +23 -0
- package/api/resources/forms/client/requests/index.d.ts +1 -0
- package/api/resources/inventory/client/Client.js +2 -2
- package/api/resources/orders/client/Client.js +6 -6
- package/api/resources/pages/client/Client.d.ts +8 -3
- package/api/resources/pages/client/Client.js +13 -8
- package/api/resources/pages/resources/scripts/client/Client.d.ts +6 -20
- package/api/resources/pages/resources/scripts/client/Client.js +9 -23
- package/api/resources/products/client/Client.js +6 -6
- package/api/resources/scripts/client/Client.d.ts +12 -20
- package/api/resources/scripts/client/Client.js +15 -23
- package/api/resources/sites/client/Client.d.ts +12 -3
- package/api/resources/sites/client/Client.js +25 -14
- package/api/resources/sites/resources/activityLogs/client/Client.d.ts +5 -1
- package/api/resources/sites/resources/activityLogs/client/Client.js +6 -2
- package/api/resources/sites/resources/index.d.ts +1 -0
- package/api/resources/sites/resources/index.js +2 -1
- package/api/resources/sites/resources/plans/client/Client.d.ts +2 -0
- package/api/resources/sites/resources/plans/client/Client.js +3 -1
- package/api/resources/sites/resources/redirects/client/Client.d.ts +10 -0
- package/api/resources/sites/resources/redirects/client/Client.js +14 -4
- package/api/resources/sites/resources/robotsTxt/client/Client.d.ts +124 -0
- package/api/resources/sites/resources/robotsTxt/client/Client.js +486 -0
- package/api/resources/sites/resources/robotsTxt/client/index.d.ts +1 -0
- package/api/resources/sites/resources/robotsTxt/client/index.js +2 -0
- package/api/resources/sites/resources/robotsTxt/index.d.ts +1 -0
- package/api/resources/{collections/resources/fields/types → sites/resources/robotsTxt}/index.js +1 -1
- package/api/resources/sites/resources/scripts/client/Client.d.ts +15 -13
- package/api/resources/sites/resources/scripts/client/Client.js +19 -17
- package/api/resources/token/client/Client.js +2 -2
- package/api/resources/users/client/Client.js +5 -5
- package/api/resources/users/client/requests/UsersInviteRequest.d.ts +1 -4
- package/api/resources/users/client/requests/UsersUpdateRequest.d.ts +1 -4
- package/api/resources/webhooks/client/Client.js +4 -4
- package/api/types/Asset.d.ts +4 -0
- package/api/types/AssetVariant.d.ts +3 -0
- package/api/types/Assets.d.ts +1 -0
- package/api/types/ComponentNode.d.ts +2 -2
- package/api/types/Conflict.d.ts +4 -0
- package/api/types/Dom.d.ts +2 -0
- package/api/types/FieldCreate.d.ts +8 -0
- package/api/types/FieldCreate.js +5 -0
- package/api/types/FieldType.d.ts +3 -1
- package/api/types/FieldType.js +2 -0
- package/api/types/ImageNode.d.ts +1 -0
- package/api/types/ImageNodeImage.d.ts +3 -0
- package/api/types/Metadata.d.ts +11 -0
- package/api/types/Metadata.js +5 -0
- package/api/types/MetadataOptionsItem.d.ts +12 -0
- package/api/types/MetadataOptionsItem.js +5 -0
- package/api/types/OAuthScope.d.ts +8 -0
- package/api/types/OAuthScope.js +2 -0
- package/api/types/OptionField.d.ts +19 -0
- package/api/types/OptionField.js +5 -0
- package/api/types/ReferenceField.d.ts +20 -0
- package/api/types/ReferenceField.js +5 -0
- package/api/types/ReferenceFieldMetadata.d.ts +10 -0
- package/api/types/ReferenceFieldMetadata.js +5 -0
- package/api/types/ReferenceFieldType.d.ts +11 -0
- package/api/types/ReferenceFieldType.js +10 -0
- package/api/types/Robots.d.ts +13 -0
- package/api/types/Robots.js +5 -0
- package/api/types/RobotsRulesItem.d.ts +11 -0
- package/api/types/RobotsRulesItem.js +5 -0
- package/api/types/SkuFieldData.d.ts +2 -0
- package/api/types/SkuFieldDataEcSkuBillingMethod.d.ts +3 -0
- package/api/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +3 -0
- package/api/{resources/collections/resources/fields/client/requests/FieldCreate.d.ts → types/StaticField.d.ts} +7 -12
- package/api/types/StaticField.js +5 -0
- package/api/{resources/collections/resources/fields/types/FieldCreateType.d.ts → types/StaticFieldType.d.ts} +2 -3
- package/{dist/api/resources/collections/resources/fields/types/FieldCreateType.js → api/types/StaticFieldType.js} +2 -3
- package/api/types/Text.d.ts +3 -0
- package/api/types/TextNode.d.ts +1 -0
- package/api/types/TextNodeText.d.ts +3 -0
- package/api/types/TriggerType.d.ts +1 -15
- package/api/types/WebhookList.d.ts +1 -1
- package/api/types/index.d.ts +12 -0
- package/api/types/index.js +12 -0
- package/dist/api/resources/accessGroups/client/Client.js +1 -1
- package/dist/api/resources/assets/client/Client.d.ts +10 -7
- package/dist/api/resources/assets/client/Client.js +18 -15
- package/dist/api/resources/collections/client/Client.d.ts +21 -1
- package/dist/api/resources/collections/client/Client.js +27 -5
- package/dist/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +23 -1
- package/dist/api/resources/collections/resources/fields/client/Client.d.ts +34 -4
- package/dist/api/resources/collections/resources/fields/client/Client.js +40 -8
- package/dist/api/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
- package/dist/api/resources/collections/resources/fields/index.d.ts +0 -1
- package/dist/api/resources/collections/resources/fields/index.js +0 -1
- package/dist/api/resources/collections/resources/index.d.ts +1 -2
- package/dist/api/resources/collections/resources/index.js +2 -3
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +19 -12
- package/dist/api/resources/collections/resources/items/client/Client.js +39 -28
- package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
- package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
- package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
- package/dist/api/resources/components/client/Client.d.ts +5 -6
- package/dist/api/resources/components/client/Client.js +10 -11
- package/dist/api/resources/ecommerce/client/Client.js +1 -1
- package/dist/api/resources/forms/client/Client.d.ts +51 -0
- package/dist/api/resources/forms/client/Client.js +226 -5
- package/dist/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.d.ts +23 -0
- package/dist/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.js +5 -0
- package/dist/api/resources/forms/client/requests/index.d.ts +1 -0
- package/dist/api/resources/inventory/client/Client.js +2 -2
- package/dist/api/resources/orders/client/Client.js +6 -6
- package/dist/api/resources/pages/client/Client.d.ts +8 -3
- package/dist/api/resources/pages/client/Client.js +13 -8
- package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +6 -20
- package/dist/api/resources/pages/resources/scripts/client/Client.js +9 -23
- package/dist/api/resources/products/client/Client.js +6 -6
- package/dist/api/resources/scripts/client/Client.d.ts +12 -20
- package/dist/api/resources/scripts/client/Client.js +15 -23
- package/dist/api/resources/sites/client/Client.d.ts +12 -3
- package/dist/api/resources/sites/client/Client.js +25 -14
- package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +5 -1
- package/dist/api/resources/sites/resources/activityLogs/client/Client.js +6 -2
- package/dist/api/resources/sites/resources/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/index.js +2 -1
- package/dist/api/resources/sites/resources/plans/client/Client.d.ts +2 -0
- package/dist/api/resources/sites/resources/plans/client/Client.js +3 -1
- package/dist/api/resources/sites/resources/redirects/client/Client.d.ts +10 -0
- package/dist/api/resources/sites/resources/redirects/client/Client.js +14 -4
- package/dist/api/resources/sites/resources/robotsTxt/client/Client.d.ts +124 -0
- package/dist/api/resources/sites/resources/robotsTxt/client/Client.js +486 -0
- package/dist/api/resources/sites/resources/robotsTxt/client/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/robotsTxt/client/index.js +2 -0
- package/dist/api/resources/sites/resources/robotsTxt/index.d.ts +1 -0
- package/dist/{serialization/resources/collections/resources/fields/types → api/resources/sites/resources/robotsTxt}/index.js +1 -1
- package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +15 -13
- package/dist/api/resources/sites/resources/scripts/client/Client.js +19 -17
- package/dist/api/resources/token/client/Client.js +2 -2
- package/dist/api/resources/users/client/Client.js +5 -5
- package/dist/api/resources/users/client/requests/UsersInviteRequest.d.ts +1 -4
- package/dist/api/resources/users/client/requests/UsersUpdateRequest.d.ts +1 -4
- package/dist/api/resources/webhooks/client/Client.js +4 -4
- package/dist/api/types/Asset.d.ts +4 -0
- package/dist/api/types/AssetVariant.d.ts +3 -0
- package/dist/api/types/Assets.d.ts +1 -0
- package/dist/api/types/ComponentNode.d.ts +2 -2
- package/dist/api/types/Conflict.d.ts +4 -0
- package/dist/api/types/Conflict.js +5 -0
- package/dist/api/types/Dom.d.ts +2 -0
- package/dist/api/types/FieldCreate.d.ts +8 -0
- package/dist/api/types/FieldCreate.js +5 -0
- package/dist/api/types/FieldType.d.ts +3 -1
- package/dist/api/types/FieldType.js +2 -0
- package/dist/api/types/ImageNode.d.ts +1 -0
- package/dist/api/types/ImageNodeImage.d.ts +3 -0
- package/dist/api/types/Metadata.d.ts +11 -0
- package/dist/api/types/Metadata.js +5 -0
- package/dist/api/types/MetadataOptionsItem.d.ts +12 -0
- package/dist/api/types/MetadataOptionsItem.js +5 -0
- package/dist/api/types/OAuthScope.d.ts +8 -0
- package/dist/api/types/OAuthScope.js +2 -0
- package/dist/api/types/OptionField.d.ts +19 -0
- package/dist/api/types/OptionField.js +5 -0
- package/dist/api/types/ReferenceField.d.ts +20 -0
- package/dist/api/types/ReferenceField.js +5 -0
- package/dist/api/types/ReferenceFieldMetadata.d.ts +10 -0
- package/dist/api/types/ReferenceFieldMetadata.js +5 -0
- package/dist/api/types/ReferenceFieldType.d.ts +11 -0
- package/dist/api/types/ReferenceFieldType.js +10 -0
- package/dist/api/types/Robots.d.ts +13 -0
- package/dist/api/types/Robots.js +5 -0
- package/dist/api/types/RobotsRulesItem.d.ts +11 -0
- package/dist/api/types/RobotsRulesItem.js +5 -0
- package/dist/api/types/SkuFieldData.d.ts +2 -0
- package/dist/api/types/SkuFieldDataEcSkuBillingMethod.d.ts +3 -0
- package/dist/api/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +3 -0
- package/dist/api/{resources/collections/resources/fields/client/requests/FieldCreate.d.ts → types/StaticField.d.ts} +7 -12
- package/dist/api/types/StaticField.js +5 -0
- package/dist/api/{resources/collections/resources/fields/types/FieldCreateType.d.ts → types/StaticFieldType.d.ts} +2 -3
- package/{api/resources/collections/resources/fields/types/FieldCreateType.js → dist/api/types/StaticFieldType.js} +2 -3
- package/dist/api/types/Text.d.ts +3 -0
- package/dist/api/types/TextNode.d.ts +1 -0
- package/dist/api/types/TextNodeText.d.ts +3 -0
- package/dist/api/types/TriggerType.d.ts +1 -15
- package/dist/api/types/WebhookList.d.ts +1 -1
- package/dist/api/types/index.d.ts +12 -0
- package/dist/api/types/index.js +12 -0
- package/dist/serialization/resources/collections/client/requests/CollectionsCreateRequest.d.ts +2 -0
- package/dist/serialization/resources/collections/client/requests/CollectionsCreateRequest.js +2 -0
- package/dist/serialization/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/collections/resources/fields/client/requests/index.js +1 -3
- package/dist/serialization/resources/collections/resources/fields/index.d.ts +0 -1
- package/dist/serialization/resources/collections/resources/fields/index.js +0 -1
- package/dist/serialization/resources/collections/resources/index.d.ts +1 -2
- package/dist/serialization/resources/collections/resources/index.js +2 -3
- package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
- package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +1 -1
- package/dist/serialization/types/Assets.d.ts +2 -0
- package/dist/serialization/types/Assets.js +2 -0
- package/dist/serialization/types/Conflict.d.ts +10 -0
- package/dist/serialization/types/Conflict.js +31 -0
- package/dist/serialization/types/Dom.d.ts +1 -0
- package/dist/serialization/types/Dom.js +1 -0
- package/dist/serialization/types/FieldCreate.d.ts +13 -0
- package/dist/serialization/types/FieldCreate.js +34 -0
- package/dist/serialization/types/FieldType.d.ts +1 -1
- package/dist/serialization/types/FieldType.js +2 -0
- package/dist/serialization/types/Metadata.d.ts +13 -0
- package/dist/serialization/types/Metadata.js +34 -0
- package/dist/serialization/types/MetadataOptionsItem.d.ts +13 -0
- package/dist/serialization/types/MetadataOptionsItem.js +34 -0
- package/dist/serialization/types/OptionField.d.ts +19 -0
- package/dist/serialization/types/OptionField.js +40 -0
- package/dist/serialization/types/ReferenceField.d.ts +20 -0
- package/dist/serialization/types/ReferenceField.js +41 -0
- package/dist/serialization/types/ReferenceFieldMetadata.d.ts +12 -0
- package/dist/serialization/types/ReferenceFieldMetadata.js +33 -0
- package/dist/serialization/types/ReferenceFieldType.d.ts +10 -0
- package/dist/serialization/types/ReferenceFieldType.js +31 -0
- package/dist/serialization/types/Robots.d.ts +14 -0
- package/dist/serialization/types/Robots.js +35 -0
- package/dist/serialization/types/RobotsRulesItem.d.ts +14 -0
- package/dist/serialization/types/RobotsRulesItem.js +35 -0
- package/dist/serialization/types/StaticField.d.ts +18 -0
- package/dist/serialization/{resources/collections/resources/fields/client/requests/FieldCreate.js → types/StaticField.js} +7 -5
- package/dist/serialization/types/StaticFieldType.d.ts +10 -0
- package/dist/serialization/{resources/collections/resources/fields/types/FieldCreateType.js → types/StaticFieldType.js} +3 -4
- package/dist/serialization/types/WebhookList.d.ts +2 -2
- package/dist/serialization/types/WebhookList.js +2 -2
- package/dist/serialization/types/index.d.ts +12 -0
- package/dist/serialization/types/index.js +12 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AssetsClient.d.ts +12 -0
- package/dist/wrapper/AssetsClient.js +16 -0
- package/dist/wrapper/AssetsUtilitiesClient.d.ts +49 -0
- package/dist/wrapper/AssetsUtilitiesClient.js +121 -0
- package/dist/wrapper/WebflowClient.d.ts +6 -0
- package/dist/wrapper/WebflowClient.js +10 -0
- package/dist/wrapper/WebhooksClient.d.ts +39 -0
- package/dist/wrapper/WebhooksClient.js +66 -0
- package/package.json +15 -12
- package/reference.md +585 -91
- package/serialization/resources/collections/client/requests/CollectionsCreateRequest.d.ts +2 -0
- package/serialization/resources/collections/client/requests/CollectionsCreateRequest.js +2 -0
- package/serialization/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
- package/serialization/resources/collections/resources/fields/client/requests/index.js +1 -3
- package/serialization/resources/collections/resources/fields/index.d.ts +0 -1
- package/serialization/resources/collections/resources/fields/index.js +0 -1
- package/serialization/resources/collections/resources/index.d.ts +1 -2
- package/serialization/resources/collections/resources/index.js +2 -3
- package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
- package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +1 -1
- package/serialization/types/Assets.d.ts +2 -0
- package/serialization/types/Assets.js +2 -0
- package/serialization/types/Conflict.d.ts +10 -0
- package/serialization/types/Conflict.js +31 -0
- package/serialization/types/Dom.d.ts +1 -0
- package/serialization/types/Dom.js +1 -0
- package/serialization/types/FieldCreate.d.ts +13 -0
- package/serialization/types/FieldCreate.js +34 -0
- package/serialization/types/FieldType.d.ts +1 -1
- package/serialization/types/FieldType.js +2 -0
- package/serialization/types/Metadata.d.ts +13 -0
- package/serialization/types/Metadata.js +34 -0
- package/serialization/types/MetadataOptionsItem.d.ts +13 -0
- package/serialization/types/MetadataOptionsItem.js +34 -0
- package/serialization/types/OptionField.d.ts +19 -0
- package/serialization/types/OptionField.js +40 -0
- package/serialization/types/ReferenceField.d.ts +20 -0
- package/serialization/types/ReferenceField.js +41 -0
- package/serialization/types/ReferenceFieldMetadata.d.ts +12 -0
- package/serialization/types/ReferenceFieldMetadata.js +33 -0
- package/serialization/types/ReferenceFieldType.d.ts +10 -0
- package/serialization/types/ReferenceFieldType.js +31 -0
- package/serialization/types/Robots.d.ts +14 -0
- package/serialization/types/Robots.js +35 -0
- package/serialization/types/RobotsRulesItem.d.ts +14 -0
- package/serialization/types/RobotsRulesItem.js +35 -0
- package/serialization/types/StaticField.d.ts +18 -0
- package/serialization/{resources/collections/resources/fields/client/requests/FieldCreate.js → types/StaticField.js} +7 -5
- package/serialization/types/StaticFieldType.d.ts +10 -0
- package/serialization/{resources/collections/resources/fields/types/FieldCreateType.js → types/StaticFieldType.js} +3 -4
- package/serialization/types/WebhookList.d.ts +2 -2
- package/serialization/types/WebhookList.js +2 -2
- package/serialization/types/index.d.ts +12 -0
- package/serialization/types/index.js +12 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AssetsClient.d.ts +12 -0
- package/wrapper/AssetsClient.js +16 -0
- package/wrapper/AssetsUtilitiesClient.d.ts +49 -0
- package/wrapper/AssetsUtilitiesClient.js +121 -0
- package/wrapper/WebflowClient.d.ts +6 -0
- package/wrapper/WebflowClient.js +10 -0
- package/wrapper/WebhooksClient.d.ts +39 -0
- package/wrapper/WebhooksClient.js +66 -0
- package/api/resources/collections/resources/fields/types/index.d.ts +0 -1
- package/dist/api/resources/collections/resources/fields/types/index.d.ts +0 -1
- package/dist/api/resources/collections/resources/fields/types/index.js +0 -17
- package/dist/serialization/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +0 -16
- package/dist/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +0 -10
- package/dist/serialization/resources/collections/resources/fields/types/index.d.ts +0 -1
- package/serialization/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +0 -16
- package/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +0 -10
- package/serialization/resources/collections/resources/fields/types/index.d.ts +0 -1
- package/serialization/resources/collections/resources/fields/types/index.js +0 -17
- /package/api/resources/{collections/resources/fields/client/requests/FieldCreate.js → forms/client/requests/FormsListSubmissionsBySiteRequest.js} +0 -0
- /package/{dist/api/resources/collections/resources/fields/client/requests/FieldCreate.js → api/types/Conflict.js} +0 -0
|
@@ -55,29 +55,59 @@ class Fields {
|
|
|
55
55
|
* Slugs must be all lowercase letters without spaces.
|
|
56
56
|
* If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will
|
|
57
57
|
* convert the slug to lowercase and replace spaces with "-."
|
|
58
|
-
*
|
|
59
|
-
* Only some field types can be created through the API.
|
|
60
58
|
* This endpoint does not currently support bulk creation.
|
|
61
59
|
*
|
|
62
60
|
* Required scope | `cms:write`
|
|
63
61
|
*
|
|
64
62
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
65
|
-
* @param {Webflow.
|
|
63
|
+
* @param {Webflow.FieldCreate} request
|
|
66
64
|
* @param {Fields.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
65
|
*
|
|
68
66
|
* @throws {@link Webflow.BadRequestError}
|
|
69
67
|
* @throws {@link Webflow.UnauthorizedError}
|
|
70
68
|
* @throws {@link Webflow.NotFoundError}
|
|
69
|
+
* @throws {@link Webflow.ConflictError}
|
|
71
70
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
72
71
|
* @throws {@link Webflow.InternalServerError}
|
|
73
72
|
*
|
|
74
73
|
* @example
|
|
75
74
|
* await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
|
|
75
|
+
* isEditable: true,
|
|
76
76
|
* isRequired: false,
|
|
77
77
|
* type: "RichText",
|
|
78
78
|
* displayName: "Post Body",
|
|
79
79
|
* helpText: "Add the body of your post here"
|
|
80
80
|
* })
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
|
|
84
|
+
* isEditable: true,
|
|
85
|
+
* isRequired: false,
|
|
86
|
+
* type: "Option",
|
|
87
|
+
* displayName: "Post Type",
|
|
88
|
+
* helpText: "Add the body of your post here",
|
|
89
|
+
* metadata: {
|
|
90
|
+
* options: [{
|
|
91
|
+
* name: "Feature"
|
|
92
|
+
* }, {
|
|
93
|
+
* name: "News"
|
|
94
|
+
* }, {
|
|
95
|
+
* name: "Product Highlight"
|
|
96
|
+
* }]
|
|
97
|
+
* }
|
|
98
|
+
* })
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
|
|
102
|
+
* isEditable: true,
|
|
103
|
+
* isRequired: false,
|
|
104
|
+
* type: "Reference",
|
|
105
|
+
* displayName: "Author",
|
|
106
|
+
* helpText: "Add the post author here",
|
|
107
|
+
* metadata: {
|
|
108
|
+
* collectionId: "63692ab61fb2852f582ba8f5"
|
|
109
|
+
* }
|
|
110
|
+
* })
|
|
81
111
|
*/
|
|
82
112
|
create(collectionId, request, requestOptions) {
|
|
83
113
|
var _a;
|
|
@@ -85,10 +115,10 @@ class Fields {
|
|
|
85
115
|
const _response = yield core.fetcher({
|
|
86
116
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/fields`),
|
|
87
117
|
method: "POST",
|
|
88
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
118
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
89
119
|
contentType: "application/json",
|
|
90
120
|
requestType: "json",
|
|
91
|
-
body: serializers.
|
|
121
|
+
body: serializers.FieldCreate.jsonOrThrow(request, {
|
|
92
122
|
unrecognizedObjectKeys: "passthrough",
|
|
93
123
|
allowUnrecognizedUnionMembers: true,
|
|
94
124
|
allowUnrecognizedEnumValues: true,
|
|
@@ -98,7 +128,7 @@ class Fields {
|
|
|
98
128
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
99
129
|
});
|
|
100
130
|
if (_response.ok) {
|
|
101
|
-
return serializers.
|
|
131
|
+
return serializers.FieldCreate.parseOrThrow(_response.body, {
|
|
102
132
|
unrecognizedObjectKeys: "passthrough",
|
|
103
133
|
allowUnrecognizedUnionMembers: true,
|
|
104
134
|
allowUnrecognizedEnumValues: true,
|
|
@@ -126,6 +156,8 @@ class Fields {
|
|
|
126
156
|
skipValidation: true,
|
|
127
157
|
breadcrumbsPrefix: ["response"],
|
|
128
158
|
}));
|
|
159
|
+
case 409:
|
|
160
|
+
throw new Webflow.ConflictError(_response.error.body);
|
|
129
161
|
case 429:
|
|
130
162
|
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
131
163
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -188,7 +220,7 @@ class Fields {
|
|
|
188
220
|
const _response = yield core.fetcher({
|
|
189
221
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/fields/${encodeURIComponent(fieldId)}`),
|
|
190
222
|
method: "DELETE",
|
|
191
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
223
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
192
224
|
contentType: "application/json",
|
|
193
225
|
requestType: "json",
|
|
194
226
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -285,7 +317,7 @@ class Fields {
|
|
|
285
317
|
const _response = yield core.fetcher({
|
|
286
318
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/fields/${encodeURIComponent(fieldId)}`),
|
|
287
319
|
method: "PATCH",
|
|
288
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
320
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
289
321
|
contentType: "application/json",
|
|
290
322
|
requestType: "json",
|
|
291
323
|
body: serializers.collections.FieldUpdate.jsonOrThrow(request, {
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
17
|
__exportStar(require("./client"), exports);
|
|
@@ -26,10 +26,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
exports.fields = __importStar(require("./fields"));
|
|
31
|
-
__exportStar(require("./fields/types"), exports);
|
|
29
|
+
exports.fields = exports.items = void 0;
|
|
32
30
|
exports.items = __importStar(require("./items"));
|
|
33
31
|
__exportStar(require("./items/types"), exports);
|
|
32
|
+
exports.fields = __importStar(require("./fields"));
|
|
34
33
|
__exportStar(require("./fields/client/requests"), exports);
|
|
35
34
|
__exportStar(require("./items/client/requests"), exports);
|
|
@@ -93,7 +93,7 @@ export declare class Items {
|
|
|
93
93
|
/**
|
|
94
94
|
* Delete Items from a Collection.
|
|
95
95
|
*
|
|
96
|
-
*
|
|
96
|
+
* <Tip title="Localization Tip">Items will only be deleted in the primary locale unless a `cmsLocaleId` is included in the request.</Tip>
|
|
97
97
|
*
|
|
98
98
|
* Required scope | `CMS:write`
|
|
99
99
|
*
|
|
@@ -113,9 +113,11 @@ export declare class Items {
|
|
|
113
113
|
*/
|
|
114
114
|
deleteItems(collectionId: string, request?: Webflow.collections.ItemsDeleteItemsRequest, requestOptions?: Items.RequestOptions): Promise<void>;
|
|
115
115
|
/**
|
|
116
|
-
* Update a single item or multiple items
|
|
116
|
+
* Update a single item or multiple items in a Collection.
|
|
117
117
|
*
|
|
118
|
-
*
|
|
118
|
+
* The limit for this endpoint is 100 items.
|
|
119
|
+
*
|
|
120
|
+
* <Tip title="Localization Tip">Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request.</Tip>
|
|
119
121
|
*
|
|
120
122
|
* Required scope | `CMS:write`
|
|
121
123
|
*
|
|
@@ -185,7 +187,7 @@ export declare class Items {
|
|
|
185
187
|
*/
|
|
186
188
|
updateItems(collectionId: string, request?: Webflow.collections.ItemsUpdateItemsRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
187
189
|
/**
|
|
188
|
-
* List
|
|
190
|
+
* List all published items in a collection.
|
|
189
191
|
*
|
|
190
192
|
* Required scope | `CMS:read`
|
|
191
193
|
*
|
|
@@ -204,7 +206,7 @@ export declare class Items {
|
|
|
204
206
|
*/
|
|
205
207
|
listItemsLive(collectionId: string, request?: Webflow.collections.ItemsListItemsLiveRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItemList>;
|
|
206
208
|
/**
|
|
207
|
-
* Create
|
|
209
|
+
* Create item(s) in a collection that will be immediately published to the live site.
|
|
208
210
|
*
|
|
209
211
|
*
|
|
210
212
|
* To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items)
|
|
@@ -253,9 +255,11 @@ export declare class Items {
|
|
|
253
255
|
*/
|
|
254
256
|
createItemLive(collectionId: string, request: Webflow.collections.ItemsCreateItemLiveRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
255
257
|
/**
|
|
256
|
-
* Remove an item or multiple items (up to 100 items) from the live site.
|
|
258
|
+
* Remove an item or multiple items (up to 100 items) from the live site.
|
|
259
|
+
*
|
|
260
|
+
* Using this endpoint to delete published item(s) will unpublish the item(s) from the live site and set the item(s) `isDraft` property to `true`.
|
|
257
261
|
*
|
|
258
|
-
*
|
|
262
|
+
* <Tip title="Localization Tip">Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request.</Tip>
|
|
259
263
|
*
|
|
260
264
|
* Required scope | `CMS:write`
|
|
261
265
|
*
|
|
@@ -274,9 +278,9 @@ export declare class Items {
|
|
|
274
278
|
*/
|
|
275
279
|
deleteItemsLive(collectionId: string, request?: Webflow.collections.ItemsDeleteItemsLiveRequest, requestOptions?: Items.RequestOptions): Promise<void>;
|
|
276
280
|
/**
|
|
277
|
-
* Update a single
|
|
281
|
+
* Update a single published item or multiple published items (up to 100) in a Collection
|
|
278
282
|
*
|
|
279
|
-
*
|
|
283
|
+
* <Tip title="Localization Tip">Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request.</Tip>
|
|
280
284
|
*
|
|
281
285
|
* Required scope | `CMS:write`
|
|
282
286
|
*
|
|
@@ -287,6 +291,7 @@ export declare class Items {
|
|
|
287
291
|
* @throws {@link Webflow.BadRequestError}
|
|
288
292
|
* @throws {@link Webflow.UnauthorizedError}
|
|
289
293
|
* @throws {@link Webflow.NotFoundError}
|
|
294
|
+
* @throws {@link Webflow.ConflictError}
|
|
290
295
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
291
296
|
* @throws {@link Webflow.InternalServerError}
|
|
292
297
|
*
|
|
@@ -348,9 +353,10 @@ export declare class Items {
|
|
|
348
353
|
/**
|
|
349
354
|
* Create an item or multiple items in a CMS Collection across multiple corresponding locales.
|
|
350
355
|
*
|
|
351
|
-
*
|
|
356
|
+
* <Note>
|
|
352
357
|
* - This endpoint can create up to 100 items in a request.
|
|
353
|
-
* - If the `cmsLocaleIds` parameter is
|
|
358
|
+
* - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale.
|
|
359
|
+
* </Note>
|
|
354
360
|
*
|
|
355
361
|
* Required scope | `CMS:write`
|
|
356
362
|
*
|
|
@@ -411,7 +417,7 @@ export declare class Items {
|
|
|
411
417
|
*/
|
|
412
418
|
getItem(collectionId: string, itemId: string, request?: Webflow.collections.ItemsGetItemRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
413
419
|
/**
|
|
414
|
-
* Delete an
|
|
420
|
+
* Delete an item from a collection.
|
|
415
421
|
*
|
|
416
422
|
* Required scope | `CMS:write`
|
|
417
423
|
*
|
|
@@ -512,6 +518,7 @@ export declare class Items {
|
|
|
512
518
|
* @throws {@link Webflow.BadRequestError}
|
|
513
519
|
* @throws {@link Webflow.UnauthorizedError}
|
|
514
520
|
* @throws {@link Webflow.NotFoundError}
|
|
521
|
+
* @throws {@link Webflow.ConflictError}
|
|
515
522
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
516
523
|
* @throws {@link Webflow.InternalServerError}
|
|
517
524
|
*
|
|
@@ -96,7 +96,7 @@ class Items {
|
|
|
96
96
|
const _response = yield core.fetcher({
|
|
97
97
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items`),
|
|
98
98
|
method: "GET",
|
|
99
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
99
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
100
100
|
contentType: "application/json",
|
|
101
101
|
queryParameters: _queryParams,
|
|
102
102
|
requestType: "json",
|
|
@@ -224,7 +224,7 @@ class Items {
|
|
|
224
224
|
const _response = yield core.fetcher({
|
|
225
225
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items`),
|
|
226
226
|
method: "POST",
|
|
227
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
227
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
228
228
|
contentType: "application/json",
|
|
229
229
|
requestType: "json",
|
|
230
230
|
body: serializers.collections.ItemsCreateItemRequest.jsonOrThrow(request, {
|
|
@@ -306,7 +306,7 @@ class Items {
|
|
|
306
306
|
/**
|
|
307
307
|
* Delete Items from a Collection.
|
|
308
308
|
*
|
|
309
|
-
*
|
|
309
|
+
* <Tip title="Localization Tip">Items will only be deleted in the primary locale unless a `cmsLocaleId` is included in the request.</Tip>
|
|
310
310
|
*
|
|
311
311
|
* Required scope | `CMS:write`
|
|
312
312
|
*
|
|
@@ -330,7 +330,7 @@ class Items {
|
|
|
330
330
|
const _response = yield core.fetcher({
|
|
331
331
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items`),
|
|
332
332
|
method: "DELETE",
|
|
333
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
333
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
334
334
|
contentType: "application/json",
|
|
335
335
|
requestType: "json",
|
|
336
336
|
body: serializers.collections.ItemsDeleteItemsRequest.jsonOrThrow(request, {
|
|
@@ -406,9 +406,11 @@ class Items {
|
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
/**
|
|
409
|
-
* Update a single item or multiple items
|
|
409
|
+
* Update a single item or multiple items in a Collection.
|
|
410
410
|
*
|
|
411
|
-
*
|
|
411
|
+
* The limit for this endpoint is 100 items.
|
|
412
|
+
*
|
|
413
|
+
* <Tip title="Localization Tip">Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request.</Tip>
|
|
412
414
|
*
|
|
413
415
|
* Required scope | `CMS:write`
|
|
414
416
|
*
|
|
@@ -482,7 +484,7 @@ class Items {
|
|
|
482
484
|
const _response = yield core.fetcher({
|
|
483
485
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items`),
|
|
484
486
|
method: "PATCH",
|
|
485
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
487
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
486
488
|
contentType: "application/json",
|
|
487
489
|
requestType: "json",
|
|
488
490
|
body: serializers.collections.ItemsUpdateItemsRequest.jsonOrThrow(request, {
|
|
@@ -562,7 +564,7 @@ class Items {
|
|
|
562
564
|
});
|
|
563
565
|
}
|
|
564
566
|
/**
|
|
565
|
-
* List
|
|
567
|
+
* List all published items in a collection.
|
|
566
568
|
*
|
|
567
569
|
* Required scope | `CMS:read`
|
|
568
570
|
*
|
|
@@ -608,7 +610,7 @@ class Items {
|
|
|
608
610
|
const _response = yield core.fetcher({
|
|
609
611
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/live`),
|
|
610
612
|
method: "GET",
|
|
611
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
613
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
612
614
|
contentType: "application/json",
|
|
613
615
|
queryParameters: _queryParams,
|
|
614
616
|
requestType: "json",
|
|
@@ -684,7 +686,7 @@ class Items {
|
|
|
684
686
|
});
|
|
685
687
|
}
|
|
686
688
|
/**
|
|
687
|
-
* Create
|
|
689
|
+
* Create item(s) in a collection that will be immediately published to the live site.
|
|
688
690
|
*
|
|
689
691
|
*
|
|
690
692
|
* To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items)
|
|
@@ -737,7 +739,7 @@ class Items {
|
|
|
737
739
|
const _response = yield core.fetcher({
|
|
738
740
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/live`),
|
|
739
741
|
method: "POST",
|
|
740
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
742
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
741
743
|
contentType: "application/json",
|
|
742
744
|
requestType: "json",
|
|
743
745
|
body: serializers.collections.ItemsCreateItemLiveRequest.jsonOrThrow(request, {
|
|
@@ -817,9 +819,11 @@ class Items {
|
|
|
817
819
|
});
|
|
818
820
|
}
|
|
819
821
|
/**
|
|
820
|
-
* Remove an item or multiple items (up to 100 items) from the live site.
|
|
822
|
+
* Remove an item or multiple items (up to 100 items) from the live site.
|
|
823
|
+
*
|
|
824
|
+
* Using this endpoint to delete published item(s) will unpublish the item(s) from the live site and set the item(s) `isDraft` property to `true`.
|
|
821
825
|
*
|
|
822
|
-
*
|
|
826
|
+
* <Tip title="Localization Tip">Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request.</Tip>
|
|
823
827
|
*
|
|
824
828
|
* Required scope | `CMS:write`
|
|
825
829
|
*
|
|
@@ -842,7 +846,7 @@ class Items {
|
|
|
842
846
|
const _response = yield core.fetcher({
|
|
843
847
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/live`),
|
|
844
848
|
method: "DELETE",
|
|
845
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
849
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
846
850
|
contentType: "application/json",
|
|
847
851
|
requestType: "json",
|
|
848
852
|
body: serializers.collections.ItemsDeleteItemsLiveRequest.jsonOrThrow(request, {
|
|
@@ -916,9 +920,9 @@ class Items {
|
|
|
916
920
|
});
|
|
917
921
|
}
|
|
918
922
|
/**
|
|
919
|
-
* Update a single
|
|
923
|
+
* Update a single published item or multiple published items (up to 100) in a Collection
|
|
920
924
|
*
|
|
921
|
-
*
|
|
925
|
+
* <Tip title="Localization Tip">Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request.</Tip>
|
|
922
926
|
*
|
|
923
927
|
* Required scope | `CMS:write`
|
|
924
928
|
*
|
|
@@ -929,6 +933,7 @@ class Items {
|
|
|
929
933
|
* @throws {@link Webflow.BadRequestError}
|
|
930
934
|
* @throws {@link Webflow.UnauthorizedError}
|
|
931
935
|
* @throws {@link Webflow.NotFoundError}
|
|
936
|
+
* @throws {@link Webflow.ConflictError}
|
|
932
937
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
933
938
|
* @throws {@link Webflow.InternalServerError}
|
|
934
939
|
*
|
|
@@ -992,7 +997,7 @@ class Items {
|
|
|
992
997
|
const _response = yield core.fetcher({
|
|
993
998
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/live`),
|
|
994
999
|
method: "PATCH",
|
|
995
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1000
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
996
1001
|
contentType: "application/json",
|
|
997
1002
|
requestType: "json",
|
|
998
1003
|
body: serializers.collections.ItemsUpdateItemsLiveRequest.jsonOrThrow(request, {
|
|
@@ -1033,6 +1038,8 @@ class Items {
|
|
|
1033
1038
|
skipValidation: true,
|
|
1034
1039
|
breadcrumbsPrefix: ["response"],
|
|
1035
1040
|
}));
|
|
1041
|
+
case 409:
|
|
1042
|
+
throw new Webflow.ConflictError(_response.error.body);
|
|
1036
1043
|
case 429:
|
|
1037
1044
|
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
1038
1045
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1074,9 +1081,10 @@ class Items {
|
|
|
1074
1081
|
/**
|
|
1075
1082
|
* Create an item or multiple items in a CMS Collection across multiple corresponding locales.
|
|
1076
1083
|
*
|
|
1077
|
-
*
|
|
1084
|
+
* <Note>
|
|
1078
1085
|
* - This endpoint can create up to 100 items in a request.
|
|
1079
|
-
* - If the `cmsLocaleIds` parameter is
|
|
1086
|
+
* - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale.
|
|
1087
|
+
* </Note>
|
|
1080
1088
|
*
|
|
1081
1089
|
* Required scope | `CMS:write`
|
|
1082
1090
|
*
|
|
@@ -1121,7 +1129,7 @@ class Items {
|
|
|
1121
1129
|
const _response = yield core.fetcher({
|
|
1122
1130
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/bulk`),
|
|
1123
1131
|
method: "POST",
|
|
1124
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1132
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1125
1133
|
contentType: "application/json",
|
|
1126
1134
|
requestType: "json",
|
|
1127
1135
|
body: serializers.collections.CreateBulkCollectionItemRequestBody.jsonOrThrow(request, {
|
|
@@ -1230,7 +1238,7 @@ class Items {
|
|
|
1230
1238
|
const _response = yield core.fetcher({
|
|
1231
1239
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}`),
|
|
1232
1240
|
method: "GET",
|
|
1233
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1241
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1234
1242
|
contentType: "application/json",
|
|
1235
1243
|
queryParameters: _queryParams,
|
|
1236
1244
|
requestType: "json",
|
|
@@ -1306,7 +1314,7 @@ class Items {
|
|
|
1306
1314
|
});
|
|
1307
1315
|
}
|
|
1308
1316
|
/**
|
|
1309
|
-
* Delete an
|
|
1317
|
+
* Delete an item from a collection.
|
|
1310
1318
|
*
|
|
1311
1319
|
* Required scope | `CMS:write`
|
|
1312
1320
|
*
|
|
@@ -1335,7 +1343,7 @@ class Items {
|
|
|
1335
1343
|
const _response = yield core.fetcher({
|
|
1336
1344
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}`),
|
|
1337
1345
|
method: "DELETE",
|
|
1338
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1346
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1339
1347
|
contentType: "application/json",
|
|
1340
1348
|
queryParameters: _queryParams,
|
|
1341
1349
|
requestType: "json",
|
|
@@ -1436,7 +1444,7 @@ class Items {
|
|
|
1436
1444
|
const _response = yield core.fetcher({
|
|
1437
1445
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}`),
|
|
1438
1446
|
method: "PATCH",
|
|
1439
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1447
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1440
1448
|
contentType: "application/json",
|
|
1441
1449
|
requestType: "json",
|
|
1442
1450
|
body: serializers.CollectionItemPatchSingle.jsonOrThrow(request, {
|
|
@@ -1545,7 +1553,7 @@ class Items {
|
|
|
1545
1553
|
const _response = yield core.fetcher({
|
|
1546
1554
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live`),
|
|
1547
1555
|
method: "GET",
|
|
1548
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1556
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1549
1557
|
contentType: "application/json",
|
|
1550
1558
|
queryParameters: _queryParams,
|
|
1551
1559
|
requestType: "json",
|
|
@@ -1652,7 +1660,7 @@ class Items {
|
|
|
1652
1660
|
const _response = yield core.fetcher({
|
|
1653
1661
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live`),
|
|
1654
1662
|
method: "DELETE",
|
|
1655
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1663
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1656
1664
|
contentType: "application/json",
|
|
1657
1665
|
queryParameters: _queryParams,
|
|
1658
1666
|
requestType: "json",
|
|
@@ -1734,6 +1742,7 @@ class Items {
|
|
|
1734
1742
|
* @throws {@link Webflow.BadRequestError}
|
|
1735
1743
|
* @throws {@link Webflow.UnauthorizedError}
|
|
1736
1744
|
* @throws {@link Webflow.NotFoundError}
|
|
1745
|
+
* @throws {@link Webflow.ConflictError}
|
|
1737
1746
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
1738
1747
|
* @throws {@link Webflow.InternalServerError}
|
|
1739
1748
|
*
|
|
@@ -1753,7 +1762,7 @@ class Items {
|
|
|
1753
1762
|
const _response = yield core.fetcher({
|
|
1754
1763
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live`),
|
|
1755
1764
|
method: "PATCH",
|
|
1756
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1765
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1757
1766
|
contentType: "application/json",
|
|
1758
1767
|
requestType: "json",
|
|
1759
1768
|
body: serializers.CollectionItemPatchSingle.jsonOrThrow(request, {
|
|
@@ -1794,6 +1803,8 @@ class Items {
|
|
|
1794
1803
|
skipValidation: true,
|
|
1795
1804
|
breadcrumbsPrefix: ["response"],
|
|
1796
1805
|
}));
|
|
1806
|
+
case 409:
|
|
1807
|
+
throw new Webflow.ConflictError(_response.error.body);
|
|
1797
1808
|
case 429:
|
|
1798
1809
|
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
1799
1810
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1859,7 +1870,7 @@ class Items {
|
|
|
1859
1870
|
const _response = yield core.fetcher({
|
|
1860
1871
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/items/publish`),
|
|
1861
1872
|
method: "POST",
|
|
1862
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.
|
|
1873
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1863
1874
|
contentType: "application/json",
|
|
1864
1875
|
requestType: "json",
|
|
1865
1876
|
body: serializers.collections.ItemsPublishItemRequest.jsonOrThrow(request, {
|
|
@@ -20,11 +20,11 @@ export interface ItemsListItemsLiveRequest {
|
|
|
20
20
|
*/
|
|
21
21
|
limit?: number;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Filter by the exact name of the item(s)
|
|
24
24
|
*/
|
|
25
25
|
name?: string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Filter by the exact slug of the item
|
|
28
28
|
*/
|
|
29
29
|
slug?: string;
|
|
30
30
|
/**
|
package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts
CHANGED
|
@@ -20,11 +20,11 @@ export interface ItemsListItemsRequest {
|
|
|
20
20
|
*/
|
|
21
21
|
limit?: number;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Filter by the exact name of the item(s)
|
|
24
24
|
*/
|
|
25
25
|
name?: string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Filter by the exact slug of the item
|
|
28
28
|
*/
|
|
29
29
|
slug?: string;
|
|
30
30
|
/**
|
|
@@ -115,9 +115,9 @@ export declare class Components {
|
|
|
115
115
|
*/
|
|
116
116
|
updateContent(siteId: string, componentId: string, request: Webflow.ComponentDomWrite, requestOptions?: Components.RequestOptions): Promise<Webflow.ComponentsUpdateContentResponse>;
|
|
117
117
|
/**
|
|
118
|
-
* Get the property
|
|
118
|
+
* Get the default property values of a component definition.
|
|
119
119
|
*
|
|
120
|
-
* <Note>If you do not
|
|
120
|
+
* <Note>If you do not include a `localeId` in your request, the response will return any properties that can be localized from the Primary locale.</Note>
|
|
121
121
|
*
|
|
122
122
|
* Required scope | `components:read`
|
|
123
123
|
*
|
|
@@ -139,12 +139,11 @@ export declare class Components {
|
|
|
139
139
|
*/
|
|
140
140
|
getProperties(siteId: string, componentId: string, request?: Webflow.ComponentsGetPropertiesRequest, requestOptions?: Components.RequestOptions): Promise<Webflow.ComponentProperties>;
|
|
141
141
|
/**
|
|
142
|
-
* Update the property
|
|
142
|
+
* Update the default property values of a component definition in a specificed locale.
|
|
143
143
|
*
|
|
144
|
-
* Before making updates
|
|
145
|
-
* 1. Use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify available properties
|
|
144
|
+
* Before making updates, use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify properties that can be updated in a secondary locale.
|
|
146
145
|
*
|
|
147
|
-
* <Note>The request requires a secondary locale ID. If a
|
|
146
|
+
* <Note>The request requires a secondary locale ID. If a `localeId` is missing, the request will not be processed and will result in an error.</Note>
|
|
148
147
|
*
|
|
149
148
|
* Required scope | `components:write`
|
|
150
149
|
*
|