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
@@ -62,7 +62,9 @@ class Pages {
62
62
  this._options = _options;
63
63
  }
64
64
  /**
65
- * List of all pages for a site </br></br> Required scope | `pages:read`
65
+ * List of all pages for a site.
66
+ *
67
+ * Required scope | `pages:read`
66
68
  *
67
69
  * @param {string} siteId - Unique identifier for a Site
68
70
  * @param {Webflow.PagesListRequest} request
@@ -76,16 +78,16 @@ class Pages {
76
78
  *
77
79
  * @example
78
80
  * await client.pages.list("580e63e98c9a982ac9b8b741", {
79
- * locale: "65427cf400e02b306eaa04a0"
81
+ * localeId: "65427cf400e02b306eaa04a0"
80
82
  * })
81
83
  */
82
84
  list(siteId, request = {}, requestOptions) {
83
85
  var _a;
84
86
  return __awaiter(this, void 0, void 0, function* () {
85
- const { locale, limit, offset } = request;
87
+ const { localeId, limit, offset } = request;
86
88
  const _queryParams = {};
87
- if (locale != null) {
88
- _queryParams["locale"] = locale;
89
+ if (localeId != null) {
90
+ _queryParams["localeId"] = localeId;
89
91
  }
90
92
  if (limit != null) {
91
93
  _queryParams["limit"] = limit.toString();
@@ -96,15 +98,7 @@ class Pages {
96
98
  const _response = yield core.fetcher({
97
99
  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)}/pages`),
98
100
  method: "GET",
99
- headers: {
100
- Authorization: yield this._getAuthorizationHeader(),
101
- "X-Fern-Language": "JavaScript",
102
- "X-Fern-SDK-Name": "webflow-api",
103
- "X-Fern-SDK-Version": "2.4.0",
104
- "User-Agent": "webflow-api/2.4.0",
105
- "X-Fern-Runtime": core.RUNTIME.type,
106
- "X-Fern-Runtime-Version": core.RUNTIME.version,
107
- },
101
+ 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),
108
102
  contentType: "application/json",
109
103
  queryParameters: _queryParams,
110
104
  requestType: "json",
@@ -126,11 +120,23 @@ class Pages {
126
120
  case 400:
127
121
  throw new Webflow.BadRequestError(_response.error.body);
128
122
  case 401:
129
- throw new Webflow.UnauthorizedError(_response.error.body);
123
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
124
+ unrecognizedObjectKeys: "passthrough",
125
+ allowUnrecognizedUnionMembers: true,
126
+ allowUnrecognizedEnumValues: true,
127
+ skipValidation: true,
128
+ breadcrumbsPrefix: ["response"],
129
+ }));
130
130
  case 404:
131
- throw new Webflow.NotFoundError(_response.error.body);
131
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
132
+ unrecognizedObjectKeys: "passthrough",
133
+ allowUnrecognizedUnionMembers: true,
134
+ allowUnrecognizedEnumValues: true,
135
+ skipValidation: true,
136
+ breadcrumbsPrefix: ["response"],
137
+ }));
132
138
  case 429:
133
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
139
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
134
140
  unrecognizedObjectKeys: "passthrough",
135
141
  allowUnrecognizedUnionMembers: true,
136
142
  allowUnrecognizedEnumValues: true,
@@ -138,7 +144,13 @@ class Pages {
138
144
  breadcrumbsPrefix: ["response"],
139
145
  }));
140
146
  case 500:
141
- throw new Webflow.InternalServerError(_response.error.body);
147
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
148
+ unrecognizedObjectKeys: "passthrough",
149
+ allowUnrecognizedUnionMembers: true,
150
+ allowUnrecognizedEnumValues: true,
151
+ skipValidation: true,
152
+ breadcrumbsPrefix: ["response"],
153
+ }));
142
154
  default:
143
155
  throw new errors.WebflowError({
144
156
  statusCode: _response.error.statusCode,
@@ -153,7 +165,7 @@ class Pages {
153
165
  body: _response.error.rawBody,
154
166
  });
155
167
  case "timeout":
156
- throw new errors.WebflowTimeoutError();
168
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/pages.");
157
169
  case "unknown":
158
170
  throw new errors.WebflowError({
159
171
  message: _response.error.errorMessage,
@@ -162,7 +174,9 @@ class Pages {
162
174
  });
163
175
  }
164
176
  /**
165
- * Get metadata information for a single page </br></br> Required scope | `pages:read`
177
+ * Get metadata information for a single page.
178
+ *
179
+ * Required scope | `pages:read`
166
180
  *
167
181
  * @param {string} pageId - Unique identifier for a Page
168
182
  * @param {Webflow.PagesGetMetadataRequest} request
@@ -176,29 +190,21 @@ class Pages {
176
190
  *
177
191
  * @example
178
192
  * await client.pages.getMetadata("63c720f9347c2139b248e552", {
179
- * locale: "65427cf400e02b306eaa04a0"
193
+ * localeId: "65427cf400e02b306eaa04a0"
180
194
  * })
181
195
  */
182
196
  getMetadata(pageId, request = {}, requestOptions) {
183
197
  var _a;
184
198
  return __awaiter(this, void 0, void 0, function* () {
185
- const { locale } = request;
199
+ const { localeId } = request;
186
200
  const _queryParams = {};
187
- if (locale != null) {
188
- _queryParams["locale"] = locale;
201
+ if (localeId != null) {
202
+ _queryParams["localeId"] = localeId;
189
203
  }
190
204
  const _response = yield core.fetcher({
191
205
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}`),
192
206
  method: "GET",
193
- headers: {
194
- Authorization: yield this._getAuthorizationHeader(),
195
- "X-Fern-Language": "JavaScript",
196
- "X-Fern-SDK-Name": "webflow-api",
197
- "X-Fern-SDK-Version": "2.4.0",
198
- "User-Agent": "webflow-api/2.4.0",
199
- "X-Fern-Runtime": core.RUNTIME.type,
200
- "X-Fern-Runtime-Version": core.RUNTIME.version,
201
- },
207
+ 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),
202
208
  contentType: "application/json",
203
209
  queryParameters: _queryParams,
204
210
  requestType: "json",
@@ -220,11 +226,23 @@ class Pages {
220
226
  case 400:
221
227
  throw new Webflow.BadRequestError(_response.error.body);
222
228
  case 401:
223
- throw new Webflow.UnauthorizedError(_response.error.body);
229
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
230
+ unrecognizedObjectKeys: "passthrough",
231
+ allowUnrecognizedUnionMembers: true,
232
+ allowUnrecognizedEnumValues: true,
233
+ skipValidation: true,
234
+ breadcrumbsPrefix: ["response"],
235
+ }));
224
236
  case 404:
225
- throw new Webflow.NotFoundError(_response.error.body);
237
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
238
+ unrecognizedObjectKeys: "passthrough",
239
+ allowUnrecognizedUnionMembers: true,
240
+ allowUnrecognizedEnumValues: true,
241
+ skipValidation: true,
242
+ breadcrumbsPrefix: ["response"],
243
+ }));
226
244
  case 429:
