webflow-api 2.4.0 → 2.5.0

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.
Files changed (457) hide show
  1. package/.mock/definition/__package__.yml +2495 -0
  2. package/.mock/definition/accessGroups.yml +80 -0
  3. package/.mock/definition/api.yml +13 -0
  4. package/.mock/definition/assets.yml +414 -0
  5. package/.mock/definition/collections/fields.yml +187 -0
  6. package/.mock/definition/collections/items.yml +1511 -0
  7. package/.mock/definition/collections.yml +185 -0
  8. package/.mock/definition/ecommerce.yml +42 -0
  9. package/.mock/definition/forms.yml +301 -0
  10. package/.mock/definition/inventory.yml +120 -0
  11. package/.mock/definition/orders.yml +1569 -0
  12. package/.mock/definition/pages/scripts.yml +169 -0
  13. package/.mock/definition/pages.yml +443 -0
  14. package/.mock/definition/products.yml +500 -0
  15. package/.mock/definition/scripts.yml +257 -0
  16. package/.mock/definition/sites/activityLogs.yml +65 -0
  17. package/.mock/definition/sites/scripts.yml +228 -0
  18. package/.mock/definition/sites.yml +299 -0
  19. package/.mock/definition/token.yml +71 -0
  20. package/.mock/definition/users.yml +392 -0
  21. package/.mock/definition/webhooks.yml +189 -0
  22. package/.mock/fern.config.json +4 -0
  23. package/Client.d.ts +2 -0
  24. package/README.md +23 -30
  25. package/api/errors/InternalServerError.d.ts +2 -1
  26. package/api/errors/NotFoundError.d.ts +2 -1
  27. package/api/errors/TooManyRequestsError.d.ts +1 -1
  28. package/api/errors/UnauthorizedError.d.ts +2 -1
  29. package/api/resources/accessGroups/client/Client.d.ts +5 -1
  30. package/api/resources/accessGroups/client/Client.js +27 -15
  31. package/api/resources/assets/client/Client.d.ts +31 -11
  32. package/api/resources/assets/client/Client.js +236 -126
  33. package/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -2
  34. package/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +5 -5
  35. package/api/resources/collections/client/Client.d.ts +15 -22
  36. package/api/resources/collections/client/Client.js +109 -137
  37. package/api/resources/collections/resources/fields/client/Client.d.ts +34 -2
  38. package/api/resources/collections/resources/fields/client/Client.js +163 -32
  39. package/api/resources/collections/resources/items/client/Client.d.ts +302 -30
  40. package/api/resources/collections/resources/items/client/Client.js +959 -221
  41. package/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +61 -0
  42. package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +11 -0
  43. package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +11 -0
  44. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +128 -0
  45. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +128 -0
  46. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +5 -0
  47. package/api/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  48. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +5 -0
  49. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +5 -0
  50. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  51. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +5 -0
  52. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  53. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +5 -0
  54. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +5 -0
  55. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +5 -0
  56. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +8 -0
  57. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +5 -0
  58. package/api/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +5 -0
  59. package/api/resources/collections/resources/items/types/ItemsCreateItemRequest.js +5 -0
  60. package/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +8 -0
  61. package/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +5 -0
  62. package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +9 -0
  63. package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +5 -0
  64. package/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +9 -0
  65. package/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +5 -0
  66. package/api/resources/collections/resources/items/types/index.d.ts +9 -0
  67. package/api/resources/collections/resources/items/types/index.js +9 -0
  68. package/api/resources/ecommerce/client/Client.d.ts +2 -0
  69. package/api/resources/ecommerce/client/Client.js +24 -14
  70. package/api/resources/forms/client/Client.d.ts +17 -5
  71. package/api/resources/forms/client/Client.js +140 -76
  72. package/api/resources/inventory/client/Client.d.ts +8 -1
  73. package/api/resources/inventory/client/Client.js +59 -30
  74. package/api/resources/orders/client/Client.d.ts +7 -2
  75. package/api/resources/orders/client/Client.js +164 -89
  76. package/api/resources/pages/client/Client.d.ts +25 -14
  77. package/api/resources/pages/client/Client.js +169 -100
  78. package/api/resources/pages/client/requests/DomWrite.d.ts +6 -6
  79. package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
  80. package/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +2 -2
  81. package/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
  82. package/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +3 -4
  83. package/api/resources/pages/resources/scripts/client/Client.d.ts +29 -3
  84. package/api/resources/pages/resources/scripts/client/Client.js +104 -46
  85. package/api/resources/products/client/Client.d.ts +26 -10
  86. package/api/resources/products/client/Client.js +188 -98
  87. package/api/resources/scripts/client/Client.d.ts +31 -3
  88. package/api/resources/scripts/client/Client.js +111 -47
  89. package/api/resources/sites/client/Client.d.ts +16 -4
  90. package/api/resources/sites/client/Client.js +101 -59
  91. package/api/resources/sites/client/requests/SitesPublishRequest.d.ts +1 -1
  92. package/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -0
  93. package/api/resources/sites/resources/activityLogs/client/Client.js +17 -13
  94. package/api/resources/sites/resources/scripts/client/Client.d.ts +26 -4
  95. package/api/resources/sites/resources/scripts/client/Client.js +125 -61
  96. package/api/resources/token/client/Client.d.ts +7 -2
  97. package/api/resources/token/client/Client.js +23 -24
  98. package/api/resources/users/client/Client.d.ts +21 -6
  99. package/api/resources/users/client/Client.js +149 -78
  100. package/api/resources/webhooks/client/Client.d.ts +15 -2
  101. package/api/resources/webhooks/client/Client.js +114 -59
  102. package/api/types/AssetFolder.d.ts +1 -1
  103. package/api/types/AuthorizationAuthorization.d.ts +1 -1
  104. package/api/types/AuthorizedUser.d.ts +1 -1
  105. package/api/types/BulkCollectionItemFieldData.d.ts +1 -1
  106. package/api/types/CollectionItem.d.ts +1 -1
  107. package/api/types/CollectionItemFieldData.d.ts +1 -1
  108. package/api/types/CollectionItemListNoPagination.d.ts +11 -0
  109. package/api/types/CollectionItemListNoPagination.js +5 -0
  110. package/api/types/CollectionItemWithIdInput.d.ts +24 -0
  111. package/api/types/CollectionItemWithIdInput.js +5 -0
  112. package/api/types/CollectionItemWithIdInputFieldData.d.ts +11 -0
  113. package/api/types/CollectionItemWithIdInputFieldData.js +5 -0
  114. package/api/types/ConflictErrorBody.d.ts +1 -10
  115. package/api/types/CustomCodeBlock.d.ts +2 -2
  116. package/api/types/DuplicateUserEmail.d.ts +1 -11
  117. package/api/types/ErrorCode.d.ts +38 -0
  118. package/api/types/ErrorCode.js +37 -0
  119. package/api/types/Error_.d.ts +1 -1
  120. package/api/types/ForbiddenErrorBody.d.ts +2 -7
  121. package/api/types/Form.d.ts +8 -8
  122. package/api/types/FormSubmission.d.ts +3 -3
  123. package/api/types/InvalidScopes.d.ts +4 -0
  124. package/api/types/InvalidScopes.js +5 -0
  125. package/api/types/NotEnterprisePlanSite.d.ts +1 -11
  126. package/api/types/Order.d.ts +5 -1
  127. package/api/types/Page.d.ts +2 -0
  128. package/api/types/Site.d.ts +4 -0
  129. package/api/types/SiteActivityLogItem.d.ts +1 -1
  130. package/api/types/SiteActivityLogItemEvent.d.ts +48 -0
  131. package/api/types/SiteActivityLogItemEvent.js +50 -0
  132. package/api/types/SiteActivityLogItemResourceOperation.d.ts +5 -1
  133. package/api/types/SiteActivityLogItemResourceOperation.js +4 -0
  134. package/api/types/SiteDataCollectionType.d.ts +12 -0
  135. package/api/types/SiteDataCollectionType.js +11 -0
  136. package/api/types/UserLimitReached.d.ts +1 -11
  137. package/api/types/UsersNotEnabled.d.ts +1 -11
  138. package/api/types/index.d.ts +10 -6
  139. package/api/types/index.js +10 -6
  140. package/core/fetcher/Fetcher.d.ts +1 -1
  141. package/core/fetcher/getResponseBody.js +3 -0
  142. package/core/fetcher/requestWithRetries.js +13 -4
  143. package/core/schemas/builders/object/object.js +28 -0
  144. package/core/schemas/builders/object/types.d.ts +5 -0
  145. package/dist/Client.d.ts +2 -0
  146. package/dist/api/errors/InternalServerError.d.ts +2 -1
  147. package/dist/api/errors/NotFoundError.d.ts +2 -1
  148. package/dist/api/errors/TooManyRequestsError.d.ts +1 -1
  149. package/dist/api/errors/UnauthorizedError.d.ts +2 -1
  150. package/dist/api/resources/accessGroups/client/Client.d.ts +5 -1
  151. package/dist/api/resources/accessGroups/client/Client.js +27 -15
  152. package/dist/api/resources/assets/client/Client.d.ts +31 -11
  153. package/dist/api/resources/assets/client/Client.js +236 -126
  154. package/dist/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -2
  155. package/dist/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +5 -5
  156. package/dist/api/resources/collections/client/Client.d.ts +15 -22
  157. package/dist/api/resources/collections/client/Client.js +109 -137
  158. package/dist/api/resources/collections/resources/fields/client/Client.d.ts +34 -2
  159. package/dist/api/resources/collections/resources/fields/client/Client.js +163 -32
  160. package/dist/api/resources/collections/resources/items/client/Client.d.ts +302 -30
  161. package/dist/api/resources/collections/resources/items/client/Client.js +959 -221
  162. package/dist/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +61 -0
  163. package/dist/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +5 -0
  164. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +11 -0
  165. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +5 -0
  166. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +11 -0
  167. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +5 -0
  168. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +128 -0
  169. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +5 -0
  170. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +128 -0
  171. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +5 -0
  172. package/dist/api/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  173. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +5 -0
  174. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +5 -0
  175. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  176. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +5 -0
  177. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  178. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +5 -0
  179. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +5 -0
  180. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +5 -0
  181. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +8 -0
  182. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +5 -0
  183. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +5 -0
  184. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequest.js +5 -0
  185. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +8 -0
  186. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +5 -0
  187. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +9 -0
  188. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +5 -0
  189. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +9 -0
  190. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +5 -0
  191. package/dist/api/resources/collections/resources/items/types/index.d.ts +9 -0
  192. package/dist/api/resources/collections/resources/items/types/index.js +9 -0
  193. package/dist/api/resources/ecommerce/client/Client.d.ts +2 -0
  194. package/dist/api/resources/ecommerce/client/Client.js +24 -14
  195. package/dist/api/resources/forms/client/Client.d.ts +17 -5
  196. package/dist/api/resources/forms/client/Client.js +140 -76
  197. package/dist/api/resources/inventory/client/Client.d.ts +8 -1
  198. package/dist/api/resources/inventory/client/Client.js +59 -30
  199. package/dist/api/resources/orders/client/Client.d.ts +7 -2
  200. package/dist/api/resources/orders/client/Client.js +164 -89
  201. package/dist/api/resources/pages/client/Client.d.ts +25 -14
  202. package/dist/api/resources/pages/client/Client.js +169 -100
  203. package/dist/api/resources/pages/client/requests/DomWrite.d.ts +6 -6
  204. package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
  205. package/dist/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +2 -2
  206. package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
  207. package/dist/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +3 -4
  208. package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +29 -3
  209. package/dist/api/resources/pages/resources/scripts/client/Client.js +104 -46
  210. package/dist/api/resources/products/client/Client.d.ts +26 -10
  211. package/dist/api/resources/products/client/Client.js +188 -98
  212. package/dist/api/resources/scripts/client/Client.d.ts +31 -3
  213. package/dist/api/resources/scripts/client/Client.js +111 -47
  214. package/dist/api/resources/sites/client/Client.d.ts +16 -4
  215. package/dist/api/resources/sites/client/Client.js +101 -59
  216. package/dist/api/resources/sites/client/requests/SitesPublishRequest.d.ts +1 -1
  217. package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -0
  218. package/dist/api/resources/sites/resources/activityLogs/client/Client.js +17 -13
  219. package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +26 -4
  220. package/dist/api/resources/sites/resources/scripts/client/Client.js +125 -61
  221. package/dist/api/resources/token/client/Client.d.ts +7 -2
  222. package/dist/api/resources/token/client/Client.js +23 -24
  223. package/dist/api/resources/users/client/Client.d.ts +21 -6
  224. package/dist/api/resources/users/client/Client.js +149 -78
  225. package/dist/api/resources/webhooks/client/Client.d.ts +15 -2
  226. package/dist/api/resources/webhooks/client/Client.js +114 -59
  227. package/dist/api/types/AssetFolder.d.ts +1 -1
  228. package/dist/api/types/AuthorizationAuthorization.d.ts +1 -1
  229. package/dist/api/types/AuthorizedUser.d.ts +1 -1
  230. package/dist/api/types/BulkCollectionItemFieldData.d.ts +1 -1
  231. package/dist/api/types/CollectionItem.d.ts +1 -1
  232. package/dist/api/types/CollectionItemFieldData.d.ts +1 -1
  233. package/dist/api/types/CollectionItemListNoPagination.d.ts +11 -0
  234. package/dist/api/types/CollectionItemListNoPagination.js +5 -0
  235. package/dist/api/types/CollectionItemWithIdInput.d.ts +24 -0
  236. package/dist/api/types/CollectionItemWithIdInput.js +5 -0
  237. package/dist/api/types/CollectionItemWithIdInputFieldData.d.ts +11 -0
  238. package/dist/api/types/CollectionItemWithIdInputFieldData.js +5 -0
  239. package/dist/api/types/ConflictErrorBody.d.ts +1 -10
  240. package/dist/api/types/CustomCodeBlock.d.ts +2 -2
  241. package/dist/api/types/DuplicateUserEmail.d.ts +1 -11
  242. package/dist/api/types/ErrorCode.d.ts +38 -0
  243. package/dist/api/types/ErrorCode.js +37 -0
  244. package/dist/api/types/Error_.d.ts +1 -1
  245. package/dist/api/types/ForbiddenErrorBody.d.ts +2 -7
  246. package/dist/api/types/Form.d.ts +8 -8
  247. package/dist/api/types/FormSubmission.d.ts +3 -3
  248. package/dist/api/types/InvalidScopes.d.ts +4 -0
  249. package/dist/api/types/InvalidScopes.js +5 -0
  250. package/dist/api/types/NotEnterprisePlanSite.d.ts +1 -11
  251. package/dist/api/types/Order.d.ts +5 -1
  252. package/dist/api/types/Page.d.ts +2 -0
  253. package/dist/api/types/Site.d.ts +4 -0
  254. package/dist/api/types/SiteActivityLogItem.d.ts +1 -1
  255. package/dist/api/types/SiteActivityLogItemEvent.d.ts +48 -0
  256. package/dist/api/types/SiteActivityLogItemEvent.js +50 -0
  257. package/dist/api/types/SiteActivityLogItemResourceOperation.d.ts +5 -1
  258. package/dist/api/types/SiteActivityLogItemResourceOperation.js +4 -0
  259. package/dist/api/types/SiteDataCollectionType.d.ts +12 -0
  260. package/dist/api/types/SiteDataCollectionType.js +11 -0
  261. package/dist/api/types/UserLimitReached.d.ts +1 -11
  262. package/dist/api/types/UsersNotEnabled.d.ts +1 -11
  263. package/dist/api/types/index.d.ts +10 -6
  264. package/dist/api/types/index.js +10 -6
  265. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  266. package/dist/core/fetcher/getResponseBody.js +3 -0
  267. package/dist/core/fetcher/requestWithRetries.js +13 -4
  268. package/dist/core/schemas/builders/object/object.js +28 -0
  269. package/dist/core/schemas/builders/object/types.d.ts +5 -0
  270. package/dist/errors/WebflowTimeoutError.d.ts +1 -1
  271. package/dist/errors/WebflowTimeoutError.js +2 -2
  272. package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +2 -1
  273. package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +2 -1
  274. package/dist/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +16 -0
  275. package/dist/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +37 -0
  276. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +13 -0
  277. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +34 -0
  278. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +13 -0
  279. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +34 -0
  280. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +13 -0
  281. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +34 -0
  282. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +13 -0
  283. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +34 -0
  284. package/dist/serialization/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  285. package/dist/serialization/resources/collections/resources/items/client/requests/index.js +11 -1
  286. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +12 -0
  287. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +36 -0
  288. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  289. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +36 -0
  290. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  291. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +36 -0
  292. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +12 -0
  293. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +33 -0
  294. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +13 -0
  295. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +34 -0
  296. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +12 -0
  297. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.js +33 -0
  298. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +13 -0
  299. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +34 -0
  300. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +13 -0
  301. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +34 -0
  302. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +13 -0
  303. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +34 -0
  304. package/dist/serialization/resources/collections/resources/items/types/index.d.ts +9 -0
  305. package/dist/serialization/resources/collections/resources/items/types/index.js +9 -0
  306. package/dist/serialization/resources/pages/client/requests/DomWrite.d.ts +1 -1
  307. package/dist/serialization/types/BulkCollectionItemFieldData.js +4 -2
  308. package/dist/serialization/types/CollectionItem.d.ts +1 -1
  309. package/dist/serialization/types/CollectionItem.js +1 -1
  310. package/dist/serialization/types/CollectionItemFieldData.js +4 -2
  311. package/dist/serialization/types/CollectionItemListNoPagination.d.ts +13 -0
  312. package/dist/serialization/types/{TooManyRequestsErrorBody.js → CollectionItemListNoPagination.js} +4 -6
  313. package/dist/serialization/types/CollectionItemWithIdInput.d.ts +20 -0
  314. package/dist/serialization/types/CollectionItemWithIdInput.js +41 -0
  315. package/dist/serialization/types/CollectionItemWithIdInputFieldData.d.ts +14 -0
  316. package/dist/serialization/types/{MissingScopes.js → CollectionItemWithIdInputFieldData.js} +7 -8
  317. package/dist/serialization/types/ConflictErrorBody.d.ts +4 -8
  318. package/dist/serialization/types/ConflictErrorBody.js +3 -7
  319. package/dist/serialization/types/DuplicateUserEmail.d.ts +2 -8
  320. package/dist/serialization/types/DuplicateUserEmail.js +1 -7
  321. package/dist/serialization/types/ErrorCode.d.ts +10 -0
  322. package/dist/serialization/types/ErrorCode.js +61 -0
  323. package/dist/serialization/types/Error_.d.ts +2 -1
  324. package/dist/serialization/types/Error_.js +2 -1
  325. package/dist/serialization/types/ForbiddenErrorBody.d.ts +4 -8
  326. package/dist/serialization/types/ForbiddenErrorBody.js +3 -7
  327. package/dist/serialization/types/Form.d.ts +1 -1
  328. package/dist/serialization/types/Form.js +1 -1
  329. package/dist/serialization/types/InvalidScopes.d.ts +10 -0
  330. package/{serialization/types/MissingScopes.js → dist/serialization/types/InvalidScopes.js} +2 -8
  331. package/dist/serialization/types/NotEnterprisePlanSite.d.ts +2 -8
  332. package/dist/serialization/types/NotEnterprisePlanSite.js +1 -7
  333. package/dist/serialization/types/Page.d.ts +1 -0
  334. package/dist/serialization/types/Page.js +1 -0
  335. package/dist/serialization/types/Site.d.ts +3 -0
  336. package/dist/serialization/types/Site.js +3 -0
  337. package/dist/serialization/types/SiteActivityLogItem.d.ts +2 -1
  338. package/dist/serialization/types/SiteActivityLogItem.js +2 -1
  339. package/dist/serialization/types/SiteActivityLogItemEvent.d.ts +10 -0
  340. package/dist/serialization/types/SiteActivityLogItemEvent.js +74 -0
  341. package/dist/serialization/types/SiteActivityLogItemResourceOperation.d.ts +1 -1
  342. package/dist/serialization/types/SiteActivityLogItemResourceOperation.js +11 -1
  343. package/dist/serialization/types/SiteDataCollectionType.d.ts +10 -0
  344. package/dist/serialization/types/SiteDataCollectionType.js +31 -0
  345. package/dist/serialization/types/UserLimitReached.d.ts +2 -8
  346. package/dist/serialization/types/UserLimitReached.js +1 -7
  347. package/dist/serialization/types/UsersNotEnabled.d.ts +2 -8
  348. package/dist/serialization/types/UsersNotEnabled.js +1 -7
  349. package/dist/serialization/types/index.d.ts +10 -5
  350. package/dist/serialization/types/index.js +10 -5
  351. package/dist/version.d.ts +1 -1
  352. package/dist/version.js +1 -1
  353. package/dist/wrapper/ItemsClient.d.ts +23 -49
  354. package/dist/wrapper/ItemsClient.js +50 -216
  355. package/dist/wrapper/WebflowClient.d.ts +1 -1
  356. package/dist/wrapper/WebflowClient.js +11 -1
  357. package/errors/WebflowTimeoutError.d.ts +1 -1
  358. package/errors/WebflowTimeoutError.js +2 -2
  359. package/package.json +1 -2
  360. package/reference.md +821 -230
  361. package/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +2 -1
  362. package/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +2 -1
  363. package/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +16 -0
  364. package/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +37 -0
  365. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +13 -0
  366. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +34 -0
  367. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +13 -0
  368. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +34 -0
  369. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +13 -0
  370. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +34 -0
  371. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +13 -0
  372. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +34 -0
  373. package/serialization/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  374. package/serialization/resources/collections/resources/items/client/requests/index.js +11 -1
  375. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +12 -0
  376. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +36 -0
  377. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  378. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +36 -0
  379. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  380. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +36 -0
  381. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +12 -0
  382. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +33 -0
  383. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +13 -0
  384. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +34 -0
  385. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +12 -0
  386. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.js +33 -0
  387. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +13 -0
  388. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +34 -0
  389. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +13 -0
  390. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +34 -0
  391. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +13 -0
  392. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +34 -0
  393. package/serialization/resources/collections/resources/items/types/index.d.ts +9 -0
  394. package/serialization/resources/collections/resources/items/types/index.js +9 -0
  395. package/serialization/resources/pages/client/requests/DomWrite.d.ts +1 -1
  396. package/serialization/types/BulkCollectionItemFieldData.js +4 -2
  397. package/serialization/types/CollectionItem.d.ts +1 -1
  398. package/serialization/types/CollectionItem.js +1 -1
  399. package/serialization/types/CollectionItemFieldData.js +4 -2
  400. package/serialization/types/CollectionItemListNoPagination.d.ts +13 -0
  401. package/serialization/types/{TooManyRequestsErrorBody.js → CollectionItemListNoPagination.js} +4 -6
  402. package/serialization/types/CollectionItemWithIdInput.d.ts +20 -0
  403. package/serialization/types/CollectionItemWithIdInput.js +41 -0
  404. package/serialization/types/CollectionItemWithIdInputFieldData.d.ts +14 -0
  405. package/serialization/types/CollectionItemWithIdInputFieldData.js +36 -0
  406. package/serialization/types/ConflictErrorBody.d.ts +4 -8
  407. package/serialization/types/ConflictErrorBody.js +3 -7
  408. package/serialization/types/DuplicateUserEmail.d.ts +2 -8
  409. package/serialization/types/DuplicateUserEmail.js +1 -7
  410. package/serialization/types/ErrorCode.d.ts +10 -0
  411. package/serialization/types/ErrorCode.js +61 -0
  412. package/serialization/types/Error_.d.ts +2 -1
  413. package/serialization/types/Error_.js +2 -1
  414. package/serialization/types/ForbiddenErrorBody.d.ts +4 -8
  415. package/serialization/types/ForbiddenErrorBody.js +3 -7
  416. package/serialization/types/Form.d.ts +1 -1
  417. package/serialization/types/Form.js +1 -1
  418. package/serialization/types/InvalidScopes.d.ts +10 -0
  419. package/serialization/types/InvalidScopes.js +31 -0
  420. package/serialization/types/NotEnterprisePlanSite.d.ts +2 -8
  421. package/serialization/types/NotEnterprisePlanSite.js +1 -7
  422. package/serialization/types/Page.d.ts +1 -0
  423. package/serialization/types/Page.js +1 -0
  424. package/serialization/types/Site.d.ts +3 -0
  425. package/serialization/types/Site.js +3 -0
  426. package/serialization/types/SiteActivityLogItem.d.ts +2 -1
  427. package/serialization/types/SiteActivityLogItem.js +2 -1
  428. package/serialization/types/SiteActivityLogItemEvent.d.ts +10 -0
  429. package/serialization/types/SiteActivityLogItemEvent.js +74 -0
  430. package/serialization/types/SiteActivityLogItemResourceOperation.d.ts +1 -1
  431. package/serialization/types/SiteActivityLogItemResourceOperation.js +11 -1
  432. package/serialization/types/SiteDataCollectionType.d.ts +10 -0
  433. package/serialization/types/SiteDataCollectionType.js +31 -0
  434. package/serialization/types/UserLimitReached.d.ts +2 -8
  435. package/serialization/types/UserLimitReached.js +1 -7
  436. package/serialization/types/UsersNotEnabled.d.ts +2 -8
  437. package/serialization/types/UsersNotEnabled.js +1 -7
  438. package/serialization/types/index.d.ts +10 -5
  439. package/serialization/types/index.js +10 -5
  440. package/version.d.ts +1 -1
  441. package/version.js +1 -1
  442. package/wrapper/ItemsClient.d.ts +23 -49
  443. package/wrapper/ItemsClient.js +50 -216
  444. package/wrapper/WebflowClient.d.ts +1 -1
  445. package/wrapper/WebflowClient.js +11 -1
  446. package/api/types/MissingScopes.d.ts +0 -14
  447. package/api/types/TooManyRequestsErrorBody.d.ts +0 -9
  448. package/dist/api/types/MissingScopes.d.ts +0 -14
  449. package/dist/api/types/TooManyRequestsErrorBody.d.ts +0 -9
  450. package/dist/serialization/types/MissingScopes.d.ts +0 -16
  451. package/dist/serialization/types/TooManyRequestsErrorBody.d.ts +0 -15
  452. package/serialization/types/MissingScopes.d.ts +0 -16
  453. package/serialization/types/TooManyRequestsErrorBody.d.ts +0 -15
  454. /package/api/{types/MissingScopes.js → resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js} +0 -0
  455. /package/api/{types/TooManyRequestsErrorBody.js → resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js} +0 -0
  456. /package/{dist/api/types/MissingScopes.js → api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js} +0 -0
  457. /package/{dist/api/types/TooManyRequestsErrorBody.js → api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js} +0 -0
