webflow-api 3.1.0 → 3.1.2

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 (351) hide show
  1. package/.mock/definition/__package__.yml +363 -79
  2. package/.mock/definition/accessGroups.yml +1 -0
  3. package/.mock/definition/assets.yml +86 -47
  4. package/.mock/definition/collections/fields.yml +63 -46
  5. package/.mock/definition/collections/items.yml +58 -30
  6. package/.mock/definition/collections.yml +42 -7
  7. package/.mock/definition/components.yml +43 -50
  8. package/.mock/definition/ecommerce.yml +1 -0
  9. package/.mock/definition/forms.yml +114 -2
  10. package/.mock/definition/inventory.yml +2 -0
  11. package/.mock/definition/orders.yml +6 -68
  12. package/.mock/definition/pages/scripts.yml +10 -44
  13. package/.mock/definition/pages.yml +36 -41
  14. package/.mock/definition/products.yml +9 -0
  15. package/.mock/definition/scripts.yml +18 -49
  16. package/.mock/definition/sites/activityLogs.yml +10 -7
  17. package/.mock/definition/sites/plans.yml +7 -1
  18. package/.mock/definition/sites/redirects.yml +24 -1
  19. package/.mock/definition/sites/robotsTxt.yml +202 -0
  20. package/.mock/definition/sites/scripts.yml +22 -30
  21. package/.mock/definition/sites.yml +27 -30
  22. package/.mock/definition/token.yml +2 -0
  23. package/.mock/definition/users.yml +4 -0
  24. package/.mock/definition/webhooks.yml +7 -8
  25. package/.mock/fern.config.json +1 -1
  26. package/api/resources/accessGroups/client/Client.js +1 -1
  27. package/api/resources/assets/client/Client.d.ts +10 -7
  28. package/api/resources/assets/client/Client.js +18 -15
  29. package/api/resources/collections/client/Client.d.ts +21 -1
  30. package/api/resources/collections/client/Client.js +27 -5
  31. package/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +23 -1
  32. package/api/resources/collections/resources/fields/client/Client.d.ts +34 -4
  33. package/api/resources/collections/resources/fields/client/Client.js +40 -8
  34. package/api/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
  35. package/api/resources/collections/resources/fields/index.d.ts +0 -1
  36. package/api/resources/collections/resources/fields/index.js +0 -1
  37. package/api/resources/collections/resources/index.d.ts +1 -2
  38. package/api/resources/collections/resources/index.js +2 -3
  39. package/api/resources/collections/resources/items/client/Client.d.ts +19 -12
  40. package/api/resources/collections/resources/items/client/Client.js +39 -28
  41. package/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
  42. package/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
  43. package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
  44. package/api/resources/components/client/Client.d.ts +5 -6
  45. package/api/resources/components/client/Client.js +10 -11
  46. package/api/resources/ecommerce/client/Client.js +1 -1
  47. package/api/resources/forms/client/Client.d.ts +51 -0
  48. package/api/resources/forms/client/Client.js +226 -5
  49. package/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.d.ts +23 -0
  50. package/api/resources/forms/client/requests/index.d.ts +1 -0
  51. package/api/resources/inventory/client/Client.js +2 -2
  52. package/api/resources/orders/client/Client.js +6 -6
  53. package/api/resources/pages/client/Client.d.ts +8 -3
  54. package/api/resources/pages/client/Client.js +13 -8
  55. package/api/resources/pages/resources/scripts/client/Client.d.ts +6 -20
  56. package/api/resources/pages/resources/scripts/client/Client.js +9 -23
  57. package/api/resources/products/client/Client.js +6 -6
  58. package/api/resources/scripts/client/Client.d.ts +12 -20
  59. package/api/resources/scripts/client/Client.js +15 -23
  60. package/api/resources/sites/client/Client.d.ts +12 -3
  61. package/api/resources/sites/client/Client.js +25 -14
  62. package/api/resources/sites/resources/activityLogs/client/Client.d.ts +5 -1
  63. package/api/resources/sites/resources/activityLogs/client/Client.js +6 -2
  64. package/api/resources/sites/resources/index.d.ts +1 -0
  65. package/api/resources/sites/resources/index.js +2 -1
  66. package/api/resources/sites/resources/plans/client/Client.d.ts +2 -0
  67. package/api/resources/sites/resources/plans/client/Client.js +3 -1
  68. package/api/resources/sites/resources/redirects/client/Client.d.ts +10 -0
  69. package/api/resources/sites/resources/redirects/client/Client.js +14 -4
  70. package/api/resources/sites/resources/robotsTxt/client/Client.d.ts +124 -0
  71. package/api/resources/sites/resources/robotsTxt/client/Client.js +486 -0
  72. package/api/resources/sites/resources/robotsTxt/client/index.d.ts +1 -0
  73. package/api/resources/sites/resources/robotsTxt/client/index.js +2 -0
  74. package/api/resources/sites/resources/robotsTxt/index.d.ts +1 -0
  75. package/api/resources/{collections/resources/fields/types → sites/resources/robotsTxt}/index.js +1 -1
  76. package/api/resources/sites/resources/scripts/client/Client.d.ts +15 -13
  77. package/api/resources/sites/resources/scripts/client/Client.js +19 -17
  78. package/api/resources/token/client/Client.js +2 -2
  79. package/api/resources/users/client/Client.js +5 -5
  80. package/api/resources/users/client/requests/UsersInviteRequest.d.ts +1 -4
  81. package/api/resources/users/client/requests/UsersUpdateRequest.d.ts +1 -4
  82. package/api/resources/webhooks/client/Client.js +4 -4
  83. package/api/types/Asset.d.ts +4 -0
  84. package/api/types/AssetVariant.d.ts +3 -0
  85. package/api/types/Assets.d.ts +1 -0
  86. package/api/types/ComponentNode.d.ts +2 -2
  87. package/api/types/Conflict.d.ts +4 -0
  88. package/api/types/Dom.d.ts +2 -0
  89. package/api/types/FieldCreate.d.ts +8 -0
  90. package/api/types/FieldCreate.js +5 -0
  91. package/api/types/FieldType.d.ts +3 -1
  92. package/api/types/FieldType.js +2 -0
  93. package/api/types/ImageNode.d.ts +1 -0
  94. package/api/types/ImageNodeImage.d.ts +3 -0
  95. package/api/types/Metadata.d.ts +11 -0
  96. package/api/types/Metadata.js +5 -0
  97. package/api/types/MetadataOptionsItem.d.ts +12 -0
  98. package/api/types/MetadataOptionsItem.js +5 -0
  99. package/api/types/OAuthScope.d.ts +8 -0
  100. package/api/types/OAuthScope.js +2 -0
  101. package/api/types/OptionField.d.ts +19 -0
  102. package/api/types/OptionField.js +5 -0
  103. package/api/types/ReferenceField.d.ts +20 -0
  104. package/api/types/ReferenceField.js +5 -0
  105. package/api/types/ReferenceFieldMetadata.d.ts +10 -0
  106. package/api/types/ReferenceFieldMetadata.js +5 -0
  107. package/api/types/ReferenceFieldType.d.ts +11 -0
  108. package/api/types/ReferenceFieldType.js +10 -0
  109. package/api/types/Robots.d.ts +13 -0
  110. package/api/types/Robots.js +5 -0
  111. package/api/types/RobotsRulesItem.d.ts +11 -0
  112. package/api/types/RobotsRulesItem.js +5 -0
  113. package/api/types/SkuFieldData.d.ts +2 -0
  114. package/api/types/SkuFieldDataEcSkuBillingMethod.d.ts +3 -0
  115. package/api/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +3 -0
  116. package/api/{resources/collections/resources/fields/client/requests/FieldCreate.d.ts → types/StaticField.d.ts} +7 -12
  117. package/api/types/StaticField.js +5 -0
  118. package/api/{resources/collections/resources/fields/types/FieldCreateType.d.ts → types/StaticFieldType.d.ts} +2 -3
  119. package/{dist/api/resources/collections/resources/fields/types/FieldCreateType.js → api/types/StaticFieldType.js} +2 -3
  120. package/api/types/Text.d.ts +3 -0
  121. package/api/types/TextNode.d.ts +1 -0
  122. package/api/types/TextNodeText.d.ts +3 -0
  123. package/api/types/TriggerType.d.ts +1 -15
  124. package/api/types/WebhookList.d.ts +1 -1
  125. package/api/types/index.d.ts +12 -0
  126. package/api/types/index.js +12 -0
  127. package/dist/api/resources/accessGroups/client/Client.js +1 -1
  128. package/dist/api/resources/assets/client/Client.d.ts +10 -7
  129. package/dist/api/resources/assets/client/Client.js +18 -15
  130. package/dist/api/resources/collections/client/Client.d.ts +21 -1
  131. package/dist/api/resources/collections/client/Client.js +27 -5
  132. package/dist/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +23 -1
  133. package/dist/api/resources/collections/resources/fields/client/Client.d.ts +34 -4
  134. package/dist/api/resources/collections/resources/fields/client/Client.js +40 -8
  135. package/dist/api/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
  136. package/dist/api/resources/collections/resources/fields/index.d.ts +0 -1
  137. package/dist/api/resources/collections/resources/fields/index.js +0 -1
  138. package/dist/api/resources/collections/resources/index.d.ts +1 -2
  139. package/dist/api/resources/collections/resources/index.js +2 -3
  140. package/dist/api/resources/collections/resources/items/client/Client.d.ts +19 -12
  141. package/dist/api/resources/collections/resources/items/client/Client.js +39 -28
  142. package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
  143. package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
  144. package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
  145. package/dist/api/resources/components/client/Client.d.ts +5 -6
  146. package/dist/api/resources/components/client/Client.js +10 -11
  147. package/dist/api/resources/ecommerce/client/Client.js +1 -1
  148. package/dist/api/resources/forms/client/Client.d.ts +51 -0
  149. package/dist/api/resources/forms/client/Client.js +226 -5
  150. package/dist/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.d.ts +23 -0
  151. package/dist/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.js +5 -0
  152. package/dist/api/resources/forms/client/requests/index.d.ts +1 -0
  153. package/dist/api/resources/inventory/client/Client.js +2 -2
  154. package/dist/api/resources/orders/client/Client.js +6 -6
  155. package/dist/api/resources/pages/client/Client.d.ts +8 -3
  156. package/dist/api/resources/pages/client/Client.js +13 -8
  157. package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +6 -20
  158. package/dist/api/resources/pages/resources/scripts/client/Client.js +9 -23
  159. package/dist/api/resources/products/client/Client.js +6 -6
  160. package/dist/api/resources/scripts/client/Client.d.ts +12 -20
  161. package/dist/api/resources/scripts/client/Client.js +15 -23
  162. package/dist/api/resources/sites/client/Client.d.ts +12 -3
  163. package/dist/api/resources/sites/client/Client.js +25 -14
  164. package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +5 -1
  165. package/dist/api/resources/sites/resources/activityLogs/client/Client.js +6 -2
  166. package/dist/api/resources/sites/resources/index.d.ts +1 -0
  167. package/dist/api/resources/sites/resources/index.js +2 -1
  168. package/dist/api/resources/sites/resources/plans/client/Client.d.ts +2 -0
  169. package/dist/api/resources/sites/resources/plans/client/Client.js +3 -1
  170. package/dist/api/resources/sites/resources/redirects/client/Client.d.ts +10 -0
  171. package/dist/api/resources/sites/resources/redirects/client/Client.js +14 -4
  172. package/dist/api/resources/sites/resources/robotsTxt/client/Client.d.ts +124 -0
  173. package/dist/api/resources/sites/resources/robotsTxt/client/Client.js +486 -0
  174. package/dist/api/resources/sites/resources/robotsTxt/client/index.d.ts +1 -0
  175. package/dist/api/resources/sites/resources/robotsTxt/client/index.js +2 -0
  176. package/dist/api/resources/sites/resources/robotsTxt/index.d.ts +1 -0
  177. package/dist/{serialization/resources/collections/resources/fields/types → api/resources/sites/resources/robotsTxt}/index.js +1 -1
  178. package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +15 -13
  179. package/dist/api/resources/sites/resources/scripts/client/Client.js +19 -17
  180. package/dist/api/resources/token/client/Client.js +2 -2
  181. package/dist/api/resources/users/client/Client.js +5 -5
  182. package/dist/api/resources/users/client/requests/UsersInviteRequest.d.ts +1 -4
  183. package/dist/api/resources/users/client/requests/UsersUpdateRequest.d.ts +1 -4
  184. package/dist/api/resources/webhooks/client/Client.js +4 -4
  185. package/dist/api/types/Asset.d.ts +4 -0
  186. package/dist/api/types/AssetVariant.d.ts +3 -0
  187. package/dist/api/types/Assets.d.ts +1 -0
  188. package/dist/api/types/ComponentNode.d.ts +2 -2
  189. package/dist/api/types/Conflict.d.ts +4 -0
  190. package/dist/api/types/Conflict.js +5 -0
  191. package/dist/api/types/Dom.d.ts +2 -0
  192. package/dist/api/types/FieldCreate.d.ts +8 -0
  193. package/dist/api/types/FieldCreate.js +5 -0
  194. package/dist/api/types/FieldType.d.ts +3 -1
  195. package/dist/api/types/FieldType.js +2 -0
  196. package/dist/api/types/ImageNode.d.ts +1 -0
  197. package/dist/api/types/ImageNodeImage.d.ts +3 -0
  198. package/dist/api/types/Metadata.d.ts +11 -0
  199. package/dist/api/types/Metadata.js +5 -0
  200. package/dist/api/types/MetadataOptionsItem.d.ts +12 -0
  201. package/dist/api/types/MetadataOptionsItem.js +5 -0
  202. package/dist/api/types/OAuthScope.d.ts +8 -0
  203. package/dist/api/types/OAuthScope.js +2 -0
  204. package/dist/api/types/OptionField.d.ts +19 -0
  205. package/dist/api/types/OptionField.js +5 -0
  206. package/dist/api/types/ReferenceField.d.ts +20 -0
  207. package/dist/api/types/ReferenceField.js +5 -0
  208. package/dist/api/types/ReferenceFieldMetadata.d.ts +10 -0
  209. package/dist/api/types/ReferenceFieldMetadata.js +5 -0
  210. package/dist/api/types/ReferenceFieldType.d.ts +11 -0
  211. package/dist/api/types/ReferenceFieldType.js +10 -0
  212. package/dist/api/types/Robots.d.ts +13 -0
  213. package/dist/api/types/Robots.js +5 -0
  214. package/dist/api/types/RobotsRulesItem.d.ts +11 -0
  215. package/dist/api/types/RobotsRulesItem.js +5 -0
  216. package/dist/api/types/SkuFieldData.d.ts +2 -0
  217. package/dist/api/types/SkuFieldDataEcSkuBillingMethod.d.ts +3 -0
  218. package/dist/api/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +3 -0
  219. package/dist/api/{resources/collections/resources/fields/client/requests/FieldCreate.d.ts → types/StaticField.d.ts} +7 -12
  220. package/dist/api/types/StaticField.js +5 -0
  221. package/dist/api/{resources/collections/resources/fields/types/FieldCreateType.d.ts → types/StaticFieldType.d.ts} +2 -3
  222. package/{api/resources/collections/resources/fields/types/FieldCreateType.js → dist/api/types/StaticFieldType.js} +2 -3
  223. package/dist/api/types/Text.d.ts +3 -0
  224. package/dist/api/types/TextNode.d.ts +1 -0
  225. package/dist/api/types/TextNodeText.d.ts +3 -0
  226. package/dist/api/types/TriggerType.d.ts +1 -15
  227. package/dist/api/types/WebhookList.d.ts +1 -1
  228. package/dist/api/types/index.d.ts +12 -0
  229. package/dist/api/types/index.js +12 -0
  230. package/dist/serialization/resources/collections/client/requests/CollectionsCreateRequest.d.ts +2 -0
  231. package/dist/serialization/resources/collections/client/requests/CollectionsCreateRequest.js +2 -0
  232. package/dist/serialization/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
  233. package/dist/serialization/resources/collections/resources/fields/client/requests/index.js +1 -3
  234. package/dist/serialization/resources/collections/resources/fields/index.d.ts +0 -1
  235. package/dist/serialization/resources/collections/resources/fields/index.js +0 -1
  236. package/dist/serialization/resources/collections/resources/index.d.ts +1 -2
  237. package/dist/serialization/resources/collections/resources/index.js +2 -3
  238. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
  239. package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +1 -1
  240. package/dist/serialization/types/Assets.d.ts +2 -0
  241. package/dist/serialization/types/Assets.js +2 -0
  242. package/dist/serialization/types/Conflict.d.ts +10 -0
  243. package/dist/serialization/types/Conflict.js +31 -0
  244. package/dist/serialization/types/Dom.d.ts +1 -0
  245. package/dist/serialization/types/Dom.js +1 -0
  246. package/dist/serialization/types/FieldCreate.d.ts +13 -0
  247. package/dist/serialization/types/FieldCreate.js +34 -0
  248. package/dist/serialization/types/FieldType.d.ts +1 -1
  249. package/dist/serialization/types/FieldType.js +2 -0
  250. package/dist/serialization/types/Metadata.d.ts +13 -0
  251. package/dist/serialization/types/Metadata.js +34 -0
  252. package/dist/serialization/types/MetadataOptionsItem.d.ts +13 -0
  253. package/dist/serialization/types/MetadataOptionsItem.js +34 -0
  254. package/dist/serialization/types/OptionField.d.ts +19 -0
  255. package/dist/serialization/types/OptionField.js +40 -0
  256. package/dist/serialization/types/ReferenceField.d.ts +20 -0
  257. package/dist/serialization/types/ReferenceField.js +41 -0
  258. package/dist/serialization/types/ReferenceFieldMetadata.d.ts +12 -0
  259. package/dist/serialization/types/ReferenceFieldMetadata.js +33 -0
  260. package/dist/serialization/types/ReferenceFieldType.d.ts +10 -0
  261. package/dist/serialization/types/ReferenceFieldType.js +31 -0
  262. package/dist/serialization/types/Robots.d.ts +14 -0
  263. package/dist/serialization/types/Robots.js +35 -0
  264. package/dist/serialization/types/RobotsRulesItem.d.ts +14 -0
  265. package/dist/serialization/types/RobotsRulesItem.js +35 -0
  266. package/dist/serialization/types/StaticField.d.ts +18 -0
  267. package/dist/serialization/{resources/collections/resources/fields/client/requests/FieldCreate.js → types/StaticField.js} +7 -5
  268. package/dist/serialization/types/StaticFieldType.d.ts +10 -0
  269. package/dist/serialization/{resources/collections/resources/fields/types/FieldCreateType.js → types/StaticFieldType.js} +3 -4
  270. package/dist/serialization/types/WebhookList.d.ts +2 -2
  271. package/dist/serialization/types/WebhookList.js +2 -2
  272. package/dist/serialization/types/index.d.ts +12 -0
  273. package/dist/serialization/types/index.js +12 -0
  274. package/dist/version.d.ts +1 -1
  275. package/dist/version.js +1 -1
  276. package/dist/wrapper/AssetsClient.d.ts +12 -0
  277. package/dist/wrapper/AssetsClient.js +16 -0
  278. package/dist/wrapper/AssetsUtilitiesClient.d.ts +49 -0
  279. package/dist/wrapper/AssetsUtilitiesClient.js +121 -0
  280. package/dist/wrapper/WebflowClient.d.ts +6 -0
  281. package/dist/wrapper/WebflowClient.js +10 -0
  282. package/dist/wrapper/WebhooksClient.d.ts +39 -0
  283. package/dist/wrapper/WebhooksClient.js +66 -0
  284. package/package.json +15 -12
  285. package/reference.md +585 -91
  286. package/serialization/resources/collections/client/requests/CollectionsCreateRequest.d.ts +2 -0
  287. package/serialization/resources/collections/client/requests/CollectionsCreateRequest.js +2 -0
  288. package/serialization/resources/collections/resources/fields/client/requests/index.d.ts +0 -1
  289. package/serialization/resources/collections/resources/fields/client/requests/index.js +1 -3
  290. package/serialization/resources/collections/resources/fields/index.d.ts +0 -1
  291. package/serialization/resources/collections/resources/fields/index.js +0 -1
  292. package/serialization/resources/collections/resources/index.d.ts +1 -2
  293. package/serialization/resources/collections/resources/index.js +2 -3
  294. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +1 -1
  295. package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +1 -1
  296. package/serialization/types/Assets.d.ts +2 -0
  297. package/serialization/types/Assets.js +2 -0
  298. package/serialization/types/Conflict.d.ts +10 -0
  299. package/serialization/types/Conflict.js +31 -0
  300. package/serialization/types/Dom.d.ts +1 -0
  301. package/serialization/types/Dom.js +1 -0
  302. package/serialization/types/FieldCreate.d.ts +13 -0
  303. package/serialization/types/FieldCreate.js +34 -0
  304. package/serialization/types/FieldType.d.ts +1 -1
  305. package/serialization/types/FieldType.js +2 -0
  306. package/serialization/types/Metadata.d.ts +13 -0
  307. package/serialization/types/Metadata.js +34 -0
  308. package/serialization/types/MetadataOptionsItem.d.ts +13 -0
  309. package/serialization/types/MetadataOptionsItem.js +34 -0
  310. package/serialization/types/OptionField.d.ts +19 -0
  311. package/serialization/types/OptionField.js +40 -0
  312. package/serialization/types/ReferenceField.d.ts +20 -0
  313. package/serialization/types/ReferenceField.js +41 -0
  314. package/serialization/types/ReferenceFieldMetadata.d.ts +12 -0
  315. package/serialization/types/ReferenceFieldMetadata.js +33 -0
  316. package/serialization/types/ReferenceFieldType.d.ts +10 -0
  317. package/serialization/types/ReferenceFieldType.js +31 -0
  318. package/serialization/types/Robots.d.ts +14 -0
  319. package/serialization/types/Robots.js +35 -0
  320. package/serialization/types/RobotsRulesItem.d.ts +14 -0
  321. package/serialization/types/RobotsRulesItem.js +35 -0
  322. package/serialization/types/StaticField.d.ts +18 -0
  323. package/serialization/{resources/collections/resources/fields/client/requests/FieldCreate.js → types/StaticField.js} +7 -5
  324. package/serialization/types/StaticFieldType.d.ts +10 -0
  325. package/serialization/{resources/collections/resources/fields/types/FieldCreateType.js → types/StaticFieldType.js} +3 -4
  326. package/serialization/types/WebhookList.d.ts +2 -2
  327. package/serialization/types/WebhookList.js +2 -2
  328. package/serialization/types/index.d.ts +12 -0
  329. package/serialization/types/index.js +12 -0
  330. package/version.d.ts +1 -1
  331. package/version.js +1 -1
  332. package/wrapper/AssetsClient.d.ts +12 -0
  333. package/wrapper/AssetsClient.js +16 -0
  334. package/wrapper/AssetsUtilitiesClient.d.ts +49 -0
  335. package/wrapper/AssetsUtilitiesClient.js +121 -0
  336. package/wrapper/WebflowClient.d.ts +6 -0
  337. package/wrapper/WebflowClient.js +10 -0
  338. package/wrapper/WebhooksClient.d.ts +39 -0
  339. package/wrapper/WebhooksClient.js +66 -0
  340. package/api/resources/collections/resources/fields/types/index.d.ts +0 -1
  341. package/dist/api/resources/collections/resources/fields/types/index.d.ts +0 -1
  342. package/dist/api/resources/collections/resources/fields/types/index.js +0 -17
  343. package/dist/serialization/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +0 -16
  344. package/dist/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +0 -10
  345. package/dist/serialization/resources/collections/resources/fields/types/index.d.ts +0 -1
  346. package/serialization/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +0 -16
  347. package/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +0 -10
  348. package/serialization/resources/collections/resources/fields/types/index.d.ts +0 -1
  349. package/serialization/resources/collections/resources/fields/types/index.js +0 -17
  350. /package/api/resources/{collections/resources/fields/client/requests/FieldCreate.js → forms/client/requests/FormsListSubmissionsBySiteRequest.js} +0 -0
  351. /package/{dist/api/resources/collections/resources/fields/client/requests/FieldCreate.js → api/types/Conflict.js} +0 -0