227
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
245
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
228
246
  unrecognizedObjectKeys: "passthrough",
229
247
  allowUnrecognizedUnionMembers: true,
230
248
  allowUnrecognizedEnumValues: true,
@@ -232,7 +250,13 @@ class Pages {
232
250
  breadcrumbsPrefix: ["response"],
233
251
  }));
234
252
  case 500:
235
- throw new Webflow.InternalServerError(_response.error.body);
253
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
254
+ unrecognizedObjectKeys: "passthrough",
255
+ allowUnrecognizedUnionMembers: true,
256
+ allowUnrecognizedEnumValues: true,
257
+ skipValidation: true,
258
+ breadcrumbsPrefix: ["response"],
259
+ }));
236
260
  default:
237
261
  throw new errors.WebflowError({
238
262
  statusCode: _response.error.statusCode,
@@ -247,7 +271,7 @@ class Pages {
247
271
  body: _response.error.rawBody,
248
272
  });
249
273
  case "timeout":
250
- throw new errors.WebflowTimeoutError();
274
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /pages/{page_id}.");
251
275
  case "unknown":
252
276
  throw new errors.WebflowError({
253
277
  message: _response.error.errorMessage,
@@ -256,7 +280,9 @@ class Pages {
256
280
  });
257
281
  }
258
282
  /**
259
- * Update Page-level metadata, including SEO and Open Graph fields. </br></br> Required scope | `pages:write`
283
+ * Update Page-level metadata, including SEO and Open Graph fields.
284
+ *
285
+ * Required scope | `pages:write`
260
286
  *
261
287
  * @param {string} pageId - Unique identifier for a Page
262
288
  * @param {Webflow.UpdatePageSettingsRequest} request
@@ -270,19 +296,18 @@ class Pages {
270
296
  *
271
297
  * @example
272
298
  * await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
273
- * locale: "65427cf400e02b306eaa04a0",
299
+ * localeId: "65427cf400e02b306eaa04a0",
274
300
  * body: {
275
301
  * id: "6596da6045e56dee495bcbba",
276
302
  * siteId: "6258612d1ee792848f805dcf",
277
303
  * title: "Guide to the Galaxy",
278
304
  * slug: "guide-to-the-galaxy",
279
- * parentId: "6419db964a9c435aa3af6251",
280
- * collectionId: "6390c49774a71f12831a08e3",
281
305
  * createdOn: "2024-03-11T10:42:00Z",
282
306
  * lastUpdated: "2024-03-11T10:42:42Z",
283
307
  * archived: false,
284
308
  * draft: false,
285
309
  * canBranch: true,
310
+ * isBranch: false,
286
311
  * seo: {
287
312
  * title: "The Ultimate Hitchhiker's Guide to the Galaxy",
288
313
  * description: "Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels."
@@ -301,27 +326,23 @@ class Pages {
301
326
  updatePageSettings(pageId, request, requestOptions) {
302
327
  var _a;
303
328
  return __awaiter(this, void 0, void 0, function* () {
304
- const { locale, body: _body } = request;
329
+ const { localeId, body: _body } = request;
305
330
  const _queryParams = {};
306
- if (locale != null) {
307
- _queryParams["locale"] = locale;
331
+ if (localeId != null) {
332
+ _queryParams["localeId"] = localeId;
308
333
  }
309
334
  const _response = yield core.fetcher({
310
335
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}`),
311
336
  method: "PUT",
312
- headers: {
313
- Authorization: yield this._getAuthorizationHeader(),
314
- "X-Fern-Language": "JavaScript",
315
- "X-Fern-SDK-Name": "webflow-api",
316
- "X-Fern-SDK-Version": "2.4.0",
317
- "User-Agent": "webflow-api/2.4.0",
318
- "X-Fern-Runtime": core.RUNTIME.type,
319
- "X-Fern-Runtime-Version": core.RUNTIME.version,
320
- },
337
+ 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),
321
338
  contentType: "application/json",
322
339
  queryParameters: _queryParams,
323
340
  requestType: "json",
324
- body: serializers.Page.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
341
+ body: serializers.Page.jsonOrThrow(_body, {
342
+ unrecognizedObjectKeys: "passthrough",
343
+ allowUnrecognizedUnionMembers: true,
344
+ allowUnrecognizedEnumValues: true,
345
+ }),
325
346
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
326
347
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
327
348
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -340,11 +361,23 @@ class Pages {
340
361
  case 400:
341
362
  throw new Webflow.BadRequestError(_response.error.body);
342
363
  case 401:
343
- throw new Webflow.UnauthorizedError(_response.error.body);
364
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
365
+ unrecognizedObjectKeys: "passthrough",
366
+ allowUnrecognizedUnionMembers: true,
367
+ allowUnrecognizedEnumValues: true,
368
+ skipValidation: true,
369
+ breadcrumbsPrefix: ["response"],
370
+ }));
344
371
  case 404:
345
- throw new Webflow.NotFoundError(_response.error.body);
372
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
373
+ unrecognizedObjectKeys: "passthrough",
374
+ allowUnrecognizedUnionMembers: true,
375
+ allowUnrecognizedEnumValues: true,
376
+ skipValidation: true,
377
+ breadcrumbsPrefix: ["response"],
378
+ }));
346
379
  case 429:
347
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
380
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
348
381
  unrecognizedObjectKeys: "passthrough",
349
382
  allowUnrecognizedUnionMembers: true,
350
383
  allowUnrecognizedEnumValues: true,
@@ -352,7 +385,13 @@ class Pages {
352
385
  breadcrumbsPrefix: ["response"],
353
386
  }));
354
387
  case 500:
355
- throw new Webflow.InternalServerError(_response.error.body);
388
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
389
+ unrecognizedObjectKeys: "passthrough",
390
+ allowUnrecognizedUnionMembers: true,
391
+ allowUnrecognizedEnumValues: true,
392
+ skipValidation: true,
393
+ breadcrumbsPrefix: ["response"],
394
+ }));
356
395
  default:
357
396
  throw new errors.WebflowError({
358
397
  statusCode: _response.error.statusCode,
@@ -367,7 +406,7 @@ class Pages {
367
406
  body: _response.error.rawBody,
368
407
  });
369
408
  case "timeout":
370
- throw new errors.WebflowTimeoutError();
409
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PUT /pages/{page_id}.");
371
410
  case "unknown":
372
411
  throw new errors.WebflowError({
373
412
  message: _response.error.errorMessage,
@@ -376,7 +415,11 @@ class Pages {
376
415
  });
377
416
  }
378
417
  /**
379
- * Get static content from a static page. </br> If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale</br></br> Required scope | `pages:read`
418
+ * Get static content from a static page.
419
+ *
420
+ * If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale.
421
+ *
422
+ * Required scope | `pages:read`
380
423
  *
381
424
  * @param {string} pageId - Unique identifier for a Page
382
425
  * @param {Webflow.PagesGetContentRequest} request
@@ -391,16 +434,16 @@ class Pages {
391
434
  *
392
435
  * @example
393
436
  * await client.pages.getContent("63c720f9347c2139b248e552", {
394
- * locale: "65427cf400e02b306eaa04a0"
437
+ * localeId: "65427cf400e02b306eaa04a0"
395
438
  * })
396
439
  */
397
440
  getContent(pageId, request = {}, requestOptions) {
398
441
  var _a;
399
442
  return __awaiter(this, void 0, void 0, function* () {
400
- const { locale, limit, offset } = request;
443
+ const { localeId, limit, offset } = request;
401
444
  const _queryParams = {};
402
- if (locale != null) {
403
- _queryParams["locale"] = locale;
445
+ if (localeId != null) {
446
+ _queryParams["localeId"] = localeId;
404
447
  }
405
448
  if (limit != null) {
406
449
  _queryParams["limit"] = limit.toString();
@@ -411,15 +454,7 @@ class Pages {
411
454
  const _response = yield core.fetcher({
412
455
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/dom`),
413
456
  method: "GET",
414
- headers: {
415
- Authorization: yield this._getAuthorizationHeader(),
416
- "X-Fern-Language": "JavaScript",
417
- "X-Fern-SDK-Name": "webflow-api",
418
- "X-Fern-SDK-Version": "2.4.0",
419
- "User-Agent": "webflow-api/2.4.0",
420
- "X-Fern-Runtime": core.RUNTIME.type,
421
- "X-Fern-Runtime-Version": core.RUNTIME.version,
422
- },
457
+ 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),
423
458
  contentType: "application/json",
424
459
  queryParameters: _queryParams,
425
460
  requestType: "json",
@@ -441,13 +476,25 @@ class Pages {
441
476
  case 400:
442
477
  throw new Webflow.BadRequestError(_response.error.body);
443
478
  case 401:
444
- throw new Webflow.UnauthorizedError(_response.error.body);
479
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
480
+ unrecognizedObjectKeys: "passthrough",
481
+ allowUnrecognizedUnionMembers: true,
482
+ allowUnrecognizedEnumValues: true,
483
+ skipValidation: true,
484
+ breadcrumbsPrefix: ["response"],
485
+ }));
445
486
  case 403:
446
487
  throw new Webflow.ForbiddenError(_response.error.body);
447
488
  case 404:
448
- throw new Webflow.NotFoundError(_response.error.body);
489
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
490
+ unrecognizedObjectKeys: "passthrough",
491
+ allowUnrecognizedUnionMembers: true,
492
+ allowUnrecognizedEnumValues: true,
493
+ skipValidation: true,
494
+ breadcrumbsPrefix: ["response"],
495
+ }));
449
496
  case 429:
450
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
497
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
451
498
  unrecognizedObjectKeys: "passthrough",
452
499
  allowUnrecognizedUnionMembers: true,
453
500
  allowUnrecognizedEnumValues: true,
@@ -455,7 +502,13 @@ class Pages {
455
502
  breadcrumbsPrefix: ["response"],
456
503
  }));
457
504
  case 500:
458
- throw new Webflow.InternalServerError(_response.error.body);
505
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
506
+ unrecognizedObjectKeys: "passthrough",
507
+ allowUnrecognizedUnionMembers: true,
508
+ allowUnrecognizedEnumValues: true,
509
+ skipValidation: true,
510
+ breadcrumbsPrefix: ["response"],
511
+ }));
459
512
  default:
460
513
  throw new errors.WebflowError({
461
514
  statusCode: _response.error.statusCode,
@@ -470,7 +523,7 @@ class Pages {
470
523
  body: _response.error.rawBody,
471
524
  });
472
525
  case "timeout":
473
- throw new errors.WebflowTimeoutError();
526
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /pages/{page_id}/dom.");
474
527
  case "unknown":
475
528
  throw new errors.WebflowError({
476
529
  message: _response.error.errorMessage,
@@ -498,41 +551,39 @@ class Pages {
498
551
  *
499
552
  * @example
500
553
  * await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
501
- * locale: "locale",
554
+ * localeId: "65427cf400e02b306eaa04a0",
502
555
  * nodes: [{
503
556
  * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623",
504
- * text: "<h1>The Hitchhiker's Guide to the Galaxy</h1>"
557
+ * text: "<h1>The Hitchhiker\u2019s Guide to the Galaxy</h1>"
505
558
  * }, {
506
559
  * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627",
507
- * text: "<div><h3>Don't Panic!</h3><p>Always know where your towel is.</p></div>"
560
+ * text: "<div><h3>Don\u2019t Panic!</h3><p>Always know where your towel is.</p></div>"
508
561
  * }, {
509
562
  * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629",
510
- * text: "<img alt='Marvin, the Paranoid Android' src='path/to/image/with/assetId/659595234426a9fcbad57043'/>"
563
+ * text: "<img alt=\"Marvin, the Paranoid Android\" src=\"path/to/image/with/assetId/659595234426a9fcbad57043\"/>"
511
564
  * }]
512
565
  * })
513
566
  */
514
567
  updateStaticContent(pageId, request, requestOptions) {
515
568
  var _a;
516
569
  return __awaiter(this, void 0, void 0, function* () {
517
- const { locale } = request, _body = __rest(request, ["locale"]);
570
+ const { localeId } = request, _body = __rest(request, ["localeId"]);
518
571
  const _queryParams = {};
519
- _queryParams["locale"] = locale;
572
+ if (localeId != null) {
573
+ _queryParams["localeId"] = localeId;
574
+ }
520
575
  const _response = yield core.fetcher({
521
576
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/dom`),
522
577
  method: "POST",
523
- headers: {
524
- Authorization: yield this._getAuthorizationHeader(),
525
- "X-Fern-Language": "JavaScript",
526
- "X-Fern-SDK-Name": "webflow-api",
527
- "X-Fern-SDK-Version": "2.4.0",
528
- "User-Agent": "webflow-api/2.4.0",
529
- "X-Fern-Runtime": core.RUNTIME.type,
530
- "X-Fern-Runtime-Version": core.RUNTIME.version,
531
- },
578
+ 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),
532
579
  contentType: "application/json",
533
580
  queryParameters: _queryParams,
534
581
  requestType: "json",
535
- body: serializers.DomWrite.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
582
+ body: serializers.DomWrite.jsonOrThrow(_body, {
583
+ unrecognizedObjectKeys: "passthrough",
584
+ allowUnrecognizedUnionMembers: true,
585
+ allowUnrecognizedEnumValues: true,
586
+ }),
536
587
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
537
588
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
538
589
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -551,13 +602,25 @@ class Pages {
551
602
  case 400:
552
603
  throw new Webflow.BadRequestError(_response.error.body);
553
604
  case 401:
554
- throw new Webflow.UnauthorizedError(_response.error.body);
605
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
606
+ unrecognizedObjectKeys: "passthrough",
607
+ allowUnrecognizedUnionMembers: true,
608
+ allowUnrecognizedEnumValues: true,
609
+ skipValidation: true,
610
+ breadcrumbsPrefix: ["response"],
611
+ }));
555
612
  case 403:
556
613
  throw new Webflow.ForbiddenError(_response.error.body);
557
614
  case 404:
558
- throw new Webflow.NotFoundError(_response.error.body);
615
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
616
+ unrecognizedObjectKeys: "passthrough",
617
+ allowUnrecognizedUnionMembers: true,
618
+ allowUnrecognizedEnumValues: true,
619
+ skipValidation: true,
620
+ breadcrumbsPrefix: ["response"],
621
+ }));
559
622
  case 429:
560
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
623
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
561
624
  unrecognizedObjectKeys: "passthrough",
562
625
  allowUnrecognizedUnionMembers: true,
563
626
  allowUnrecognizedEnumValues: true,
@@ -565,7 +628,13 @@ class Pages {
565
628
  breadcrumbsPrefix: ["response"],
566
629
  }));