@@ -50,7 +50,16 @@ class Scripts {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * List of scripts registered to a Site. </br></br> In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets. <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote> Required scope | `custom_code:read`
53
+ * List of scripts registered to a Site.
54
+ *
55
+ * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
56
+ * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
57
+ * `custom_code` endpoints.
58
+ * Additionally, Scripts can be remotely hosted, or registered as inline snippets.
59
+ *
60
+ * <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
61
+ *
62
+ * Required scope | `custom_code:read`
54
63
  *
55
64
  * @param {string} siteId - Unique identifier for a Site
56
65
  * @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
@@ -70,15 +79,7 @@ class Scripts {
70
79
  const _response = yield core.fetcher({
71
80
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts`),
72
81
  method: "GET",
73
- headers: {
74
- Authorization: yield this._getAuthorizationHeader(),
75
- "X-Fern-Language": "JavaScript",
76
- "X-Fern-SDK-Name": "webflow-api",
77
- "X-Fern-SDK-Version": "2.4.0",
78
- "User-Agent": "webflow-api/2.4.0",
79
- "X-Fern-Runtime": core.RUNTIME.type,
80
- "X-Fern-Runtime-Version": core.RUNTIME.version,
81
- },
82
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
82
83
  contentType: "application/json",
83
84
  requestType: "json",
84
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -99,11 +100,23 @@ class Scripts {
99
100
  case 400:
100
101
  throw new Webflow.BadRequestError(_response.error.body);
101
102
  case 401:
102
- throw new Webflow.UnauthorizedError(_response.error.body);
103
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
104
+ unrecognizedObjectKeys: "passthrough",
105
+ allowUnrecognizedUnionMembers: true,
106
+ allowUnrecognizedEnumValues: true,
107
+ skipValidation: true,
108
+ breadcrumbsPrefix: ["response"],
109
+ }));
103
110
  case 404:
104
- throw new Webflow.NotFoundError(_response.error.body);
111
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
112
+ unrecognizedObjectKeys: "passthrough",
113
+ allowUnrecognizedUnionMembers: true,
114
+ allowUnrecognizedEnumValues: true,
115
+ skipValidation: true,
116
+ breadcrumbsPrefix: ["response"],
117
+ }));
105
118
  case 429:
106
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
119
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
107
120
  unrecognizedObjectKeys: "passthrough",
108
121
  allowUnrecognizedUnionMembers: true,
109
122
  allowUnrecognizedEnumValues: true,
@@ -111,7 +124,13 @@ class Scripts {
111
124
  breadcrumbsPrefix: ["response"],
112
125
  }));
113
126
  case 500:
114
- throw new Webflow.InternalServerError(_response.error.body);
127
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
128
+ unrecognizedObjectKeys: "passthrough",
129
+ allowUnrecognizedUnionMembers: true,
130
+ allowUnrecognizedEnumValues: true,
131
+ skipValidation: true,
132
+ breadcrumbsPrefix: ["response"],
133
+ }));
115
134
  default:
116
135
  throw new errors.WebflowError({
117
136
  statusCode: _response.error.statusCode,
@@ -126,7 +145,7 @@ class Scripts {
126
145
  body: _response.error.rawBody,
127
146
  });
128
147
  case "timeout":
129
- throw new errors.WebflowTimeoutError();
148
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/registered_scripts.");
130
149
  case "unknown":
131
150
  throw new errors.WebflowError({
132
151
  message: _response.error.errorMessage,
@@ -135,7 +154,16 @@ class Scripts {
135
154
  });
136
155
  }
137
156
  /**
138
- * Add a script to a Site's Custom Code registry. </br></br> In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets. <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote> </br></br> Required scope | `custom_code:write`
157
+ * Add a script to a Site's Custom Code registry.
158
+ *
159
+ * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
160
+ * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
161
+ * `custom_code` endpoints.
162
+ * Additionally, Scripts can be remotely hosted, or registered as inline snippets.
163
+ *
164
+ * <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
165
+ *
166
+ * Required scope | `custom_code:write`
139
167
  *
140
168
  * @param {string} siteId - Unique identifier for a Site
141
169
  * @param {Webflow.CustomCodeHostedRequest} request
@@ -161,18 +189,14 @@ class Scripts {
161
189
  const _response = yield core.fetcher({
162
190
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts/hosted`),
163
191
  method: "POST",
164
- headers: {
165
- Authorization: yield this._getAuthorizationHeader(),
166
- "X-Fern-Language": "JavaScript",
167
- "X-Fern-SDK-Name": "webflow-api",
168
- "X-Fern-SDK-Version": "2.4.0",
169
- "User-Agent": "webflow-api/2.4.0",
170
- "X-Fern-Runtime": core.RUNTIME.type,
171
- "X-Fern-Runtime-Version": core.RUNTIME.version,
172
- },
192
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
173
193
  contentType: "application/json",
174
194
  requestType: "json",
175
- body: serializers.CustomCodeHostedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
195
+ body: serializers.CustomCodeHostedRequest.jsonOrThrow(request, {
196
+ unrecognizedObjectKeys: "passthrough",
197
+ allowUnrecognizedUnionMembers: true,
198
+ allowUnrecognizedEnumValues: true,
199
+ }),
176
200
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
177
201
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
178
202
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -191,11 +215,23 @@ class Scripts {
191
215
  case 400:
192
216
  throw new Webflow.BadRequestError(_response.error.body);
193
217
  case 401:
194
- throw new Webflow.UnauthorizedError(_response.error.body);
218
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
219
+ unrecognizedObjectKeys: "passthrough",
220
+ allowUnrecognizedUnionMembers: true,
221
+ allowUnrecognizedEnumValues: true,
222
+ skipValidation: true,
223
+ breadcrumbsPrefix: ["response"],
224
+ }));
195
225
  case 404:
196
- throw new Webflow.NotFoundError(_response.error.body);
226
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
227
+ unrecognizedObjectKeys: "passthrough",
228
+ allowUnrecognizedUnionMembers: true,
229
+ allowUnrecognizedEnumValues: true,
230
+ skipValidation: true,
231
+ breadcrumbsPrefix: ["response"],
232
+ }));
197
233
  case 429:
