webflow-api 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. package/.mock/definition/__package__.yml +2495 -0
  2. package/.mock/definition/accessGroups.yml +80 -0
  3. package/.mock/definition/api.yml +13 -0
  4. package/.mock/definition/assets.yml +414 -0
  5. package/.mock/definition/collections/fields.yml +187 -0
  6. package/.mock/definition/collections/items.yml +1511 -0
  7. package/.mock/definition/collections.yml +185 -0
  8. package/.mock/definition/ecommerce.yml +42 -0
  9. package/.mock/definition/forms.yml +301 -0
  10. package/.mock/definition/inventory.yml +120 -0
  11. package/.mock/definition/orders.yml +1569 -0
  12. package/.mock/definition/pages/scripts.yml +169 -0
  13. package/.mock/definition/pages.yml +443 -0
  14. package/.mock/definition/products.yml +500 -0
  15. package/.mock/definition/scripts.yml +257 -0
  16. package/.mock/definition/sites/activityLogs.yml +65 -0
  17. package/.mock/definition/sites/scripts.yml +228 -0
  18. package/.mock/definition/sites.yml +299 -0
  19. package/.mock/definition/token.yml +71 -0
  20. package/.mock/definition/users.yml +392 -0
  21. package/.mock/definition/webhooks.yml +189 -0
  22. package/.mock/fern.config.json +4 -0
  23. package/Client.d.ts +2 -0
  24. package/README.md +23 -30
  25. package/api/errors/InternalServerError.d.ts +2 -1
  26. package/api/errors/NotFoundError.d.ts +2 -1
  27. package/api/errors/TooManyRequestsError.d.ts +1 -1
  28. package/api/errors/UnauthorizedError.d.ts +2 -1
  29. package/api/resources/accessGroups/client/Client.d.ts +5 -1
  30. package/api/resources/accessGroups/client/Client.js +27 -15
  31. package/api/resources/assets/client/Client.d.ts +31 -11
  32. package/api/resources/assets/client/Client.js +236 -126
  33. package/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -2
  34. package/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +5 -5
  35. package/api/resources/collections/client/Client.d.ts +15 -22
  36. package/api/resources/collections/client/Client.js +109 -137
  37. package/api/resources/collections/resources/fields/client/Client.d.ts +34 -2
  38. package/api/resources/collections/resources/fields/client/Client.js +163 -32
  39. package/api/resources/collections/resources/items/client/Client.d.ts +302 -30
  40. package/api/resources/collections/resources/items/client/Client.js +959 -221
  41. package/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +61 -0
  42. package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +11 -0
  43. package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +11 -0
  44. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +128 -0
  45. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +128 -0
  46. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +5 -0
  47. package/api/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  48. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +5 -0
  49. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +5 -0
  50. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  51. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +5 -0
  52. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  53. package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +5 -0
  54. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +5 -0
  55. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +5 -0
  56. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +8 -0
  57. package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +5 -0
  58. package/api/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +5 -0
  59. package/api/resources/collections/resources/items/types/ItemsCreateItemRequest.js +5 -0
  60. package/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +8 -0
  61. package/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +5 -0
  62. package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +9 -0
  63. package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +5 -0
  64. package/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +9 -0
  65. package/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +5 -0
  66. package/api/resources/collections/resources/items/types/index.d.ts +9 -0
  67. package/api/resources/collections/resources/items/types/index.js +9 -0
  68. package/api/resources/ecommerce/client/Client.d.ts +2 -0
  69. package/api/resources/ecommerce/client/Client.js +24 -14
  70. package/api/resources/forms/client/Client.d.ts +17 -5
  71. package/api/resources/forms/client/Client.js +140 -76
  72. package/api/resources/inventory/client/Client.d.ts +8 -1
  73. package/api/resources/inventory/client/Client.js +59 -30
  74. package/api/resources/orders/client/Client.d.ts +7 -2
  75. package/api/resources/orders/client/Client.js +164 -89
  76. package/api/resources/pages/client/Client.d.ts +25 -14
  77. package/api/resources/pages/client/Client.js +169 -100
  78. package/api/resources/pages/client/requests/DomWrite.d.ts +6 -6
  79. package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
  80. package/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +2 -2
  81. package/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
  82. package/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +3 -4
  83. package/api/resources/pages/resources/scripts/client/Client.d.ts +29 -3
  84. package/api/resources/pages/resources/scripts/client/Client.js +104 -46
  85. package/api/resources/products/client/Client.d.ts +26 -10
  86. package/api/resources/products/client/Client.js +188 -98
  87. package/api/resources/scripts/client/Client.d.ts +31 -3
  88. package/api/resources/scripts/client/Client.js +111 -47
  89. package/api/resources/sites/client/Client.d.ts +16 -4
  90. package/api/resources/sites/client/Client.js +101 -59
  91. package/api/resources/sites/client/requests/SitesPublishRequest.d.ts +1 -1
  92. package/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -0
  93. package/api/resources/sites/resources/activityLogs/client/Client.js +17 -13
  94. package/api/resources/sites/resources/scripts/client/Client.d.ts +26 -4
  95. package/api/resources/sites/resources/scripts/client/Client.js +125 -61
  96. package/api/resources/token/client/Client.d.ts +7 -2
  97. package/api/resources/token/client/Client.js +23 -24
  98. package/api/resources/users/client/Client.d.ts +21 -6
  99. package/api/resources/users/client/Client.js +149 -78
  100. package/api/resources/webhooks/client/Client.d.ts +15 -2
  101. package/api/resources/webhooks/client/Client.js +114 -59
  102. package/api/types/AssetFolder.d.ts +1 -1
  103. package/api/types/AuthorizationAuthorization.d.ts +1 -1
  104. package/api/types/AuthorizedUser.d.ts +1 -1
  105. package/api/types/BulkCollectionItemFieldData.d.ts +1 -1
  106. package/api/types/CollectionItem.d.ts +1 -1
  107. package/api/types/CollectionItemFieldData.d.ts +1 -1
  108. package/api/types/CollectionItemListNoPagination.d.ts +11 -0
  109. package/api/types/CollectionItemListNoPagination.js +5 -0
  110. package/api/types/CollectionItemWithIdInput.d.ts +24 -0
  111. package/api/types/CollectionItemWithIdInput.js +5 -0
  112. package/api/types/CollectionItemWithIdInputFieldData.d.ts +11 -0
  113. package/api/types/CollectionItemWithIdInputFieldData.js +5 -0
  114. package/api/types/ConflictErrorBody.d.ts +1 -10
  115. package/api/types/CustomCodeBlock.d.ts +2 -2
  116. package/api/types/DuplicateUserEmail.d.ts +1 -11
  117. package/api/types/ErrorCode.d.ts +38 -0
  118. package/api/types/ErrorCode.js +37 -0
  119. package/api/types/Error_.d.ts +1 -1
  120. package/api/types/ForbiddenErrorBody.d.ts +2 -7
  121. package/api/types/Form.d.ts +8 -8
  122. package/api/types/FormSubmission.d.ts +3 -3
  123. package/api/types/InvalidScopes.d.ts +4 -0
  124. package/api/types/InvalidScopes.js +5 -0
  125. package/api/types/NotEnterprisePlanSite.d.ts +1 -11
  126. package/api/types/Order.d.ts +5 -1
  127. package/api/types/Page.d.ts +2 -0
  128. package/api/types/Site.d.ts +4 -0
  129. package/api/types/SiteActivityLogItem.d.ts +1 -1
  130. package/api/types/SiteActivityLogItemEvent.d.ts +48 -0
  131. package/api/types/SiteActivityLogItemEvent.js +50 -0
  132. package/api/types/SiteActivityLogItemResourceOperation.d.ts +5 -1
  133. package/api/types/SiteActivityLogItemResourceOperation.js +4 -0
  134. package/api/types/SiteDataCollectionType.d.ts +12 -0
  135. package/api/types/SiteDataCollectionType.js +11 -0
  136. package/api/types/UserLimitReached.d.ts +1 -11
  137. package/api/types/UsersNotEnabled.d.ts +1 -11
  138. package/api/types/index.d.ts +10 -6
  139. package/api/types/index.js +10 -6
  140. package/core/fetcher/Fetcher.d.ts +1 -1
  141. package/core/fetcher/getResponseBody.js +3 -0
  142. package/core/fetcher/requestWithRetries.js +13 -4
  143. package/core/schemas/builders/object/object.js +28 -0
  144. package/core/schemas/builders/object/types.d.ts +5 -0
  145. package/dist/Client.d.ts +2 -0
  146. package/dist/api/errors/InternalServerError.d.ts +2 -1
  147. package/dist/api/errors/NotFoundError.d.ts +2 -1
  148. package/dist/api/errors/TooManyRequestsError.d.ts +1 -1
  149. package/dist/api/errors/UnauthorizedError.d.ts +2 -1
  150. package/dist/api/resources/accessGroups/client/Client.d.ts +5 -1
  151. package/dist/api/resources/accessGroups/client/Client.js +27 -15
  152. package/dist/api/resources/assets/client/Client.d.ts +31 -11
  153. package/dist/api/resources/assets/client/Client.js +236 -126
  154. package/dist/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -2
  155. package/dist/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +5 -5
  156. package/dist/api/resources/collections/client/Client.d.ts +15 -22
  157. package/dist/api/resources/collections/client/Client.js +109 -137
  158. package/dist/api/resources/collections/resources/fields/client/Client.d.ts +34 -2
  159. package/dist/api/resources/collections/resources/fields/client/Client.js +163 -32
  160. package/dist/api/resources/collections/resources/items/client/Client.d.ts +302 -30
  161. package/dist/api/resources/collections/resources/items/client/Client.js +959 -221
  162. package/dist/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +61 -0
  163. package/dist/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +5 -0
  164. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +11 -0
  165. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +5 -0
  166. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +11 -0
  167. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +5 -0
  168. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +128 -0
  169. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +5 -0
  170. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +128 -0
  171. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +5 -0
  172. package/dist/api/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  173. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +5 -0
  174. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +5 -0
  175. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  176. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +5 -0
  177. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  178. package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +5 -0
  179. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +5 -0
  180. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +5 -0
  181. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +8 -0
  182. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +5 -0
  183. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +5 -0
  184. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequest.js +5 -0
  185. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +8 -0
  186. package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +5 -0
  187. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +9 -0
  188. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +5 -0
  189. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +9 -0
  190. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +5 -0
  191. package/dist/api/resources/collections/resources/items/types/index.d.ts +9 -0
  192. package/dist/api/resources/collections/resources/items/types/index.js +9 -0
  193. package/dist/api/resources/ecommerce/client/Client.d.ts +2 -0
  194. package/dist/api/resources/ecommerce/client/Client.js +24 -14
  195. package/dist/api/resources/forms/client/Client.d.ts +17 -5
  196. package/dist/api/resources/forms/client/Client.js +140 -76
  197. package/dist/api/resources/inventory/client/Client.d.ts +8 -1
  198. package/dist/api/resources/inventory/client/Client.js +59 -30
  199. package/dist/api/resources/orders/client/Client.d.ts +7 -2
  200. package/dist/api/resources/orders/client/Client.js +164 -89
  201. package/dist/api/resources/pages/client/Client.d.ts +25 -14
  202. package/dist/api/resources/pages/client/Client.js +169 -100
  203. package/dist/api/resources/pages/client/requests/DomWrite.d.ts +6 -6
  204. package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
  205. package/dist/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +2 -2
  206. package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
  207. package/dist/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +3 -4
  208. package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +29 -3
  209. package/dist/api/resources/pages/resources/scripts/client/Client.js +104 -46
  210. package/dist/api/resources/products/client/Client.d.ts +26 -10
  211. package/dist/api/resources/products/client/Client.js +188 -98
  212. package/dist/api/resources/scripts/client/Client.d.ts +31 -3
  213. package/dist/api/resources/scripts/client/Client.js +111 -47
  214. package/dist/api/resources/sites/client/Client.d.ts +16 -4
  215. package/dist/api/resources/sites/client/Client.js +101 -59
  216. package/dist/api/resources/sites/client/requests/SitesPublishRequest.d.ts +1 -1
  217. package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -0
  218. package/dist/api/resources/sites/resources/activityLogs/client/Client.js +17 -13
  219. package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +26 -4
  220. package/dist/api/resources/sites/resources/scripts/client/Client.js +125 -61
  221. package/dist/api/resources/token/client/Client.d.ts +7 -2
  222. package/dist/api/resources/token/client/Client.js +23 -24
  223. package/dist/api/resources/users/client/Client.d.ts +21 -6
  224. package/dist/api/resources/users/client/Client.js +149 -78
  225. package/dist/api/resources/webhooks/client/Client.d.ts +15 -2
  226. package/dist/api/resources/webhooks/client/Client.js +114 -59
  227. package/dist/api/types/AssetFolder.d.ts +1 -1
  228. package/dist/api/types/AuthorizationAuthorization.d.ts +1 -1
  229. package/dist/api/types/AuthorizedUser.d.ts +1 -1
  230. package/dist/api/types/BulkCollectionItemFieldData.d.ts +1 -1
  231. package/dist/api/types/CollectionItem.d.ts +1 -1
  232. package/dist/api/types/CollectionItemFieldData.d.ts +1 -1
  233. package/dist/api/types/CollectionItemListNoPagination.d.ts +11 -0
  234. package/dist/api/types/CollectionItemListNoPagination.js +5 -0
  235. package/dist/api/types/CollectionItemWithIdInput.d.ts +24 -0
  236. package/dist/api/types/CollectionItemWithIdInput.js +5 -0
  237. package/dist/api/types/CollectionItemWithIdInputFieldData.d.ts +11 -0
  238. package/dist/api/types/CollectionItemWithIdInputFieldData.js +5 -0
  239. package/dist/api/types/ConflictErrorBody.d.ts +1 -10
  240. package/dist/api/types/CustomCodeBlock.d.ts +2 -2
  241. package/dist/api/types/DuplicateUserEmail.d.ts +1 -11
  242. package/dist/api/types/ErrorCode.d.ts +38 -0
  243. package/dist/api/types/ErrorCode.js +37 -0
  244. package/dist/api/types/Error_.d.ts +1 -1
  245. package/dist/api/types/ForbiddenErrorBody.d.ts +2 -7
  246. package/dist/api/types/Form.d.ts +8 -8
  247. package/dist/api/types/FormSubmission.d.ts +3 -3
  248. package/dist/api/types/InvalidScopes.d.ts +4 -0
  249. package/dist/api/types/InvalidScopes.js +5 -0
  250. package/dist/api/types/NotEnterprisePlanSite.d.ts +1 -11
  251. package/dist/api/types/Order.d.ts +5 -1
  252. package/dist/api/types/Page.d.ts +2 -0
  253. package/dist/api/types/Site.d.ts +4 -0
  254. package/dist/api/types/SiteActivityLogItem.d.ts +1 -1
  255. package/dist/api/types/SiteActivityLogItemEvent.d.ts +48 -0
  256. package/dist/api/types/SiteActivityLogItemEvent.js +50 -0
  257. package/dist/api/types/SiteActivityLogItemResourceOperation.d.ts +5 -1
  258. package/dist/api/types/SiteActivityLogItemResourceOperation.js +4 -0
  259. package/dist/api/types/SiteDataCollectionType.d.ts +12 -0
  260. package/dist/api/types/SiteDataCollectionType.js +11 -0
  261. package/dist/api/types/UserLimitReached.d.ts +1 -11
  262. package/dist/api/types/UsersNotEnabled.d.ts +1 -11
  263. package/dist/api/types/index.d.ts +10 -6
  264. package/dist/api/types/index.js +10 -6
  265. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  266. package/dist/core/fetcher/getResponseBody.js +3 -0
  267. package/dist/core/fetcher/requestWithRetries.js +13 -4
  268. package/dist/core/schemas/builders/object/object.js +28 -0
  269. package/dist/core/schemas/builders/object/types.d.ts +5 -0
  270. package/dist/errors/WebflowTimeoutError.d.ts +1 -1
  271. package/dist/errors/WebflowTimeoutError.js +2 -2
  272. package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +2 -1
  273. package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +2 -1
  274. package/dist/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +16 -0
  275. package/dist/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +37 -0
  276. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +13 -0
  277. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +34 -0
  278. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +13 -0
  279. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +34 -0
  280. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +13 -0
  281. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +34 -0
  282. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +13 -0
  283. package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +34 -0
  284. package/dist/serialization/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  285. package/dist/serialization/resources/collections/resources/items/client/requests/index.js +11 -1
  286. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +12 -0
  287. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +36 -0
  288. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  289. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +36 -0
  290. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  291. package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +36 -0
  292. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +12 -0
  293. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +33 -0
  294. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +13 -0
  295. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +34 -0
  296. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +12 -0
  297. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.js +33 -0
  298. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +13 -0
  299. package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +34 -0
  300. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +13 -0
  301. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +34 -0
  302. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +13 -0
  303. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +34 -0
  304. package/dist/serialization/resources/collections/resources/items/types/index.d.ts +9 -0
  305. package/dist/serialization/resources/collections/resources/items/types/index.js +9 -0
  306. package/dist/serialization/resources/pages/client/requests/DomWrite.d.ts +1 -1
  307. package/dist/serialization/types/BulkCollectionItemFieldData.js +4 -2
  308. package/dist/serialization/types/CollectionItem.d.ts +1 -1
  309. package/dist/serialization/types/CollectionItem.js +1 -1
  310. package/dist/serialization/types/CollectionItemFieldData.js +4 -2
  311. package/dist/serialization/types/CollectionItemListNoPagination.d.ts +13 -0
  312. package/dist/serialization/types/{TooManyRequestsErrorBody.js → CollectionItemListNoPagination.js} +4 -6
  313. package/dist/serialization/types/CollectionItemWithIdInput.d.ts +20 -0
  314. package/dist/serialization/types/CollectionItemWithIdInput.js +41 -0
  315. package/dist/serialization/types/CollectionItemWithIdInputFieldData.d.ts +14 -0
  316. package/dist/serialization/types/{MissingScopes.js → CollectionItemWithIdInputFieldData.js} +7 -8
  317. package/dist/serialization/types/ConflictErrorBody.d.ts +4 -8
  318. package/dist/serialization/types/ConflictErrorBody.js +3 -7
  319. package/dist/serialization/types/DuplicateUserEmail.d.ts +2 -8
  320. package/dist/serialization/types/DuplicateUserEmail.js +1 -7
  321. package/dist/serialization/types/ErrorCode.d.ts +10 -0
  322. package/dist/serialization/types/ErrorCode.js +61 -0
  323. package/dist/serialization/types/Error_.d.ts +2 -1
  324. package/dist/serialization/types/Error_.js +2 -1
  325. package/dist/serialization/types/ForbiddenErrorBody.d.ts +4 -8
  326. package/dist/serialization/types/ForbiddenErrorBody.js +3 -7
  327. package/dist/serialization/types/Form.d.ts +1 -1
  328. package/dist/serialization/types/Form.js +1 -1
  329. package/dist/serialization/types/InvalidScopes.d.ts +10 -0
  330. package/{serialization/types/MissingScopes.js → dist/serialization/types/InvalidScopes.js} +2 -8
  331. package/dist/serialization/types/NotEnterprisePlanSite.d.ts +2 -8
  332. package/dist/serialization/types/NotEnterprisePlanSite.js +1 -7
  333. package/dist/serialization/types/Page.d.ts +1 -0
  334. package/dist/serialization/types/Page.js +1 -0
  335. package/dist/serialization/types/Site.d.ts +3 -0
  336. package/dist/serialization/types/Site.js +3 -0
  337. package/dist/serialization/types/SiteActivityLogItem.d.ts +2 -1
  338. package/dist/serialization/types/SiteActivityLogItem.js +2 -1
  339. package/dist/serialization/types/SiteActivityLogItemEvent.d.ts +10 -0
  340. package/dist/serialization/types/SiteActivityLogItemEvent.js +74 -0
  341. package/dist/serialization/types/SiteActivityLogItemResourceOperation.d.ts +1 -1
  342. package/dist/serialization/types/SiteActivityLogItemResourceOperation.js +11 -1
  343. package/dist/serialization/types/SiteDataCollectionType.d.ts +10 -0
  344. package/dist/serialization/types/SiteDataCollectionType.js +31 -0
  345. package/dist/serialization/types/UserLimitReached.d.ts +2 -8
  346. package/dist/serialization/types/UserLimitReached.js +1 -7
  347. package/dist/serialization/types/UsersNotEnabled.d.ts +2 -8
  348. package/dist/serialization/types/UsersNotEnabled.js +1 -7
  349. package/dist/serialization/types/index.d.ts +10 -5
  350. package/dist/serialization/types/index.js +10 -5
  351. package/dist/version.d.ts +1 -1
  352. package/dist/version.js +1 -1
  353. package/dist/wrapper/ItemsClient.d.ts +23 -49
  354. package/dist/wrapper/ItemsClient.js +50 -216
  355. package/dist/wrapper/WebflowClient.d.ts +1 -1
  356. package/dist/wrapper/WebflowClient.js +11 -1
  357. package/errors/WebflowTimeoutError.d.ts +1 -1
  358. package/errors/WebflowTimeoutError.js +2 -2
  359. package/package.json +1 -2
  360. package/reference.md +821 -230
  361. package/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +2 -1
  362. package/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +2 -1
  363. package/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +16 -0
  364. package/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +37 -0
  365. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +13 -0
  366. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +34 -0
  367. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +13 -0
  368. package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +34 -0
  369. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +13 -0
  370. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +34 -0
  371. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +13 -0
  372. package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +34 -0
  373. package/serialization/resources/collections/resources/items/client/requests/index.d.ts +5 -0
  374. package/serialization/resources/collections/resources/items/client/requests/index.js +11 -1
  375. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +12 -0
  376. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +36 -0
  377. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
  378. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +36 -0
  379. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
  380. package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +36 -0
  381. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +12 -0
  382. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +33 -0
  383. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +13 -0
  384. package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +34 -0
  385. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +12 -0
  386. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.js +33 -0
  387. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +13 -0
  388. package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +34 -0
  389. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +13 -0
  390. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +34 -0
  391. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +13 -0
  392. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +34 -0
  393. package/serialization/resources/collections/resources/items/types/index.d.ts +9 -0
  394. package/serialization/resources/collections/resources/items/types/index.js +9 -0
  395. package/serialization/resources/pages/client/requests/DomWrite.d.ts +1 -1
  396. package/serialization/types/BulkCollectionItemFieldData.js +4 -2
  397. package/serialization/types/CollectionItem.d.ts +1 -1
  398. package/serialization/types/CollectionItem.js +1 -1
  399. package/serialization/types/CollectionItemFieldData.js +4 -2
  400. package/serialization/types/CollectionItemListNoPagination.d.ts +13 -0
  401. package/serialization/types/{TooManyRequestsErrorBody.js → CollectionItemListNoPagination.js} +4 -6
  402. package/serialization/types/CollectionItemWithIdInput.d.ts +20 -0
  403. package/serialization/types/CollectionItemWithIdInput.js +41 -0
  404. package/serialization/types/CollectionItemWithIdInputFieldData.d.ts +14 -0
  405. package/serialization/types/CollectionItemWithIdInputFieldData.js +36 -0
  406. package/serialization/types/ConflictErrorBody.d.ts +4 -8
  407. package/serialization/types/ConflictErrorBody.js +3 -7
  408. package/serialization/types/DuplicateUserEmail.d.ts +2 -8
  409. package/serialization/types/DuplicateUserEmail.js +1 -7
  410. package/serialization/types/ErrorCode.d.ts +10 -0
  411. package/serialization/types/ErrorCode.js +61 -0
  412. package/serialization/types/Error_.d.ts +2 -1
  413. package/serialization/types/Error_.js +2 -1
  414. package/serialization/types/ForbiddenErrorBody.d.ts +4 -8
  415. package/serialization/types/ForbiddenErrorBody.js +3 -7
  416. package/serialization/types/Form.d.ts +1 -1
  417. package/serialization/types/Form.js +1 -1
  418. package/serialization/types/InvalidScopes.d.ts +10 -0
  419. package/serialization/types/InvalidScopes.js +31 -0
  420. package/serialization/types/NotEnterprisePlanSite.d.ts +2 -8
  421. package/serialization/types/NotEnterprisePlanSite.js +1 -7
  422. package/serialization/types/Page.d.ts +1 -0
  423. package/serialization/types/Page.js +1 -0
  424. package/serialization/types/Site.d.ts +3 -0
  425. package/serialization/types/Site.js +3 -0
  426. package/serialization/types/SiteActivityLogItem.d.ts +2 -1
  427. package/serialization/types/SiteActivityLogItem.js +2 -1
  428. package/serialization/types/SiteActivityLogItemEvent.d.ts +10 -0
  429. package/serialization/types/SiteActivityLogItemEvent.js +74 -0
  430. package/serialization/types/SiteActivityLogItemResourceOperation.d.ts +1 -1
  431. package/serialization/types/SiteActivityLogItemResourceOperation.js +11 -1
  432. package/serialization/types/SiteDataCollectionType.d.ts +10 -0
  433. package/serialization/types/SiteDataCollectionType.js +31 -0
  434. package/serialization/types/UserLimitReached.d.ts +2 -8
  435. package/serialization/types/UserLimitReached.js +1 -7
  436. package/serialization/types/UsersNotEnabled.d.ts +2 -8
  437. package/serialization/types/UsersNotEnabled.js +1 -7
  438. package/serialization/types/index.d.ts +10 -5
  439. package/serialization/types/index.js +10 -5
  440. package/version.d.ts +1 -1
  441. package/version.js +1 -1
  442. package/wrapper/ItemsClient.d.ts +23 -49
  443. package/wrapper/ItemsClient.js +50 -216
  444. package/wrapper/WebflowClient.d.ts +1 -1
  445. package/wrapper/WebflowClient.js +11 -1
  446. package/api/types/MissingScopes.d.ts +0 -14
  447. package/api/types/TooManyRequestsErrorBody.d.ts +0 -9
  448. package/dist/api/types/MissingScopes.d.ts +0 -14
  449. package/dist/api/types/TooManyRequestsErrorBody.d.ts +0 -9
  450. package/dist/serialization/types/MissingScopes.d.ts +0 -16
  451. package/dist/serialization/types/TooManyRequestsErrorBody.d.ts +0 -15
  452. package/serialization/types/MissingScopes.d.ts +0 -16
  453. package/serialization/types/TooManyRequestsErrorBody.d.ts +0 -15
  454. /package/api/{types/MissingScopes.js → resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js} +0 -0
  455. /package/api/{types/TooManyRequestsErrorBody.js → resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js} +0 -0
  456. /package/{dist/api/types/MissingScopes.js → api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js} +0 -0
  457. /package/{dist/api/types/TooManyRequestsErrorBody.js → api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js} +0 -0