567
630
  case 500:
568
- throw new Webflow.InternalServerError(_response.error.body);
631
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
632
+ unrecognizedObjectKeys: "passthrough",
633
+ allowUnrecognizedUnionMembers: true,
634
+ allowUnrecognizedEnumValues: true,
635
+ skipValidation: true,
636
+ breadcrumbsPrefix: ["response"],
637
+ }));
569
638
  default:
570
639
  throw new errors.WebflowError({
571
640
  statusCode: _response.error.statusCode,
@@ -580,7 +649,7 @@ class Pages {
580
649
  body: _response.error.rawBody,
581
650
  });
582
651
  case "timeout":
583
- throw new errors.WebflowTimeoutError();
652
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /pages/{page_id}/dom.");
584
653
  case "unknown":
585
654
  throw new errors.WebflowError({
586
655
  message: _response.error.errorMessage,
@@ -5,23 +5,23 @@ import * as Webflow from "../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * locale: "locale",
8
+ * localeId: "65427cf400e02b306eaa04a0",
9
9
  * nodes: [{
10
10
  * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623",
11
- * text: "<h1>The Hitchhiker's Guide to the Galaxy</h1>"
11
+ * text: "<h1>The Hitchhiker\u2019s Guide to the Galaxy</h1>"
12
12
  * }, {
13
13
  * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627",
14
- * text: "<div><h3>Don't Panic!</h3><p>Always know where your towel is.</p></div>"
14
+ * text: "<div><h3>Don\u2019t Panic!</h3><p>Always know where your towel is.</p></div>"
15
15
  * }, {
16
16
  * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629",
17
- * text: "<img alt='Marvin, the Paranoid Android' src='path/to/image/with/assetId/659595234426a9fcbad57043'/>"
17
+ * text: "<img alt=\"Marvin, the Paranoid Android\" src=\"path/to/image/with/assetId/659595234426a9fcbad57043\"/>"
18
18
  * }]
19
19
  * }
20
20
  */
21
21
  export interface DomWrite {
22
22
  /**
23
- * The locale identifier.
23
+ * Unique identifier for a specific locale. Applicable, when using localization.
24
24
  */
25
- locale: string;
25
+ localeId?: string;
26
26
  nodes: Webflow.DomWriteNodesItem[];
27
27
  }
@@ -4,14 +4,14 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * locale: "65427cf400e02b306eaa04a0"
7
+ * localeId: "65427cf400e02b306eaa04a0"
8
8
  * }
9
9
  */
10
10
  export interface PagesGetContentRequest {
11
11
  /**
12
12
  * Unique identifier for a specific locale. Applicable, when using localization.
13
13
  */
14
- locale?: string;
14
+ localeId?: string;
15
15
  /**
16
16
  * Maximum number of records to be returned (max limit: 100)
17
17
  */
@@ -4,12 +4,12 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * locale: "65427cf400e02b306eaa04a0"
7
+ * localeId: "65427cf400e02b306eaa04a0"
8
8
  * }
9
9
  */
10
10
  export interface PagesGetMetadataRequest {
11
11
  /**
12
12
  * Unique identifier for a specific locale. Applicable, when using localization.
13
13
  */
14
- locale?: string;
14
+ localeId?: string;
15
15
  }
@@ -4,14 +4,14 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * locale: "65427cf400e02b306eaa04a0"
7
+ * localeId: "65427cf400e02b306eaa04a0"
8
8
  * }