198
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
234
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
199
235
  unrecognizedObjectKeys: "passthrough",
200
236
  allowUnrecognizedUnionMembers: true,
201
237
  allowUnrecognizedEnumValues: true,
@@ -203,7 +239,13 @@ class Scripts {
203
239
  breadcrumbsPrefix: ["response"],
204
240
  }));
205
241
  case 500:
206
- throw new Webflow.InternalServerError(_response.error.body);
242
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
243
+ unrecognizedObjectKeys: "passthrough",
244
+ allowUnrecognizedUnionMembers: true,
245
+ allowUnrecognizedEnumValues: true,
246
+ skipValidation: true,
247
+ breadcrumbsPrefix: ["response"],
248
+ }));
207
249
  default:
208
250
  throw new errors.WebflowError({
209
251
  statusCode: _response.error.statusCode,
@@ -218,7 +260,7 @@ class Scripts {
218
260
  body: _response.error.rawBody,
219
261
  });
220
262
  case "timeout":
221
- throw new errors.WebflowTimeoutError();
263
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/registered_scripts/hosted.");
222
264
  case "unknown":
223
265
  throw new errors.WebflowError({
224
266
  message: _response.error.errorMessage,
@@ -227,7 +269,15 @@ class Scripts {
227
269
  });
228
270
  }
229
271
  /**
230
- * Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters. </br></br> In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. </br></br> <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote> Required scope | `custom_code:write`
272
+ * Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters.
273
+ *
274
+ * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
275
+ * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
276
+ * `custom_code` endpoints.
277
+ *
278
+ * <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
279
+ *
280
+ * Required scope | `custom_code:write`
231
281
  *
232
282
  * @param {string} siteId - Unique identifier for a Site
233
283
  * @param {Webflow.CustomCodeInlineRequest} request
@@ -252,18 +302,14 @@ class Scripts {
252
302
  const _response = yield core.fetcher({
253
303
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts/inline`),
254
304
  method: "POST",
255
- headers: {
256
- Authorization: yield this._getAuthorizationHeader(),
257
- "X-Fern-Language": "JavaScript",
258
- "X-Fern-SDK-Name": "webflow-api",
259
- "X-Fern-SDK-Version": "2.4.0",
260
- "User-Agent": "webflow-api/2.4.0",
261
- "X-Fern-Runtime": core.RUNTIME.type,
262
- "X-Fern-Runtime-Version": core.RUNTIME.version,
263
- },
305
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
264
306
  contentType: "application/json",
265
307
  requestType: "json",
266
- body: serializers.CustomCodeInlineRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
308
+ body: serializers.CustomCodeInlineRequest.jsonOrThrow(request, {
309
+ unrecognizedObjectKeys: "passthrough",
310
+ allowUnrecognizedUnionMembers: true,
311
+ allowUnrecognizedEnumValues: true,
312
+ }),
267
313
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
268
314
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
269
315
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -282,11 +328,23 @@ class Scripts {
282
328
  case 400:
283
329
  throw new Webflow.BadRequestError(_response.error.body);
284
330
  case 401:
285
- throw new Webflow.UnauthorizedError(_response.error.body);
331
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
332
+ unrecognizedObjectKeys: "passthrough",
333
+ allowUnrecognizedUnionMembers: true,
334
+ allowUnrecognizedEnumValues: true,
335
+ skipValidation: true,
336
+ breadcrumbsPrefix: ["response"],
337
+ }));
286
338
  case 404:
287
- throw new Webflow.NotFoundError(_response.error.body);
339
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
340
+ unrecognizedObjectKeys: "passthrough",
341
+ allowUnrecognizedUnionMembers: true,
342
+ allowUnrecognizedEnumValues: true,
343
+ skipValidation: true,
344
+ breadcrumbsPrefix: ["response"],
345
+ }));
288
346
  case 429:
289
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
347
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
290
348
  unrecognizedObjectKeys: "passthrough",
291
349
  allowUnrecognizedUnionMembers: true,
292
350
  allowUnrecognizedEnumValues: true,
@@ -294,7 +352,13 @@ class Scripts {
294
352
  breadcrumbsPrefix: ["response"],
295
353
  }));
296
354
  case 500:
297
- throw new Webflow.InternalServerError(_response.error.body);
355
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
356
+ unrecognizedObjectKeys: "passthrough",
357
+ allowUnrecognizedUnionMembers: true,
358
+ allowUnrecognizedEnumValues: true,
359
+ skipValidation: true,
360
+ breadcrumbsPrefix: ["response"],
361
+ }));
298
362
  default:
299
363
  throw new errors.WebflowError({
300
364
  statusCode: _response.error.statusCode,
@@ -309,7 +373,7 @@ class Scripts {
309
373
  body: _response.error.rawBody,
310
374
  });
311
375
  case "timeout":
312
- throw new errors.WebflowTimeoutError();
376
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/registered_scripts/inline.");
313
377
  case "unknown":
314
378
  throw new errors.WebflowError({
315
379
  message: _response.error.errorMessage,
@@ -18,13 +18,17 @@ export declare namespace Sites {
18
18
  maxRetries?: number;
19
19
  /** A hook to abort the request. */
20
20
  abortSignal?: AbortSignal;
21
+ /** Additional headers to include in the request. */
22
+ headers?: Record<string, string>;
21
23
  }