@@ -50,7 +50,10 @@ class Products {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Retrieve all products for a site. Use `limit` and `offset` to page through all products with subsequent requests. All SKUs for each product will also be fetched and returned. The `limit`, `offset` and `total` values represent Products only and do not include any SKUs.
53
+ * Retrieve all products for a site.
54
+ *
55
+ * Use `limit` and `offset` to page through all products with subsequent requests. All SKUs for each product
56
+ * will also be fetched and returned. The `limit`, `offset` and `total` values represent Products only and do not include any SKUs.
54
57
  *
55
58
  * Required scope | `ecommerce:read`
56
59
  *
@@ -83,15 +86,7 @@ class Products {
83
86
  const _response = yield core.fetcher({
84
87
  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)}/products`),
85
88
  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
- },
89
+ 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
90
  contentType: "application/json",
96
91
  queryParameters: _queryParams,
97
92
  requestType: "json",
@@ -113,15 +108,27 @@ class Products {
113
108
  case 400:
114
109
  throw new Webflow.BadRequestError(_response.error.body);
115
110
  case 401:
116
- throw new Webflow.UnauthorizedError(_response.error.body);
111
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
112
+ unrecognizedObjectKeys: "passthrough",
113
+ allowUnrecognizedUnionMembers: true,
114
+ allowUnrecognizedEnumValues: true,
115
+ skipValidation: true,
116
+ breadcrumbsPrefix: ["response"],
117
+ }));
117
118
  case 403:
118
119
  throw new Webflow.ForbiddenError(_response.error.body);
119
120
  case 404:
120
- throw new Webflow.NotFoundError(_response.error.body);
121
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
122
+ unrecognizedObjectKeys: "passthrough",
123
+ allowUnrecognizedUnionMembers: true,
124
+ allowUnrecognizedEnumValues: true,
125
+ skipValidation: true,
126
+ breadcrumbsPrefix: ["response"],
127
+ }));
121
128
  case 409:
122
129
  throw new Webflow.ConflictError(_response.error.body);
123
130
  case 429:
124
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
131
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
125
132
  unrecognizedObjectKeys: "passthrough",
126
133
  allowUnrecognizedUnionMembers: true,
127
134
  allowUnrecognizedEnumValues: true,
@@ -129,7 +136,13 @@ class Products {
129
136
  breadcrumbsPrefix: ["response"],
130
137
  }));
131
138
  case 500:
132
- throw new Webflow.InternalServerError(_response.error.body);
139
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
140
+ unrecognizedObjectKeys: "passthrough",
141
+ allowUnrecognizedUnionMembers: true,
142
+ allowUnrecognizedEnumValues: true,
143
+ skipValidation: true,
144
+ breadcrumbsPrefix: ["response"],
145
+ }));
133
146
  default:
134
147
  throw new errors.WebflowError({
135
148
  statusCode: _response.error.statusCode,
@@ -144,7 +157,7 @@ class Products {
144
157
  body: _response.error.rawBody,
145
158
  });
146
159
  case "timeout":
147
- throw new errors.WebflowTimeoutError();
160
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/products.");
148
161
  case "unknown":
149
162
  throw new errors.WebflowError({
150
163
  message: _response.error.errorMessage,
@@ -153,13 +166,19 @@ class Products {
153
166
  });
154
167
  }
155
168
  /**
156
- * Creating a new Product involves creating both a Product and a SKU, since a Product Item has to have, at minimum, a single SKU.
169
+ * Create a new product and SKU.
170
+ *
171
+ * When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU.
157
172
  *
158
- * In order to create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large - you'll need to create `sku-properties`. In our T-shirt example, a single `sku-property` would be Color. Within that property, we'll need to list out the various colors a T-shirt could be as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`.
173
+ * To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large:
159
174
  *
160
- * Once, you've created a Product and its `sku-properties` with `enum` values, you can create your default SKU, which will automatically be a combination of the first `sku-properties` you've created. In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. After you've created your product, you can create additional SKUs using the <a href="https://developers.webflow.com/reference/create-skus">Create SKU endpoint</a>
175
+ * - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants).
176
+ * - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`.
177
+ * - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created.
178
+ * - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue.
179
+ * - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku)
161
180
  *
162
- * Upon creation, the default product type will be `Advanced`. The product type is used to determine which Product and SKU fields are shown to users in the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown.
181
+ * Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
163
182
  *
164
183
  * Required scope | `ecommerce:write`
165
184
  *
@@ -184,18 +203,14 @@ class Products {
184
203
  const _response = yield core.fetcher({
185
204
  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)}/products`),
