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
@@ -0,0 +1,486 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.RobotsTxt = void 0;
42
+ const environments = __importStar(require("../../../../../../environments"));
43
+ const core = __importStar(require("../../../../../../core"));
44
+ const Webflow = __importStar(require("../../../../../index"));
45
+ const url_join_1 = __importDefault(require("url-join"));
46
+ const serializers = __importStar(require("../../../../../../serialization/index"));
47
+ const errors = __importStar(require("../../../../../../errors/index"));
48
+ class RobotsTxt {
49
+ constructor(_options) {
50
+ this._options = _options;
51
+ }
52
+ /**
53
+ * Retrieve the robots.txt configuration for various user agents.
54
+ *
55
+ * Required scope: `site_config:read`
56
+ *
57
+ * @param {string} siteId - Unique identifier for a Site
58
+ * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link Webflow.BadRequestError}
61
+ * @throws {@link Webflow.UnauthorizedError}
62
+ * @throws {@link Webflow.NotFoundError}
63
+ * @throws {@link Webflow.TooManyRequestsError}
64
+ * @throws {@link Webflow.InternalServerError}
65
+ *
66
+ * @example
67
+ * await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741")
68
+ */
69
+ get(siteId, requestOptions) {
70
+ var _a;
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ const _response = yield core.fetcher({
73
+ 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)}/robots_txt`),
74
+ method: "GET",
75
+ 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),
76
+ contentType: "application/json",
77
+ requestType: "json",
78
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
79
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
80
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
+ });
82
+ if (_response.ok) {
83
+ return serializers.Robots.parseOrThrow(_response.body, {
84
+ unrecognizedObjectKeys: "passthrough",
85
+ allowUnrecognizedUnionMembers: true,
86
+ allowUnrecognizedEnumValues: true,
87
+ skipValidation: true,
88
+ breadcrumbsPrefix: ["response"],
89
+ });
90
+ }
91
+ if (_response.error.reason === "status-code") {
92
+ switch (_response.error.statusCode) {
93
+ case 400:
94
+ throw new Webflow.BadRequestError(_response.error.body);
95
+ case 401:
96
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
97
+ unrecognizedObjectKeys: "passthrough",
98
+ allowUnrecognizedUnionMembers: true,
99
+ allowUnrecognizedEnumValues: true,
100
+ skipValidation: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ }));
103
+ case 404:
104
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
105
+ unrecognizedObjectKeys: "passthrough",
106
+ allowUnrecognizedUnionMembers: true,
107
+ allowUnrecognizedEnumValues: true,
108
+ skipValidation: true,
109
+ breadcrumbsPrefix: ["response"],
110
+ }));
111
+ case 429:
112
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
113
+ unrecognizedObjectKeys: "passthrough",
114
+ allowUnrecognizedUnionMembers: true,
115
+ allowUnrecognizedEnumValues: true,
116
+ skipValidation: true,
117
+ breadcrumbsPrefix: ["response"],
118
+ }));
119
+ case 500:
120
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
121
+ unrecognizedObjectKeys: "passthrough",
122
+ allowUnrecognizedUnionMembers: true,
123
+ allowUnrecognizedEnumValues: true,
124
+ skipValidation: true,
125
+ breadcrumbsPrefix: ["response"],
126
+ }));
127
+ default:
128
+ throw new errors.WebflowError({
129
+ statusCode: _response.error.statusCode,
130
+ body: _response.error.body,
131
+ });
132
+ }
133
+ }
134
+ switch (_response.error.reason) {
135
+ case "non-json":
136
+ throw new errors.WebflowError({
137
+ statusCode: _response.error.statusCode,
138
+ body: _response.error.rawBody,
139
+ });
140
+ case "timeout":
141
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/robots_txt.");
142
+ case "unknown":
143
+ throw new errors.WebflowError({
144
+ message: _response.error.errorMessage,
145
+ });
146
+ }
147
+ });
148
+ }
149
+ /**
150
+ * Replace the `robots.txt` configuration for various user agents.
151
+ *
152
+ * Required scope | `site_config:write`
153
+ *
154
+ * @param {string} siteId - Unique identifier for a Site
155
+ * @param {Webflow.Robots} request
156
+ * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration.
157
+ *
158
+ * @throws {@link Webflow.BadRequestError}
159
+ * @throws {@link Webflow.UnauthorizedError}
160
+ * @throws {@link Webflow.NotFoundError}
161
+ * @throws {@link Webflow.TooManyRequestsError}
162
+ * @throws {@link Webflow.InternalServerError}
163
+ *
164
+ * @example
165
+ * await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", {
166
+ * rules: [{
167
+ * userAgent: "googlebot",
168
+ * allows: ["/public"],
169
+ * disallows: ["/vogon-poetry", "/total-perspective-vortex"]
170
+ * }],
171
+ * sitemap: "https://heartofgold.ship/sitemap.xml"
172
+ * })
173
+ */
174
+ put(siteId, request, requestOptions) {
175
+ var _a;
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const _response = yield core.fetcher({
178
+ 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)}/robots_txt`),
179
+ method: "PUT",
180
+ 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),
181
+ contentType: "application/json",
182
+ requestType: "json",
183
+ body: serializers.Robots.jsonOrThrow(request, {
184
+ unrecognizedObjectKeys: "passthrough",
185
+ allowUnrecognizedUnionMembers: true,
186
+ allowUnrecognizedEnumValues: true,
187
+ }),
188
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
189
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
190
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
191
+ });
192
+ if (_response.ok) {
193
+ return serializers.Robots.parseOrThrow(_response.body, {
194
+ unrecognizedObjectKeys: "passthrough",
195
+ allowUnrecognizedUnionMembers: true,
196
+ allowUnrecognizedEnumValues: true,
197
+ skipValidation: true,
198
+ breadcrumbsPrefix: ["response"],
199
+ });
200
+ }
201
+ if (_response.error.reason === "status-code") {
202
+ switch (_response.error.statusCode) {
203
+ case 400:
204
+ throw new Webflow.BadRequestError(_response.error.body);
205
+ case 401:
206
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
207
+ unrecognizedObjectKeys: "passthrough",
208
+ allowUnrecognizedUnionMembers: true,
209
+ allowUnrecognizedEnumValues: true,
210
+ skipValidation: true,
211
+ breadcrumbsPrefix: ["response"],
212
+ }));
213
+ case 404:
214
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
215
+ unrecognizedObjectKeys: "passthrough",
216
+ allowUnrecognizedUnionMembers: true,
217
+ allowUnrecognizedEnumValues: true,
218
+ skipValidation: true,
219
+ breadcrumbsPrefix: ["response"],
220
+ }));
221
+ case 429:
222
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
223
+ unrecognizedObjectKeys: "passthrough",
224
+ allowUnrecognizedUnionMembers: true,
225
+ allowUnrecognizedEnumValues: true,
226
+ skipValidation: true,
227
+ breadcrumbsPrefix: ["response"],
228
+ }));
229
+ case 500:
230
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
231
+ unrecognizedObjectKeys: "passthrough",
232
+ allowUnrecognizedUnionMembers: true,
233
+ allowUnrecognizedEnumValues: true,
234
+ skipValidation: true,
235
+ breadcrumbsPrefix: ["response"],
236
+ }));
237
+ default:
238
+ throw new errors.WebflowError({
239
+ statusCode: _response.error.statusCode,
240
+ body: _response.error.body,
241
+ });
242
+ }
243
+ }
244
+ switch (_response.error.reason) {
245
+ case "non-json":
246
+ throw new errors.WebflowError({
247
+ statusCode: _response.error.statusCode,
248
+ body: _response.error.rawBody,
249
+ });
250
+ case "timeout":
251
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PUT /sites/{site_id}/robots_txt.");
252
+ case "unknown":
253
+ throw new errors.WebflowError({
254
+ message: _response.error.errorMessage,
255
+ });
256
+ }
257
+ });
258
+ }
259
+ /**
260
+ * Remove specific rules for a user-agent in your `robots.txt` file. To delete all rules for a user-agent, provide an empty rule set. This will remove the user-agent's entry entirely, leaving it subject to your site's default crawling behavior.
261
+ *
262
+ * **Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply.
263
+ *
264
+ * Required scope: `site_config:write`
265
+ *
266
+ * @param {string} siteId - Unique identifier for a Site
267
+ * @param {Webflow.Robots} request
268
+ * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration.
269
+ *
270
+ * @throws {@link Webflow.BadRequestError}
271
+ * @throws {@link Webflow.UnauthorizedError}
272
+ * @throws {@link Webflow.NotFoundError}
273
+ * @throws {@link Webflow.TooManyRequestsError}
274
+ * @throws {@link Webflow.InternalServerError}
275
+ *
276
+ * @example
277
+ * await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", {
278
+ * rules: [{
279
+ * userAgent: "*",
280
+ * allows: ["/public"],
281
+ * disallows: ["/bubbles"]
282
+ * }]
283
+ * })
284
+ */
285
+ delete(siteId, request, requestOptions) {
286
+ var _a;
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ const _response = yield core.fetcher({
289
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/robots_txt`),
290
+ method: "DELETE",
291
+ 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),
292
+ contentType: "application/json",
293
+ requestType: "json",
294
+ body: serializers.Robots.jsonOrThrow(request, {
295
+ unrecognizedObjectKeys: "passthrough",
296
+ allowUnrecognizedUnionMembers: true,
297
+ allowUnrecognizedEnumValues: true,
298
+ }),
299
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
300
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
301
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
302
+ });
303
+ if (_response.ok) {
304
+ return serializers.Robots.parseOrThrow(_response.body, {
305
+ unrecognizedObjectKeys: "passthrough",
306
+ allowUnrecognizedUnionMembers: true,
307
+ allowUnrecognizedEnumValues: true,
308
+ skipValidation: true,
309
+ breadcrumbsPrefix: ["response"],
310
+ });
311
+ }
312
+ if (_response.error.reason === "status-code") {
313
+ switch (_response.error.statusCode) {
314
+ case 400:
315
+ throw new Webflow.BadRequestError(_response.error.body);
316
+ case 401:
317
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
318
+ unrecognizedObjectKeys: "passthrough",
319
+ allowUnrecognizedUnionMembers: true,
320
+ allowUnrecognizedEnumValues: true,
321
+ skipValidation: true,
322
+ breadcrumbsPrefix: ["response"],
323
+ }));
324
+ case 404:
325
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
326
+ unrecognizedObjectKeys: "passthrough",
327
+ allowUnrecognizedUnionMembers: true,
328
+ allowUnrecognizedEnumValues: true,
329
+ skipValidation: true,
330
+ breadcrumbsPrefix: ["response"],
331
+ }));
332
+ case 429:
333
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
334
+ unrecognizedObjectKeys: "passthrough",
335
+ allowUnrecognizedUnionMembers: true,
336
+ allowUnrecognizedEnumValues: true,
337
+ skipValidation: true,
338
+ breadcrumbsPrefix: ["response"],
339
+ }));
340
+ case 500:
341
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
342
+ unrecognizedObjectKeys: "passthrough",
343
+ allowUnrecognizedUnionMembers: true,
344
+ allowUnrecognizedEnumValues: true,
345
+ skipValidation: true,
346
+ breadcrumbsPrefix: ["response"],
347
+ }));
348
+ default:
349
+ throw new errors.WebflowError({
350
+ statusCode: _response.error.statusCode,
351
+ body: _response.error.body,
352
+ });
353
+ }
354
+ }
355
+ switch (_response.error.reason) {
356
+ case "non-json":
357
+ throw new errors.WebflowError({
358
+ statusCode: _response.error.statusCode,
359
+ body: _response.error.rawBody,
360
+ });
361
+ case "timeout":
362
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}/robots_txt.");
363
+ case "unknown":
364
+ throw new errors.WebflowError({
365
+ message: _response.error.errorMessage,
366
+ });
367
+ }
368
+ });
369
+ }
370
+ /**
371
+ * Update the `robots.txt` configuration for various user agents.
372
+ *
373
+ * Required scope | `site_config:write`
374
+ *
375
+ * @param {string} siteId - Unique identifier for a Site
376
+ * @param {Webflow.Robots} request
377
+ * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration.
378
+ *
379
+ * @throws {@link Webflow.BadRequestError}
380
+ * @throws {@link Webflow.UnauthorizedError}
381
+ * @throws {@link Webflow.NotFoundError}
382
+ * @throws {@link Webflow.TooManyRequestsError}
383
+ * @throws {@link Webflow.InternalServerError}
384
+ *
385
+ * @example
386
+ * await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", {
387
+ * rules: [{
388
+ * userAgent: "googlebot",
389
+ * allows: ["/public"],
390
+ * disallows: ["/vogon-poetry", "/total-perspective-vortex"]
391
+ * }],
392
+ * sitemap: "https://heartofgold.ship/sitemap.xml"
393
+ * })
394
+ */
395
+ patch(siteId, request, requestOptions) {
396
+ var _a;
397
+ return __awaiter(this, void 0, void 0, function* () {
398
+ const _response = yield core.fetcher({
399
+ 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)}/robots_txt`),
400
+ method: "PATCH",
401
+ 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),
402
+ contentType: "application/json",
403
+ requestType: "json",
404
+ body: serializers.Robots.jsonOrThrow(request, {
405
+ unrecognizedObjectKeys: "passthrough",
406
+ allowUnrecognizedUnionMembers: true,
407
+ allowUnrecognizedEnumValues: true,
408
+ }),
409
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
410
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
411
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
412
+ });
413
+ if (_response.ok) {
414
+ return serializers.Robots.parseOrThrow(_response.body, {
415
+ unrecognizedObjectKeys: "passthrough",
416
+ allowUnrecognizedUnionMembers: true,
417
+ allowUnrecognizedEnumValues: true,
418
+ skipValidation: true,
419
+ breadcrumbsPrefix: ["response"],
420
+ });
421
+ }
422
+ if (_response.error.reason === "status-code") {
423
+ switch (_response.error.statusCode) {
424
+ case 400:
425
+ throw new Webflow.BadRequestError(_response.error.body);
426
+ case 401:
427
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
428
+ unrecognizedObjectKeys: "passthrough",
429
+ allowUnrecognizedUnionMembers: true,
430
+ allowUnrecognizedEnumValues: true,
431
+ skipValidation: true,
432
+ breadcrumbsPrefix: ["response"],
433
+ }));
434
+ case 404:
435
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
436
+ unrecognizedObjectKeys: "passthrough",
437
+ allowUnrecognizedUnionMembers: true,
438
+ allowUnrecognizedEnumValues: true,
439
+ skipValidation: true,
440
+ breadcrumbsPrefix: ["response"],
441
+ }));
442
+ case 429:
443
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
444
+ unrecognizedObjectKeys: "passthrough",
445
+ allowUnrecognizedUnionMembers: true,
446
+ allowUnrecognizedEnumValues: true,
447
+ skipValidation: true,
448
+ breadcrumbsPrefix: ["response"],
449
+ }));
450
+ case 500:
451
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
452
+ unrecognizedObjectKeys: "passthrough",
453
+ allowUnrecognizedUnionMembers: true,
454
+ allowUnrecognizedEnumValues: true,
455
+ skipValidation: true,
456
+ breadcrumbsPrefix: ["response"],
457
+ }));
458
+ default:
459
+ throw new errors.WebflowError({
460
+ statusCode: _response.error.statusCode,
461
+ body: _response.error.body,
462
+ });
463
+ }
464
+ }
465
+ switch (_response.error.reason) {
466
+ case "non-json":
467
+ throw new errors.WebflowError({
468
+ statusCode: _response.error.statusCode,
469
+ body: _response.error.rawBody,
470
+ });
471
+ case "timeout":
472
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}/robots_txt.");
473
+ case "unknown":
474
+ throw new errors.WebflowError({
475
+ message: _response.error.errorMessage,
476
+ });
477
+ }
478
+ });
479
+ }
480
+ _getAuthorizationHeader() {
481
+ return __awaiter(this, void 0, void 0, function* () {
482
+ return `Bearer ${yield core.Supplier.get(this._options.accessToken)}`;
483
+ });
484
+ }
485
+ }
486
+ exports.RobotsTxt = RobotsTxt;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./FieldCreateType"), exports);
17
+ __exportStar(require("./client"), exports);
@@ -24,9 +24,11 @@ export declare class Scripts {
24
24
  protected readonly _options: Scripts.Options;
25
25
  constructor(_options: Scripts.Options);
26
26
  /**
27
- * Get all registered scripts that have been applied to a specific Site.
27
+ * Get all scripts applied to a site by the App.
28
28
  *
29
- * <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
29
+ * <Note title="Script Registration">
30
+ * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.
31
+ * </Note>
30
32
  *
31
33
  * Required scope | `custom_code:read`
32
34
  *
@@ -44,13 +46,11 @@ export declare class Scripts {
44
46
  */
45
47
  getCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
46
48
  /**
47
- * Add a registered script to a Site.
49
+ * Apply registered scripts to a site.
48
50
  *
49
- * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
50
- * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
51
- * `custom_code` endpoints.
52
- *
53
- * <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
51
+ * <Note title="Script Registration">
52
+ * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.
53
+ * </Note>
54
54
  *
55
55
  * Required scope | `custom_code:write`
56
56
  *
@@ -82,9 +82,7 @@ export declare class Scripts {
82
82
  */
83
83
  upsertCustomCode(siteId: string, request: Webflow.ScriptApplyList, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
84
84
  /**
85
- * Delete the custom code block that an app created for a Site
86
- *
87
- * <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
85
+ * Remove scripts from a site applied by the App. This endpoint will not remove scripts from the site's registered scripts.
88
86
  *
89
87
  * Required scope | `custom_code:write`
90
88
  *
@@ -102,9 +100,13 @@ export declare class Scripts {
102
100
  */
103
101
  deleteCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<void>;
104
102
  /**
105
- * Get all instances of Custom Code applied to a Site or Pages.
103
+ * Get a list of scripts that have been applied to a site and/or individual pages.
104
+ *
105
+ * <Note title="Script Registration">
106
+ * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints.
106
107
  *
107
- * <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
108
+ * See the documentation on [working with Custom Code](/data/docs/custom-code) for more information.
109
+ * </Note>
108
110
  *
109
111
  * Required scope | `custom_code:read`
110
112
  *