@@ -2,6 +2,9 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Webflow from "../index";
5
+ /**
6
+ * [Subscription plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription) for the SKU
7
+ */
5
8
  export interface SkuFieldDataEcSkuSubscriptionPlan {
6
9
  /** Interval of subscription renewal */
7
10
  interval?: Webflow.SkuFieldDataEcSkuSubscriptionPlanInterval;
@@ -1,21 +1,16 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Webflow from "../../../../../../index";
5
- /**
6
- * @example
7
- * {
8
- * isRequired: false,
9
- * type: "RichText",
10
- * displayName: "Post Body",
11
- * helpText: "Add the body of your post here"
12
- * }
13
- */
14
- export interface FieldCreate {
4
+ import * as Webflow from "../index";
5
+ export interface StaticField {
6
+ /** Unique identifier for a Field */
7
+ id?: string;
8
+ /** Define whether the field is editable */
9
+ isEditable?: boolean;
15
10
  /** define whether a field is required in a collection */
16
11
  isRequired?: boolean;
17
12
  /** Choose these appropriate field type for your collection data */
18
- type: Webflow.collections.FieldCreateType;
13
+ type: Webflow.StaticFieldType;
19
14
  /** The name of a field */
20
15
  displayName: string;
21
16
  /** Additional text to help anyone filling out this field */
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,12 +4,11 @@
4
4
  /**
5
5
  * Choose these appropriate field type for your collection data
6
6
  */
7
- export declare type FieldCreateType = "Color" | "DateTime" | "Email" | "ExtFileRef" | "File" | "Image" | "Link" | "MultiImage" | "Number" | "Phone" | "PlainText" | "RichText" | "Switch" | "Video";
8
- export declare const FieldCreateType: {
7
+ export declare type StaticFieldType = "Color" | "DateTime" | "Email" | "File" | "Image" | "Link" | "MultiImage" | "Number" | "Phone" | "PlainText" | "RichText" | "Switch" | "Video";
8
+ export declare const StaticFieldType: {
9
9
  readonly Color: "Color";
10
10
  readonly DateTime: "DateTime";
11
11
  readonly Email: "Email";
12
- readonly ExtFileRef: "ExtFileRef";
13
12
  readonly File: "File";
14
13
  readonly Image: "Image";
15
14
  readonly Link: "Link";
@@ -3,12 +3,11 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FieldCreateType = void 0;
7
- exports.FieldCreateType = {
6
+ exports.StaticFieldType = void 0;
7
+ exports.StaticFieldType = {
8
8
  Color: "Color",
9
9
  DateTime: "DateTime",
10
10
  Email: "Email",
11
- ExtFileRef: "ExtFileRef",
12
11
  File: "File",
13
12
  Image: "Image",
14
13
  Link: "Link",
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * The text content of the node
6
+ */
4
7
  export interface Text {
5
8
  /** The HTML content of the text node. */
6
9
  html?: string;
@@ -8,6 +8,7 @@ import * as Webflow from "../index";
8
8
  export interface TextNode {
9
9
  /** Node UUID */
10
10
  id?: string;
11
+ /** The text content of the node */
11
12
  text?: Webflow.TextNodeText;
12
13
  /** The custom attributes of the node */
13
14
  attributes?: Record<string, string>;
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * The text content of the node
6
+ */
4
7
  export interface TextNodeText {
5
8
  /** The HTML content of the text node. */
6
9
  html?: string;
@@ -2,21 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * * `form_submission` - Sends the [form_submission](#form_submission) event
6
- * * `site_publish` - Sends a [site_publish](#site_publish) event
7
- * * `page_created` - Send the [page_created](#page_created) event
8
- * * `page_metadata_updated` - Sends the [page_metadata_updated](#page_metadata_updated) event
9
- * * `page_deleted` - Sends the [page_deleted](#page_deleted) event
10
- * * `ecomm_new_order` - Sends the new [ecomm_new_order](#ecomm_new_order) event
11
- * * `ecomm_order_changed` - Sends the [ecomm_order_changed](#ecomm_order_changed) event
12
- * * `ecomm_inventory_changed` - Sends the [ecomm_inventory_changed](#ecomm_inventory_changed) event
13
- * * `user_account_added` - Sends the [user_account_added](#user_account_added) event
14
- * * `user_account_updated` - Sends the [user_account_updated](#user_account_updated) event
15
- * * `user_account_deleted` - Sends the [user_account_deleted](#user_account_deleted) event
16
- * * `collection_item_created` - Sends the [collection_item_created](#collection_item_created) event
17
- * * `collection_item_changed` - Sends the [collection_item_changed](#collection_item_changed) event
18
- * * `collection_item_deleted` - Sends the [collection_item_deleted](#collection_item_deleted) event
19
- * * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event
5
+ * The type of event that triggered the request. See the the documentation for details on [supported events](/data/reference/all-events).
20
6
  */
21
7
  export declare type TriggerType = "form_submission" | "site_publish" | "page_created" | "page_metadata_updated" | "page_deleted" | "ecomm_new_order" | "ecomm_order_changed" | "ecomm_inventory_changed" | "user_account_added" | "user_account_updated" | "user_account_deleted" | "collection_item_created" | "collection_item_changed" | "collection_item_deleted" | "collection_item_unpublished";
22
8
  export declare const TriggerType: {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  import * as Webflow from "../index";
5
5
  export interface WebhookList {
6
- pagination?: Webflow.Pagination;
7
6
  webhooks?: Webflow.Webhook[];
7
+ pagination?: Webflow.Pagination;
8
8
  }
@@ -26,6 +26,8 @@ export * from "./Redirects";
26
26
  export * from "./SitePlanId";
27
27
  export * from "./SitePlanName";
28
28
  export * from "./SitePlan";
29
+ export * from "./RobotsRulesItem";
30
+ export * from "./Robots";
29
31
  export * from "./SiteActivityLogItemEvent";
30
32
  export * from "./SiteActivityLogItemResourceOperation";
31
33
  export * from "./SiteActivityLogItemUser";
@@ -33,6 +35,15 @@ export * from "./SiteActivityLogItem";
33
35
  export * from "./SiteActivityLogResponse";
34
36
  export * from "./CollectionListArrayItem";
35
37
  export * from "./CollectionList";
38
+ export * from "./StaticFieldType";
39
+ export * from "./StaticField";
40
+ export * from "./MetadataOptionsItem";
41
+ export * from "./Metadata";
42
+ export * from "./OptionField";
43
+ export * from "./ReferenceFieldType";
44
+ export * from "./ReferenceFieldMetadata";
45
+ export * from "./ReferenceField";
46
+ export * from "./FieldCreate";
36
47
  export * from "./FieldType";
37
48
  export * from "./Field";
38
49
  export * from "./Collection";
@@ -45,6 +56,7 @@ export * from "./CollectionItemPostSingle";
45
56
  export * from "./CollectionItemWithIdInputFieldData";
46
57
  export * from "./CollectionItemWithIdInput";
47
58
  export * from "./CollectionItemListNoPagination";
59
+ export * from "./Conflict";
48
60
  export * from "./BulkCollectionItemFieldData";
49
61
  export * from "./BulkCollectionItem";
50
62
  export * from "./CollectionItemPatchSingleFieldData";
@@ -42,6 +42,8 @@ __exportStar(require("./Redirects"), exports);
42
42
  __exportStar(require("./SitePlanId"), exports);
43
43
  __exportStar(require("./SitePlanName"), exports);
44
44
  __exportStar(require("./SitePlan"), exports);
45
+ __exportStar(require("./RobotsRulesItem"), exports);
46
+ __exportStar(require("./Robots"), exports);
45
47
  __exportStar(require("./SiteActivityLogItemEvent"), exports);
46
48
  __exportStar(require("./SiteActivityLogItemResourceOperation"), exports);
47
49
  __exportStar(require("./SiteActivityLogItemUser"), exports);
@@ -49,6 +51,15 @@ __exportStar(require("./SiteActivityLogItem"), exports);
49
51
  __exportStar(require("./SiteActivityLogResponse"), exports);
50
52
  __exportStar(require("./CollectionListArrayItem"), exports);
51
53
  __exportStar(require("./CollectionList"), exports);
54
+ __exportStar(require("./StaticFieldType"), exports);
55
+ __exportStar(require("./StaticField"), exports);
56
+ __exportStar(require("./MetadataOptionsItem"), exports);
57
+ __exportStar(require("./Metadata"), exports);
58
+ __exportStar(require("./OptionField"), exports);
59
+ __exportStar(require("./ReferenceFieldType"), exports);
60
+ __exportStar(require("./ReferenceFieldMetadata"), exports);
61
+ __exportStar(require("./ReferenceField"), exports);
62
+ __exportStar(require("./FieldCreate"), exports);
52
63
  __exportStar(require("./FieldType"), exports);
53
64
  __exportStar(require("./Field"), exports);
54
65
  __exportStar(require("./Collection"), exports);
@@ -61,6 +72,7 @@ __exportStar(require("./CollectionItemPostSingle"), exports);
61
72
  __exportStar(require("./CollectionItemWithIdInputFieldData"), exports);
62
73
  __exportStar(require("./CollectionItemWithIdInput"), exports);
63
74
  __exportStar(require("./CollectionItemListNoPagination"), exports);
75
+ __exportStar(require("./Conflict"), exports);
64
76
  __exportStar(require("./BulkCollectionItemFieldData"), exports);
65
77
  __exportStar(require("./BulkCollectionItem"), exports);
66
78
  __exportStar(require("./CollectionItemPatchSingleFieldData"), exports);
@@ -85,7 +85,7 @@ class AccessGroups {
85
85
  const _response = yield core.fetcher({
86
86
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/accessgroups`),
87
87
  method: "GET",
88
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
89
  contentType: "application/json",
90
90
  queryParameters: _queryParams,
91
91
  requestType: "json",
@@ -27,7 +27,7 @@ export declare class Assets {
27
27
  protected readonly _options: Assets.Options;
28
28
  constructor(_options: Assets.Options);
29
29
  /**
30
- * List assets for a given site
30
+ * List of assets uploaded to a site
31
31
  *
32
32
  * Required scope | `assets:read`
33
33
  *
@@ -45,15 +45,18 @@ export declare class Assets {
45
45
  */
46
46
  list(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Assets>;
47
47
  /**
48
- * Create a new asset entry.
48
+ * The first step in uploading an asset to a site.
49
49
  *
50
50
  *
51
51
  * This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`.
52
- * You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html)
53
- * request to the `uploadUrl` with the `uploadDetails` object as your header information in the request.
54
52
  *
55
53
  *
56
- * Required scope | `assets:write`
54
+ * Use these properties in the header of a [POST request to Amazson s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) to complete the upload.
55
+ *
56
+ *
57
+ * To learn more about how to upload assets to Webflow, see our [assets guide](/data/docs/working-with-assets).
58
+ *
59
+ * Required scope | `assets:write`
57
60
  *
58
61
  * @param {string} siteId - Unique identifier for a Site
59
62
  * @param {Webflow.AssetsCreateRequest} request
@@ -73,7 +76,7 @@ export declare class Assets {
73
76
  */
74
77
  create(siteId: string, request: Webflow.AssetsCreateRequest, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetUpload>;
75
78
  /**
76
- * Get an Asset
79
+ * Get details about an asset
77
80
  *
78
81
  * Required scope | `assets:read`
79
82
  *
@@ -109,7 +112,7 @@ export declare class Assets {
109
112
  */
110
113
  delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise<void>;
111
114
  /**
112
- * Update an Asset
115
+ * Update details of an Asset.
113
116
  *
114
117
  * Required scope | `assets:write`
115
118
  *
@@ -53,7 +53,7 @@ class Assets {
53
53
  this._options = _options;
54
54
  }
55
55
  /**
56
- * List assets for a given site
56
+ * List of assets uploaded to a site
57
57
  *
58
58
  * Required scope | `assets:read`
59
59
  *
@@ -75,7 +75,7 @@ class Assets {
75
75
  const _response = yield core.fetcher({
76
76
  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)}/assets`),
77
77
  method: "GET",
78
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -150,15 +150,18 @@ class Assets {
150
150
  });
151
151
  }
152
152
  /**
153
- * Create a new asset entry.
153
+ * The first step in uploading an asset to a site.
154
154
  *
155
155
  *
156
156
  * This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`.
157
- * You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html)
158
- * request to the `uploadUrl` with the `uploadDetails` object as your header information in the request.
159
157
  *
160
158
  *
161
- * Required scope | `assets:write`
159
+ * Use these properties in the header of a [POST request to Amazson s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) to complete the upload.
160
+ *
161
+ *
162
+ * To learn more about how to upload assets to Webflow, see our [assets guide](/data/docs/working-with-assets).
163
+ *
164
+ * Required scope | `assets:write`
162
165
  *
163
166
  * @param {string} siteId - Unique identifier for a Site
164
167
  * @param {Webflow.AssetsCreateRequest} request
@@ -182,7 +185,7 @@ class Assets {
182
185
  const _response = yield core.fetcher({
183
186
  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)}/assets`),
184
187
  method: "POST",
185
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
188
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
186
189
  contentType: "application/json",
187
190
  requestType: "json",
188
191
  body: serializers.AssetsCreateRequest.jsonOrThrow(request, {
@@ -262,7 +265,7 @@ class Assets {
262
265
  });
263
266
  }
264
267
  /**
265
- * Get an Asset
268
+ * Get details about an asset
266
269
  *
267
270
  * Required scope | `assets:read`
268
271
  *
@@ -284,7 +287,7 @@ class Assets {
284
287
  const _response = yield core.fetcher({
285
288
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `assets/${encodeURIComponent(assetId)}`),
286
289
  method: "GET",
287
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
290
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
288
291
  contentType: "application/json",
289
292
  requestType: "json",
290
293
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -381,7 +384,7 @@ class Assets {
381
384
  const _response = yield core.fetcher({
382
385
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `assets/${encodeURIComponent(assetId)}`),
383
386
  method: "DELETE",
384
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
387
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
385
388
  contentType: "application/json",
386
389
  requestType: "json",
387
390
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -450,7 +453,7 @@ class Assets {
450
453
  });
451
454
  }
452
455
  /**
453
- * Update an Asset
456
+ * Update details of an Asset.
454
457
  *
455
458
  * Required scope | `assets:write`
456
459
  *
@@ -473,7 +476,7 @@ class Assets {
473
476
  const _response = yield core.fetcher({
474
477
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `assets/${encodeURIComponent(assetId)}`),
475
478
  method: "PATCH",
476
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
479
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
477
480
  contentType: "application/json",
478
481
  requestType: "json",
479
482
  body: serializers.AssetsUpdateRequest.jsonOrThrow(request, {
@@ -575,7 +578,7 @@ class Assets {
575
578
  const _response = yield core.fetcher({
576
579
  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)}/asset_folders`),
577
580
  method: "GET",
578
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
581
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
579
582
  contentType: "application/json",
580
583
  requestType: "json",
581
584
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -675,7 +678,7 @@ class Assets {
675
678
  const _response = yield core.fetcher({
676
679
  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)}/asset_folders`),
677
680
  method: "POST",
678
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
681
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
679
682
  contentType: "application/json",
680
683
  requestType: "json",
681
684
  body: serializers.AssetsCreateFolderRequest.jsonOrThrow(request, {
@@ -777,7 +780,7 @@ class Assets {
777
780
  const _response = yield core.fetcher({
778
781
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `asset_folders/${encodeURIComponent(assetFolderId)}`),
779
782
  method: "GET",
780
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
783
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
781
784
  contentType: "application/json",
782
785
  requestType: "json",
783
786
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -58,6 +58,7 @@ export declare class Collections {
58
58
  * @throws {@link Webflow.BadRequestError}
59
59
  * @throws {@link Webflow.UnauthorizedError}
60
60
  * @throws {@link Webflow.NotFoundError}
61
+ * @throws {@link Webflow.ConflictError}
61
62
  * @throws {@link Webflow.TooManyRequestsError}
62
63
  * @throws {@link Webflow.InternalServerError}
63
64
  *
@@ -65,7 +66,26 @@ export declare class Collections {
65
66
  * await client.collections.create("580e63e98c9a982ac9b8b741", {
66
67
  * displayName: "Blog Posts",
67
68
  * singularName: "Blog Post",
68
- * slug: "posts"
69
+ * slug: "posts",
70
+ * fields: [{
71
+ * isRequired: true,
72
+ * type: "PlainText",
73
+ * displayName: "Title",
74
+ * helpText: "The title of the blog post"
75
+ * }, {
76
+ * isRequired: true,
77
+ * type: "RichText",
78
+ * displayName: "Content",
79
+ * helpText: "The content of the blog post"
80
+ * }, {
81
+ * isRequired: true,
82
+ * type: "Reference",
83
+ * displayName: "Author",
84
+ * helpText: "The author of the blog post",
85
+ * metadata: {
86
+ * collectionId: "23cc2d952d4e4631ffd4345d2743db4e"
87
+ * }
88
+ * }]
69
89
  * })
70
90
  */
71
91
  create(siteId: string, request: Webflow.CollectionsCreateRequest, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
@@ -77,7 +77,7 @@ class Collections {
77
77
  const _response = yield core.fetcher({
78
78
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/collections`),
79
79
  method: "GET",
80
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -163,6 +163,7 @@ class Collections {
163
163
  * @throws {@link Webflow.BadRequestError}
164
164
  * @throws {@link Webflow.UnauthorizedError}
165
165
  * @throws {@link Webflow.NotFoundError}
166
+ * @throws {@link Webflow.ConflictError}
166
167
  * @throws {@link Webflow.TooManyRequestsError}
167
168
  * @throws {@link Webflow.InternalServerError}
168
169
  *
@@ -170,7 +171,26 @@ class Collections {
170
171
  * await client.collections.create("580e63e98c9a982ac9b8b741", {
171
172
  * displayName: "Blog Posts",
172
173
  * singularName: "Blog Post",
173
- * slug: "posts"
174
+ * slug: "posts",
175
+ * fields: [{
176
+ * isRequired: true,
177
+ * type: "PlainText",
178
+ * displayName: "Title",
179
+ * helpText: "The title of the blog post"
180
+ * }, {
181
+ * isRequired: true,
182
+ * type: "RichText",
183
+ * displayName: "Content",
184
+ * helpText: "The content of the blog post"
185
+ * }, {
186
+ * isRequired: true,
187
+ * type: "Reference",
188
+ * displayName: "Author",
189
+ * helpText: "The author of the blog post",
190
+ * metadata: {
191
+ * collectionId: "23cc2d952d4e4631ffd4345d2743db4e"
192
+ * }
193
+ * }]
174
194
  * })
175
195
  */
176
196
  create(siteId, request, requestOptions) {
@@ -179,7 +199,7 @@ class Collections {
179
199
  const _response = yield core.fetcher({
180
200
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/collections`),
181
201
  method: "POST",
182
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
202
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
183
203
  contentType: "application/json",
184
204
  requestType: "json",
185
205
  body: serializers.CollectionsCreateRequest.jsonOrThrow(request, {
@@ -220,6 +240,8 @@ class Collections {
220
240
  skipValidation: true,
221
241
  breadcrumbsPrefix: ["response"],
222
242
  }));
243
+ case 409:
244
+ throw new Webflow.ConflictError(_response.error.body);
223
245
  case 429:
224
246
  throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
225
247
  unrecognizedObjectKeys: "passthrough",
@@ -281,7 +303,7 @@ class Collections {
281
303
  const _response = yield core.fetcher({
282
304
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}`),
283
305
  method: "GET",
284
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
306
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
285
307
  contentType: "application/json",
286
308
  requestType: "json",
287
309
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -378,7 +400,7 @@ class Collections {
378
400
  const _response = yield core.fetcher({
379
401
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}`),
380
402
  method: "DELETE",
381
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.0", "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
403
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
382
404
  contentType: "application/json",
383
405
  requestType: "json",
384
406
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,12 +1,32 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Webflow from "../../../../index";
4
5
  /**
5
6
  * @example
6
7
  * {
7
8
  * displayName: "Blog Posts",
8
9
  * singularName: "Blog Post",
9
- * slug: "posts"
10
+ * slug: "posts",
11
+ * fields: [{
12
+ * isRequired: true,
13
+ * type: "PlainText",
14
+ * displayName: "Title",
15
+ * helpText: "The title of the blog post"
16
+ * }, {
17
+ * isRequired: true,
18
+ * type: "RichText",
19
+ * displayName: "Content",
20
+ * helpText: "The content of the blog post"
21
+ * }, {
22
+ * isRequired: true,
23
+ * type: "Reference",
24
+ * displayName: "Author",
25
+ * helpText: "The author of the blog post",
26
+ * metadata: {
27
+ * collectionId: "23cc2d952d4e4631ffd4345d2743db4e"
28
+ * }
29
+ * }]
10
30
  * }
11
31
  */
12
32
  export interface CollectionsCreateRequest {
@@ -16,4 +36,6 @@ export interface CollectionsCreateRequest {
16
36
  singularName: string;
17
37
  /** Part of a URL that identifier */
18
38
  slug?: string;
39
+ /** An array of custom fields to add to the collection */
40
+ fields?: Webflow.FieldCreate[];
19
41
  }
@@ -29,31 +29,61 @@ export declare class Fields {
29
29
  * Slugs must be all lowercase letters without spaces.
30
30
  * If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will
31
31
  * convert the slug to lowercase and replace spaces with "-."
32
- *
33
- * Only some field types can be created through the API.
34
32
  * This endpoint does not currently support bulk creation.
35
33
  *
36
34
  * Required scope | `cms:write`
37
35
  *
38
36
  * @param {string} collectionId - Unique identifier for a Collection
39
- * @param {Webflow.collections.FieldCreate} request
37
+ * @param {Webflow.FieldCreate} request
40
38
  * @param {Fields.RequestOptions} requestOptions - Request-specific configuration.
41
39
  *
42
40
  * @throws {@link Webflow.BadRequestError}
43
41
  * @throws {@link Webflow.UnauthorizedError}
44
42
  * @throws {@link Webflow.NotFoundError}
43
+ * @throws {@link Webflow.ConflictError}
45
44
  * @throws {@link Webflow.TooManyRequestsError}
46
45
  * @throws {@link Webflow.InternalServerError}
47
46
  *
48
47
  * @example
49
48
  * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
49
+ * isEditable: true,
50
50
  * isRequired: false,
51
51
  * type: "RichText",
52
52
  * displayName: "Post Body",
53
53
  * helpText: "Add the body of your post here"
54
54
  * })
55
+ *
56
+ * @example
57
+ * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
58
+ * isEditable: true,
59
+ * isRequired: false,
60
+ * type: "Option",
61
+ * displayName: "Post Type",
62
+ * helpText: "Add the body of your post here",
63
+ * metadata: {
64
+ * options: [{
65
+ * name: "Feature"
66
+ * }, {
67
+ * name: "News"
68
+ * }, {
69
+ * name: "Product Highlight"
70
+ * }]
71
+ * }
72
+ * })
73
+ *
74
+ * @example
75
+ * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
76
+ * isEditable: true,
77
+ * isRequired: false,
78
+ * type: "Reference",
79
+ * displayName: "Author",
80
+ * helpText: "Add the post author here",
81
+ * metadata: {
82
+ * collectionId: "63692ab61fb2852f582ba8f5"
83
+ * }
84
+ * })
55
85
  */
56
- create(collectionId: string, request: Webflow.collections.FieldCreate, requestOptions?: Fields.RequestOptions): Promise<Webflow.Field>;
86
+ create(collectionId: string, request: Webflow.FieldCreate, requestOptions?: Fields.RequestOptions): Promise<Webflow.FieldCreate>;
57
87
  /**
58
88
  * Delete a custom field in a collection. This endpoint does not currently support bulk deletion.
59
89
  *