186
205
  method: "POST",
187
- headers: {
188
- Authorization: yield this._getAuthorizationHeader(),
189
- "X-Fern-Language": "JavaScript",
190
- "X-Fern-SDK-Name": "webflow-api",
191
- "X-Fern-SDK-Version": "2.4.0",
192
- "User-Agent": "webflow-api/2.4.0",
193
- "X-Fern-Runtime": core.RUNTIME.type,
194
- "X-Fern-Runtime-Version": core.RUNTIME.version,
195
- },
206
+ 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),
196
207
  contentType: "application/json",
197
208
  requestType: "json",
198
- body: serializers.ProductSkuCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
209
+ body: serializers.ProductSkuCreate.jsonOrThrow(request, {
210
+ unrecognizedObjectKeys: "passthrough",
211
+ allowUnrecognizedUnionMembers: true,
212
+ allowUnrecognizedEnumValues: true,
213
+ }),
199
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
200
215
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
201
216
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -214,15 +229,27 @@ class Products {
214
229
  case 400:
215
230
  throw new Webflow.BadRequestError(_response.error.body);
216
231
  case 401:
217
- throw new Webflow.UnauthorizedError(_response.error.body);
232
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
233
+ unrecognizedObjectKeys: "passthrough",
234
+ allowUnrecognizedUnionMembers: true,
235
+ allowUnrecognizedEnumValues: true,
236
+ skipValidation: true,
237
+ breadcrumbsPrefix: ["response"],
238
+ }));
218
239
  case 403:
