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
@@ -9,10 +9,10 @@
9
9
  * }
10
10
  */
11
11
  export interface AssetsCreateRequest {
12
- /** file name including file extension */
12
+ /** File name including file extension. File names must be less than 100 characters. */
13
13
  fileName: string;
14
14
  /** MD5 hash of the file */
15
15
  fileHash: string;
16
- /** id of the Asset folder (optional) */
16
+ /** ID of the Asset folder (optional) */
17
17
  parentFolder?: string;
18
18
  }
@@ -3,11 +3,11 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {
7
- * displayName: "bulldoze.png"
8
- * }
6
+ * {}
9
7
  */
10
8
  export interface AssetsUpdateRequest {
11
- /** file name including file extension */
12
- displayName: string;
9
+ /** Unique identifier for a specific locale. Applicable, when using localization. */
10
+ localeId?: string;
11
+ /** A human readable name for the asset */
12
+ displayName?: string;
13
13
  }
@@ -18,13 +18,17 @@ export declare namespace Collections {
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 Collections {
24
26
  protected readonly _options: Collections.Options;
25
27
  constructor(_options: Collections.Options);
26
28
  /**
27
- * List of all Collections within a Site. </br></br> Required scope | `cms:read`
29
+ * List of all Collections within a Site.
30
+ *
31
+ * Required scope | `cms:read`
28
32
  *
29
33
  * @param {string} siteId - Unique identifier for a Site
30
34
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -40,7 +44,9 @@ export declare class Collections {
40
44
  */
41
45
  list(siteId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.CollectionList>;
42
46
  /**
43
- * Create a Collection for a site. </br></br> Required scope | `cms:write`
47
+ * Create a Collection for a site.
48
+ *
49
+ * Required scope | `cms:write`
44
50
  *
45
51
  * @param {string} siteId - Unique identifier for a Site
46
52
  * @param {Webflow.CollectionsCreateRequest} request
@@ -61,7 +67,9 @@ export declare class Collections {
61
67
  */
62
68
  create(siteId: string, request: Webflow.CollectionsCreateRequest, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
63
69
  /**
64
- * Get the full details of a collection from its ID. </br></br> Required scope | `cms:read`
70
+ * Get the full details of a collection from its ID.
71
+ *
72
+ * Required scope | `cms:read`
65
73
  *
66
74
  * @param {string} collectionId - Unique identifier for a Collection
67
75
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -77,26 +85,11 @@ export declare class Collections {
77
85
  */
78
86
  get(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
79
87
  /**
80
- * Delete a collection using its ID. </br></br> Required scope | `cms:write`
81
- *
82
- * @param {string} collectionId - Unique identifier for a Collection
83
- * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
88
+ * Delete a collection using its ID.
84
89
  *
85
- * @throws {@link Webflow.BadRequestError}
86
- * @throws {@link Webflow.UnauthorizedError}
87
- * @throws {@link Webflow.NotFoundError}
88
- * @throws {@link Webflow.TooManyRequestsError}
89
- * @throws {@link Webflow.InternalServerError}
90
- *
91
- * @example
92
- * await client.collections.deleteCollection("580e63fc8c9a982ac9b8b745")
93
- */
94
- deleteCollection(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
95
- /**
96
- * Delete a custom field in a collection. This endpoint does not currently support bulk deletion. </br></br> Required scope | `cms:write`
90
+ * Required scope | `cms:write`
97
91
  *
98
92
  * @param {string} collectionId - Unique identifier for a Collection
99
- * @param {string} fieldId - Unique identifier for a Field in a collection
100
93
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
101
94
  *
102
95
  * @throws {@link Webflow.BadRequestError}
@@ -106,9 +99,9 @@ export declare class Collections {
106
99
  * @throws {@link Webflow.InternalServerError}
107
100
  *
108
101
  * @example
109
- * await client.collections.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745")
102
+ * await client.collections.delete("580e63fc8c9a982ac9b8b745")
110
103
  */
111
- delete(collectionId: string, fieldId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
104
+ delete(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
112
105
  protected _fields: Fields | undefined;
113
106
  get fields(): Fields;
114
107
  protected _items: Items | undefined;
@@ -52,7 +52,9 @@ class Collections {
52
52
  this._options = _options;
53
53
  }
54
54
  /**
55
- * List of all Collections within a Site. </br></br> Required scope | `cms:read`
55
+ * List of all Collections within a Site.
56
+ *
57
+ * Required scope | `cms:read`
56
58
  *
57
59
  * @param {string} siteId - Unique identifier for a Site
58
60
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -72,15 +74,7 @@ class Collections {
72
74
  const _response = yield core.fetcher({
73
75
  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)}/collections`),
74
76
  method: "GET",
75
- headers: {
76
- Authorization: yield this._getAuthorizationHeader(),
77
- "X-Fern-Language": "JavaScript",
78
- "X-Fern-SDK-Name": "webflow-api",
79
- "X-Fern-SDK-Version": "2.4.0",
80
- "User-Agent": "webflow-api/2.4.0",
81
- "X-Fern-Runtime": core.RUNTIME.type,
82
- "X-Fern-Runtime-Version": core.RUNTIME.version,
83
- },
77
+ 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),
84
78
  contentType: "application/json",
85
79
  requestType: "json",
86
80
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -101,11 +95,23 @@ class Collections {
101
95
  case 400:
102
96
  throw new Webflow.BadRequestError(_response.error.body);
103
97
  case 401:
104
- throw new Webflow.UnauthorizedError(_response.error.body);
98
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
99
+ unrecognizedObjectKeys: "passthrough",
100
+ allowUnrecognizedUnionMembers: true,
101
+ allowUnrecognizedEnumValues: true,
102
+ skipValidation: true,
103
+ breadcrumbsPrefix: ["response"],
104
+ }));
105
105
  case 404:
106
- throw new Webflow.NotFoundError(_response.error.body);
106
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
107
+ unrecognizedObjectKeys: "passthrough",
108
+ allowUnrecognizedUnionMembers: true,
109
+ allowUnrecognizedEnumValues: true,
110
+ skipValidation: true,
111
+ breadcrumbsPrefix: ["response"],
112
+ }));
107
113
  case 429:
108
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
114
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
109
115
  unrecognizedObjectKeys: "passthrough",
110
116
  allowUnrecognizedUnionMembers: true,
111
117
  allowUnrecognizedEnumValues: true,
@@ -113,7 +119,13 @@ class Collections {
113
119
  breadcrumbsPrefix: ["response"],
114
120
  }));
115
121
  case 500:
116
- throw new Webflow.InternalServerError(_response.error.body);
122
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
123
+ unrecognizedObjectKeys: "passthrough",
124
+ allowUnrecognizedUnionMembers: true,
125
+ allowUnrecognizedEnumValues: true,
126
+ skipValidation: true,
127
+ breadcrumbsPrefix: ["response"],
128
+ }));
117
129
  default:
118
130
  throw new errors.WebflowError({
119
131
  statusCode: _response.error.statusCode,
@@ -128,7 +140,7 @@ class Collections {
128
140
  body: _response.error.rawBody,
129
141
  });
130
142
  case "timeout":
131
- throw new errors.WebflowTimeoutError();
143
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/collections.");
132
144
  case "unknown":
133
145
  throw new errors.WebflowError({
134
146
  message: _response.error.errorMessage,
@@ -137,7 +149,9 @@ class Collections {
137
149
  });
138
150
  }
139
151
  /**
140
- * Create a Collection for a site. </br></br> Required scope | `cms:write`
152
+ * Create a Collection for a site.
153
+ *
154
+ * Required scope | `cms:write`
141
155
  *
142
156
  * @param {string} siteId - Unique identifier for a Site
143
157
  * @param {Webflow.CollectionsCreateRequest} request
@@ -162,18 +176,14 @@ class Collections {
162
176
  const _response = yield core.fetcher({
163
177
  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)}/collections`),
164
178
  method: "POST",
165
- headers: {
166
- Authorization: yield this._getAuthorizationHeader(),
167
- "X-Fern-Language": "JavaScript",
168
- "X-Fern-SDK-Name": "webflow-api",
169
- "X-Fern-SDK-Version": "2.4.0",
170
- "User-Agent": "webflow-api/2.4.0",
171
- "X-Fern-Runtime": core.RUNTIME.type,
172
- "X-Fern-Runtime-Version": core.RUNTIME.version,
173
- },
179
+ 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),
174
180
  contentType: "application/json",
175
181
  requestType: "json",
176
- body: serializers.CollectionsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
182
+ body: serializers.CollectionsCreateRequest.jsonOrThrow(request, {
183
+ unrecognizedObjectKeys: "passthrough",
184
+ allowUnrecognizedUnionMembers: true,
185
+ allowUnrecognizedEnumValues: true,
186
+ }),
177
187
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
178
188
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
179
189
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -192,11 +202,23 @@ class Collections {
192
202
  case 400:
193
203
  throw new Webflow.BadRequestError(_response.error.body);
194
204
  case 401:
195
- throw new Webflow.UnauthorizedError(_response.error.body);
205
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
206
+ unrecognizedObjectKeys: "passthrough",
207
+ allowUnrecognizedUnionMembers: true,
208
+ allowUnrecognizedEnumValues: true,
209
+ skipValidation: true,
210
+ breadcrumbsPrefix: ["response"],
211
+ }));
196
212
  case 404:
197
- throw new Webflow.NotFoundError(_response.error.body);
213
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
214
+ unrecognizedObjectKeys: "passthrough",
215
+ allowUnrecognizedUnionMembers: true,
216
+ allowUnrecognizedEnumValues: true,
217
+ skipValidation: true,
218
+ breadcrumbsPrefix: ["response"],
219
+ }));
198
220
  case 429:
199
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
221
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
200
222
  unrecognizedObjectKeys: "passthrough",
201
223
  allowUnrecognizedUnionMembers: true,
202
224
  allowUnrecognizedEnumValues: true,
@@ -204,7 +226,13 @@ class Collections {
204
226
  breadcrumbsPrefix: ["response"],
205
227
  }));
206
228
  case 500:
207
- throw new Webflow.InternalServerError(_response.error.body);
229
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
230
+ unrecognizedObjectKeys: "passthrough",
231
+ allowUnrecognizedUnionMembers: true,
232
+ allowUnrecognizedEnumValues: true,
233
+ skipValidation: true,
234
+ breadcrumbsPrefix: ["response"],
235
+ }));
208
236
  default:
209
237
  throw new errors.WebflowError({
210
238
  statusCode: _response.error.statusCode,
@@ -219,7 +247,7 @@ class Collections {
219
247
  body: _response.error.rawBody,
220
248
  });
221
249
  case "timeout":
222
- throw new errors.WebflowTimeoutError();
250
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/collections.");
223
251
  case "unknown":
224
252
  throw new errors.WebflowError({
225
253
  message: _response.error.errorMessage,
@@ -228,7 +256,9 @@ class Collections {
228
256
  });
229
257
  }
230
258
  /**
231
- * Get the full details of a collection from its ID. </br></br> Required scope | `cms:read`
259
+ * Get the full details of a collection from its ID.
260
+ *
261
+ * Required scope | `cms:read`
232
262
  *
233
263
  * @param {string} collectionId - Unique identifier for a Collection
234
264
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -248,15 +278,7 @@ class Collections {
248
278
  const _response = yield core.fetcher({
249
279
  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)}`),
250
280
  method: "GET",
251
- headers: {
252
- Authorization: yield this._getAuthorizationHeader(),
253
- "X-Fern-Language": "JavaScript",
254
- "X-Fern-SDK-Name": "webflow-api",
255
- "X-Fern-SDK-Version": "2.4.0",
256
- "User-Agent": "webflow-api/2.4.0",
257
- "X-Fern-Runtime": core.RUNTIME.type,
258
- "X-Fern-Runtime-Version": core.RUNTIME.version,
259
- },
281
+ 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),
260
282
  contentType: "application/json",
261
283
  requestType: "json",
262
284
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -277,11 +299,23 @@ class Collections {
277
299
  case 400:
278
300
  throw new Webflow.BadRequestError(_response.error.body);
279
301
  case 401:
280
- throw new Webflow.UnauthorizedError(_response.error.body);
302
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
303
+ unrecognizedObjectKeys: "passthrough",
304
+ allowUnrecognizedUnionMembers: true,
305
+ allowUnrecognizedEnumValues: true,
306
+ skipValidation: true,
307
+ breadcrumbsPrefix: ["response"],
308
+ }));
281
309
  case 404:
282
- throw new Webflow.NotFoundError(_response.error.body);
310
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
311
+ unrecognizedObjectKeys: "passthrough",
312
+ allowUnrecognizedUnionMembers: true,
313
+ allowUnrecognizedEnumValues: true,
314
+ skipValidation: true,
315
+ breadcrumbsPrefix: ["response"],
316
+ }));
283
317
  case 429:
284
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
318
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
285
319
  unrecognizedObjectKeys: "passthrough",
286
320
  allowUnrecognizedUnionMembers: true,
287
321
  allowUnrecognizedEnumValues: true,
@@ -289,7 +323,13 @@ class Collections {
289
323
  breadcrumbsPrefix: ["response"],
290
324
  }));
291
325
  case 500:
292
- throw new Webflow.InternalServerError(_response.error.body);
326
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
327
+ unrecognizedObjectKeys: "passthrough",
328
+ allowUnrecognizedUnionMembers: true,
329
+ allowUnrecognizedEnumValues: true,
330
+ skipValidation: true,
331
+ breadcrumbsPrefix: ["response"],
332
+ }));
293
333
  default:
294
334
  throw new errors.WebflowError({
295
335
  statusCode: _response.error.statusCode,
@@ -304,7 +344,7 @@ class Collections {
304
344
  body: _response.error.rawBody,
305
345
  });
306
346
  case "timeout":
307
- throw new errors.WebflowTimeoutError();
347
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /collections/{collection_id}.");
308
348
  case "unknown":
309
349
  throw new errors.WebflowError({
310
350
  message: _response.error.errorMessage,
@@ -313,7 +353,9 @@ class Collections {
313
353
  });
314
354
  }
315
355
  /**
316
- * Delete a collection using its ID. </br></br> Required scope | `cms:write`
356
+ * Delete a collection using its ID.
357
+ *
358
+ * Required scope | `cms:write`
317
359
  *
318
360
  * @param {string} collectionId - Unique identifier for a Collection
319
361
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -325,23 +367,15 @@ class Collections {
325
367
  * @throws {@link Webflow.InternalServerError}
326
368
  *
327
369
  * @example
328
- * await client.collections.deleteCollection("580e63fc8c9a982ac9b8b745")
370
+ * await client.collections.delete("580e63fc8c9a982ac9b8b745")
329
371
  */
330
- deleteCollection(collectionId, requestOptions) {
372
+ delete(collectionId, requestOptions) {
331
373
  var _a;
332
374
  return __awaiter(this, void 0, void 0, function* () {
333
375
  const _response = yield core.fetcher({
334
376
  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)}`),
335
377
  method: "DELETE",
336
- headers: {
337
- Authorization: yield this._getAuthorizationHeader(),
338
- "X-Fern-Language": "JavaScript",
339
- "X-Fern-SDK-Name": "webflow-api",
340
- "X-Fern-SDK-Version": "2.4.0",
341
- "User-Agent": "webflow-api/2.4.0",
342
- "X-Fern-Runtime": core.RUNTIME.type,
343
- "X-Fern-Runtime-Version": core.RUNTIME.version,
344
- },
378
+ 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),
345
379
  contentType: "application/json",
346
380
  requestType: "json",
347
381
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -356,91 +390,23 @@ class Collections {
356
390
  case 400:
357
391
  throw new Webflow.BadRequestError(_response.error.body);
358
392
  case 401:
359
- throw new Webflow.UnauthorizedError(_response.error.body);
360
- case 404:
361
- throw new Webflow.NotFoundError(_response.error.body);
362
- case 429:
363
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
393
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
364
394
  unrecognizedObjectKeys: "passthrough",
365
395
  allowUnrecognizedUnionMembers: true,
366
396
  allowUnrecognizedEnumValues: true,
367
397
  skipValidation: true,
368
398
  breadcrumbsPrefix: ["response"],
369
399
  }));
370
- case 500:
371
- throw new Webflow.InternalServerError(_response.error.body);
372
- default:
373
- throw new errors.WebflowError({
374
- statusCode: _response.error.statusCode,
375
- body: _response.error.body,
376
- });
377
- }
378
- }
379
- switch (_response.error.reason) {
380
- case "non-json":
381
- throw new errors.WebflowError({
382
- statusCode: _response.error.statusCode,
383
- body: _response.error.rawBody,
384
- });
385
- case "timeout":
386
- throw new errors.WebflowTimeoutError();
387
- case "unknown":
388
- throw new errors.WebflowError({
389
- message: _response.error.errorMessage,
390
- });
391
- }
392
- });
393
- }
394
- /**
395
- * Delete a custom field in a collection. This endpoint does not currently support bulk deletion. </br></br> Required scope | `cms:write`
396
- *
397
- * @param {string} collectionId - Unique identifier for a Collection
398
- * @param {string} fieldId - Unique identifier for a Field in a collection
399
- * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
400
- *
401
- * @throws {@link Webflow.BadRequestError}
402
- * @throws {@link Webflow.UnauthorizedError}
403
- * @throws {@link Webflow.NotFoundError}
404
- * @throws {@link Webflow.TooManyRequestsError}
405
- * @throws {@link Webflow.InternalServerError}
406
- *
407
- * @example
408
- * await client.collections.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745")
409
- */
410
- delete(collectionId, fieldId, requestOptions) {
411
- var _a;
412
- return __awaiter(this, void 0, void 0, function* () {
413
- const _response = yield core.fetcher({
414
- 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)}`),
415
- method: "DELETE",
416
- headers: {
417
- Authorization: yield this._getAuthorizationHeader(),
418
- "X-Fern-Language": "JavaScript",
419
- "X-Fern-SDK-Name": "webflow-api",
420
- "X-Fern-SDK-Version": "2.4.0",
421
- "User-Agent": "webflow-api/2.4.0",
422
- "X-Fern-Runtime": core.RUNTIME.type,
423
- "X-Fern-Runtime-Version": core.RUNTIME.version,
424
- },
425
- contentType: "application/json",
426
- requestType: "json",
427
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
428
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
429
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
430
- });
431
- if (_response.ok) {
432
- return;
433
- }
434
- if (_response.error.reason === "status-code") {
435
- switch (_response.error.statusCode) {
436
- case 400:
437
- throw new Webflow.BadRequestError(_response.error.body);
438
- case 401:
439
- throw new Webflow.UnauthorizedError(_response.error.body);
440
400
  case 404:
441
- throw new Webflow.NotFoundError(_response.error.body);
401
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
402
+ unrecognizedObjectKeys: "passthrough",
403
+ allowUnrecognizedUnionMembers: true,
404
+ allowUnrecognizedEnumValues: true,
405
+ skipValidation: true,
406
+ breadcrumbsPrefix: ["response"],
407
+ }));
442
408
  case 429:
443
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
409
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
444
410
  unrecognizedObjectKeys: "passthrough",
445
411
  allowUnrecognizedUnionMembers: true,
446
412
  allowUnrecognizedEnumValues: true,
@@ -448,7 +414,13 @@ class Collections {
448
414
  breadcrumbsPrefix: ["response"],
449
415
  }));
450
416
  case 500:
451
- throw new Webflow.InternalServerError(_response.error.body);
417
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
418
+ unrecognizedObjectKeys: "passthrough",
419
+ allowUnrecognizedUnionMembers: true,
420
+ allowUnrecognizedEnumValues: true,
421
+ skipValidation: true,
422
+ breadcrumbsPrefix: ["response"],
423
+ }));
452
424
  default:
453
425
  throw new errors.WebflowError({
454
426
  statusCode: _response.error.statusCode,
@@ -463,7 +435,7 @@ class Collections {
463
435
  body: _response.error.rawBody,
464
436
  });
465
437
  case "timeout":
466
- throw new errors.WebflowTimeoutError();
438
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /collections/{collection_id}.");
467
439
  case "unknown":
468
440
  throw new errors.WebflowError({
469
441
  message: _response.error.errorMessage,
@@ -16,13 +16,24 @@ export declare namespace Fields {
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 Fields {
22
24
  protected readonly _options: Fields.Options;
23
25
  constructor(_options: Fields.Options);
24
26
  /**
25
- * 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`
27
+ * Create a custom field in a collection.
28
+ *
29
+ * Slugs must be all lowercase letters without spaces.
30
+ * If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will
31
+ * convert the slug to lowercase and replace spaces with "-."
32
+ *
33
+ * Only some field types can be created through the API.
34
+ * This endpoint does not currently support bulk creation.
35
+ *
36
+ * Required scope | `cms:write`
26
37
  *
27
38
  * @param {string} collectionId - Unique identifier for a Collection
28
39
  * @param {Webflow.collections.FieldCreate} request
@@ -44,7 +55,28 @@ export declare class Fields {
44
55
  */
45
56
  create(collectionId: string, request: Webflow.collections.FieldCreate, requestOptions?: Fields.RequestOptions): Promise<Webflow.Field>;
46
57
  /**
47
- * Update a custom field in a collection. </br></br> Required scope | `cms:write`
58
+ * Delete a custom field in a collection. This endpoint does not currently support bulk deletion.
59
+ *
60
+ * Required scope | `cms:write`
61
+ *
62
+ * @param {string} collectionId - Unique identifier for a Collection
63
+ * @param {string} fieldId - Unique identifier for a Field in a collection
64
+ * @param {Fields.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link Webflow.BadRequestError}
67
+ * @throws {@link Webflow.UnauthorizedError}
68
+ * @throws {@link Webflow.NotFoundError}
69
+ * @throws {@link Webflow.TooManyRequestsError}
70
+ * @throws {@link Webflow.InternalServerError}
71
+ *
72
+ * @example
73
+ * await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745")
74
+ */
75
+ delete(collectionId: string, fieldId: string, requestOptions?: Fields.RequestOptions): Promise<void>;
76
+ /**
77
+ * Update a custom field in a collection.
78
+ *
79
+ * Required scope | `cms:write`
48
80
  *
49
81
  * @param {string} collectionId - Unique identifier for a Collection
50
82
  * @param {string} fieldId - Unique identifier for a Field in a collection