9
9
  */
10
10
  export interface PagesListRequest {
11
11
  /**
12
12
  * Unique identifier for a specific locale. Applicable, when using localization.
13
13
  */
14
- locale?: string;
14
+ localeId?: string;
15
15
  /**
16
16
  * Maximum number of records to be returned (max limit: 100)
17
17
  */
@@ -5,19 +5,18 @@ import * as Webflow from "../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * locale: "65427cf400e02b306eaa04a0",
8
+ * localeId: "65427cf400e02b306eaa04a0",
9
9
  * body: {
10
10
  * id: "6596da6045e56dee495bcbba",
11
11
  * siteId: "6258612d1ee792848f805dcf",
12
12
  * title: "Guide to the Galaxy",
13
13
  * slug: "guide-to-the-galaxy",
14
- * parentId: "6419db964a9c435aa3af6251",
15
- * collectionId: "6390c49774a71f12831a08e3",
16
14
  * createdOn: "2024-03-11T10:42:00Z",
17
15
  * lastUpdated: "2024-03-11T10:42:42Z",
18
16
  * archived: false,
19
17
  * draft: false,
20
18
  * canBranch: true,
19
+ * isBranch: false,
21
20
  * seo: {
22
21
  * title: "The Ultimate Hitchhiker's Guide to the Galaxy",
23
22
  * description: "Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels."
@@ -37,6 +36,6 @@ export interface UpdatePageSettingsRequest {
37
36
  /**
38
37
  * Unique identifier for a specific locale. Applicable, when using localization.
39
38
  */
40
- locale?: string;
39
+ localeId?: string;
41
40
  body: Webflow.Page;
42
41
  }