219
240
  throw new Webflow.ForbiddenError(_response.error.body);
220
241
  case 404:
221
- throw new Webflow.NotFoundError(_response.error.body);
242
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
243
+ unrecognizedObjectKeys: "passthrough",
244
+ allowUnrecognizedUnionMembers: true,
245
+ allowUnrecognizedEnumValues: true,
246
+ skipValidation: true,
247
+ breadcrumbsPrefix: ["response"],
248
+ }));
222
249
  case 409:
223
250
  throw new Webflow.ConflictError(_response.error.body);
224
251
  case 429:
225
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
252
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
226
253
  unrecognizedObjectKeys: "passthrough",
227
254
  allowUnrecognizedUnionMembers: true,
228
255
  allowUnrecognizedEnumValues: true,
@@ -230,7 +257,13 @@ class Products {
230
257
  breadcrumbsPrefix: ["response"],
231
258
  }));
232
259
  case 500:
233
- throw new Webflow.InternalServerError(_response.error.body);
260
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
261
+ unrecognizedObjectKeys: "passthrough",
262
+ allowUnrecognizedUnionMembers: true,
263
+ allowUnrecognizedEnumValues: true,
264
+ skipValidation: true,
265
+ breadcrumbsPrefix: ["response"],
266
+ }));
234
267
  default:
235
268
  throw new errors.WebflowError({
236
269
  statusCode: _response.error.statusCode,
@@ -245,7 +278,7 @@ class Products {
245
278
  body: _response.error.rawBody,
246
279
  });
247
280
  case "timeout":
248
- throw new errors.WebflowTimeoutError();
281
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/products.");
249
282
  case "unknown":
250
283
  throw new errors.WebflowError({
251
284
  message: _response.error.errorMessage,
@@ -254,7 +287,8 @@ class Products {
254
287
  });
255
288
  }
256
289
  /**
257
- * Retrieve a single product by its id. All of its SKUs will also be retrieved.
290
+ * Retrieve a single product by its ID. All of its SKUs will also be
291
+ * retrieved.
258
292
  *
259
293
  * Required scope | `ecommerce:read`
260
294
  *
@@ -279,15 +313,7 @@ class Products {
279
313
  const _response = yield core.fetcher({
280
314
  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)}/products/${encodeURIComponent(productId)}`),
281
315
  method: "GET",
282
- headers: {
283
- Authorization: yield this._getAuthorizationHeader(),
284
- "X-Fern-Language": "JavaScript",
285
- "X-Fern-SDK-Name": "webflow-api",
286
- "X-Fern-SDK-Version": "2.4.0",
287
- "User-Agent": "webflow-api/2.4.0",
288
- "X-Fern-Runtime": core.RUNTIME.type,
289
- "X-Fern-Runtime-Version": core.RUNTIME.version,
290
- },
316
+ 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),
291
317
  contentType: "application/json",
292
318
  requestType: "json",
293
319
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -308,15 +334,27 @@ class Products {
308
334
  case 400:
309
335
  throw new Webflow.BadRequestError(_response.error.body);
310
336
  case 401:
311
- throw new Webflow.UnauthorizedError(_response.error.body);
337
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
338
+ unrecognizedObjectKeys: "passthrough",
339
+ allowUnrecognizedUnionMembers: true,
340
+ allowUnrecognizedEnumValues: true,
341
+ skipValidation: true,
342
+ breadcrumbsPrefix: ["response"],
343
+ }));
312
344
  case 403:
313
345
  throw new Webflow.ForbiddenError(_response.error.body);
314
346
  case 404:
315
- throw new Webflow.NotFoundError(_response.error.body);
347
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
348
+ unrecognizedObjectKeys: "passthrough",
349
+ allowUnrecognizedUnionMembers: true,
350
+ allowUnrecognizedEnumValues: true,
351
+ skipValidation: true,
352
+ breadcrumbsPrefix: ["response"],
353
+ }));
316
354
  case 409:
317
355
  throw new Webflow.ConflictError(_response.error.body);
318
356
  case 429:
319
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
357
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
320
358
  unrecognizedObjectKeys: "passthrough",
321
359
  allowUnrecognizedUnionMembers: true,
322
360
  allowUnrecognizedEnumValues: true,
@@ -324,7 +362,13 @@ class Products {
324
362
  breadcrumbsPrefix: ["response"],
325
363
  }));
326
364
  case 500:
327
- throw new Webflow.InternalServerError(_response.error.body);
365
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
366
+ unrecognizedObjectKeys: "passthrough",
367
+ allowUnrecognizedUnionMembers: true,
368
+ allowUnrecognizedEnumValues: true,
369
+ skipValidation: true,
370
+ breadcrumbsPrefix: ["response"],
371
+ }));
328
372
  default:
329
373
  throw new errors.WebflowError({
330
374
  statusCode: _response.error.statusCode,
@@ -339,7 +383,7 @@ class Products {
339
383
  body: _response.error.rawBody,
340
384
  });
341
385
  case "timeout":
342
- throw new errors.WebflowTimeoutError();
386
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/products/{product_id}.");
343
387
  case "unknown":
344
388
  throw new errors.WebflowError({
345
389
  message: _response.error.errorMessage,
@@ -348,7 +392,9 @@ class Products {
348
392
  });
349
393
  }
350
394
  /**
351
- * Updating an existing Product will set the product type to `Advanced`. The product type is used to determine which Product and SKU fields are shown to users in the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown. The product type can be edited in the `Designer` or the `Editor`.
395
+ * Update an existing Product.
396
+ *
397
+ * Updating an existing Product will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
352
398
  *
353
399
  * Required scope | `ecommerce:write`
354
400
  *
@@ -374,18 +420,14 @@ class Products {
374
420
  const _response = yield core.fetcher({
375
421
  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)}/products/${encodeURIComponent(productId)}`),
376
422
  method: "PATCH",
377
- headers: {
378
- Authorization: yield this._getAuthorizationHeader(),
379
- "X-Fern-Language": "JavaScript",
380
- "X-Fern-SDK-Name": "webflow-api",
381
- "X-Fern-SDK-Version": "2.4.0",
382
- "User-Agent": "webflow-api/2.4.0",
383
- "X-Fern-Runtime": core.RUNTIME.type,
384
- "X-Fern-Runtime-Version": core.RUNTIME.version,
385
- },
423
+ 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),
386
424
  contentType: "application/json",
387
425
  requestType: "json",
388
- body: serializers.ProductSkuUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
426
+ body: serializers.ProductSkuUpdate.jsonOrThrow(request, {
427
+ unrecognizedObjectKeys: "passthrough",
428
+ allowUnrecognizedUnionMembers: true,
429
+ allowUnrecognizedEnumValues: true,
430
+ }),
389
431
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
390
432
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
391
433
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -404,15 +446,27 @@ class Products {
404
446
  case 400:
405
447
  throw new Webflow.BadRequestError(_response.error.body);
406
448
  case 401:
407
- throw new Webflow.UnauthorizedError(_response.error.body);
449
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
450
+ unrecognizedObjectKeys: "passthrough",
451
+ allowUnrecognizedUnionMembers: true,
452
+ allowUnrecognizedEnumValues: true,
453
+ skipValidation: true,
454
+ breadcrumbsPrefix: ["response"],
455
+ }));
408
456
  case 403:
409
457
  throw new Webflow.ForbiddenError(_response.error.body);
410
458
  case 404:
411
- throw new Webflow.NotFoundError(_response.error.body);
459
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
460
+ unrecognizedObjectKeys: "passthrough",
461
+ allowUnrecognizedUnionMembers: true,
462
+ allowUnrecognizedEnumValues: true,
463
+ skipValidation: true,
464
+ breadcrumbsPrefix: ["response"],
465
+ }));
412
466
  case 409:
413
467
  throw new Webflow.ConflictError(_response.error.body);
414
468
  case 429:
415
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
469
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
416
470
  unrecognizedObjectKeys: "passthrough",
417
471
  allowUnrecognizedUnionMembers: true,
418
472
  allowUnrecognizedEnumValues: true,
@@ -420,7 +474,13 @@ class Products {
420
474
  breadcrumbsPrefix: ["response"],
421
475
  }));
422
476
  case 500:
423
- throw new Webflow.InternalServerError(_response.error.body);
477
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
478
+ unrecognizedObjectKeys: "passthrough",
479
+ allowUnrecognizedUnionMembers: true,
480
+ allowUnrecognizedEnumValues: true,
481
+ skipValidation: true,
482
+ breadcrumbsPrefix: ["response"],
483
+ }));
424
484
  default:
425
485
  throw new errors.WebflowError({
426
486
  statusCode: _response.error.statusCode,
@@ -435,7 +495,7 @@ class Products {
435
495
  body: _response.error.rawBody,
436
496
  });
437
497
  case "timeout":
438
- throw new errors.WebflowTimeoutError();
498
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}/products/{product_id}.");
439
499
  case "unknown":
440
500
  throw new errors.WebflowError({
441
501
  message: _response.error.errorMessage,
@@ -444,9 +504,9 @@ class Products {
444
504
  });
445
505
  }
446
506
  /**
447
- * Create additional SKUs to cover every variant of your Product. The Default SKU already counts as one of the variants.
507
+ * Create additional SKUs to manage every [option and variant of your Product.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants)
448
508
  *
449
- * Creating additional SKUs will set the product type to `Advanced` for the product associated with the SKUs. The product type is used to determine which Product and SKU fields are shown to users in the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown. The product type can be edited in the `Designer` or the `Editor`.
509
+ * Creating SKUs through the API will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
450
510
  *
451
511
  * Required scope | `ecommerce:write`
452
512
  *
@@ -474,18 +534,14 @@ class Products {
474
534
  const _response = yield core.fetcher({
475
535
  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)}/products/${encodeURIComponent(productId)}/skus`),
476
536
  method: "POST",
477
- headers: {
478
- Authorization: yield this._getAuthorizationHeader(),
479
- "X-Fern-Language": "JavaScript",
480
- "X-Fern-SDK-Name": "webflow-api",
481
- "X-Fern-SDK-Version": "2.4.0",
482
- "User-Agent": "webflow-api/2.4.0",
483
- "X-Fern-Runtime": core.RUNTIME.type,
484
- "X-Fern-Runtime-Version": core.RUNTIME.version,
485
- },
537
+ 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),
486
538
  contentType: "application/json",
487
539
  requestType: "json",
488
- body: serializers.ProductsCreateSkuRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
540
+ body: serializers.ProductsCreateSkuRequest.jsonOrThrow(request, {
541
+ unrecognizedObjectKeys: "passthrough",
542
+ allowUnrecognizedUnionMembers: true,
543
+ allowUnrecognizedEnumValues: true,
544
+ }),
489
545
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
490
546
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
491
547
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -504,15 +560,27 @@ class Products {
504
560
  case 400:
505
561
  throw new Webflow.BadRequestError(_response.error.body);
506
562
  case 401:
507
- throw new Webflow.UnauthorizedError(_response.error.body);
563
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
564
+ unrecognizedObjectKeys: "passthrough",
565
+ allowUnrecognizedUnionMembers: true,
566
+ allowUnrecognizedEnumValues: true,
567
+ skipValidation: true,
568
+ breadcrumbsPrefix: ["response"],
569
+ }));
508
570
  case 403:
509
571
  throw new Webflow.ForbiddenError(_response.error.body);
510
572
  case 404:
511
- throw new Webflow.NotFoundError(_response.error.body);
573
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
574
+ unrecognizedObjectKeys: "passthrough",
575
+ allowUnrecognizedUnionMembers: true,
576
+ allowUnrecognizedEnumValues: true,
577
+ skipValidation: true,
578
+ breadcrumbsPrefix: ["response"],
579
+ }));
512
580
  case 409:
513
581
  throw new Webflow.ConflictError(_response.error.body);
514
582
  case 429:
515
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
583
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
516
584
  unrecognizedObjectKeys: "passthrough",
517
585
  allowUnrecognizedUnionMembers: true,
518
586
  allowUnrecognizedEnumValues: true,
@@ -520,7 +588,13 @@ class Products {
520
588
  breadcrumbsPrefix: ["response"],
521
589
  }));
522
590
  case 500:
523
- throw new Webflow.InternalServerError(_response.error.body);
591
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
592
+ unrecognizedObjectKeys: "passthrough",
593
+ allowUnrecognizedUnionMembers: true,
594
+ allowUnrecognizedEnumValues: true,
595
+ skipValidation: true,
596
+ breadcrumbsPrefix: ["response"],
597
+ }));
524
598
  default:
525
599
  throw new errors.WebflowError({
526
600
  statusCode: _response.error.statusCode,
@@ -535,7 +609,7 @@ class Products {
535
609
  body: _response.error.rawBody,
536
610
  });
537
611
  case "timeout":
538
- throw new errors.WebflowTimeoutError();
612
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/products/{product_id}/skus.");
539
613
  case "unknown":
540
614
  throw new errors.WebflowError({
541
615
  message: _response.error.errorMessage,
@@ -544,7 +618,9 @@ class Products {
544
618
  });
545
619
  }
546
620
  /**
547
- * Updating an existing SKU will set the product type to `Advanced` for the product associated with the SKU. The product type is used to determine which Product and SKU fields are shown to users in the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown. The product type can be edited in the `Designer` or the `Editor`.
621
+ * Update a specified SKU.
622
+ *
623
+ * Updating an existing SKU will set the Product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
548
624
  *
549
625
  * Required scope | `ecommerce:write`
550
626
  *
@@ -573,18 +649,14 @@ class Products {
573
649
  const _response = yield core.fetcher({
574
650
  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)}/products/${encodeURIComponent(productId)}/skus/${encodeURIComponent(skuId)}`),
575
651
  method: "PATCH",
576
- headers: {
577
- Authorization: yield this._getAuthorizationHeader(),
578
- "X-Fern-Language": "JavaScript",
579
- "X-Fern-SDK-Name": "webflow-api",
580
- "X-Fern-SDK-Version": "2.4.0",
581
- "User-Agent": "webflow-api/2.4.0",
582
- "X-Fern-Runtime": core.RUNTIME.type,
583
- "X-Fern-Runtime-Version": core.RUNTIME.version,
584
- },
652
+ 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),
585
653
  contentType: "application/json",
586
654
  requestType: "json",
587
- body: serializers.ProductsUpdateSkuRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
655
+ body: serializers.ProductsUpdateSkuRequest.jsonOrThrow(request, {
656
+ unrecognizedObjectKeys: "passthrough",
657
+ allowUnrecognizedUnionMembers: true,
658
+ allowUnrecognizedEnumValues: true,
659
+ }),
588
660
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
589
661
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
590
662
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -603,15 +675,27 @@ class Products {
603
675
  case 400:
604
676
  throw new Webflow.BadRequestError(_response.error.body);
605
677
  case 401:
606
- throw new Webflow.UnauthorizedError(_response.error.body);
678
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
679
+ unrecognizedObjectKeys: "passthrough",
680
+ allowUnrecognizedUnionMembers: true,
681
+ allowUnrecognizedEnumValues: true,
682
+ skipValidation: true,
683
+ breadcrumbsPrefix: ["response"],
684
+ }));
607
685
  case 403:
608
686
  throw new Webflow.ForbiddenError(_response.error.body);
609
687
  case 404:
610
- throw new Webflow.NotFoundError(_response.error.body);
688
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
689
+ unrecognizedObjectKeys: "passthrough",
690
+ allowUnrecognizedUnionMembers: true,
691
+ allowUnrecognizedEnumValues: true,
692
+ skipValidation: true,
693
+ breadcrumbsPrefix: ["response"],
694
+ }));
611
695
  case 409:
612
696
  throw new Webflow.ConflictError(_response.error.body);
613
697
  case 429:
614
- throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
698
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
615
699
  unrecognizedObjectKeys: "passthrough",
616
700
  allowUnrecognizedUnionMembers: true,
617
701
  allowUnrecognizedEnumValues: true,
@@ -619,7 +703,13 @@ class Products {
619
703
  breadcrumbsPrefix: ["response"],
620
704
  }));
621
705
  case 500:
622
- throw new Webflow.InternalServerError(_response.error.body);
706
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
707
+ unrecognizedObjectKeys: "passthrough",
708
+ allowUnrecognizedUnionMembers: true,
709
+ allowUnrecognizedEnumValues: true,
710
+ skipValidation: true,
711
+ breadcrumbsPrefix: ["response"],
712
+ }));
623
713
  default:
624
714
  throw new errors.WebflowError({
625
715
  statusCode: _response.error.statusCode,
@@ -634,7 +724,7 @@ class Products {
634
724
  body: _response.error.rawBody,
635
725
  });
636
726
  case "timeout":
637
- throw new errors.WebflowTimeoutError();
727
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}/products/{product_id}/skus/{sku_id}.");
638
728
  case "unknown":
639
729
  throw new errors.WebflowError({
640
730
  message: _response.error.errorMessage,
@@ -16,13 +16,24 @@ export declare namespace Scripts {
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 Scripts {
22
24
  protected readonly _options: Scripts.Options;
23
25
  constructor(_options: Scripts.Options);
24
26
  /**
25
- * List of scripts registered to a Site. </br></br> In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets. <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote> Required scope | `custom_code:read`
27
+ * List of scripts registered to a Site.
28
+ *
29
+ * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
30
+ * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
31
+ * `custom_code` endpoints.
32
+ * Additionally, Scripts can be remotely hosted, or registered as inline snippets.
33
+ *
34
+ * <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>
35
+ *
36
+ * Required scope | `custom_code:read`
26
37
  *
27
38
  * @param {string} siteId - Unique identifier for a Site
28
39
  * @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
@@ -38,7 +49,16 @@ export declare class Scripts {
38
49
  */
39
50
  list(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<Webflow.RegisteredScriptList>;
40
51
  /**
41
- * Add a script to a Site's Custom Code registry. </br></br> In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets. <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote> </br></br> Required scope | `custom_code:write`
52
+ * Add a script to a Site's Custom Code registry.
53
+ *
54
+ * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
55
+ * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
56
+ * `custom_code` endpoints.
57
+ * Additionally, Scripts can be remotely hosted, or registered as inline snippets.
58
+ *
59
+ * <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>
60
+ *
61
+ * Required scope | `custom_code:write`
42
62
  *
43
63
  * @param {string} siteId - Unique identifier for a Site
44
64
  * @param {Webflow.CustomCodeHostedRequest} request
@@ -60,7 +80,15 @@ export declare class Scripts {
60
80
  */
61
81
  registerHosted(siteId: string, request: Webflow.CustomCodeHostedRequest, requestOptions?: Scripts.RequestOptions): Promise<Webflow.CustomCodeHostedResponse>;
62
82
  /**
63
- * Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters. </br></br> In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. </br></br> <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote> Required scope | `custom_code:write`
83
+ * Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters.
84
+ *
85
+ * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
86
+ * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
87
+ * `custom_code` endpoints.
88
+ *
89
+ * <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>
90
+ *
91
+ * Required scope | `custom_code:write`
64
92
  *
65
93
  * @param {string} siteId - Unique identifier for a Site
66
94
  * @param {Webflow.CustomCodeInlineRequest} request