webflow-api 3.2.0 → 3.2.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 (586) hide show
  1. package/.mock/definition/__package__.yml +132 -289
  2. package/.mock/definition/accessGroups.yml +17 -4
  3. package/.mock/definition/api.yml +0 -2
  4. package/.mock/definition/assets.yml +41 -8
  5. package/.mock/definition/collections/fields.yml +9 -3
  6. package/.mock/definition/collections/items.yml +468 -88
  7. package/.mock/definition/collections.yml +15 -4
  8. package/.mock/definition/comments.yml +1 -0
  9. package/.mock/definition/components.yml +75 -31
  10. package/.mock/definition/ecommerce.yml +3 -1
  11. package/.mock/definition/forms.yml +35 -86
  12. package/.mock/definition/inventory.yml +25 -17
  13. package/.mock/definition/items.yml +29 -16
  14. package/.mock/definition/orders.yml +206 -112
  15. package/.mock/definition/pages/scripts.yml +27 -8
  16. package/.mock/definition/pages.yml +79 -49
  17. package/.mock/definition/products.yml +23 -14
  18. package/.mock/definition/scripts.yml +14 -4
  19. package/.mock/definition/sites/activityLogs.yml +12 -3
  20. package/.mock/definition/sites/comments.yml +47 -18
  21. package/.mock/definition/sites/forms.yml +316 -0
  22. package/.mock/definition/sites/plans.yml +3 -1
  23. package/.mock/definition/sites/redirects.yml +12 -4
  24. package/.mock/definition/sites/robotsTxt.yml +12 -4
  25. package/.mock/definition/sites/scripts.yml +38 -10
  26. package/.mock/definition/sites/wellKnown.yml +20 -4
  27. package/.mock/definition/sites.yml +47 -8
  28. package/.mock/definition/token.yml +3 -2
  29. package/.mock/definition/users.yml +83 -17
  30. package/.mock/definition/webhooks.yml +4 -4
  31. package/.mock/definition/workspaces/auditLogs.yml +11 -5
  32. package/.mock/fern.config.json +1 -1
  33. package/Client.d.ts +2 -2
  34. package/Client.js +3 -3
  35. package/LICENSE +21 -0
  36. package/api/resources/accessGroups/client/Client.d.ts +10 -4
  37. package/api/resources/accessGroups/client/Client.js +13 -3
  38. package/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +5 -1
  39. package/api/resources/assets/client/Client.d.ts +9 -5
  40. package/api/resources/assets/client/Client.js +24 -7
  41. package/api/resources/assets/client/requests/AssetsListRequest.d.ts +20 -0
  42. package/api/resources/assets/client/requests/index.d.ts +1 -0
  43. package/api/resources/collections/client/Client.d.ts +3 -3
  44. package/api/resources/collections/client/Client.js +6 -2
  45. package/api/resources/collections/resources/fields/client/Client.d.ts +3 -3
  46. package/api/resources/collections/resources/fields/client/Client.js +6 -2
  47. package/api/resources/collections/resources/items/client/Client.d.ts +59 -25
  48. package/api/resources/collections/resources/items/client/Client.js +63 -25
  49. package/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +4 -0
  50. package/api/resources/collections/resources/items/client/requests/ItemsCreateItemLiveRequest.d.ts +4 -2
  51. package/api/resources/collections/resources/items/client/requests/ItemsCreateItemRequest.d.ts +4 -2
  52. package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemLiveRequest.d.ts +3 -1
  53. package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemRequest.d.ts +3 -1
  54. package/api/resources/collections/resources/items/client/requests/ItemsGetItemLiveRequest.d.ts +3 -1
  55. package/api/resources/collections/resources/items/client/requests/ItemsGetItemRequest.d.ts +3 -1
  56. package/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +9 -1
  57. package/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +9 -1
  58. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemLiveRequest.d.ts +3 -2
  59. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemRequest.d.ts +3 -2
  60. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +4 -0
  61. package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +2 -0
  62. package/api/resources/components/client/Client.d.ts +18 -9
  63. package/api/resources/components/client/Client.js +21 -8
  64. package/api/resources/components/client/requests/ComponentDomWrite.d.ts +3 -1
  65. package/api/resources/components/client/requests/ComponentPropertiesWrite.d.ts +3 -1
  66. package/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +6 -2
  67. package/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +6 -2
  68. package/api/resources/components/client/requests/ComponentsListRequest.d.ts +3 -1
  69. package/api/resources/components/types/ComponentDomWriteNodesItem.d.ts +1 -1
  70. package/api/resources/ecommerce/client/Client.d.ts +3 -3
  71. package/api/resources/ecommerce/client/Client.js +6 -2
  72. package/api/resources/forms/client/Client.d.ts +11 -30
  73. package/api/resources/forms/client/Client.js +14 -129
  74. package/api/resources/forms/client/requests/FormsListRequest.d.ts +4 -1
  75. package/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +4 -1
  76. package/api/resources/forms/client/requests/index.d.ts +0 -1
  77. package/api/resources/inventory/client/Client.d.ts +11 -11
  78. package/api/resources/inventory/client/Client.js +22 -18
  79. package/api/resources/orders/client/Client.d.ts +8 -4
  80. package/api/resources/orders/client/Client.js +11 -3
  81. package/api/resources/orders/client/requests/OrdersListRequest.d.ts +5 -1
  82. package/api/resources/pages/client/Client.d.ts +14 -15
  83. package/api/resources/pages/client/Client.js +17 -14
  84. package/api/resources/pages/client/requests/PageMetadataWrite.d.ts +9 -2
  85. package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +6 -2
  86. package/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +3 -1
  87. package/api/resources/pages/client/requests/PagesListRequest.d.ts +6 -2
  88. package/api/resources/pages/resources/scripts/client/Client.d.ts +8 -6
  89. package/api/resources/pages/resources/scripts/client/Client.js +11 -5
  90. package/api/resources/pages/types/PageDomWriteNodesItem.d.ts +1 -1
  91. package/api/resources/products/client/Client.d.ts +7 -4
  92. package/api/resources/products/client/Client.js +10 -3
  93. package/api/resources/products/client/requests/ProductsListRequest.d.ts +4 -1
  94. package/api/resources/scripts/client/Client.d.ts +3 -3
  95. package/api/resources/scripts/client/Client.js +6 -2
  96. package/api/resources/sites/client/Client.d.ts +6 -3
  97. package/api/resources/sites/client/Client.js +11 -2
  98. package/api/resources/sites/resources/activityLogs/client/Client.d.ts +7 -4
  99. package/api/resources/sites/resources/activityLogs/client/Client.js +10 -3
  100. package/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +4 -1
  101. package/api/resources/sites/resources/comments/client/Client.d.ts +18 -6
  102. package/api/resources/sites/resources/comments/client/Client.js +21 -5
  103. package/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.d.ts +8 -2
  104. package/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.d.ts +8 -2
  105. package/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.d.ts +8 -2
  106. package/api/resources/sites/resources/forms/client/Client.d.ts +157 -0
  107. package/api/resources/sites/resources/forms/client/Client.js +662 -0
  108. package/api/resources/sites/resources/forms/client/index.d.ts +2 -0
  109. package/api/resources/sites/resources/forms/client/index.js +17 -0
  110. package/api/resources/{forms → sites/resources/forms}/client/requests/FormsListSubmissionsBySiteRequest.d.ts +3 -1
  111. package/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +20 -0
  112. package/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +11 -0
  113. package/api/resources/sites/resources/forms/client/requests/index.d.ts +3 -0
  114. package/api/resources/sites/resources/forms/client/requests/index.js +2 -0
  115. package/api/resources/sites/resources/forms/index.d.ts +1 -0
  116. package/api/resources/sites/resources/forms/index.js +17 -0
  117. package/api/resources/sites/resources/index.d.ts +2 -0
  118. package/api/resources/sites/resources/index.js +3 -1
  119. package/api/resources/sites/resources/plans/client/Client.d.ts +3 -3
  120. package/api/resources/sites/resources/plans/client/Client.js +6 -2
  121. package/api/resources/sites/resources/redirects/client/Client.d.ts +3 -3
  122. package/api/resources/sites/resources/redirects/client/Client.js +6 -2
  123. package/api/resources/sites/resources/robotsTxt/client/Client.d.ts +3 -3
  124. package/api/resources/sites/resources/robotsTxt/client/Client.js +6 -2
  125. package/api/resources/sites/resources/scripts/client/Client.d.ts +13 -6
  126. package/api/resources/sites/resources/scripts/client/Client.js +16 -5
  127. package/api/resources/sites/resources/scripts/client/requests/ScriptsListCustomCodeBlocksRequest.d.ts +4 -1
  128. package/api/resources/sites/resources/wellKnown/client/Client.d.ts +6 -5
  129. package/api/resources/sites/resources/wellKnown/client/Client.js +9 -4
  130. package/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.d.ts +3 -2
  131. package/api/resources/token/client/Client.d.ts +3 -3
  132. package/api/resources/token/client/Client.js +6 -2
  133. package/api/resources/users/client/Client.d.ts +18 -4
  134. package/api/resources/users/client/Client.js +21 -3
  135. package/api/resources/users/client/requests/UsersListRequest.d.ts +5 -1
  136. package/api/resources/webhooks/client/Client.d.ts +3 -3
  137. package/api/resources/webhooks/client/Client.js +6 -2
  138. package/api/resources/workspaces/client/Client.d.ts +2 -2
  139. package/api/resources/workspaces/client/Client.js +1 -1
  140. package/api/resources/workspaces/resources/auditLogs/client/Client.d.ts +9 -5
  141. package/api/resources/workspaces/resources/auditLogs/client/Client.js +12 -4
  142. package/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.d.ts +6 -2
  143. package/api/types/CollectionItemChanged.d.ts +1 -1
  144. package/api/types/CollectionItemCreated.d.ts +1 -1
  145. package/api/types/CollectionItemPublished.d.ts +9 -0
  146. package/api/types/{ComponentInstance.d.ts → ComponentInstanceNodePropertyOverridesWrite.d.ts} +1 -1
  147. package/api/types/{ComponentNodeDom.d.ts → ComponentNode.d.ts} +1 -1
  148. package/api/types/Dom.d.ts +1 -1
  149. package/{dist/api/types/ImageNodeDom.d.ts → api/types/ImageNode.d.ts} +1 -1
  150. package/api/types/Node.d.ts +7 -7
  151. package/api/types/Payload.d.ts +25 -0
  152. package/api/types/{SingleLocaleChangedPayloadFieldData.d.ts → PayloadFieldData.d.ts} +1 -1
  153. package/api/types/{SearchButtonNodeDom.d.ts → SearchButtonNode.d.ts} +1 -1
  154. package/api/types/{SearchButton.d.ts → SearchButtonNodeWrite.d.ts} +1 -1
  155. package/{dist/api/types/SelectNodeDom.d.ts → api/types/SelectNode.d.ts} +1 -1
  156. package/api/types/SiteMembership.d.ts +1 -0
  157. package/api/types/SiteMembershipAuditLogItemEventSubType.d.ts +2 -1
  158. package/api/types/SiteMembershipAuditLogItemEventSubType.js +1 -0
  159. package/api/types/SkuFieldData.d.ts +0 -4
  160. package/{dist/api/types/SubmitButtonNodeDom.d.ts → api/types/SubmitButtonNode.d.ts} +1 -1
  161. package/api/types/{SubmitButton.d.ts → SubmitButtonNodeWrite.d.ts} +1 -1
  162. package/api/types/{TextInputNodeDom.d.ts → TextInputNode.d.ts} +1 -1
  163. package/api/types/{TextInput.d.ts → TextInputNodeWrite.d.ts} +1 -1
  164. package/api/types/TextNode.d.ts +7 -4
  165. package/api/types/TextNodeWrite.d.ts +12 -0
  166. package/api/types/TriggerType.d.ts +2 -1
  167. package/api/types/TriggerType.js +1 -0
  168. package/api/types/WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.d.ts +9 -0
  169. package/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.d.ts +2 -1
  170. package/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.js +1 -0
  171. package/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.d.ts +7 -0
  172. package/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.d.ts +2 -1
  173. package/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.js +1 -0
  174. package/api/types/WorkspaceInvitation.d.ts +1 -0
  175. package/api/types/WorkspaceInvitationAuditLogItemEventSubType.d.ts +2 -1
  176. package/api/types/WorkspaceInvitationAuditLogItemEventSubType.js +1 -0
  177. package/api/types/index.d.ts +17 -20
  178. package/api/types/index.js +17 -20
  179. package/dist/Client.d.ts +2 -2
  180. package/dist/Client.js +3 -3
  181. package/dist/api/resources/accessGroups/client/Client.d.ts +10 -4
  182. package/dist/api/resources/accessGroups/client/Client.js +13 -3
  183. package/dist/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +5 -1
  184. package/dist/api/resources/assets/client/Client.d.ts +9 -5
  185. package/dist/api/resources/assets/client/Client.js +24 -7
  186. package/dist/api/resources/assets/client/requests/AssetsListRequest.d.ts +20 -0
  187. package/dist/api/resources/assets/client/requests/index.d.ts +1 -0
  188. package/dist/api/resources/collections/client/Client.d.ts +3 -3
  189. package/dist/api/resources/collections/client/Client.js +6 -2
  190. package/dist/api/resources/collections/resources/fields/client/Client.d.ts +3 -3
  191. package/dist/api/resources/collections/resources/fields/client/Client.js +6 -2
  192. package/dist/api/resources/collections/resources/items/client/Client.d.ts +59 -25
  193. package/dist/api/resources/collections/resources/items/client/Client.js +63 -25
  194. package/dist/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +4 -0
  195. package/dist/api/resources/collections/resources/items/client/requests/ItemsCreateItemLiveRequest.d.ts +4 -2
  196. package/dist/api/resources/collections/resources/items/client/requests/ItemsCreateItemRequest.d.ts +4 -2
  197. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemLiveRequest.d.ts +3 -1
  198. package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemRequest.d.ts +3 -1
  199. package/dist/api/resources/collections/resources/items/client/requests/ItemsGetItemLiveRequest.d.ts +3 -1
  200. package/dist/api/resources/collections/resources/items/client/requests/ItemsGetItemRequest.d.ts +3 -1
  201. package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +9 -1
  202. package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +9 -1
  203. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemLiveRequest.d.ts +3 -2
  204. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemRequest.d.ts +3 -2
  205. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +4 -0
  206. package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +2 -0
  207. package/dist/api/resources/components/client/Client.d.ts +18 -9
  208. package/dist/api/resources/components/client/Client.js +21 -8
  209. package/dist/api/resources/components/client/requests/ComponentDomWrite.d.ts +3 -1
  210. package/dist/api/resources/components/client/requests/ComponentPropertiesWrite.d.ts +3 -1
  211. package/dist/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +6 -2
  212. package/dist/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +6 -2
  213. package/dist/api/resources/components/client/requests/ComponentsListRequest.d.ts +3 -1
  214. package/dist/api/resources/components/types/ComponentDomWriteNodesItem.d.ts +1 -1
  215. package/dist/api/resources/ecommerce/client/Client.d.ts +3 -3
  216. package/dist/api/resources/ecommerce/client/Client.js +6 -2
  217. package/dist/api/resources/forms/client/Client.d.ts +11 -30
  218. package/dist/api/resources/forms/client/Client.js +14 -129
  219. package/dist/api/resources/forms/client/requests/FormsListRequest.d.ts +4 -1
  220. package/dist/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +4 -1
  221. package/dist/api/resources/forms/client/requests/index.d.ts +0 -1
  222. package/dist/api/resources/inventory/client/Client.d.ts +11 -11
  223. package/dist/api/resources/inventory/client/Client.js +22 -18
  224. package/dist/api/resources/orders/client/Client.d.ts +8 -4
  225. package/dist/api/resources/orders/client/Client.js +11 -3
  226. package/dist/api/resources/orders/client/requests/OrdersListRequest.d.ts +5 -1
  227. package/dist/api/resources/pages/client/Client.d.ts +14 -15
  228. package/dist/api/resources/pages/client/Client.js +17 -14
  229. package/dist/api/resources/pages/client/requests/PageMetadataWrite.d.ts +9 -2
  230. package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +6 -2
  231. package/dist/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +3 -1
  232. package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +6 -2
  233. package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +8 -6
  234. package/dist/api/resources/pages/resources/scripts/client/Client.js +11 -5
  235. package/dist/api/resources/pages/types/PageDomWriteNodesItem.d.ts +1 -1
  236. package/dist/api/resources/products/client/Client.d.ts +7 -4
  237. package/dist/api/resources/products/client/Client.js +10 -3
  238. package/dist/api/resources/products/client/requests/ProductsListRequest.d.ts +4 -1
  239. package/dist/api/resources/scripts/client/Client.d.ts +3 -3
  240. package/dist/api/resources/scripts/client/Client.js +6 -2
  241. package/dist/api/resources/sites/client/Client.d.ts +6 -3
  242. package/dist/api/resources/sites/client/Client.js +11 -2
  243. package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +7 -4
  244. package/dist/api/resources/sites/resources/activityLogs/client/Client.js +10 -3
  245. package/dist/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +4 -1
  246. package/dist/api/resources/sites/resources/comments/client/Client.d.ts +18 -6
  247. package/dist/api/resources/sites/resources/comments/client/Client.js +21 -5
  248. package/dist/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.d.ts +8 -2
  249. package/dist/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.d.ts +8 -2
  250. package/dist/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.d.ts +8 -2
  251. package/dist/api/resources/sites/resources/forms/client/Client.d.ts +157 -0
  252. package/dist/api/resources/sites/resources/forms/client/Client.js +662 -0
  253. package/dist/api/resources/sites/resources/forms/client/index.d.ts +2 -0
  254. package/dist/api/resources/sites/resources/forms/client/index.js +17 -0
  255. package/dist/api/resources/{forms → sites/resources/forms}/client/requests/FormsListSubmissionsBySiteRequest.d.ts +3 -1
  256. package/dist/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +20 -0
  257. package/dist/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +11 -0
  258. package/dist/api/resources/sites/resources/forms/client/requests/index.d.ts +3 -0
  259. package/dist/api/resources/sites/resources/forms/client/requests/index.js +2 -0
  260. package/dist/api/resources/sites/resources/forms/index.d.ts +1 -0
  261. package/dist/api/resources/sites/resources/forms/index.js +17 -0
  262. package/dist/api/resources/sites/resources/index.d.ts +2 -0
  263. package/dist/api/resources/sites/resources/index.js +3 -1
  264. package/dist/api/resources/sites/resources/plans/client/Client.d.ts +3 -3
  265. package/dist/api/resources/sites/resources/plans/client/Client.js +6 -2
  266. package/dist/api/resources/sites/resources/redirects/client/Client.d.ts +3 -3
  267. package/dist/api/resources/sites/resources/redirects/client/Client.js +6 -2
  268. package/dist/api/resources/sites/resources/robotsTxt/client/Client.d.ts +3 -3
  269. package/dist/api/resources/sites/resources/robotsTxt/client/Client.js +6 -2
  270. package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +13 -6
  271. package/dist/api/resources/sites/resources/scripts/client/Client.js +16 -5
  272. package/dist/api/resources/sites/resources/scripts/client/requests/ScriptsListCustomCodeBlocksRequest.d.ts +4 -1
  273. package/dist/api/resources/sites/resources/wellKnown/client/Client.d.ts +6 -5
  274. package/dist/api/resources/sites/resources/wellKnown/client/Client.js +9 -4
  275. package/dist/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.d.ts +3 -2
  276. package/dist/api/resources/token/client/Client.d.ts +3 -3
  277. package/dist/api/resources/token/client/Client.js +6 -2
  278. package/dist/api/resources/users/client/Client.d.ts +18 -4
  279. package/dist/api/resources/users/client/Client.js +21 -3
  280. package/dist/api/resources/users/client/requests/UsersListRequest.d.ts +5 -1
  281. package/dist/api/resources/webhooks/client/Client.d.ts +3 -3
  282. package/dist/api/resources/webhooks/client/Client.js +6 -2
  283. package/dist/api/resources/workspaces/client/Client.d.ts +2 -2
  284. package/dist/api/resources/workspaces/client/Client.js +1 -1
  285. package/dist/api/resources/workspaces/resources/auditLogs/client/Client.d.ts +9 -5
  286. package/dist/api/resources/workspaces/resources/auditLogs/client/Client.js +12 -4
  287. package/dist/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.d.ts +6 -2
  288. package/dist/api/types/CollectionItemChanged.d.ts +1 -1
  289. package/dist/api/types/CollectionItemCreated.d.ts +1 -1
  290. package/dist/api/types/CollectionItemPublished.d.ts +9 -0
  291. package/dist/api/types/{ComponentInstance.d.ts → ComponentInstanceNodePropertyOverridesWrite.d.ts} +1 -1
  292. package/dist/api/types/{ComponentNodeDom.d.ts → ComponentNode.d.ts} +1 -1
  293. package/dist/api/types/Dom.d.ts +1 -1
  294. package/{api/types/ImageNodeDom.d.ts → dist/api/types/ImageNode.d.ts} +1 -1
  295. package/dist/api/types/Node.d.ts +7 -7
  296. package/dist/api/types/Payload.d.ts +25 -0
  297. package/dist/api/types/{SingleLocaleChangedPayloadFieldData.d.ts → PayloadFieldData.d.ts} +1 -1
  298. package/dist/api/types/{SearchButtonNodeDom.d.ts → SearchButtonNode.d.ts} +1 -1
  299. package/dist/api/types/{SearchButton.d.ts → SearchButtonNodeWrite.d.ts} +1 -1
  300. package/{api/types/SelectNodeDom.d.ts → dist/api/types/SelectNode.d.ts} +1 -1
  301. package/dist/api/types/SiteMembership.d.ts +1 -0
  302. package/dist/api/types/SiteMembershipAuditLogItemEventSubType.d.ts +2 -1
  303. package/dist/api/types/SiteMembershipAuditLogItemEventSubType.js +1 -0
  304. package/dist/api/types/SkuFieldData.d.ts +0 -4
  305. package/{api/types/SubmitButtonNodeDom.d.ts → dist/api/types/SubmitButtonNode.d.ts} +1 -1
  306. package/dist/api/types/{SubmitButton.d.ts → SubmitButtonNodeWrite.d.ts} +1 -1
  307. package/dist/api/types/{TextInputNodeDom.d.ts → TextInputNode.d.ts} +1 -1
  308. package/dist/api/types/{TextInput.d.ts → TextInputNodeWrite.d.ts} +1 -1
  309. package/dist/api/types/TextNode.d.ts +7 -4
  310. package/dist/api/types/TextNodeWrite.d.ts +12 -0
  311. package/dist/api/types/TriggerType.d.ts +2 -1
  312. package/dist/api/types/TriggerType.js +1 -0
  313. package/dist/api/types/WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.d.ts +9 -0
  314. package/dist/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.d.ts +2 -1
  315. package/dist/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.js +1 -0
  316. package/dist/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.d.ts +7 -0
  317. package/dist/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.d.ts +2 -1
  318. package/dist/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.js +1 -0
  319. package/dist/api/types/WorkspaceInvitation.d.ts +1 -0
  320. package/dist/api/types/WorkspaceInvitationAuditLogItemEventSubType.d.ts +2 -1
  321. package/dist/api/types/WorkspaceInvitationAuditLogItemEventSubType.js +1 -0
  322. package/dist/api/types/index.d.ts +17 -20
  323. package/dist/api/types/index.js +17 -20
  324. package/dist/environments.d.ts +0 -4
  325. package/dist/environments.js +0 -2
  326. package/dist/serialization/resources/components/types/ComponentDomWriteNodesItem.d.ts +6 -6
  327. package/dist/serialization/resources/components/types/ComponentDomWriteNodesItem.js +10 -10
  328. package/dist/serialization/resources/pages/types/PageDomWriteNodesItem.d.ts +6 -6
  329. package/dist/serialization/resources/pages/types/PageDomWriteNodesItem.js +10 -10
  330. package/dist/serialization/resources/sites/resources/forms/client/index.d.ts +1 -0
  331. package/dist/serialization/resources/sites/resources/forms/client/index.js +17 -0
  332. package/dist/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +12 -0
  333. package/dist/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js +43 -0
  334. package/dist/serialization/resources/sites/resources/forms/client/requests/index.d.ts +1 -0
  335. package/dist/serialization/resources/sites/resources/forms/client/requests/index.js +5 -0
  336. package/dist/serialization/resources/sites/resources/forms/index.d.ts +1 -0
  337. package/dist/serialization/resources/sites/resources/forms/index.js +17 -0
  338. package/dist/serialization/resources/sites/resources/index.d.ts +2 -0
  339. package/dist/serialization/resources/sites/resources/index.js +3 -1
  340. package/dist/serialization/types/CollectionItemChanged.d.ts +2 -2
  341. package/dist/serialization/types/CollectionItemChanged.js +2 -2
  342. package/dist/serialization/types/CollectionItemCreated.d.ts +2 -2
  343. package/dist/serialization/types/CollectionItemCreated.js +2 -2
  344. package/dist/serialization/types/CollectionItemPublished.d.ts +14 -0
  345. package/dist/serialization/types/CollectionItemPublished.js +45 -0
  346. package/{serialization/types/ComponentInstance.d.ts → dist/serialization/types/ComponentInstanceNodePropertyOverridesWrite.d.ts} +2 -2
  347. package/{serialization/types/ComponentInstance.js → dist/serialization/types/ComponentInstanceNodePropertyOverridesWrite.js} +2 -2
  348. package/{serialization/types/ComponentNodeDom.d.ts → dist/serialization/types/ComponentNode.d.ts} +2 -2
  349. package/{serialization/types/ComponentNodeDom.js → dist/serialization/types/ComponentNode.js} +2 -2
  350. package/dist/serialization/types/FieldValidationsAdditionalPropertiesAdditionalProperties.d.ts +1 -1
  351. package/dist/serialization/types/FieldValidationsAdditionalPropertiesAdditionalProperties.js +1 -1
  352. package/dist/serialization/types/{ImageNodeDom.d.ts → ImageNode.d.ts} +2 -2
  353. package/dist/serialization/types/{ImageNodeDom.js → ImageNode.js} +2 -2
  354. package/dist/serialization/types/Node.d.ts +14 -14
  355. package/dist/serialization/types/Node.js +14 -14
  356. package/dist/serialization/types/Payload.d.ts +23 -0
  357. package/dist/serialization/types/{MultiLocaleChangedPayload.js → Payload.js} +8 -8
  358. package/dist/serialization/types/{SingleLocaleChangedPayloadFieldData.d.ts → PayloadFieldData.d.ts} +2 -2
  359. package/dist/serialization/types/{SingleLocaleChangedPayloadFieldData.js → PayloadFieldData.js} +2 -2
  360. package/{serialization/types/SearchButtonNodeDom.d.ts → dist/serialization/types/SearchButtonNode.d.ts} +2 -2
  361. package/{serialization/types/SearchButtonNodeDom.js → dist/serialization/types/SearchButtonNode.js} +2 -2
  362. package/{serialization/types/SearchButton.d.ts → dist/serialization/types/SearchButtonNodeWrite.d.ts} +2 -2
  363. package/{serialization/types/SearchButton.js → dist/serialization/types/SearchButtonNodeWrite.js} +2 -2
  364. package/dist/serialization/types/{SelectNodeDom.d.ts → SelectNode.d.ts} +2 -2
  365. package/{serialization/types/SelectNodeDom.js → dist/serialization/types/SelectNode.js} +2 -2
  366. package/dist/serialization/types/SiteMembership.d.ts +2 -0
  367. package/dist/serialization/types/SiteMembership.js +2 -0
  368. package/dist/serialization/types/SiteMembershipAuditLogItemEventSubType.d.ts +1 -1
  369. package/dist/serialization/types/SiteMembershipAuditLogItemEventSubType.js +1 -1
  370. package/dist/serialization/types/SkuFieldData.d.ts +0 -2
  371. package/dist/serialization/types/SkuFieldData.js +0 -2
  372. package/dist/serialization/types/{SubmitButtonNodeDom.d.ts → SubmitButtonNode.d.ts} +2 -2
  373. package/{serialization/types/SubmitButtonNodeDom.js → dist/serialization/types/SubmitButtonNode.js} +2 -2
  374. package/{serialization/types/SubmitButton.d.ts → dist/serialization/types/SubmitButtonNodeWrite.d.ts} +2 -2
  375. package/{serialization/types/SubmitButton.js → dist/serialization/types/SubmitButtonNodeWrite.js} +2 -2
  376. package/{serialization/types/TextInputNodeDom.d.ts → dist/serialization/types/TextInputNode.d.ts} +2 -2
  377. package/{serialization/types/TextInputNodeDom.js → dist/serialization/types/TextInputNode.js} +2 -2
  378. package/dist/serialization/types/{TextInput.d.ts → TextInputNodeWrite.d.ts} +2 -2
  379. package/dist/serialization/types/{TextInput.js → TextInputNodeWrite.js} +2 -2
  380. package/dist/serialization/types/TextNode.d.ts +4 -2
  381. package/dist/serialization/types/TextNode.js +4 -2
  382. package/dist/serialization/types/TextNodeWrite.d.ts +13 -0
  383. package/dist/serialization/types/TextNodeWrite.js +44 -0
  384. package/dist/serialization/types/TriggerType.d.ts +1 -1
  385. package/dist/serialization/types/TriggerType.js +1 -0
  386. package/dist/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.d.ts +15 -0
  387. package/dist/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.js +46 -0
  388. package/dist/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.d.ts +1 -1
  389. package/dist/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.js +1 -1
  390. package/dist/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.d.ts +13 -0
  391. package/dist/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.js +44 -0
  392. package/dist/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.d.ts +1 -1
  393. package/dist/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.js +1 -1
  394. package/dist/serialization/types/WorkspaceInvitation.d.ts +2 -0
  395. package/dist/serialization/types/WorkspaceInvitation.js +2 -0
  396. package/dist/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.d.ts +1 -1
  397. package/dist/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.js +1 -0
  398. package/dist/serialization/types/index.d.ts +17 -20
  399. package/dist/serialization/types/index.js +17 -20
  400. package/dist/version.d.ts +1 -1
  401. package/dist/version.js +1 -1
  402. package/dist/wrapper/AssetsClient.d.ts +24 -0
  403. package/dist/wrapper/AssetsClient.js +42 -0
  404. package/dist/wrapper/AssetsUtilitiesClient.d.ts +1 -1
  405. package/dist/wrapper/FormsClient.d.ts +37 -0
  406. package/dist/wrapper/FormsClient.js +193 -0
  407. package/dist/wrapper/ItemsClient.js +18 -14
  408. package/dist/wrapper/PagesClient.js +6 -5
  409. package/dist/wrapper/WebflowClient.d.ts +3 -0
  410. package/dist/wrapper/WebflowClient.js +6 -5
  411. package/environments.d.ts +0 -4
  412. package/environments.js +0 -2
  413. package/jest.config.mjs +25 -8
  414. package/package.json +3 -2
  415. package/reference.md +574 -137
  416. package/serialization/resources/components/types/ComponentDomWriteNodesItem.d.ts +6 -6
  417. package/serialization/resources/components/types/ComponentDomWriteNodesItem.js +10 -10
  418. package/serialization/resources/pages/types/PageDomWriteNodesItem.d.ts +6 -6
  419. package/serialization/resources/pages/types/PageDomWriteNodesItem.js +10 -10
  420. package/serialization/resources/sites/resources/forms/client/index.d.ts +1 -0
  421. package/serialization/resources/sites/resources/forms/client/index.js +17 -0
  422. package/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +12 -0
  423. package/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js +43 -0
  424. package/serialization/resources/sites/resources/forms/client/requests/index.d.ts +1 -0
  425. package/serialization/resources/sites/resources/forms/client/requests/index.js +5 -0
  426. package/serialization/resources/sites/resources/forms/index.d.ts +1 -0
  427. package/serialization/resources/sites/resources/forms/index.js +17 -0
  428. package/serialization/resources/sites/resources/index.d.ts +2 -0
  429. package/serialization/resources/sites/resources/index.js +3 -1
  430. package/serialization/types/CollectionItemChanged.d.ts +2 -2
  431. package/serialization/types/CollectionItemChanged.js +2 -2
  432. package/serialization/types/CollectionItemCreated.d.ts +2 -2
  433. package/serialization/types/CollectionItemCreated.js +2 -2
  434. package/serialization/types/CollectionItemPublished.d.ts +14 -0
  435. package/serialization/types/CollectionItemPublished.js +45 -0
  436. package/{dist/serialization/types/ComponentInstance.d.ts → serialization/types/ComponentInstanceNodePropertyOverridesWrite.d.ts} +2 -2
  437. package/{dist/serialization/types/ComponentInstance.js → serialization/types/ComponentInstanceNodePropertyOverridesWrite.js} +2 -2
  438. package/{dist/serialization/types/ComponentNodeDom.d.ts → serialization/types/ComponentNode.d.ts} +2 -2
  439. package/{dist/serialization/types/ComponentNodeDom.js → serialization/types/ComponentNode.js} +2 -2
  440. package/serialization/types/FieldValidationsAdditionalPropertiesAdditionalProperties.d.ts +1 -1
  441. package/serialization/types/FieldValidationsAdditionalPropertiesAdditionalProperties.js +1 -1
  442. package/serialization/types/{ImageNodeDom.d.ts → ImageNode.d.ts} +2 -2
  443. package/serialization/types/{ImageNodeDom.js → ImageNode.js} +2 -2
  444. package/serialization/types/Node.d.ts +14 -14
  445. package/serialization/types/Node.js +14 -14
  446. package/serialization/types/Payload.d.ts +23 -0
  447. package/serialization/types/{MultiLocaleChangedPayload.js → Payload.js} +8 -8
  448. package/serialization/types/{SingleLocaleChangedPayloadFieldData.d.ts → PayloadFieldData.d.ts} +2 -2
  449. package/serialization/types/{SingleLocaleChangedPayloadFieldData.js → PayloadFieldData.js} +2 -2
  450. package/{dist/serialization/types/SearchButtonNodeDom.d.ts → serialization/types/SearchButtonNode.d.ts} +2 -2
  451. package/{dist/serialization/types/SearchButtonNodeDom.js → serialization/types/SearchButtonNode.js} +2 -2
  452. package/{dist/serialization/types/SearchButton.d.ts → serialization/types/SearchButtonNodeWrite.d.ts} +2 -2
  453. package/{dist/serialization/types/SearchButton.js → serialization/types/SearchButtonNodeWrite.js} +2 -2
  454. package/serialization/types/{SelectNodeDom.d.ts → SelectNode.d.ts} +2 -2
  455. package/{dist/serialization/types/SelectNodeDom.js → serialization/types/SelectNode.js} +2 -2
  456. package/serialization/types/SiteMembership.d.ts +2 -0
  457. package/serialization/types/SiteMembership.js +2 -0
  458. package/serialization/types/SiteMembershipAuditLogItemEventSubType.d.ts +1 -1
  459. package/serialization/types/SiteMembershipAuditLogItemEventSubType.js +1 -1
  460. package/serialization/types/SkuFieldData.d.ts +0 -2
  461. package/serialization/types/SkuFieldData.js +0 -2
  462. package/serialization/types/{SubmitButtonNodeDom.d.ts → SubmitButtonNode.d.ts} +2 -2
  463. package/{dist/serialization/types/SubmitButtonNodeDom.js → serialization/types/SubmitButtonNode.js} +2 -2
  464. package/{dist/serialization/types/SubmitButton.d.ts → serialization/types/SubmitButtonNodeWrite.d.ts} +2 -2
  465. package/{dist/serialization/types/SubmitButton.js → serialization/types/SubmitButtonNodeWrite.js} +2 -2
  466. package/{dist/serialization/types/TextInputNodeDom.d.ts → serialization/types/TextInputNode.d.ts} +2 -2
  467. package/{dist/serialization/types/TextInputNodeDom.js → serialization/types/TextInputNode.js} +2 -2
  468. package/serialization/types/{TextInput.d.ts → TextInputNodeWrite.d.ts} +2 -2
  469. package/serialization/types/{TextInput.js → TextInputNodeWrite.js} +2 -2
  470. package/serialization/types/TextNode.d.ts +4 -2
  471. package/serialization/types/TextNode.js +4 -2
  472. package/serialization/types/TextNodeWrite.d.ts +13 -0
  473. package/serialization/types/TextNodeWrite.js +44 -0
  474. package/serialization/types/TriggerType.d.ts +1 -1
  475. package/serialization/types/TriggerType.js +1 -0
  476. package/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.d.ts +15 -0
  477. package/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.js +46 -0
  478. package/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.d.ts +1 -1
  479. package/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.js +1 -1
  480. package/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.d.ts +13 -0
  481. package/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.js +44 -0
  482. package/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.d.ts +1 -1
  483. package/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.js +1 -1
  484. package/serialization/types/WorkspaceInvitation.d.ts +2 -0
  485. package/serialization/types/WorkspaceInvitation.js +2 -0
  486. package/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.d.ts +1 -1
  487. package/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.js +1 -0
  488. package/serialization/types/index.d.ts +17 -20
  489. package/serialization/types/index.js +17 -20
  490. package/version.d.ts +1 -1
  491. package/version.js +1 -1
  492. package/wrapper/AssetsClient.d.ts +24 -0
  493. package/wrapper/AssetsClient.js +42 -0
  494. package/wrapper/AssetsUtilitiesClient.d.ts +1 -1
  495. package/wrapper/FormsClient.d.ts +37 -0
  496. package/wrapper/FormsClient.js +193 -0
  497. package/wrapper/ItemsClient.js +18 -14
  498. package/wrapper/PagesClient.js +6 -5
  499. package/wrapper/WebflowClient.d.ts +3 -0
  500. package/wrapper/WebflowClient.js +6 -5
  501. package/api/types/CollectionItemChangedPayload.d.ts +0 -5
  502. package/api/types/CollectionItemCreatedPayload.d.ts +0 -5
  503. package/api/types/LocalizedItem.d.ts +0 -31
  504. package/api/types/MultiLocaleChangedPayload.d.ts +0 -22
  505. package/api/types/MultiLocaleChangedPayloadFieldData.d.ts +0 -11
  506. package/api/types/MultiLocaleCreatedPayload.d.ts +0 -16
  507. package/api/types/SingleLocaleChangedPayload.d.ts +0 -22
  508. package/api/types/TextNodeDom.d.ts +0 -15
  509. package/dist/api/types/CollectionItemChangedPayload.d.ts +0 -5
  510. package/dist/api/types/CollectionItemCreatedPayload.d.ts +0 -5
  511. package/dist/api/types/LocalizedItem.d.ts +0 -31
  512. package/dist/api/types/MultiLocaleChangedPayload.d.ts +0 -22
  513. package/dist/api/types/MultiLocaleChangedPayloadFieldData.d.ts +0 -11
  514. package/dist/api/types/MultiLocaleCreatedPayload.d.ts +0 -16
  515. package/dist/api/types/SingleLocaleChangedPayload.d.ts +0 -22
  516. package/dist/api/types/TextNodeDom.d.ts +0 -15
  517. package/dist/serialization/types/CollectionItemChangedPayload.d.ts +0 -12
  518. package/dist/serialization/types/CollectionItemChangedPayload.js +0 -43
  519. package/dist/serialization/types/CollectionItemCreatedPayload.d.ts +0 -12
  520. package/dist/serialization/types/CollectionItemCreatedPayload.js +0 -43
  521. package/dist/serialization/types/LocalizedItem.d.ts +0 -24
  522. package/dist/serialization/types/LocalizedItem.js +0 -55
  523. package/dist/serialization/types/MultiLocaleChangedPayload.d.ts +0 -23
  524. package/dist/serialization/types/MultiLocaleChangedPayloadFieldData.d.ts +0 -15
  525. package/dist/serialization/types/MultiLocaleChangedPayloadFieldData.js +0 -47
  526. package/dist/serialization/types/MultiLocaleCreatedPayload.d.ts +0 -17
  527. package/dist/serialization/types/MultiLocaleCreatedPayload.js +0 -48
  528. package/dist/serialization/types/SingleLocaleChangedPayload.d.ts +0 -23
  529. package/dist/serialization/types/SingleLocaleChangedPayload.js +0 -54
  530. package/dist/serialization/types/TextNodeDom.d.ts +0 -15
  531. package/dist/serialization/types/TextNodeDom.js +0 -46
  532. package/serialization/types/CollectionItemChangedPayload.d.ts +0 -12
  533. package/serialization/types/CollectionItemChangedPayload.js +0 -43
  534. package/serialization/types/CollectionItemCreatedPayload.d.ts +0 -12
  535. package/serialization/types/CollectionItemCreatedPayload.js +0 -43
  536. package/serialization/types/LocalizedItem.d.ts +0 -24
  537. package/serialization/types/LocalizedItem.js +0 -55
  538. package/serialization/types/MultiLocaleChangedPayload.d.ts +0 -23
  539. package/serialization/types/MultiLocaleChangedPayloadFieldData.d.ts +0 -15
  540. package/serialization/types/MultiLocaleChangedPayloadFieldData.js +0 -47
  541. package/serialization/types/MultiLocaleCreatedPayload.d.ts +0 -17
  542. package/serialization/types/MultiLocaleCreatedPayload.js +0 -48
  543. package/serialization/types/SingleLocaleChangedPayload.d.ts +0 -23
  544. package/serialization/types/SingleLocaleChangedPayload.js +0 -54
  545. package/serialization/types/TextNodeDom.d.ts +0 -15
  546. package/serialization/types/TextNodeDom.js +0 -46
  547. /package/api/resources/{forms/client/requests/FormsListSubmissionsBySiteRequest.js → assets/client/requests/AssetsListRequest.js} +0 -0
  548. /package/{dist/api → api/resources/sites}/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.js +0 -0
  549. /package/api/{types/CollectionItemChangedPayload.js → resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.js} +0 -0
  550. /package/api/{types/CollectionItemCreatedPayload.js → resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js} +0 -0
  551. /package/api/types/{ComponentInstance.js → CollectionItemPublished.js} +0 -0
  552. /package/api/types/{ComponentNodeDom.js → ComponentInstanceNodePropertyOverridesWrite.js} +0 -0
  553. /package/api/types/{ImageNodeDom.js → ComponentNode.js} +0 -0
  554. /package/api/types/{LocalizedItem.js → ImageNode.js} +0 -0
  555. /package/api/types/{MultiLocaleChangedPayload.js → Payload.js} +0 -0
  556. /package/api/types/{MultiLocaleChangedPayloadFieldData.js → PayloadFieldData.js} +0 -0
  557. /package/api/types/{MultiLocaleCreatedPayload.js → SearchButtonNode.js} +0 -0
  558. /package/api/types/{SearchButton.js → SearchButtonNodeWrite.js} +0 -0
  559. /package/api/types/{SearchButtonNodeDom.js → SelectNode.js} +0 -0
  560. /package/api/types/{SelectNodeDom.js → SubmitButtonNode.js} +0 -0
  561. /package/api/types/{SingleLocaleChangedPayload.js → SubmitButtonNodeWrite.js} +0 -0
  562. /package/api/types/{SingleLocaleChangedPayloadFieldData.js → TextInputNode.js} +0 -0
  563. /package/api/types/{SubmitButton.js → TextInputNodeWrite.js} +0 -0
  564. /package/api/types/{SubmitButtonNodeDom.js → TextNodeWrite.js} +0 -0
  565. /package/api/types/{TextInput.js → WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.js} +0 -0
  566. /package/api/types/{TextInputNodeDom.js → WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.js} +0 -0
  567. /package/{api/types/TextNodeDom.js → dist/api/resources/assets/client/requests/AssetsListRequest.js} +0 -0
  568. /package/dist/api/{types/CollectionItemChangedPayload.js → resources/sites/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.js} +0 -0
  569. /package/dist/api/{types/CollectionItemCreatedPayload.js → resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.js} +0 -0
  570. /package/dist/api/{types/ComponentInstance.js → resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js} +0 -0
  571. /package/dist/api/types/{ComponentNodeDom.js → CollectionItemPublished.js} +0 -0
  572. /package/dist/api/types/{ImageNodeDom.js → ComponentInstanceNodePropertyOverridesWrite.js} +0 -0
  573. /package/dist/api/types/{LocalizedItem.js → ComponentNode.js} +0 -0
  574. /package/dist/api/types/{MultiLocaleChangedPayload.js → ImageNode.js} +0 -0
  575. /package/dist/api/types/{MultiLocaleChangedPayloadFieldData.js → Payload.js} +0 -0
  576. /package/dist/api/types/{MultiLocaleCreatedPayload.js → PayloadFieldData.js} +0 -0
  577. /package/dist/api/types/{SearchButton.js → SearchButtonNode.js} +0 -0
  578. /package/dist/api/types/{SearchButtonNodeDom.js → SearchButtonNodeWrite.js} +0 -0
  579. /package/dist/api/types/{SelectNodeDom.js → SelectNode.js} +0 -0
  580. /package/dist/api/types/{SingleLocaleChangedPayload.js → SubmitButtonNode.js} +0 -0
  581. /package/dist/api/types/{SingleLocaleChangedPayloadFieldData.js → SubmitButtonNodeWrite.js} +0 -0
  582. /package/dist/api/types/{SubmitButton.js → TextInputNode.js} +0 -0
  583. /package/dist/api/types/{SubmitButtonNodeDom.js → TextInputNodeWrite.js} +0 -0
  584. /package/dist/api/types/{TextInput.js → TextNodeWrite.js} +0 -0
  585. /package/dist/api/types/{TextInputNodeDom.js → WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess.js} +0 -0
  586. /package/dist/api/types/{TextNodeDom.js → WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem.js} +0 -0
