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
@@ -16,13 +16,17 @@ export declare namespace Users {
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 Users {
22
24
  protected readonly _options: Users.Options;
23
25
  constructor(_options: Users.Options);
24
26
  /**
25
- * Get a list of users for a site <br><br> Required scope | `users:read`
27
+ * Get a list of users for a site
28
+ *
29
+ * Required scope | `users:read`
26
30
  *
27
31
  * @param {string} siteId - Unique identifier for a Site
28
32
  * @param {Webflow.UsersListRequest} request
@@ -40,7 +44,9 @@ export declare class Users {
40
44
  */
41
45
  list(siteId: string, request?: Webflow.UsersListRequest, requestOptions?: Users.RequestOptions): Promise<Webflow.UserList>;
42
46
  /**
43
- * Get a User by ID <br><br> Required scope | `users:read`
47
+ * Get a User by ID
48
+ *
49
+ * Required scope | `users:read`
44
50
  *
45
51
  * @param {string} siteId - Unique identifier for a Site
46
52
  * @param {string} userId - Unique identifier for a User
@@ -58,7 +64,9 @@ export declare class Users {
58
64
  */
59
65
  get(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise<Webflow.User>;
60
66
  /**
61
- * Delete a User by ID <br><br> Required scope | `users:write`
67
+ * Delete a User by ID
68
+ *
69
+ * Required scope | `users:write`
62
70
  *
63
71
  * @param {string} siteId - Unique identifier for a Site
64
72
  * @param {string} userId - Unique identifier for a User
@@ -76,9 +84,12 @@ export declare class Users {
76
84
  */
77
85
  delete(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise<void>;
78
86
  /**
79
- * Update a User by ID <br><br> Required scope | `users:write`
87
+ * Update a User by ID
80
88
  *
81
- * <aside class="notice">The <code>email</code> and <code>password</code> fields cannot be updated using this endpoint</aside>
89
+ * Required scope | `users:write`
90
+ *
91
+ * <Note class="notice">The <code>email</code> and <code>password</code>
92
+ * fields cannot be updated using this endpoint</Note>
82
93
  *
83
94
  * @param {string} siteId - Unique identifier for a Site
84
95
  * @param {string} userId - Unique identifier for a User
@@ -104,7 +115,11 @@ export declare class Users {
104
115
  */
105
116
  update(siteId: string, userId: string, request?: Webflow.UsersUpdateRequest, requestOptions?: Users.RequestOptions): Promise<Webflow.User>;
106
117
  /**
107
- * Create and invite a user with an email address. The user will be sent and invite via email, which they will need to accept in order to join paid Access Groups. <br><br> Required scope | `users:write`
118
+ * Create and invite a user with an email address.
119
+ *
120
+ * The user will be sent and invite via email, which they will need to accept in order to join paid any paid access group.
121
+ *
122
+ * Required scope | `users:write`
108
123
  *
109
124
  * @param {string} siteId - Unique identifier for a Site
110
125
  * @param {Webflow.UsersInviteRequest} request
@@ -50,7 +50,9 @@ class Users {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Get a list of users for a site <br><br> Required scope | `users:read`
53
+ * Get a list of users for a site
54
+ *
55
+ * Required scope | `users:read`
54
56
  *
55
57
  * @param {string} siteId - Unique identifier for a Site
56
58
  * @param {Webflow.UsersListRequest} request
@@ -83,15 +85,7 @@ class Users {
83
85
  const _response = yield core.fetcher({
84
86
  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)}/users`),
85
87
  method: "GET",
86
- headers: {
87
- Authorization: yield this._getAuthorizationHeader(),
88
- "X-Fern-Language": "JavaScript",
89
- "X-Fern-SDK-Name": "webflow-api",
90
- "X-Fern-SDK-Version": "2.4.0",
91
- "User-Agent": "webflow-api/2.4.0",
92
- "X-Fern-Runtime": core.RUNTIME.type,
93
- "X-Fern-Runtime-Version": core.RUNTIME.version,
94
- },
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),
95
89
  contentType: "application/json",
96
90
  queryParameters: _queryParams,
97
91
  requestType: "json",
@@ -113,13 +107,25 @@ class Users {
113
107
  case 400:
114
108
  throw new Webflow.BadRequestError(_response.error.body);
115
109
  case 401:
116
- throw new Webflow.UnauthorizedError(_response.error.body);
110
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
111
+ unrecognizedObjectKeys: "passthrough",
112
+ allowUnrecognizedUnionMembers: true,
113
+ allowUnrecognizedEnumValues: true,
114
+ skipValidation: true,
115
+ breadcrumbsPrefix: ["response"],
116
+ }));
117
117
  case 403:
118
118
  throw new Webflow.ForbiddenError(_response.error.body);
119
119
  case 404:
120
- throw new Webflow.NotFoundError(_response.error.body);
120
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
121
+ unrecognizedObjectKeys: "passthrough",
122
+ allowUnrecognizedUnionMembers: true,
123
+ allowUnrecognizedEnumValues: true,
124
+ skipValidation: true,
125
+ breadcrumbsPrefix: ["response"],
126
+ }));
121
127
  case 429:
122
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
128
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
123
129
  unrecognizedObjectKeys: "passthrough",
124
130
  allowUnrecognizedUnionMembers: true,
125
131
  allowUnrecognizedEnumValues: true,
@@ -127,7 +133,13 @@ class Users {
127
133
  breadcrumbsPrefix: ["response"],
128
134
  }));
129
135
  case 500:
130
- throw new Webflow.InternalServerError(_response.error.body);
136
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
137
+ unrecognizedObjectKeys: "passthrough",
138
+ allowUnrecognizedUnionMembers: true,
139
+ allowUnrecognizedEnumValues: true,
140
+ skipValidation: true,
141
+ breadcrumbsPrefix: ["response"],
142
+ }));
131
143
  default:
132
144
  throw new errors.WebflowError({
133
145
  statusCode: _response.error.statusCode,
@@ -142,7 +154,7 @@ class Users {
142
154
  body: _response.error.rawBody,
143
155
  });
144
156
  case "timeout":
145
- throw new errors.WebflowTimeoutError();
157
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/users.");
146
158
  case "unknown":
147
159
  throw new errors.WebflowError({
148
160
  message: _response.error.errorMessage,
@@ -151,7 +163,9 @@ class Users {
151
163
  });
152
164
  }
153
165
  /**
154
- * Get a User by ID <br><br> Required scope | `users:read`
166
+ * Get a User by ID
167
+ *
168
+ * Required scope | `users:read`
155
169
  *
156
170
  * @param {string} siteId - Unique identifier for a Site
157
171
  * @param {string} userId - Unique identifier for a User
@@ -173,15 +187,7 @@ class Users {
173
187
  const _response = yield core.fetcher({
174
188
  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)}/users/${encodeURIComponent(userId)}`),
175
189
  method: "GET",
176
- headers: {
177
- Authorization: yield this._getAuthorizationHeader(),
178
- "X-Fern-Language": "JavaScript",
179
- "X-Fern-SDK-Name": "webflow-api",
180
- "X-Fern-SDK-Version": "2.4.0",
181
- "User-Agent": "webflow-api/2.4.0",
182
- "X-Fern-Runtime": core.RUNTIME.type,
183
- "X-Fern-Runtime-Version": core.RUNTIME.version,
184
- },
190
+ 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),
185
191
  contentType: "application/json",
186
192
  requestType: "json",
187
193
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -202,13 +208,25 @@ class Users {
202
208
  case 400:
203
209
  throw new Webflow.BadRequestError(_response.error.body);
204
210
  case 401:
205
- throw new Webflow.UnauthorizedError(_response.error.body);
211
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
212
+ unrecognizedObjectKeys: "passthrough",
213
+ allowUnrecognizedUnionMembers: true,
214
+ allowUnrecognizedEnumValues: true,
215
+ skipValidation: true,
216
+ breadcrumbsPrefix: ["response"],
217
+ }));
206
218
  case 403:
207
219
  throw new Webflow.ForbiddenError(_response.error.body);
208
220
  case 404:
209
- throw new Webflow.NotFoundError(_response.error.body);
221
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
222
+ unrecognizedObjectKeys: "passthrough",
223
+ allowUnrecognizedUnionMembers: true,
224
+ allowUnrecognizedEnumValues: true,
225
+ skipValidation: true,
226
+ breadcrumbsPrefix: ["response"],
227
+ }));
210
228
  case 429:
211
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
229
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
212
230
  unrecognizedObjectKeys: "passthrough",
213
231
  allowUnrecognizedUnionMembers: true,
214
232
  allowUnrecognizedEnumValues: true,
@@ -216,7 +234,13 @@ class Users {
216
234
  breadcrumbsPrefix: ["response"],
217
235
  }));
218
236
  case 500:
219
- throw new Webflow.InternalServerError(_response.error.body);
237
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
238
+ unrecognizedObjectKeys: "passthrough",
239
+ allowUnrecognizedUnionMembers: true,
240
+ allowUnrecognizedEnumValues: true,
241
+ skipValidation: true,
242
+ breadcrumbsPrefix: ["response"],
243
+ }));
220
244
  default:
221
245
  throw new errors.WebflowError({
222
246
  statusCode: _response.error.statusCode,
@@ -231,7 +255,7 @@ class Users {
231
255
  body: _response.error.rawBody,
232
256
  });
233
257
  case "timeout":
234
- throw new errors.WebflowTimeoutError();
258
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/users/{user_id}.");
235
259
  case "unknown":
236
260
  throw new errors.WebflowError({
237
261
  message: _response.error.errorMessage,
@@ -240,7 +264,9 @@ class Users {
240
264
  });
241
265
  }
242
266
  /**
243
- * Delete a User by ID <br><br> Required scope | `users:write`
267
+ * Delete a User by ID
268
+ *
269
+ * Required scope | `users:write`
244
270
  *
245
271
  * @param {string} siteId - Unique identifier for a Site
246
272
  * @param {string} userId - Unique identifier for a User
@@ -262,15 +288,7 @@ class Users {
262
288
  const _response = yield core.fetcher({
263
289
  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)}/users/${encodeURIComponent(userId)}`),
264
290
  method: "DELETE",
265
- headers: {
266
- Authorization: yield this._getAuthorizationHeader(),
267
- "X-Fern-Language": "JavaScript",
268
- "X-Fern-SDK-Name": "webflow-api",
269
- "X-Fern-SDK-Version": "2.4.0",
270
- "User-Agent": "webflow-api/2.4.0",
271
- "X-Fern-Runtime": core.RUNTIME.type,
272
- "X-Fern-Runtime-Version": core.RUNTIME.version,
273
- },
291
+ 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),
274
292
  contentType: "application/json",
275
293
  requestType: "json",
276
294
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -285,13 +303,25 @@ class Users {
285
303
  case 400:
286
304
  throw new Webflow.BadRequestError(_response.error.body);
287
305
  case 401:
288
- throw new Webflow.UnauthorizedError(_response.error.body);
306
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
307
+ unrecognizedObjectKeys: "passthrough",
308
+ allowUnrecognizedUnionMembers: true,
309
+ allowUnrecognizedEnumValues: true,
310
+ skipValidation: true,
311
+ breadcrumbsPrefix: ["response"],
312
+ }));
289
313
  case 403:
290
314
  throw new Webflow.ForbiddenError(_response.error.body);
291
315
  case 404:
292
- throw new Webflow.NotFoundError(_response.error.body);
316
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
317
+ unrecognizedObjectKeys: "passthrough",
318
+ allowUnrecognizedUnionMembers: true,
319
+ allowUnrecognizedEnumValues: true,
320
+ skipValidation: true,
321
+ breadcrumbsPrefix: ["response"],
322
+ }));
293
323
  case 429:
294
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
324
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
295
325
  unrecognizedObjectKeys: "passthrough",
296
326
  allowUnrecognizedUnionMembers: true,
297
327
  allowUnrecognizedEnumValues: true,
@@ -299,7 +329,13 @@ class Users {
299
329
  breadcrumbsPrefix: ["response"],
300
330
  }));
301
331
  case 500:
302
- throw new Webflow.InternalServerError(_response.error.body);
332
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
333
+ unrecognizedObjectKeys: "passthrough",
334
+ allowUnrecognizedUnionMembers: true,
335
+ allowUnrecognizedEnumValues: true,
336
+ skipValidation: true,
337
+ breadcrumbsPrefix: ["response"],
338
+ }));
303
339
  default:
304
340
  throw new errors.WebflowError({
305
341
  statusCode: _response.error.statusCode,
@@ -314,7 +350,7 @@ class Users {
314
350
  body: _response.error.rawBody,
315
351
  });
316
352
  case "timeout":
317
- throw new errors.WebflowTimeoutError();
353
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}/users/{user_id}.");
318
354
  case "unknown":
319
355
  throw new errors.WebflowError({
320
356
  message: _response.error.errorMessage,
@@ -323,9 +359,12 @@ class Users {
323
359
  });
324
360
  }
325
361
  /**
326
- * Update a User by ID <br><br> Required scope | `users:write`
362
+ * Update a User by ID
363
+ *
364
+ * Required scope | `users:write`
327
365
  *
328
- * <aside class="notice">The <code>email</code> and <code>password</code> fields cannot be updated using this endpoint</aside>
366
+ * <Note class="notice">The <code>email</code> and <code>password</code>
367
+ * fields cannot be updated using this endpoint</Note>
329
368
  *
330
369
  * @param {string} siteId - Unique identifier for a Site
331
370
  * @param {string} userId - Unique identifier for a User
@@ -355,18 +394,14 @@ class Users {
355
394
  const _response = yield core.fetcher({
356
395
  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)}/users/${encodeURIComponent(userId)}`),
357
396
  method: "PATCH",
358
- headers: {
359
- Authorization: yield this._getAuthorizationHeader(),
360
- "X-Fern-Language": "JavaScript",
361
- "X-Fern-SDK-Name": "webflow-api",
362
- "X-Fern-SDK-Version": "2.4.0",
363
- "User-Agent": "webflow-api/2.4.0",
364
- "X-Fern-Runtime": core.RUNTIME.type,
365
- "X-Fern-Runtime-Version": core.RUNTIME.version,
366
- },
397
+ 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),
367
398
  contentType: "application/json",
368
399
  requestType: "json",
369
- body: serializers.UsersUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
400
+ body: serializers.UsersUpdateRequest.jsonOrThrow(request, {
401
+ unrecognizedObjectKeys: "passthrough",
402
+ allowUnrecognizedUnionMembers: true,
403
+ allowUnrecognizedEnumValues: true,
404
+ }),
370
405
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
371
406
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
372
407
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -385,13 +420,25 @@ class Users {
385
420
  case 400:
386
421
  throw new Webflow.BadRequestError(_response.error.body);
387
422
  case 401:
388
- throw new Webflow.UnauthorizedError(_response.error.body);
423
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
424
+ unrecognizedObjectKeys: "passthrough",
425
+ allowUnrecognizedUnionMembers: true,
426
+ allowUnrecognizedEnumValues: true,
427
+ skipValidation: true,
428
+ breadcrumbsPrefix: ["response"],
429
+ }));
389
430
  case 403:
390
431
  throw new Webflow.ForbiddenError(_response.error.body);
391
432
  case 404:
392
- throw new Webflow.NotFoundError(_response.error.body);
433
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
434
+ unrecognizedObjectKeys: "passthrough",
435
+ allowUnrecognizedUnionMembers: true,
436
+ allowUnrecognizedEnumValues: true,
437
+ skipValidation: true,
438
+ breadcrumbsPrefix: ["response"],
439
+ }));
393
440
  case 429:
394
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
441
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
395
442
  unrecognizedObjectKeys: "passthrough",
396
443
  allowUnrecognizedUnionMembers: true,
397
444
  allowUnrecognizedEnumValues: true,
@@ -399,7 +446,13 @@ class Users {
399
446
  breadcrumbsPrefix: ["response"],
400
447
  }));
401
448
  case 500:
402
- throw new Webflow.InternalServerError(_response.error.body);
449
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
450
+ unrecognizedObjectKeys: "passthrough",
451
+ allowUnrecognizedUnionMembers: true,
452
+ allowUnrecognizedEnumValues: true,
453
+ skipValidation: true,
454
+ breadcrumbsPrefix: ["response"],
455
+ }));
403
456
  default:
404
457
  throw new errors.WebflowError({
405
458
  statusCode: _response.error.statusCode,
@@ -414,7 +467,7 @@ class Users {
414
467
  body: _response.error.rawBody,
415
468
  });
416
469
  case "timeout":
417
- throw new errors.WebflowTimeoutError();
470
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}/users/{user_id}.");
418
471
  case "unknown":
419
472
  throw new errors.WebflowError({
420
473
  message: _response.error.errorMessage,
@@ -423,7 +476,11 @@ class Users {
423
476
  });
424
477
  }
425
478
  /**
426
- * Create and invite a user with an email address. The user will be sent and invite via email, which they will need to accept in order to join paid Access Groups. <br><br> Required scope | `users:write`
479
+ * Create and invite a user with an email address.
480
+ *
481
+ * The user will be sent and invite via email, which they will need to accept in order to join paid any paid access group.
482
+ *
483
+ * Required scope | `users:write`
427
484
  *
428
485
  * @param {string} siteId - Unique identifier for a Site
429
486
  * @param {Webflow.UsersInviteRequest} request
@@ -449,18 +506,14 @@ class Users {
449
506
  const _response = yield core.fetcher({
450
507
  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)}/users/invite`),
451
508
  method: "POST",
452
- headers: {
453
- Authorization: yield this._getAuthorizationHeader(),
454
- "X-Fern-Language": "JavaScript",
455
- "X-Fern-SDK-Name": "webflow-api",
456
- "X-Fern-SDK-Version": "2.4.0",
457
- "User-Agent": "webflow-api/2.4.0",
458
- "X-Fern-Runtime": core.RUNTIME.type,
459
- "X-Fern-Runtime-Version": core.RUNTIME.version,
460
- },
509
+ 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),
461
510
  contentType: "application/json",
462
511
  requestType: "json",
463
- body: serializers.UsersInviteRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
512
+ body: serializers.UsersInviteRequest.jsonOrThrow(request, {
513
+ unrecognizedObjectKeys: "passthrough",
514
+ allowUnrecognizedUnionMembers: true,
515
+ allowUnrecognizedEnumValues: true,
516
+ }),
464
517
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
465
518
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
466
519
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -479,15 +532,27 @@ class Users {
479
532
  case 400:
480
533
  throw new Webflow.BadRequestError(_response.error.body);
481
534
  case 401:
482
- throw new Webflow.UnauthorizedError(_response.error.body);
535
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
536
+ unrecognizedObjectKeys: "passthrough",
537
+ allowUnrecognizedUnionMembers: true,
538
+ allowUnrecognizedEnumValues: true,
539
+ skipValidation: true,
540
+ breadcrumbsPrefix: ["response"],
541
+ }));
483
542
  case 403:
484
543
  throw new Webflow.ForbiddenError(_response.error.body);
485
544
  case 404:
486
- throw new Webflow.NotFoundError(_response.error.body);
545
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
546
+ unrecognizedObjectKeys: "passthrough",
547
+ allowUnrecognizedUnionMembers: true,
548
+ allowUnrecognizedEnumValues: true,
549
+ skipValidation: true,
550
+ breadcrumbsPrefix: ["response"],
551
+ }));
487
552
  case 409:
488
553
  throw new Webflow.ConflictError(_response.error.body);
489
554
  case 429:
490
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
555
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
491
556
  unrecognizedObjectKeys: "passthrough",
492
557
  allowUnrecognizedUnionMembers: true,
493
558
  allowUnrecognizedEnumValues: true,
@@ -495,7 +560,13 @@ class Users {
495
560
  breadcrumbsPrefix: ["response"],
496
561
  }));
497
562
  case 500:
498
- throw new Webflow.InternalServerError(_response.error.body);
563
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
564
+ unrecognizedObjectKeys: "passthrough",
565
+ allowUnrecognizedUnionMembers: true,
566
+ allowUnrecognizedEnumValues: true,
567
+ skipValidation: true,
568
+ breadcrumbsPrefix: ["response"],
569
+ }));
499
570
  default:
500
571
  throw new errors.WebflowError({
501
572
  statusCode: _response.error.statusCode,
@@ -510,7 +581,7 @@ class Users {
510
581
  body: _response.error.rawBody,
511
582
  });
512
583
  case "timeout":
513
- throw new errors.WebflowTimeoutError();
584
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/users/invite.");
514
585
  case "unknown":
515
586
  throw new errors.WebflowError({
516
587
  message: _response.error.errorMessage,
@@ -16,13 +16,17 @@ export declare namespace Webhooks {
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 Webhooks {
22
24
  protected readonly _options: Webhooks.Options;
23
25
  constructor(_options: Webhooks.Options);
24
26
  /**
25
- * List all App-created Webhooks registered for a given site </br></br> Required scope | `sites:read`
27
+ * List all App-created Webhooks registered for a given site
28
+ *
29
+ * Required scope | `sites:read`
26
30
  *
27
31
  * @param {string} siteId - Unique identifier for a Site
28
32
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
@@ -38,7 +42,12 @@ export declare class Webhooks {
38
42
  */
39
43
  list(siteId: string, requestOptions?: Webhooks.RequestOptions): Promise<Webflow.WebhookList>;
40
44
  /**
41
- * Create a new Webhook, to be notified when Webflow resources change. Limit of 75 registrations per `triggerType`, per site. <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote> Required scope | `sites:write`
45
+ * Create a new Webhook.
46
+ *
47
+ * Limit of 75 registrations per `triggerType`, per site.
48
+ *
49
+ * <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
50
+ * Required scope | `sites:write`
42
51
  *
43
52
  * @param {string} siteId - Unique identifier for a Site
44
53
  * @param {Webflow.Webhook} request
@@ -65,6 +74,8 @@ export declare class Webhooks {
65
74
  /**
66
75
  * Get a specific Webhook instance
67
76
  *
77
+ * Required scope: `sites:read`
78
+ *
68
79
  * @param {string} webhookId - Unique identifier for a Webhook
69
80
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
70
81
  *
@@ -81,6 +92,8 @@ export declare class Webhooks {
81
92
  /**
82
93
  * Remove a Webhook
83
94
  *
95
+ * Required scope: `sites:read`
96
+ *
84
97
  * @param {string} webhookId - Unique identifier for a Webhook
85
98
  * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
86
99
  *