22
24
  }
23
25
  export declare class Sites {
24
26
  protected readonly _options: Sites.Options;
25
27
  constructor(_options: Sites.Options);
26
28
  /**
27
- * List of all sites the provided access token is able to access. </br></br> Required scope | `sites:read`
29
+ * List of all sites the provided access token is able to access.
30
+ *
31
+ * Required scope | `sites:read`
28
32
  *
29
33
  * @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
30
34
  *
@@ -37,7 +41,9 @@ export declare class Sites {
37
41
  */
38
42
  list(requestOptions?: Sites.RequestOptions): Promise<Webflow.Sites>;
39
43
  /**
40
- * Get a site by site id </br></br> Required scope | `sites:read`
44
+ * Get details of a site.
45
+ *
46
+ * Required scope | `sites:read`
41
47
  *
42
48
  * @param {string} siteId - Unique identifier for a Site
43
49
  * @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
@@ -53,7 +59,9 @@ export declare class Sites {
53
59
  */
54
60
  get(siteId: string, requestOptions?: Sites.RequestOptions): Promise<Webflow.Site>;
55
61
  /**
56
- * Get a list of all custom domains related to site. </br></br> Required scope | `sites:read`
62
+ * Get a list of all custom domains related to site.
63
+ *
64
+ * Required scope | `sites:read`
57
65
  *
58
66
  * @param {string} siteId - Unique identifier for a Site
59
67
  * @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
@@ -69,7 +77,11 @@ export declare class Sites {
69
77
  */
70
78
  getCustomDomain(siteId: string, requestOptions?: Sites.RequestOptions): Promise<Webflow.Domains>;
71
79
  /**
72
- * Publish a site to one more more domains. </br></br> Required scope | `sites:write` <blockquote class="callout callout_info" theme="📘"><h2 class="callout-heading"><span class="callout-icon">📘</span><p>Endpoint-specific rate limit</p></h2><p>This endpoint has a limit of one successful publish queue per minute.</p></blockquote>
80
+ * Publishes a site to one or more more domains.
81
+ *
82
+ * <Note title="Endpoint-specific rate limit">This endpoint has a limit of one successful publish queue per minute.</Note>
83
+ *
84
+ * Required scope | `sites:write`
73
85
  *
74
86
  * @param {string} siteId - Unique identifier for a Site
75
87
  * @param {Webflow.SitesPublishRequest} request
@@ -52,7 +52,9 @@ class Sites {
52
52
  this._options = _options;
53
53
  }
54
54
  /**
55
- * List of all sites the provided access token is able to access. </br></br> Required scope | `sites:read`
55
+ * List of all sites the provided access token is able to access.
56
+ *
57
+ * Required scope | `sites:read`
56
58
  *
57
59
  * @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
58
60
  *
@@ -69,15 +71,7 @@ class Sites {
69
71
  const _response = yield core.fetcher({
70
72
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, "sites"),
71
73
  method: "GET",
72
- headers: {
73
- Authorization: yield this._getAuthorizationHeader(),
74
- "X-Fern-Language": "JavaScript",
75
- "X-Fern-SDK-Name": "webflow-api",
76
- "X-Fern-SDK-Version": "2.4.0",
77
- "User-Agent": "webflow-api/2.4.0",
78
- "X-Fern-Runtime": core.RUNTIME.type,
79
- "X-Fern-Runtime-Version": core.RUNTIME.version,
80
- },
74
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
75
  contentType: "application/json",
82
76
  requestType: "json",
83
77
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -96,11 +90,23 @@ class Sites {
96
90
  if (_response.error.reason === "status-code") {
97
91
  switch (_response.error.statusCode) {
98
92
  case 401:
99
- throw new Webflow.UnauthorizedError(_response.error.body);
93
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
94
+ unrecognizedObjectKeys: "passthrough",
95
+ allowUnrecognizedUnionMembers: true,
96
+ allowUnrecognizedEnumValues: true,
97
+ skipValidation: true,
98
+ breadcrumbsPrefix: ["response"],
99
+ }));
100
100
  case 404:
101
- throw new Webflow.NotFoundError(_response.error.body);
101
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
102
+ unrecognizedObjectKeys: "passthrough",
103
+ allowUnrecognizedUnionMembers: true,
104
+ allowUnrecognizedEnumValues: true,
105
+ skipValidation: true,
106
+ breadcrumbsPrefix: ["response"],
107
+ }));
102
108
  case 429:
103
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
109
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
104
110
  unrecognizedObjectKeys: "passthrough",
105
111
  allowUnrecognizedUnionMembers: true,
106
112
  allowUnrecognizedEnumValues: true,
@@ -121,7 +127,7 @@ class Sites {
121
127
  body: _response.error.rawBody,
122
128
  });
123
129
  case "timeout":
124
- throw new errors.WebflowTimeoutError();
130
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites.");
125
131
  case "unknown":
126
132
  throw new errors.WebflowError({
127
133
  message: _response.error.errorMessage,
@@ -130,7 +136,9 @@ class Sites {
130
136
  });
131
137
  }
132
138
  /**
133
- * Get a site by site id </br></br> Required scope | `sites:read`
139
+ * Get details of a site.
140
+ *
141
+ * Required scope | `sites:read`
134
142
  *
135
143
  * @param {string} siteId - Unique identifier for a Site
136
144
  * @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
@@ -150,15 +158,7 @@ class Sites {
150
158
  const _response = yield core.fetcher({
151
159
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}`),
152
160
  method: "GET",
153
- headers: {
154
- Authorization: yield this._getAuthorizationHeader(),
155
- "X-Fern-Language": "JavaScript",
156
- "X-Fern-SDK-Name": "webflow-api",
157
- "X-Fern-SDK-Version": "2.4.0",
158
- "User-Agent": "webflow-api/2.4.0",
159
- "X-Fern-Runtime": core.RUNTIME.type,
160
- "X-Fern-Runtime-Version": core.RUNTIME.version,
161
- },
161
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
162
162
  contentType: "application/json",
163
163
  requestType: "json",
164
164
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -179,11 +179,23 @@ class Sites {
179
179
  case 400:
180
180
  throw new Webflow.BadRequestError(_response.error.body);
181
181
  case 401:
182
- throw new Webflow.UnauthorizedError(_response.error.body);
182
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
183
+ unrecognizedObjectKeys: "passthrough",
184
+ allowUnrecognizedUnionMembers: true,
185
+ allowUnrecognizedEnumValues: true,
186
+ skipValidation: true,
187
+ breadcrumbsPrefix: ["response"],
188
+ }));
183
189
  case 404:
184
- throw new Webflow.NotFoundError(_response.error.body);
190
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
191
+ unrecognizedObjectKeys: "passthrough",
192
+ allowUnrecognizedUnionMembers: true,
193
+ allowUnrecognizedEnumValues: true,
194
+ skipValidation: true,
195
+ breadcrumbsPrefix: ["response"],
196
+ }));
185
197
  case 429:
186
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
198
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
187
199
  unrecognizedObjectKeys: "passthrough",
188
200
  allowUnrecognizedUnionMembers: true,
189
201
  allowUnrecognizedEnumValues: true,
@@ -191,7 +203,13 @@ class Sites {
191
203
  breadcrumbsPrefix: ["response"],
192
204
  }));
193
205
  case 500:
194
- throw new Webflow.InternalServerError(_response.error.body);
206
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
207
+ unrecognizedObjectKeys: "passthrough",
208
+ allowUnrecognizedUnionMembers: true,
209
+ allowUnrecognizedEnumValues: true,
210
+ skipValidation: true,
211
+ breadcrumbsPrefix: ["response"],
212
+ }));
195
213
  default:
196
214
  throw new errors.WebflowError({
197
215
  statusCode: _response.error.statusCode,
@@ -206,7 +224,7 @@ class Sites {
206
224
  body: _response.error.rawBody,
207
225
  });
208
226
  case "timeout":
209
- throw new errors.WebflowTimeoutError();
227
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}.");
210
228
  case "unknown":
211
229
  throw new errors.WebflowError({
212
230
  message: _response.error.errorMessage,
@@ -215,7 +233,9 @@ class Sites {
215
233
  });
216
234
  }
217
235
  /**
218
- * Get a list of all custom domains related to site. </br></br> Required scope | `sites:read`
236
+ * Get a list of all custom domains related to site.
237
+ *
238
+ * Required scope | `sites:read`
219
239
  *
220
240
  * @param {string} siteId - Unique identifier for a Site
221
241
  * @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
@@ -235,15 +255,7 @@ class Sites {
235
255
  const _response = yield core.fetcher({
236
256
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/custom_domains`),
237
257
  method: "GET",
238
- headers: {
239
- Authorization: yield this._getAuthorizationHeader(),
240
- "X-Fern-Language": "JavaScript",
241
- "X-Fern-SDK-Name": "webflow-api",
242
- "X-Fern-SDK-Version": "2.4.0",
243
- "User-Agent": "webflow-api/2.4.0",
244
- "X-Fern-Runtime": core.RUNTIME.type,
245
- "X-Fern-Runtime-Version": core.RUNTIME.version,
246
- },
258
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
247
259
  contentType: "application/json",
248
260
  requestType: "json",
249
261
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -262,13 +274,25 @@ class Sites {
262
274
  if (_response.error.reason === "status-code") {
263
275
  switch (_response.error.statusCode) {
264
276
  case 401:
265
- throw new Webflow.UnauthorizedError(_response.error.body);
277
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
278
+ unrecognizedObjectKeys: "passthrough",
279
+ allowUnrecognizedUnionMembers: true,
280
+ allowUnrecognizedEnumValues: true,
281
+ skipValidation: true,
282
+ breadcrumbsPrefix: ["response"],
283
+ }));
266
284
  case 403:
267
285
  throw new Webflow.ForbiddenError(_response.error.body);
268
286
  case 404:
269
- throw new Webflow.NotFoundError(_response.error.body);
287
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
288
+ unrecognizedObjectKeys: "passthrough",
289
+ allowUnrecognizedUnionMembers: true,
290
+ allowUnrecognizedEnumValues: true,
291
+ skipValidation: true,
292
+ breadcrumbsPrefix: ["response"],
293
+ }));
270
294
  case 429:
271
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
295
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
272
296
  unrecognizedObjectKeys: "passthrough",
273
297
  allowUnrecognizedUnionMembers: true,
274
298
  allowUnrecognizedEnumValues: true,
@@ -276,7 +300,13 @@ class Sites {
276
300
  breadcrumbsPrefix: ["response"],
277
301
  }));
278
302
  case 500:
279
- throw new Webflow.InternalServerError(_response.error.body);
303
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
304
+ unrecognizedObjectKeys: "passthrough",
305
+ allowUnrecognizedUnionMembers: true,
306
+ allowUnrecognizedEnumValues: true,
307
+ skipValidation: true,
308
+ breadcrumbsPrefix: ["response"],
309
+ }));
280
310
  default:
281
311
  throw new errors.WebflowError({
282
312
  statusCode: _response.error.statusCode,
@@ -291,7 +321,7 @@ class Sites {
291
321
  body: _response.error.rawBody,
292
322
  });
293
323
  case "timeout":
294
- throw new errors.WebflowTimeoutError();
324
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/custom_domains.");
295
325
  case "unknown":
296
326
  throw new errors.WebflowError({
297
327
  message: _response.error.errorMessage,
@@ -300,7 +330,11 @@ class Sites {
300
330
  });
301
331
  }
302
332
  /**
303
- * Publish a site to one more more domains. </br></br> Required scope | `sites:write` <blockquote class="callout callout_info" theme="📘"><h2 class="callout-heading"><span class="callout-icon">📘</span><p>Endpoint-specific rate limit</p></h2><p>This endpoint has a limit of one successful publish queue per minute.</p></blockquote>
333
+ * Publishes a site to one or more more domains.
334
+ *
335
+ * <Note title="Endpoint-specific rate limit">This endpoint has a limit of one successful publish queue per minute.</Note>
336
+ *
337
+ * Required scope | `sites:write`
304
338
  *
305
339
  * @param {string} siteId - Unique identifier for a Site
306
340
  * @param {Webflow.SitesPublishRequest} request
@@ -321,18 +355,14 @@ class Sites {
321
355
  const _response = yield core.fetcher({
322
356
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/publish`),
323
357
  method: "POST",
324
- headers: {
325
- Authorization: yield this._getAuthorizationHeader(),
326
- "X-Fern-Language": "JavaScript",
327
- "X-Fern-SDK-Name": "webflow-api",
328
- "X-Fern-SDK-Version": "2.4.0",
329
- "User-Agent": "webflow-api/2.4.0",
330
- "X-Fern-Runtime": core.RUNTIME.type,
331
- "X-Fern-Runtime-Version": core.RUNTIME.version,
332
- },
358
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
333
359
  contentType: "application/json",
334
360
  requestType: "json",
335
- body: serializers.SitesPublishRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
361
+ body: serializers.SitesPublishRequest.jsonOrThrow(request, {
362
+ unrecognizedObjectKeys: "passthrough",
363
+ allowUnrecognizedUnionMembers: true,
364
+ allowUnrecognizedEnumValues: true,
365
+ }),
336
366
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
337
367
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
338
368
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -351,13 +381,25 @@ class Sites {
351
381
  case 400:
352
382
  throw new Webflow.BadRequestError(_response.error.body);
353
383
  case 401:
354
- throw new Webflow.UnauthorizedError(_response.error.body);
384
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
385
+ unrecognizedObjectKeys: "passthrough",
386
+ allowUnrecognizedUnionMembers: true,
387
+ allowUnrecognizedEnumValues: true,
388
+ skipValidation: true,
389
+ breadcrumbsPrefix: ["response"],
390
+ }));
355
391
  case 403:
356
392
  throw new Webflow.ForbiddenError(_response.error.body);
357
393
  case 404:
358
- throw new Webflow.NotFoundError(_response.error.body);
394
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
395
+ unrecognizedObjectKeys: "passthrough",
396
+ allowUnrecognizedUnionMembers: true,
397
+ allowUnrecognizedEnumValues: true,
398
+ skipValidation: true,
399
+ breadcrumbsPrefix: ["response"],
400
+ }));
359
401
  case 429:
360
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
402
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
361
403
  unrecognizedObjectKeys: "passthrough",
362
404
  allowUnrecognizedUnionMembers: true,
363
405
  allowUnrecognizedEnumValues: true,
@@ -378,7 +420,7 @@ class Sites {
378
420
  body: _response.error.rawBody,
379
421
  });
380
422
  case "timeout":
381
- throw new errors.WebflowTimeoutError();
423
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/publish.");
382
424
  case "unknown":
383
425
  throw new errors.WebflowError({
384
426
  message: _response.error.errorMessage,
@@ -6,7 +6,7 @@
6
6
  * {}
7
7
  */
8
8
  export interface SitesPublishRequest {
9
- /** Array of Custom Domain ids to publish */
9
+ /** Array of Custom Domain IDs to publish */
10
10
  customDomains?: string[];
11
11
  /** Choice of whether to publish to the default Webflow Subdomain */
12
12
  publishToWebflowSubdomain?: boolean;
@@ -16,6 +16,8 @@ export declare namespace ActivityLogs {
16
16
  maxRetries?: number;
17
17
  /** A hook to abort the request. */
18
18
  abortSignal?: AbortSignal;
19
+ /** Additional headers to include in the request. */
20
+ headers?: Record<string, string>;
19
21
  }
20
22
  }
21
23
  export declare class ActivityLogs {