@@ -0,0 +1,662 @@
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 () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Forms = void 0;
52
+ const environments = __importStar(require("../../../../../../environments"));
53
+ const core = __importStar(require("../../../../../../core"));
54
+ const Webflow = __importStar(require("../../../../../index"));
55
+ const headers_js_1 = require("../../../../../../core/headers.js");
56
+ const url_join_1 = __importDefault(require("url-join"));
57
+ const serializers = __importStar(require("../../../../../../serialization/index"));
58
+ const errors = __importStar(require("../../../../../../errors/index"));
59
+ class Forms {
60
+ constructor(_options = {}) {
61
+ this._options = _options;
62
+ }
63
+ /**
64
+ * List all form submissions for a given site with the ability to filter submissions by a centralized `elementId`.
65
+ *
66
+ * Add `elementId` when you want to filter form submissions to a specific form in a site. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list) (displayed as `formElementId` in the response).
67
+ *
68
+ * <Note title="Forms in components">
69
+ * When a form is used in a Webflow component definition, each instance of the component will yield a unique form. Adding the `elementId` in this request ensures this API response includes all submissions from that core form, wherever that form is used in instantiated components.
70
+ * </Note>
71
+ *
72
+ * Use the [List Form Submissions endpoint](/data/reference/forms/form-submissions/list-submissions) to list form submissions for a given form ID.
73
+ *
74
+ * Required scope | `forms:read`
75
+ *
76
+ * @param {string} siteId - Unique identifier for a Site
77
+ * @param {Webflow.sites.FormsListSubmissionsBySiteRequest} request
78
+ * @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
79
+ *
80
+ * @throws {@link Webflow.BadRequestError}
81
+ * @throws {@link Webflow.UnauthorizedError}
82
+ * @throws {@link Webflow.ForbiddenError}
83
+ * @throws {@link Webflow.NotFoundError}
84
+ * @throws {@link Webflow.TooManyRequestsError}
85
+ * @throws {@link Webflow.InternalServerError}
86
+ *
87
+ * @example
88
+ * await client.sites.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", {
89
+ * elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0",
90
+ * offset: 1,
91
+ * limit: 1
92
+ * })
93
+ */
94
+ listSubmissionsBySite(siteId, request = {}, requestOptions) {
95
+ return core.HttpResponsePromise.fromPromise(this.__listSubmissionsBySite(siteId, request, requestOptions));
96
+ }
97
+ __listSubmissionsBySite(siteId_1) {
98
+ return __awaiter(this, arguments, void 0, function* (siteId, request = {}, requestOptions) {
99
+ var _a, _b, _c;
100
+ const { elementId, offset, limit } = request;
101
+ const _queryParams = {};
102
+ if (elementId != null) {
103
+ _queryParams["elementId"] = elementId;
104
+ }
105
+ if (offset != null) {
106
+ _queryParams["offset"] = offset.toString();
107
+ }
108
+ if (limit != null) {
109
+ _queryParams["limit"] = limit.toString();
110
+ }
111
+ const _response = yield core.fetcher({
112
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.WebflowEnvironment.DataApi)
113
+ .base, `sites/${encodeURIComponent(siteId)}/form_submissions`),
114
+ method: "GET",
115
+ headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
116
+ queryParameters: _queryParams,
117
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
118
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
119
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
120
+ });
121
+ if (_response.ok) {
122
+ return {
123
+ data: serializers.FormSubmissionList.parseOrThrow(_response.body, {
124
+ unrecognizedObjectKeys: "passthrough",
125
+ allowUnrecognizedUnionMembers: true,
126
+ allowUnrecognizedEnumValues: true,
127
+ skipValidation: true,
128
+ breadcrumbsPrefix: ["response"],
129
+ }),
130
+ rawResponse: _response.rawResponse,
131
+ };
132
+ }
133
+ if (_response.error.reason === "status-code") {
134
+ switch (_response.error.statusCode) {
135
+ case 400:
136
+ throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
137
+ case 401:
138
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
139
+ unrecognizedObjectKeys: "passthrough",
140
+ allowUnrecognizedUnionMembers: true,
141
+ allowUnrecognizedEnumValues: true,
142
+ skipValidation: true,
143
+ breadcrumbsPrefix: ["response"],
144
+ }), _response.rawResponse);
145
+ case 403:
146
+ throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
147
+ case 404:
148
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
149
+ unrecognizedObjectKeys: "passthrough",
150
+ allowUnrecognizedUnionMembers: true,
151
+ allowUnrecognizedEnumValues: true,
152
+ skipValidation: true,
153
+ breadcrumbsPrefix: ["response"],
154
+ }), _response.rawResponse);
155
+ case 429:
156
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
157
+ unrecognizedObjectKeys: "passthrough",
158
+ allowUnrecognizedUnionMembers: true,
159
+ allowUnrecognizedEnumValues: true,
160
+ skipValidation: true,
161
+ breadcrumbsPrefix: ["response"],
162
+ }), _response.rawResponse);
163
+ case 500:
164
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
165
+ unrecognizedObjectKeys: "passthrough",
166
+ allowUnrecognizedUnionMembers: true,
167
+ allowUnrecognizedEnumValues: true,
168
+ skipValidation: true,
169
+ breadcrumbsPrefix: ["response"],
170
+ }), _response.rawResponse);
171
+ default:
172
+ throw new errors.WebflowError({
173
+ statusCode: _response.error.statusCode,
174
+ body: _response.error.body,
175
+ rawResponse: _response.rawResponse,
176
+ });
177
+ }
178
+ }
179
+ switch (_response.error.reason) {
180
+ case "non-json":
181
+ throw new errors.WebflowError({
182
+ statusCode: _response.error.statusCode,
183
+ body: _response.error.rawBody,
184
+ rawResponse: _response.rawResponse,
185
+ });
186
+ case "timeout":
187
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/form_submissions.");
188
+ case "unknown":
189
+ throw new errors.WebflowError({
190
+ message: _response.error.errorMessage,
191
+ rawResponse: _response.rawResponse,
192
+ });
193
+ }
194
+ });
195
+ }
196
+ /**
197
+ * List form submissions for a given form ID within a specific site.
198
+ *
199
+ * Use the [List Form Submissions by Site endpoint](/data/reference/forms/form-submissions/list-submissions-by-site) to list form submissions for a given site with the ability to filter by a `formElementId`.
200
+ *
201
+ * Required scope | `forms:read`
202
+ *
203
+ * @param {string} siteId - Unique identifier for a Site
204
+ * @param {string} formId - Unique identifier for a Form
205
+ * @param {Webflow.sites.FormsListSubmissionsRequest} request
206
+ * @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
207
+ *
208
+ * @throws {@link Webflow.BadRequestError}
209
+ * @throws {@link Webflow.UnauthorizedError}
210
+ * @throws {@link Webflow.ForbiddenError}
211
+ * @throws {@link Webflow.NotFoundError}
212
+ * @throws {@link Webflow.TooManyRequestsError}
213
+ * @throws {@link Webflow.InternalServerError}
214
+ *
215
+ * @example
216
+ * await client.sites.forms.listSubmissions("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", {
217
+ * offset: 1,
218
+ * limit: 1
219
+ * })
220
+ */
221
+ listSubmissions(siteId, formId, request = {}, requestOptions) {
222
+ return core.HttpResponsePromise.fromPromise(this.__listSubmissions(siteId, formId, request, requestOptions));
223
+ }
224
+ __listSubmissions(siteId_1, formId_1) {
225
+ return __awaiter(this, arguments, void 0, function* (siteId, formId, request = {}, requestOptions) {
226
+ var _a, _b, _c;
227
+ const { offset, limit } = request;
228
+ const _queryParams = {};
229
+ if (offset != null) {
230
+ _queryParams["offset"] = offset.toString();
231
+ }
232
+ if (limit != null) {
233
+ _queryParams["limit"] = limit.toString();
234
+ }
235
+ const _response = yield core.fetcher({
236
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.WebflowEnvironment.DataApi)
237
+ .base, `sites/${encodeURIComponent(siteId)}/forms/${encodeURIComponent(formId)}/submissions`),
238
+ method: "GET",
239
+ headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
+ queryParameters: _queryParams,
241
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
242
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
243
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
244
+ });
245
+ if (_response.ok) {
246
+ return {
247
+ data: serializers.FormSubmissionList.parseOrThrow(_response.body, {
248
+ unrecognizedObjectKeys: "passthrough",
249
+ allowUnrecognizedUnionMembers: true,
250
+ allowUnrecognizedEnumValues: true,
251
+ skipValidation: true,
252
+ breadcrumbsPrefix: ["response"],
253
+ }),
254
+ rawResponse: _response.rawResponse,
255
+ };
256
+ }
257
+ if (_response.error.reason === "status-code") {
258
+ switch (_response.error.statusCode) {
259
+ case 400:
260
+ throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
261
+ case 401:
262
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
263
+ unrecognizedObjectKeys: "passthrough",
264
+ allowUnrecognizedUnionMembers: true,
265
+ allowUnrecognizedEnumValues: true,
266
+ skipValidation: true,
267
+ breadcrumbsPrefix: ["response"],
268
+ }), _response.rawResponse);
269
+ case 403:
270
+ throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
271
+ case 404:
272
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
273
+ unrecognizedObjectKeys: "passthrough",
274
+ allowUnrecognizedUnionMembers: true,
275
+ allowUnrecognizedEnumValues: true,
276
+ skipValidation: true,
277
+ breadcrumbsPrefix: ["response"],
278
+ }), _response.rawResponse);
279
+ case 429:
280
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
281
+ unrecognizedObjectKeys: "passthrough",
282
+ allowUnrecognizedUnionMembers: true,
283
+ allowUnrecognizedEnumValues: true,
284
+ skipValidation: true,
285
+ breadcrumbsPrefix: ["response"],
286
+ }), _response.rawResponse);
287
+ case 500:
288
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
289
+ unrecognizedObjectKeys: "passthrough",
290
+ allowUnrecognizedUnionMembers: true,
291
+ allowUnrecognizedEnumValues: true,
292
+ skipValidation: true,
293
+ breadcrumbsPrefix: ["response"],
294
+ }), _response.rawResponse);
295
+ default:
296
+ throw new errors.WebflowError({
297
+ statusCode: _response.error.statusCode,
298
+ body: _response.error.body,
299
+ rawResponse: _response.rawResponse,
300
+ });
301
+ }
302
+ }
303
+ switch (_response.error.reason) {
304
+ case "non-json":
305
+ throw new errors.WebflowError({
306
+ statusCode: _response.error.statusCode,
307
+ body: _response.error.rawBody,
308
+ rawResponse: _response.rawResponse,
309
+ });
310
+ case "timeout":
311
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/forms/{form_id}/submissions.");
312
+ case "unknown":
313
+ throw new errors.WebflowError({
314
+ message: _response.error.errorMessage,
315
+ rawResponse: _response.rawResponse,
316
+ });
317
+ }
318
+ });
319
+ }
320
+ /**
321
+ * Get information about a form submission within a specific site.
322
+ *
323
+ * Required scope | `forms:read`
324
+ *
325
+ * @param {string} siteId - Unique identifier for a Site
326
+ * @param {string} formSubmissionId - Unique identifier for a Form Submission
327
+ * @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
328
+ *
329
+ * @throws {@link Webflow.BadRequestError}
330
+ * @throws {@link Webflow.UnauthorizedError}
331
+ * @throws {@link Webflow.ForbiddenError}
332
+ * @throws {@link Webflow.NotFoundError}
333
+ * @throws {@link Webflow.TooManyRequestsError}
334
+ * @throws {@link Webflow.InternalServerError}
335
+ *
336
+ * @example
337
+ * await client.sites.forms.getSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741")
338
+ */
339
+ getSubmission(siteId, formSubmissionId, requestOptions) {
340
+ return core.HttpResponsePromise.fromPromise(this.__getSubmission(siteId, formSubmissionId, requestOptions));
341
+ }
342
+ __getSubmission(siteId, formSubmissionId, requestOptions) {
343
+ return __awaiter(this, void 0, void 0, function* () {
344
+ var _a, _b, _c;
345
+ const _response = yield core.fetcher({
346
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.WebflowEnvironment.DataApi)
347
+ .base, `sites/${encodeURIComponent(siteId)}/form_submissions/${encodeURIComponent(formSubmissionId)}`),
348
+ method: "GET",
349
+ headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
350
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
351
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
352
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
353
+ });
354
+ if (_response.ok) {
355
+ return {
356
+ data: serializers.FormSubmission.parseOrThrow(_response.body, {
357
+ unrecognizedObjectKeys: "passthrough",
358
+ allowUnrecognizedUnionMembers: true,
359
+ allowUnrecognizedEnumValues: true,
360
+ skipValidation: true,
361
+ breadcrumbsPrefix: ["response"],
362
+ }),
363
+ rawResponse: _response.rawResponse,
364
+ };
365
+ }
366
+ if (_response.error.reason === "status-code") {
367
+ switch (_response.error.statusCode) {
368
+ case 400:
369
+ throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
370
+ case 401:
371
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
372
+ unrecognizedObjectKeys: "passthrough",
373
+ allowUnrecognizedUnionMembers: true,
374
+ allowUnrecognizedEnumValues: true,
375
+ skipValidation: true,
376
+ breadcrumbsPrefix: ["response"],
377
+ }), _response.rawResponse);
378
+ case 403:
379
+ throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
380
+ case 404:
381
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
382
+ unrecognizedObjectKeys: "passthrough",
383
+ allowUnrecognizedUnionMembers: true,
384
+ allowUnrecognizedEnumValues: true,
385
+ skipValidation: true,
386
+ breadcrumbsPrefix: ["response"],
387
+ }), _response.rawResponse);
388
+ case 429:
389
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
390
+ unrecognizedObjectKeys: "passthrough",
391
+ allowUnrecognizedUnionMembers: true,
392
+ allowUnrecognizedEnumValues: true,
393
+ skipValidation: true,
394
+ breadcrumbsPrefix: ["response"],
395
+ }), _response.rawResponse);
396
+ case 500:
397
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
398
+ unrecognizedObjectKeys: "passthrough",
399
+ allowUnrecognizedUnionMembers: true,
400
+ allowUnrecognizedEnumValues: true,
401
+ skipValidation: true,
402
+ breadcrumbsPrefix: ["response"],
403
+ }), _response.rawResponse);
404
+ default:
405
+ throw new errors.WebflowError({
406
+ statusCode: _response.error.statusCode,
407
+ body: _response.error.body,
408
+ rawResponse: _response.rawResponse,
409
+ });
410
+ }
411
+ }
412
+ switch (_response.error.reason) {
413
+ case "non-json":
414
+ throw new errors.WebflowError({
415
+ statusCode: _response.error.statusCode,
416
+ body: _response.error.rawBody,
417
+ rawResponse: _response.rawResponse,
418
+ });
419
+ case "timeout":
420
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/form_submissions/{form_submission_id}.");
421
+ case "unknown":
422
+ throw new errors.WebflowError({
423
+ message: _response.error.errorMessage,
424
+ rawResponse: _response.rawResponse,
425
+ });
426
+ }
427
+ });
428
+ }
429
+ /**
430
+ * Delete a form submission within a specific site.
431
+ *
432
+ * Required scope | `forms:write`
433
+ *
434
+ * @param {string} siteId - Unique identifier for a Site
435
+ * @param {string} formSubmissionId - Unique identifier for a Form Submission
436
+ * @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
437
+ *
438
+ * @throws {@link Webflow.BadRequestError}
439
+ * @throws {@link Webflow.UnauthorizedError}
440
+ * @throws {@link Webflow.ForbiddenError}
441
+ * @throws {@link Webflow.NotFoundError}
442
+ * @throws {@link Webflow.ConflictError}
443
+ * @throws {@link Webflow.TooManyRequestsError}
444
+ * @throws {@link Webflow.InternalServerError}
445
+ *
446
+ * @example
447
+ * await client.sites.forms.deleteSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741")
448
+ */
449
+ deleteSubmission(siteId, formSubmissionId, requestOptions) {
450
+ return core.HttpResponsePromise.fromPromise(this.__deleteSubmission(siteId, formSubmissionId, requestOptions));
451
+ }
452
+ __deleteSubmission(siteId, formSubmissionId, requestOptions) {
453
+ return __awaiter(this, void 0, void 0, function* () {
454
+ var _a, _b, _c;
455
+ const _response = yield core.fetcher({
456
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.WebflowEnvironment.DataApi)
457
+ .base, `sites/${encodeURIComponent(siteId)}/form_submissions/${encodeURIComponent(formSubmissionId)}`),
458
+ method: "DELETE",
459
+ headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
460
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
461
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
462
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
463
+ });
464
+ if (_response.ok) {
465
+ return { data: undefined, rawResponse: _response.rawResponse };
466
+ }
467
+ if (_response.error.reason === "status-code") {
468
+ switch (_response.error.statusCode) {
469
+ case 400:
470
+ throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
471
+ case 401:
472
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
473
+ unrecognizedObjectKeys: "passthrough",
474
+ allowUnrecognizedUnionMembers: true,
475
+ allowUnrecognizedEnumValues: true,
476
+ skipValidation: true,
477
+ breadcrumbsPrefix: ["response"],
478
+ }), _response.rawResponse);
479
+ case 403:
480
+ throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
481
+ case 404:
482
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
483
+ unrecognizedObjectKeys: "passthrough",
484
+ allowUnrecognizedUnionMembers: true,
485
+ allowUnrecognizedEnumValues: true,
486
+ skipValidation: true,
487
+ breadcrumbsPrefix: ["response"],
488
+ }), _response.rawResponse);
489
+ case 409:
490
+ throw new Webflow.ConflictError(_response.error.body, _response.rawResponse);
491
+ case 429:
492
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
493
+ unrecognizedObjectKeys: "passthrough",
494
+ allowUnrecognizedUnionMembers: true,
495
+ allowUnrecognizedEnumValues: true,
496
+ skipValidation: true,
497
+ breadcrumbsPrefix: ["response"],
498
+ }), _response.rawResponse);
499
+ case 500:
500
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
501
+ unrecognizedObjectKeys: "passthrough",
502
+ allowUnrecognizedUnionMembers: true,
503
+ allowUnrecognizedEnumValues: true,
504
+ skipValidation: true,
505
+ breadcrumbsPrefix: ["response"],
506
+ }), _response.rawResponse);
507
+ default:
508
+ throw new errors.WebflowError({
509
+ statusCode: _response.error.statusCode,
510
+ body: _response.error.body,
511
+ rawResponse: _response.rawResponse,
512
+ });
513
+ }
514
+ }
515
+ switch (_response.error.reason) {
516
+ case "non-json":
517
+ throw new errors.WebflowError({
518
+ statusCode: _response.error.statusCode,
519
+ body: _response.error.rawBody,
520
+ rawResponse: _response.rawResponse,
521
+ });
522
+ case "timeout":
523
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}/form_submissions/{form_submission_id}.");
524
+ case "unknown":
525
+ throw new errors.WebflowError({
526
+ message: _response.error.errorMessage,
527
+ rawResponse: _response.rawResponse,
528
+ });
529
+ }
530
+ });
531
+ }
532
+ /**
533
+ * Update hidden fields on a form submission within a specific site.
534
+ *
535
+ * Required scope | `forms:write`
536
+ *
537
+ * @param {string} siteId - Unique identifier for a Site
538
+ * @param {string} formSubmissionId - Unique identifier for a Form Submission
539
+ * @param {Webflow.sites.FormsUpdateSubmissionRequest} request
540
+ * @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
541
+ *
542
+ * @throws {@link Webflow.BadRequestError}
543
+ * @throws {@link Webflow.UnauthorizedError}
544
+ * @throws {@link Webflow.ForbiddenError}
545
+ * @throws {@link Webflow.NotFoundError}
546
+ * @throws {@link Webflow.ConflictError}
547
+ * @throws {@link Webflow.TooManyRequestsError}
548
+ * @throws {@link Webflow.InternalServerError}
549
+ *
550
+ * @example
551
+ * await client.sites.forms.updateSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741")
552
+ */
553
+ updateSubmission(siteId, formSubmissionId, request = {}, requestOptions) {
554
+ return core.HttpResponsePromise.fromPromise(this.__updateSubmission(siteId, formSubmissionId, request, requestOptions));
555
+ }
556
+ __updateSubmission(siteId_1, formSubmissionId_1) {
557
+ return __awaiter(this, arguments, void 0, function* (siteId, formSubmissionId, request = {}, requestOptions) {
558
+ var _a, _b, _c;
559
+ const _response = yield core.fetcher({
560
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.WebflowEnvironment.DataApi)
561
+ .base, `sites/${encodeURIComponent(siteId)}/form_submissions/${encodeURIComponent(formSubmissionId)}`),
562
+ method: "PATCH",
563
+ headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
564
+ contentType: "application/json",
565
+ requestType: "json",
566
+ body: serializers.sites.FormsUpdateSubmissionRequest.jsonOrThrow(request, {
567
+ unrecognizedObjectKeys: "passthrough",
568
+ allowUnrecognizedUnionMembers: true,
569
+ allowUnrecognizedEnumValues: true,
570
+ }),
571
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
572
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
573
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
574
+ });
575
+ if (_response.ok) {
576
+ return {
577
+ data: serializers.FormSubmission.parseOrThrow(_response.body, {
578
+ unrecognizedObjectKeys: "passthrough",
579
+ allowUnrecognizedUnionMembers: true,
580
+ allowUnrecognizedEnumValues: true,
581
+ skipValidation: true,
582
+ breadcrumbsPrefix: ["response"],
583
+ }),
584
+ rawResponse: _response.rawResponse,
585
+ };
586
+ }
587
+ if (_response.error.reason === "status-code") {
588
+ switch (_response.error.statusCode) {
589
+ case 400:
590
+ throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
591
+ case 401:
592
+ throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
593
+ unrecognizedObjectKeys: "passthrough",
594
+ allowUnrecognizedUnionMembers: true,
595
+ allowUnrecognizedEnumValues: true,
596
+ skipValidation: true,
597
+ breadcrumbsPrefix: ["response"],
598
+ }), _response.rawResponse);
599
+ case 403:
600
+ throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
601
+ case 404:
602
+ throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
603
+ unrecognizedObjectKeys: "passthrough",
604
+ allowUnrecognizedUnionMembers: true,
605
+ allowUnrecognizedEnumValues: true,
606
+ skipValidation: true,
607
+ breadcrumbsPrefix: ["response"],
608
+ }), _response.rawResponse);
609
+ case 409:
610
+ throw new Webflow.ConflictError(_response.error.body, _response.rawResponse);
611
+ case 429:
612
+ throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
613
+ unrecognizedObjectKeys: "passthrough",
614
+ allowUnrecognizedUnionMembers: true,
615
+ allowUnrecognizedEnumValues: true,
616
+ skipValidation: true,
617
+ breadcrumbsPrefix: ["response"],
618
+ }), _response.rawResponse);
619
+ case 500:
620
+ throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
621
+ unrecognizedObjectKeys: "passthrough",
622
+ allowUnrecognizedUnionMembers: true,
623
+ allowUnrecognizedEnumValues: true,
624
+ skipValidation: true,
625
+ breadcrumbsPrefix: ["response"],
626
+ }), _response.rawResponse);
627
+ default:
628
+ throw new errors.WebflowError({
629
+ statusCode: _response.error.statusCode,
630
+ body: _response.error.body,
631
+ rawResponse: _response.rawResponse,
632
+ });
633
+ }
634
+ }
635
+ switch (_response.error.reason) {
636
+ case "non-json":
637
+ throw new errors.WebflowError({
638
+ statusCode: _response.error.statusCode,
639
+ body: _response.error.rawBody,
640
+ rawResponse: _response.rawResponse,
641
+ });
642
+ case "timeout":
643
+ throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}/form_submissions/{form_submission_id}.");
644
+ case "unknown":
645
+ throw new errors.WebflowError({
646
+ message: _response.error.errorMessage,
647
+ rawResponse: _response.rawResponse,
648
+ });
649
+ }
650
+ });
651
+ }
652
+ _getAuthorizationHeader() {
653
+ return __awaiter(this, void 0, void 0, function* () {
654
+ const bearer = yield core.Supplier.get(this._options.accessToken);
655
+ if (bearer != null) {
656
+ return `Bearer ${bearer}`;
657
+ }
658
+ return undefined;
659
+ });
660
+ }
661
+ }
662
+ exports.Forms = Forms;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests";