webflow-api 2.4.2 → 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 +4 -3
  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 +4 -3
  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 Fields {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Create a custom field in a collection. </br></br> Slugs must be all lowercase letters without spaces. If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will convert the slug to lowercase and replace spaces with "-." </br></br> Only some field types can be created through the API. This endpoint does not currently support bulk creation. </br></br> Required scope | `cms:write`
53
+ * Create a custom field in a collection.
54
+ *
55
+ * Slugs must be all lowercase letters without spaces.
56
+ * If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will
57
+ * convert the slug to lowercase and replace spaces with "-."
58
+ *
59
+ * Only some field types can be created through the API.
60
+ * This endpoint does not currently support bulk creation.
61
+ *
62
+ * Required scope | `cms:write`
54
63
  *
55
64
  * @param {string} collectionId - Unique identifier for a Collection
56
65
  * @param {Webflow.collections.FieldCreate} request
@@ -76,18 +85,14 @@ class Fields {
76
85
  const _response = yield core.fetcher({
77
86
  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`),
78
87
  method: "POST",
79
- headers: {
80
- Authorization: yield this._getAuthorizationHeader(),
81
- "X-Fern-Language": "JavaScript",
82
- "X-Fern-SDK-Name": "webflow-api",
83
- "X-Fern-SDK-Version": "2.4.2",
84
- "User-Agent": "webflow-api/2.4.2",
85
- "X-Fern-Runtime": core.RUNTIME.type,
86
- "X-Fern-Runtime-Version": core.RUNTIME.version,
87
- },
88
+ 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),
88
89
  contentType: "application/json",
89
90
  requestType: "json",
90
- body: serializers.collections.FieldCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
91
+ body: serializers.collections.FieldCreate.jsonOrThrow(request, {
92
+ unrecognizedObjectKeys: "passthrough",
93
+ allowUnrecognizedUnionMembers: true,
94
+ allowUnrecognizedEnumValues: true,
95
+ }),
91
96
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
92
97
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
93
98
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -106,11 +111,115 @@ class Fields {
106
111
  case 400:
107
112
  throw new Webflow.BadRequestError(_response.error.body);
108
113
  case 401:
109
- throw new Webflow.UnauthorizedError(_response.error.body);
114
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
115
+ unrecognizedObjectKeys: "passthrough",
116
+ allowUnrecognizedUnionMembers: true,
117
+ allowUnrecognizedEnumValues: true,
118
+ skipValidation: true,
119
+ breadcrumbsPrefix: ["response"],
120
+ }));
121
+ case 404:
122
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
123
+ unrecognizedObjectKeys: "passthrough",
124
+ allowUnrecognizedUnionMembers: true,
125
+ allowUnrecognizedEnumValues: true,
126
+ skipValidation: true,
127
+ breadcrumbsPrefix: ["response"],
128
+ }));
129
+ case 429:
130
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
131
+ unrecognizedObjectKeys: "passthrough",
132
+ allowUnrecognizedUnionMembers: true,
133
+ allowUnrecognizedEnumValues: true,
134
+ skipValidation: true,
135
+ breadcrumbsPrefix: ["response"],
136
+ }));
137
+ case 500:
138
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
139
+ unrecognizedObjectKeys: "passthrough",
140
+ allowUnrecognizedUnionMembers: true,
141
+ allowUnrecognizedEnumValues: true,
142
+ skipValidation: true,
143
+ breadcrumbsPrefix: ["response"],
144
+ }));
145
+ default:
146
+ throw new errors.WebflowError({
147
+ statusCode: _response.error.statusCode,
148
+ body: _response.error.body,
149
+ });
150
+ }
151
+ }
152
+ switch (_response.error.reason) {
153
+ case "non-json":
154
+ throw new errors.WebflowError({
155
+ statusCode: _response.error.statusCode,
156
+ body: _response.error.rawBody,
157
+ });
158
+ case "timeout":
159
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /collections/{collection_id}/fields.");
160
+ case "unknown":
161
+ throw new errors.WebflowError({
162
+ message: _response.error.errorMessage,
163
+ });
164
+ }
165
+ });
166
+ }
167
+ /**
168
+ * Delete a custom field in a collection. This endpoint does not currently support bulk deletion.
169
+ *
170
+ * Required scope | `cms:write`
171
+ *
172
+ * @param {string} collectionId - Unique identifier for a Collection
173
+ * @param {string} fieldId - Unique identifier for a Field in a collection
174
+ * @param {Fields.RequestOptions} requestOptions - Request-specific configuration.
175
+ *
176
+ * @throws {@link Webflow.BadRequestError}
177
+ * @throws {@link Webflow.UnauthorizedError}
178
+ * @throws {@link Webflow.NotFoundError}
179
+ * @throws {@link Webflow.TooManyRequestsError}
180
+ * @throws {@link Webflow.InternalServerError}
181
+ *
182
+ * @example
183
+ * await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745")
184
+ */
185
+ delete(collectionId, fieldId, requestOptions) {
186
+ var _a;
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ const _response = yield core.fetcher({
189
+ 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
+ method: "DELETE",
191
+ 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),
192
+ contentType: "application/json",
193
+ requestType: "json",
194
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
195
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
196
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
197
+ });
198
+ if (_response.ok) {
199
+ return;
200
+ }
201
+ if (_response.error.reason === "status-code") {
202
+ switch (_response.error.statusCode) {
203
+ case 400:
204
+ throw new Webflow.BadRequestError(_response.error.body);
205
+ case 401:
206
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
207
+ unrecognizedObjectKeys: "passthrough",
208
+ allowUnrecognizedUnionMembers: true,
209
+ allowUnrecognizedEnumValues: true,
210
+ skipValidation: true,
211
+ breadcrumbsPrefix: ["response"],
212
+ }));
110
213
  case 404:
111
- throw new Webflow.NotFoundError(_response.error.body);
214
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
215
+ unrecognizedObjectKeys: "passthrough",
216
+ allowUnrecognizedUnionMembers: true,
217
+ allowUnrecognizedEnumValues: true,
218
+ skipValidation: true,
219
+ breadcrumbsPrefix: ["response"],
220
+ }));
112
221
  case 429:
113
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
222
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
114
223
  unrecognizedObjectKeys: "passthrough",
115
224
  allowUnrecognizedUnionMembers: true,
116
225
  allowUnrecognizedEnumValues: true,
@@ -118,7 +227,13 @@ class Fields {
118
227
  breadcrumbsPrefix: ["response"],
119
228
  }));
120
229
  case 500:
121
- throw new Webflow.InternalServerError(_response.error.body);
230
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
231
+ unrecognizedObjectKeys: "passthrough",
232
+ allowUnrecognizedUnionMembers: true,
233
+ allowUnrecognizedEnumValues: true,
234
+ skipValidation: true,
235
+ breadcrumbsPrefix: ["response"],
236
+ }));
122
237
  default:
123
238
  throw new errors.WebflowError({
124
239
  statusCode: _response.error.statusCode,
@@ -133,7 +248,7 @@ class Fields {
133
248
  body: _response.error.rawBody,
134
249
  });
135
250
  case "timeout":
136
- throw new errors.WebflowTimeoutError();
251
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /collections/{collection_id}/fields/{field_id}.");
137
252
  case "unknown":
138
253
  throw new errors.WebflowError({
139
254
  message: _response.error.errorMessage,
@@ -142,7 +257,9 @@ class Fields {
142
257
  });
143
258
  }
144
259
  /**
145
- * Update a custom field in a collection. </br></br> Required scope | `cms:write`
260
+ * Update a custom field in a collection.
261
+ *
262
+ * Required scope | `cms:write`
146
263
  *
147
264
  * @param {string} collectionId - Unique identifier for a Collection
148
265
  * @param {string} fieldId - Unique identifier for a Field in a collection
@@ -168,18 +285,14 @@ class Fields {
168
285
  const _response = yield core.fetcher({
169
286
  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)}`),
170
287
  method: "PATCH",
171
- headers: {
172
- Authorization: yield this._getAuthorizationHeader(),
173
- "X-Fern-Language": "JavaScript",
174
- "X-Fern-SDK-Name": "webflow-api",
175
- "X-Fern-SDK-Version": "2.4.2",
176
- "User-Agent": "webflow-api/2.4.2",
177
- "X-Fern-Runtime": core.RUNTIME.type,
178
- "X-Fern-Runtime-Version": core.RUNTIME.version,
179
- },
288
+ 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),
180
289
  contentType: "application/json",
181
290
  requestType: "json",
182
- body: serializers.collections.FieldUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
291
+ body: serializers.collections.FieldUpdate.jsonOrThrow(request, {
292
+ unrecognizedObjectKeys: "passthrough",
293
+ allowUnrecognizedUnionMembers: true,
294
+ allowUnrecognizedEnumValues: true,
295
+ }),
183
296
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
184
297
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
185
298
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -198,11 +311,23 @@ class Fields {
198
311
  case 400:
199
312
  throw new Webflow.BadRequestError(_response.error.body);
200
313
  case 401:
201
- throw new Webflow.UnauthorizedError(_response.error.body);
314
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
315
+ unrecognizedObjectKeys: "passthrough",
316
+ allowUnrecognizedUnionMembers: true,
317
+ allowUnrecognizedEnumValues: true,
318
+ skipValidation: true,
319
+ breadcrumbsPrefix: ["response"],
320
+ }));
202
321
  case 404:
203
- throw new Webflow.NotFoundError(_response.error.body);
322
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
323
+ unrecognizedObjectKeys: "passthrough",
324
+ allowUnrecognizedUnionMembers: true,
325
+ allowUnrecognizedEnumValues: true,
326
+ skipValidation: true,
327
+ breadcrumbsPrefix: ["response"],
328
+ }));
204
329
  case 429:
205
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
330
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
206
331
  unrecognizedObjectKeys: "passthrough",
207
332
  allowUnrecognizedUnionMembers: true,
208
333
  allowUnrecognizedEnumValues: true,
@@ -210,7 +335,13 @@ class Fields {
210
335
  breadcrumbsPrefix: ["response"],
211
336
  }));
212
337
  case 500:
213
- throw new Webflow.InternalServerError(_response.error.body);
338
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
339
+ unrecognizedObjectKeys: "passthrough",
340
+ allowUnrecognizedUnionMembers: true,
341
+ allowUnrecognizedEnumValues: true,
342
+ skipValidation: true,
343
+ breadcrumbsPrefix: ["response"],
344
+ }));
214
345
  default:
215
346
  throw new errors.WebflowError({
216
347
  statusCode: _response.error.statusCode,
@@ -225,7 +356,7 @@ class Fields {
225
356
  body: _response.error.rawBody,
226
357
  });
227
358
  case "timeout":
228
- throw new errors.WebflowTimeoutError();
359
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /collections/{collection_id}/fields/{field_id}.");
229
360
  case "unknown":
230
361
  throw new errors.WebflowError({
231
362
  message: _response.error.errorMessage,