From d08b2b508e1ab2a2c6bcb4758d204f8e09e7c706 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 16:35:28 +0000 Subject: [PATCH] SDK regeneration --- .mock/definition/__package__.yml | 677 ++++++++++++++++- .mock/definition/api.yml | 11 +- .mock/definition/collections/items.yml | 25 +- .mock/definition/components.yml | 58 +- .mock/definition/pages.yml | 38 +- .mock/definition/products.yml | 198 +++-- .mock/definition/sites.yml | 2 +- .mock/definition/sites/comments.yml | 325 ++++++++ .mock/definition/sites/robotsTxt.yml | 25 +- .mock/definition/sites/wellKnown.yml | 114 +++ .mock/definition/workspaces/auditLogs.yml | 119 +++ .mock/fern.config.json | 2 +- package.json | 26 +- reference.md | 694 +++++++++++++++++- src/Client.ts | 9 +- .../resources/accessGroups/client/Client.ts | 4 +- src/api/resources/assets/client/Client.ts | 38 +- .../resources/collections/client/Client.ts | 18 +- .../resources/fields/client/Client.ts | 17 +- .../resources/items/client/Client.ts | 104 ++- .../requests/ItemsDeleteItemsLiveRequest.ts | 8 +- .../requests/ItemsDeleteItemsRequest.ts | 8 +- src/api/resources/components/client/Client.ts | 40 +- .../client/requests/ComponentDomWrite.ts | 16 + .../requests/ComponentsGetContentRequest.ts | 5 - .../types/ComponentDomWriteNodesItem.ts | 8 +- src/api/resources/ecommerce/client/Client.ts | 6 +- src/api/resources/forms/client/Client.ts | 30 +- src/api/resources/index.ts | 1 + src/api/resources/inventory/client/Client.ts | 10 +- src/api/resources/orders/client/Client.ts | 26 +- src/api/resources/pages/client/Client.ts | 40 +- .../pages/client/requests/PageDomWrite.ts | 16 + .../pages/resources/scripts/client/Client.ts | 14 +- .../pages/types/PageDomWriteNodesItem.ts | 8 +- src/api/resources/products/client/Client.ts | 122 ++- .../client/requests/ProductSkuCreate.ts | 60 +- .../requests/ProductsCreateSkuRequest.ts | 12 +- .../requests/ProductsUpdateSkuRequest.ts | 12 +- .../products/types/ProductSkuCreateProduct.ts | 9 + .../products/types/ProductSkuCreateSku.ts | 9 + .../types/ProductsCreateSkuResponse.ts | 2 +- src/api/resources/products/types/index.ts | 2 + src/api/resources/scripts/client/Client.ts | 14 +- src/api/resources/sites/client/Client.ts | 44 +- src/api/resources/sites/index.ts | 2 +- .../resources/activityLogs/client/Client.ts | 6 +- .../sites/resources/comments/client/Client.ts | 497 +++++++++++++ .../sites/resources/comments/client/index.ts | 1 + .../CommentsGetCommentThreadRequest.ts | 34 + .../CommentsListCommentRepliesRequest.ts | 34 + .../CommentsListCommentThreadsRequest.ts | 34 + .../comments/client/requests/index.ts | 3 + .../sites/resources/comments/index.ts | 2 + .../CommentsGetCommentThreadRequestSortBy.ts | 10 + ...ommentsGetCommentThreadRequestSortOrder.ts | 10 + ...CommentsListCommentRepliesRequestSortBy.ts | 10 + ...mentsListCommentRepliesRequestSortOrder.ts | 10 + ...CommentsListCommentThreadsRequestSortBy.ts | 10 + ...mentsListCommentThreadsRequestSortOrder.ts | 10 + .../sites/resources/comments/types/index.ts | 6 + src/api/resources/sites/resources/index.ts | 6 + .../sites/resources/plans/client/Client.ts | 6 +- .../resources/redirects/client/Client.ts | 18 +- .../resources/robotsTxt/client/Client.ts | 26 +- .../sites/resources/scripts/client/Client.ts | 18 +- .../resources/wellKnown/client/Client.ts | 296 ++++++++ .../sites/resources/wellKnown/client/index.ts | 1 + .../client/requests/WellKnownDeleteRequest.ts | 12 + .../client/requests/WellKnownFile.ts | 21 + .../wellKnown/client/requests/index.ts | 2 + .../sites/resources/wellKnown/index.ts | 2 + .../types/WellKnownFileContentType.ts | 13 + .../sites/resources/wellKnown/types/index.ts | 1 + src/api/resources/token/client/Client.ts | 10 +- src/api/resources/users/client/Client.ts | 22 +- src/api/resources/webhooks/client/Client.ts | 18 +- src/api/resources/workspaces/client/Client.ts | 35 + src/api/resources/workspaces/client/index.ts | 1 + src/api/resources/workspaces/index.ts | 2 + .../resources/auditLogs/client/Client.ts | 192 +++++ .../resources/auditLogs/client/index.ts | 1 + .../AuditLogsGetWorkspaceAuditLogsRequest.ts | 39 + .../auditLogs/client/requests/index.ts | 1 + .../workspaces/resources/auditLogs/index.ts | 2 + ...gsGetWorkspaceAuditLogsRequestEventType.ts | 18 + ...gsGetWorkspaceAuditLogsRequestSortOrder.ts | 10 + .../resources/auditLogs/types/index.ts | 2 + .../resources/workspaces/resources/index.ts | 3 + src/api/types/Asset.ts | 20 +- src/api/types/AssetVariant.ts | 14 +- src/api/types/Collection.ts | 4 +- src/api/types/CollectionItem.ts | 6 +- src/api/types/CommentReply.ts | 34 + src/api/types/CommentReplyAuthor.ts | 12 + src/api/types/CommentReplyList.ts | 13 + src/api/types/CommentReplyListPagination.ts | 12 + .../types/CommentReplyMentionedUsersItem.ts | 12 + src/api/types/CommentThread.ts | 36 + src/api/types/CommentThreadAuthor.ts | 12 + src/api/types/CommentThreadList.ts | 13 + src/api/types/CommentThreadListPagination.ts | 12 + .../types/CommentThreadMentionedUsersItem.ts | 12 + src/api/types/ComponentDom.ts | 2 +- src/api/types/ComponentNode.ts | 6 +- src/api/types/CustomRole.ts | 10 + src/api/types/CustomRoleAuditLogItem.ts | 10 + .../CustomRoleAuditLogItemEventSubType.ts | 11 + src/api/types/FieldType.ts | 8 +- src/api/types/ImageNode.ts | 4 +- src/api/types/Node.ts | 25 +- src/api/types/Pagination.ts | 6 +- src/api/types/SearchButtonNode.ts | 15 + src/api/types/SearchButtonNodeWrite.ts | 13 + src/api/types/SelectNode.ts | 17 + src/api/types/SelectNodeChoicesItem.ts | 10 + src/api/types/SelectNodeWrite.ts | 15 + src/api/types/SelectNodeWriteChoicesItem.ts | 10 + src/api/types/SiteMembership.ts | 16 + src/api/types/SiteMembershipAuditLogItem.ts | 10 + .../SiteMembershipAuditLogItemEventSubType.ts | 11 + src/api/types/SkuFieldData.ts | 6 + src/api/types/SkuFieldDataPrice.ts | 2 + src/api/types/SkuValueList.ts | 2 +- src/api/types/StaticFieldType.ts | 4 +- src/api/types/SubmitButtonNode.ts | 17 + src/api/types/SubmitButtonNodeWrite.ts | 15 + src/api/types/TextInputNode.ts | 15 + src/api/types/TextInputNodeWrite.ts | 13 + src/api/types/TextNode.ts | 4 +- src/api/types/TriggerType.ts | 4 +- src/api/types/UserAccess.ts | 13 + src/api/types/UserAccessAuditLogItem.ts | 10 + .../UserAccessAuditLogItemEventSubType.ts | 10 + src/api/types/WorkspaceAuditLogItem.ts | 40 + src/api/types/WorkspaceAuditLogItemActor.ts | 8 + ...AuditLogItemPayloadSiteMembershipMethod.ts | 13 + ...ceAuditLogItemPayloadSiteMembershipSite.ts | 8 + ...tLogItemPayloadSiteMembershipTargetUser.ts | 8 + ...ditLogItemPayloadSiteMembershipUserType.ts | 12 + ...paceAuditLogItemPayloadUserAccessMethod.ts | 12 + ...LogItemPayloadWorkspaceInvitationMethod.ts | 11 + ...temPayloadWorkspaceInvitationTargetUser.ts | 8 + ...gItemPayloadWorkspaceInvitationUserType.ts | 12 + ...LogItemPayloadWorkspaceMembershipMethod.ts | 11 + ...temPayloadWorkspaceMembershipTargetUser.ts | 8 + ...gItemPayloadWorkspaceMembershipUserType.ts | 12 + .../types/WorkspaceAuditLogItemWorkspace.ts | 8 + src/api/types/WorkspaceAuditLogResponse.ts | 10 + src/api/types/WorkspaceInvitation.ts | 15 + .../types/WorkspaceInvitationAuditLogItem.ts | 10 + ...spaceInvitationAuditLogItemEventSubType.ts | 18 + src/api/types/WorkspaceMembership.ts | 15 + .../types/WorkspaceMembershipAuditLogItem.ts | 10 + ...spaceMembershipAuditLogItemEventSubType.ts | 11 + src/api/types/index.ts | 52 +- src/environments.ts | 18 +- .../requests/ItemsDeleteItemsLiveRequest.ts | 4 +- .../requests/ItemsDeleteItemsRequest.ts | 4 +- .../types/ComponentDomWriteNodesItem.ts | 21 +- src/serialization/resources/index.ts | 1 + .../pages/types/PageDomWriteNodesItem.ts | 21 +- .../client/requests/ProductSkuCreate.ts | 12 +- .../products/types/ProductSkuCreateProduct.ts | 21 + .../products/types/ProductSkuCreateSku.ts | 21 + .../types/ProductsCreateSkuResponse.ts | 4 +- .../resources/products/types/index.ts | 2 + src/serialization/resources/sites/index.ts | 1 + .../sites/resources/comments/index.ts | 1 + .../CommentsGetCommentThreadRequestSortBy.ts | 16 + ...ommentsGetCommentThreadRequestSortOrder.ts | 16 + ...CommentsListCommentRepliesRequestSortBy.ts | 16 + ...mentsListCommentRepliesRequestSortOrder.ts | 16 + ...CommentsListCommentThreadsRequestSortBy.ts | 16 + ...mentsListCommentThreadsRequestSortOrder.ts | 16 + .../sites/resources/comments/types/index.ts | 6 + .../resources/sites/resources/index.ts | 5 + .../sites/resources/wellKnown/client/index.ts | 1 + .../client/requests/WellKnownDeleteRequest.ts | 20 + .../client/requests/WellKnownFile.ts | 25 + .../wellKnown/client/requests/index.ts | 2 + .../sites/resources/wellKnown/index.ts | 2 + .../types/WellKnownFileContentType.ts | 16 + .../sites/resources/wellKnown/types/index.ts | 1 + .../resources/workspaces/index.ts | 1 + .../workspaces/resources/auditLogs/index.ts | 1 + ...gsGetWorkspaceAuditLogsRequestEventType.ts | 22 + ...gsGetWorkspaceAuditLogsRequestSortOrder.ts | 16 + .../resources/auditLogs/types/index.ts | 2 + .../resources/workspaces/resources/index.ts | 2 + src/serialization/types/Asset.ts | 40 +- src/serialization/types/AssetVariant.ts | 28 +- src/serialization/types/Collection.ts | 8 +- src/serialization/types/CollectionItem.ts | 12 +- src/serialization/types/CommentReply.ts | 42 ++ src/serialization/types/CommentReplyAuthor.ts | 24 + src/serialization/types/CommentReplyList.ts | 24 + .../types/CommentReplyListPagination.ts | 24 + .../types/CommentReplyMentionedUsersItem.ts | 24 + src/serialization/types/CommentThread.ts | 44 ++ .../types/CommentThreadAuthor.ts | 24 + src/serialization/types/CommentThreadList.ts | 24 + .../types/CommentThreadListPagination.ts | 24 + .../types/CommentThreadMentionedUsersItem.ts | 24 + src/serialization/types/ComponentNode.ts | 12 +- src/serialization/types/CustomRole.ts | 20 + .../types/CustomRoleAuditLogItem.ts | 24 + .../CustomRoleAuditLogItemEventSubType.ts | 16 + src/serialization/types/FieldType.ts | 8 +- src/serialization/types/ImageNode.ts | 8 +- src/serialization/types/Node.ts | 33 +- src/serialization/types/Pagination.ts | 12 +- src/serialization/types/SearchButtonNode.ts | 24 + .../types/SearchButtonNodeWrite.ts | 22 + src/serialization/types/SelectNode.ts | 23 + .../types/SelectNodeChoicesItem.ts | 22 + src/serialization/types/SelectNodeWrite.ts | 23 + .../types/SelectNodeWriteChoicesItem.ts | 22 + src/serialization/types/SiteMembership.ts | 32 + .../types/SiteMembershipAuditLogItem.ts | 24 + .../SiteMembershipAuditLogItemEventSubType.ts | 16 + src/serialization/types/SkuFieldData.ts | 10 + src/serialization/types/SkuFieldDataPrice.ts | 2 + src/serialization/types/StaticFieldType.ts | 4 +- src/serialization/types/SubmitButtonNode.ts | 26 + .../types/SubmitButtonNodeWrite.ts | 24 + src/serialization/types/TextInputNode.ts | 22 + src/serialization/types/TextInputNodeWrite.ts | 22 + src/serialization/types/TextNode.ts | 8 +- src/serialization/types/TriggerType.ts | 4 +- src/serialization/types/UserAccess.ts | 23 + .../types/UserAccessAuditLogItem.ts | 24 + .../UserAccessAuditLogItemEventSubType.ts | 16 + .../types/WorkspaceAuditLogItem.ts | 70 ++ .../types/WorkspaceAuditLogItemActor.ts | 22 + ...AuditLogItemPayloadSiteMembershipMethod.ts | 16 + ...ceAuditLogItemPayloadSiteMembershipSite.ts | 22 + ...tLogItemPayloadSiteMembershipTargetUser.ts | 22 + ...ditLogItemPayloadSiteMembershipUserType.ts | 16 + ...paceAuditLogItemPayloadUserAccessMethod.ts | 16 + ...LogItemPayloadWorkspaceInvitationMethod.ts | 16 + ...temPayloadWorkspaceInvitationTargetUser.ts | 22 + ...gItemPayloadWorkspaceInvitationUserType.ts | 16 + ...LogItemPayloadWorkspaceMembershipMethod.ts | 16 + ...temPayloadWorkspaceMembershipTargetUser.ts | 22 + ...gItemPayloadWorkspaceMembershipUserType.ts | 16 + .../types/WorkspaceAuditLogItemWorkspace.ts | 22 + .../types/WorkspaceAuditLogResponse.ts | 24 + .../types/WorkspaceInvitation.ts | 31 + .../types/WorkspaceInvitationAuditLogItem.ts | 24 + ...spaceInvitationAuditLogItemEventSubType.ts | 22 + .../types/WorkspaceMembership.ts | 31 + .../types/WorkspaceMembershipAuditLogItem.ts | 24 + ...spaceMembershipAuditLogItemEventSubType.ts | 16 + src/serialization/types/index.ts | 52 +- tests/wrapper/AssetsUtilitiesClient.test.ts | 178 ----- yarn.lock | 389 +++++----- 257 files changed, 6756 insertions(+), 911 deletions(-) create mode 100644 .mock/definition/sites/comments.yml create mode 100644 .mock/definition/sites/wellKnown.yml create mode 100644 .mock/definition/workspaces/auditLogs.yml create mode 100644 src/api/resources/products/types/ProductSkuCreateProduct.ts create mode 100644 src/api/resources/products/types/ProductSkuCreateSku.ts create mode 100644 src/api/resources/sites/resources/comments/client/Client.ts create mode 100644 src/api/resources/sites/resources/comments/client/index.ts create mode 100644 src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts create mode 100644 src/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.ts create mode 100644 src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts create mode 100644 src/api/resources/sites/resources/comments/client/requests/index.ts create mode 100644 src/api/resources/sites/resources/comments/index.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts create mode 100644 src/api/resources/sites/resources/comments/types/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/Client.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/requests/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts create mode 100644 src/api/resources/sites/resources/wellKnown/types/index.ts create mode 100644 src/api/resources/workspaces/client/Client.ts create mode 100644 src/api/resources/workspaces/client/index.ts create mode 100644 src/api/resources/workspaces/index.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/client/Client.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/client/index.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/client/requests/index.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/index.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts create mode 100644 src/api/resources/workspaces/resources/auditLogs/types/index.ts create mode 100644 src/api/resources/workspaces/resources/index.ts create mode 100644 src/api/types/CommentReply.ts create mode 100644 src/api/types/CommentReplyAuthor.ts create mode 100644 src/api/types/CommentReplyList.ts create mode 100644 src/api/types/CommentReplyListPagination.ts create mode 100644 src/api/types/CommentReplyMentionedUsersItem.ts create mode 100644 src/api/types/CommentThread.ts create mode 100644 src/api/types/CommentThreadAuthor.ts create mode 100644 src/api/types/CommentThreadList.ts create mode 100644 src/api/types/CommentThreadListPagination.ts create mode 100644 src/api/types/CommentThreadMentionedUsersItem.ts create mode 100644 src/api/types/CustomRole.ts create mode 100644 src/api/types/CustomRoleAuditLogItem.ts create mode 100644 src/api/types/CustomRoleAuditLogItemEventSubType.ts create mode 100644 src/api/types/SearchButtonNode.ts create mode 100644 src/api/types/SearchButtonNodeWrite.ts create mode 100644 src/api/types/SelectNode.ts create mode 100644 src/api/types/SelectNodeChoicesItem.ts create mode 100644 src/api/types/SelectNodeWrite.ts create mode 100644 src/api/types/SelectNodeWriteChoicesItem.ts create mode 100644 src/api/types/SiteMembership.ts create mode 100644 src/api/types/SiteMembershipAuditLogItem.ts create mode 100644 src/api/types/SiteMembershipAuditLogItemEventSubType.ts create mode 100644 src/api/types/SubmitButtonNode.ts create mode 100644 src/api/types/SubmitButtonNodeWrite.ts create mode 100644 src/api/types/TextInputNode.ts create mode 100644 src/api/types/TextInputNodeWrite.ts create mode 100644 src/api/types/UserAccess.ts create mode 100644 src/api/types/UserAccessAuditLogItem.ts create mode 100644 src/api/types/UserAccessAuditLogItemEventSubType.ts create mode 100644 src/api/types/WorkspaceAuditLogItem.ts create mode 100644 src/api/types/WorkspaceAuditLogItemActor.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts create mode 100644 src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts create mode 100644 src/api/types/WorkspaceAuditLogItemWorkspace.ts create mode 100644 src/api/types/WorkspaceAuditLogResponse.ts create mode 100644 src/api/types/WorkspaceInvitation.ts create mode 100644 src/api/types/WorkspaceInvitationAuditLogItem.ts create mode 100644 src/api/types/WorkspaceInvitationAuditLogItemEventSubType.ts create mode 100644 src/api/types/WorkspaceMembership.ts create mode 100644 src/api/types/WorkspaceMembershipAuditLogItem.ts create mode 100644 src/api/types/WorkspaceMembershipAuditLogItemEventSubType.ts create mode 100644 src/serialization/resources/products/types/ProductSkuCreateProduct.ts create mode 100644 src/serialization/resources/products/types/ProductSkuCreateSku.ts create mode 100644 src/serialization/resources/sites/resources/comments/index.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/index.ts create mode 100644 src/serialization/resources/sites/resources/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/types/index.ts create mode 100644 src/serialization/resources/workspaces/index.ts create mode 100644 src/serialization/resources/workspaces/resources/auditLogs/index.ts create mode 100644 src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts create mode 100644 src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts create mode 100644 src/serialization/resources/workspaces/resources/auditLogs/types/index.ts create mode 100644 src/serialization/resources/workspaces/resources/index.ts create mode 100644 src/serialization/types/CommentReply.ts create mode 100644 src/serialization/types/CommentReplyAuthor.ts create mode 100644 src/serialization/types/CommentReplyList.ts create mode 100644 src/serialization/types/CommentReplyListPagination.ts create mode 100644 src/serialization/types/CommentReplyMentionedUsersItem.ts create mode 100644 src/serialization/types/CommentThread.ts create mode 100644 src/serialization/types/CommentThreadAuthor.ts create mode 100644 src/serialization/types/CommentThreadList.ts create mode 100644 src/serialization/types/CommentThreadListPagination.ts create mode 100644 src/serialization/types/CommentThreadMentionedUsersItem.ts create mode 100644 src/serialization/types/CustomRole.ts create mode 100644 src/serialization/types/CustomRoleAuditLogItem.ts create mode 100644 src/serialization/types/CustomRoleAuditLogItemEventSubType.ts create mode 100644 src/serialization/types/SearchButtonNode.ts create mode 100644 src/serialization/types/SearchButtonNodeWrite.ts create mode 100644 src/serialization/types/SelectNode.ts create mode 100644 src/serialization/types/SelectNodeChoicesItem.ts create mode 100644 src/serialization/types/SelectNodeWrite.ts create mode 100644 src/serialization/types/SelectNodeWriteChoicesItem.ts create mode 100644 src/serialization/types/SiteMembership.ts create mode 100644 src/serialization/types/SiteMembershipAuditLogItem.ts create mode 100644 src/serialization/types/SiteMembershipAuditLogItemEventSubType.ts create mode 100644 src/serialization/types/SubmitButtonNode.ts create mode 100644 src/serialization/types/SubmitButtonNodeWrite.ts create mode 100644 src/serialization/types/TextInputNode.ts create mode 100644 src/serialization/types/TextInputNodeWrite.ts create mode 100644 src/serialization/types/UserAccess.ts create mode 100644 src/serialization/types/UserAccessAuditLogItem.ts create mode 100644 src/serialization/types/UserAccessAuditLogItemEventSubType.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItem.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemActor.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts create mode 100644 src/serialization/types/WorkspaceAuditLogItemWorkspace.ts create mode 100644 src/serialization/types/WorkspaceAuditLogResponse.ts create mode 100644 src/serialization/types/WorkspaceInvitation.ts create mode 100644 src/serialization/types/WorkspaceInvitationAuditLogItem.ts create mode 100644 src/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.ts create mode 100644 src/serialization/types/WorkspaceMembership.ts create mode 100644 src/serialization/types/WorkspaceMembershipAuditLogItem.ts create mode 100644 src/serialization/types/WorkspaceMembershipAuditLogItemEventSubType.ts delete mode 100644 tests/wrapper/AssetsUtilitiesClient.test.ts diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 17f9d9c5..ca9ec8de 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -339,6 +339,276 @@ types: openapi: ../../../openapi/referenced-specs/v2.yml InvalidScopes: unknown NotEnterprisePlanWorkspace: unknown + WorkspaceAuditLogItemPayloadUserAccessMethod: + enum: + - dashboard + - sso + - api + - google + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + User access: + properties: + method: optional + location: + type: optional + docs: The geolocation based on the logged IP address + ipAddress: + type: optional + docs: The captured IP address of the user + source: + openapi: ../../../openapi/referenced-specs/v2.yml + UserAccessAuditLogItemEventSubType: + enum: + - login + - logout + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + UserAccessAuditLogItem: + properties: + eventSubType: optional + payload: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Custom role: + properties: + roleName: + type: optional + docs: The name of the custom role + previousRoleName: + type: optional + docs: The previous name of the custom role + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CustomRoleAuditLogItemEventSubType: + enum: + - role_created + - role_updated + - role_deleted + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CustomRoleAuditLogItem: + properties: + eventSubType: optional + payload: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser: + properties: + id: optional + email: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod: + enum: + - sso + - dashboard + - admin + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType: + enum: + - member + - guest + - reviewer + - client + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Workspace membership: + properties: + targetUser: optional + method: optional + userType: optional + roleName: + type: optional + docs: The name of the role that was assigned to the user + previousRoleName: + type: optional + docs: The previous role that the user had + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceMembershipAuditLogItemEventSubType: + enum: + - user_added + - user_removed + - user_role_updated + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceMembershipAuditLogItem: + properties: + eventSubType: optional + payload: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogItemPayloadSiteMembershipSite: + properties: + id: optional + slug: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + WorkspaceAuditLogItemPayloadSiteMembershipTargetUser: + properties: + id: optional + email: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + WorkspaceAuditLogItemPayloadSiteMembershipMethod: + enum: + - sso + - invite + - scim + - dashboard + - admin + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogItemPayloadSiteMembershipUserType: + enum: + - member + - guest + - reviewer + - client + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Site membership: + properties: + site: optional + targetUser: optional + method: optional + userType: optional + roleName: + type: optional + docs: The name of the role that was assigned to the user + previousRoleName: + type: optional + docs: The previous role that the user had + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SiteMembershipAuditLogItemEventSubType: + enum: + - user_added + - user_removed + - user_role_updated + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SiteMembershipAuditLogItem: + properties: + eventSubType: optional + payload: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser: + properties: + id: optional + email: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod: + enum: + - sso + - dashboard + - admin + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType: + enum: + - member + - guest + - reviewer + - client + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Workspace invitation: + properties: + targetUser: optional + method: optional + userType: optional + roleName: + type: optional + docs: The name of the role that was assigned to the user + previousRoleName: + type: optional + docs: The previous role that the user had + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceInvitationAuditLogItemEventSubType: + enum: + - invite_sent + - invite_accepted + - invite_updated + - invite_canceled + - invite_declined + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceInvitationAuditLogItem: + properties: + eventSubType: optional + payload: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogItemActor: + properties: + id: optional + email: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + WorkspaceAuditLogItemWorkspace: + properties: + id: optional + slug: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + WorkspaceAuditLogItem: + discriminant: eventType + base-properties: + timestamp: optional + actor: optional + workspace: optional + union: + user_access: UserAccessAuditLogItem + custom_role: CustomRoleAuditLogItem + workspace_membership: WorkspaceMembershipAuditLogItem + site_membership: SiteMembershipAuditLogItem + workspace_invitation: WorkspaceInvitationAuditLogItem + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Pagination: + docs: Pagination object + properties: + limit: + type: double + docs: The limit used for pagination + offset: + type: double + docs: The offset used for pagination + total: + type: double + docs: The total number of records + source: + openapi: ../../../openapi/referenced-specs/v2.yml + WorkspaceAuditLogResponse: + properties: + items: optional> + pagination: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml Sites: properties: sites: optional> @@ -367,20 +637,6 @@ types: docs: The target URL path where the user or client will be redirected. source: openapi: ../../../openapi/referenced-specs/v2.yml - Pagination: - docs: Pagination object - properties: - limit: - type: double - docs: The limit used for pagination - offset: - type: double - docs: The offset used for pagination - total: - type: double - docs: The total number of records - source: - openapi: ../../../openapi/referenced-specs/v2.yml Redirects: docs: Site redirects response properties: @@ -614,7 +870,7 @@ types: - PlainText - RichText - Switch - - Video + - VideoLink docs: Choose these appropriate field type for your collection data inline: true source: @@ -754,17 +1010,19 @@ types: - DateTime - Email - ExtFileRef + - File - Image - Link - MultiImage - MultiReference - Number + - Option - Phone - PlainText - Reference - RichText - Switch - - Video + - VideoLink docs: Choose these appropriate field type for your collection data inline: true source: @@ -1132,6 +1390,222 @@ types: fieldData: optional source: openapi: ../../../openapi/referenced-specs/v2.yml + CommentThreadAuthor: + properties: + userId: + type: string + docs: The unique identifier of the author + email: + type: string + docs: Email of the author + name: + type: string + docs: Name of the author + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentThreadMentionedUsersItem: + properties: + userId: + type: string + docs: The unique identifier of the mentioned user + email: + type: string + docs: Email of the user + name: + type: string + docs: Name of the User + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentThread: + docs: > + A comment thread represents a conversation between users on a specific + page. Each comment thread has a unique identifier and can contain multiple + comments. Retrieve comment replies using the replies API endpoint. + properties: + id: + type: string + docs: Unique identifier for the comment thread + access: read-only + siteId: + type: string + docs: The site unique identifier + access: read-only + pageId: + type: string + docs: The page unique identifier + access: read-only + localeId: + type: optional + docs: The locale unique identifier + access: read-only + itemId: + type: optional + docs: The item unique identifier + access: read-only + breakpoint: + type: string + docs: The breakpoint the comment was left on + access: read-only + url: + type: string + docs: The URL of the page the comment was left on + access: read-only + content: + type: string + docs: The content of the comment reply + isResolved: + type: boolean + docs: Boolean determining if the comment thread is resolved + default: false + author: CommentThreadAuthor + mentionedUsers: + docs: >- + List of mentioned users. This is an empty array until email + notifications are sent, which can take up to 5 minutes after the + comment is created. + type: list + createdOn: + type: string + docs: The date the item was created + access: read-only + lastUpdated: + type: string + docs: The date the item was last updated + access: read-only + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentThreadListPagination: + properties: + limit: + type: double + docs: The limit specified in the request (default 100) + default: 100 + offset: + type: double + docs: The offset specified for pagination + default: 0 + total: + type: double + docs: Total number of comment threads + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentThreadList: + docs: > + A list of comment threads on the site. Contains the content of the first + reply. + properties: + comments: list + pagination: CommentThreadListPagination + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentReplyAuthor: + properties: + id: + type: string + docs: The unique identifier of the author + email: + type: string + docs: Email of the author + name: + type: string + docs: Name of the author + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentReplyMentionedUsersItem: + properties: + id: + type: string + docs: The unique identifier of the mentioned user + email: + type: string + docs: Email of the user + name: + type: string + docs: Name of the User + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentReply: + docs: > + A comment thread represents a conversation between users on a specific + page. Each comment thread has a unique identifier and can contain multiple + comments. + properties: + id: + type: string + docs: Unique identifier for the comment thread + access: read-only + commentId: + type: string + docs: The comment reply unique identifier + access: read-only + siteId: + type: string + docs: The site unique identifier + access: read-only + pageId: + type: string + docs: The page unique identifier + access: read-only + localeId: + type: optional + docs: The locale unique identifier + access: read-only + breakpoint: + type: string + docs: The breakpoint the comment was left on + access: read-only + content: + type: string + docs: The content of the comment reply + isResolved: + type: boolean + docs: Boolean determining if the comment thread is resolved + default: false + author: CommentReplyAuthor + mentionedUsers: + type: optional> + docs: >- + List of mentioned users is an empty array until email notifications + are sent. + lastUpdated: + type: string + docs: The date the item was last updated + access: read-only + createdOn: + type: string + docs: The date the item was created + access: read-only + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentReplyListPagination: + properties: + limit: + type: double + docs: The limit specified in the request (default 100) + default: 100 + offset: + type: double + docs: The offset specified for pagination + default: 0 + total: + type: double + docs: Total number of comment replies + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentReplyList: + docs: | + A list of comment replies. + properties: + comments: list + pagination: CommentReplyListPagination + source: + openapi: ../../../openapi/referenced-specs/v2.yml PageSeo: docs: SEO-related fields for the Page properties: @@ -1377,6 +1851,92 @@ types: type: list source: openapi: ../../../openapi/referenced-specs/v2.yml + TextInputNode: + docs: > + Represents text input and textarea elements within the DOM. It contains + the placeholder text in the input. Additional attributes can be associated + with the text for styling or other purposes. + properties: + id: + type: string + docs: Node UUID + access: read-only + placeholder: + type: string + docs: The placeholder text of the input node + attributes: + type: optional> + docs: The custom attributes of the node + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SelectNodeChoicesItem: + properties: + value: + type: string + docs: The value of the choice when selected. + text: + type: string + docs: The text to display for the choice. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + SelectNode: + docs: > + Represents select elements within the DOM. It contains the list of choices + in the select. Additional attributes can be associated with the text for + styling or other purposes. + properties: + id: + type: string + docs: Node UUID + access: read-only + choices: + docs: The list of choices in this select node. + type: list + attributes: + type: optional> + docs: The custom attributes of the node + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SubmitButtonNode: + docs: > + Represents submit button elements within the DOM. It contains the text and + waiting text of the button. Additional attributes can be associated with + the text for styling or other purposes. + properties: + id: + type: string + docs: Node UUID + access: read-only + value: + type: string + docs: The text content of the submit button. + waitingText: + type: string + docs: The text to show while the form is submitting. + attributes: + type: optional> + docs: The custom attributes of the node + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SearchButtonNode: + docs: > + Represents search button elements within the DOM. It contains the text of + the button. Additional attributes can be associated with the text for + styling or other purposes. + properties: + id: + type: string + docs: Node UUID + access: read-only + value: + type: string + docs: The text content of the search button. + attributes: + type: optional> + docs: The custom attributes of the node + source: + openapi: ../../../openapi/referenced-specs/v2.yml Node: discriminant: type base-properties: {} @@ -1388,6 +1948,10 @@ types: text: TextNode image: ImageNode component-instance: ComponentNode + text-input: TextInputNode + select: SelectNode + submit-button: SubmitButtonNode + search-button: SearchButtonNode source: openapi: ../../../openapi/referenced-specs/v2.yml Dom: @@ -1457,6 +2021,64 @@ types: type: list source: openapi: ../../../openapi/referenced-specs/v2.yml + SelectNodeWriteChoicesItem: + properties: + value: + type: string + docs: The value of the choice when selected. + text: + type: string + docs: The text to display for the choice. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + SelectNodeWrite: + docs: Update choices on a select node + properties: + nodeId: + type: string + docs: Node UUID + choices: + docs: The list of choices to set on the select node. + type: list + source: + openapi: ../../../openapi/referenced-specs/v2.yml + TextInputNodeWrite: + docs: Update placeholder text on a text input node + properties: + nodeId: + type: string + docs: Node UUID + placeholder: + type: string + docs: The placeholder text of the input node + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SubmitButtonNodeWrite: + docs: Update a submit button node + properties: + nodeId: + type: string + docs: Node UUID + value: + type: optional + docs: The text content of the submit button. + waitingText: + type: optional + docs: The text to show while the form is submitting. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + SearchButtonNodeWrite: + docs: Update a search button node + properties: + nodeId: + type: string + docs: Node UUID + value: + type: string + docs: The text content of the search button. + source: + openapi: ../../../openapi/referenced-specs/v2.yml Component: docs: The Component object properties: @@ -1497,8 +2119,8 @@ types: The Component DOM schema represents the content structure of a component. Similar to Page DOM, it captures various content nodes and their associated attributes, but specifically for a component's structure. Each - node has a unique identifier and can contain text, images, or nested - component instances. + node has a unique identifier and can contain text, images, select or text + inputs, submit buttons, or nested component instances. properties: componentId: type: optional @@ -1892,6 +2514,7 @@ types: - collection_item_changed - collection_item_deleted - collection_item_unpublished + - comment_created docs: > The type of event that triggered the request. See the the documentation for details on [supported events](/data/reference/all-events). @@ -2432,8 +3055,10 @@ types: SkuValueList: type: map docs: > - A dictionary that maps a SKU property to a SKU value. The key of the - dictionary is the SKU property ID, and the value is the SKU value ID. + A mapping between SKU properties and their values, represented as + key-value pairs. Each key represents a SKU Property ID (e.g. "color") and + maps to its corresponding SKU Value ID (e.g. "blue"). This structure + defines the specific variant combination for a SKU. SkuFieldDataPrice: docs: price of SKU properties: @@ -2443,6 +3068,9 @@ types: unit: type: optional docs: Currency of Item + currency: + type: optional + docs: Currency of Item (alternative representation) source: openapi: ../../../openapi/referenced-specs/v2.yml inline: true @@ -2561,6 +3189,15 @@ types: quantity: type: optional docs: Quantity of SKU that will be tracked as items are ordered. + main-image: + type: optional + docs: The URL for the main image of the SKU + sku: + type: optional + docs: A unique identifier for the SKU + sku-properties: + type: optional> + docs: The properties of the SKU source: openapi: ../../../openapi/referenced-specs/v2.yml Sku: diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml index aee9acdf..b881d163 100644 --- a/.mock/definition/api.yml +++ b/.mock/definition/api.yml @@ -3,8 +3,15 @@ error-discrimination: strategy: status-code display-name: Data API environments: - Default: https://api.webflow.com/v2 -default-environment: Default + Data API: + urls: + Base: https://api.webflow.com/v2 + Data API: https://api.webflow.com/v2 + Content Delivery API: https://api-cdn.webflow.com/v2 + Production: https://api.webflow.com/v2 + CDN: https://api-cdn.webflow.com/v2 +default-environment: Data API +default-url: Base auth-schemes: BearerToken: scheme: bearer diff --git a/.mock/definition/collections/items.yml b/.mock/definition/collections/items.yml index 2fae3a3b..a80fd3c8 100644 --- a/.mock/definition/collections/items.yml +++ b/.mock/definition/collections/items.yml @@ -340,7 +340,7 @@ service: name: ItemsDeleteItemsRequest body: properties: - items: optional> + items: list content-type: application/json errors: - root.BadRequestError @@ -352,7 +352,9 @@ service: examples: - path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 - request: {} + request: + items: + - id: 580e64008c9a982ac9b8b754 update-items: path: /collections/{collection_id}/items method: PATCH @@ -568,6 +570,11 @@ service: docs: | List all published items in a collection. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -610,6 +617,7 @@ service: docs: Request was successful type: root.CollectionItemList status-code: 200 + url: Data API errors: - root.BadRequestError - root.UnauthorizedError @@ -786,7 +794,7 @@ service: name: ItemsDeleteItemsLiveRequest body: properties: - items: optional> + items: list content-type: application/json errors: - root.BadRequestError @@ -797,7 +805,9 @@ service: examples: - path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 - request: {} + request: + items: + - id: 580e64008c9a982ac9b8b754 update-items-live: path: /collections/{collection_id}/items/live method: PATCH @@ -1323,6 +1333,7 @@ service: docs: Request was successful type: root.CollectionItem status-code: 200 + url: Production errors: - root.BadRequestError - root.UnauthorizedError @@ -1452,6 +1463,11 @@ service: docs: | Get details of a selected Collection live Item. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -1477,6 +1493,7 @@ service: docs: Request was successful type: root.CollectionItem status-code: 200 + url: Data API errors: - root.BadRequestError - root.UnauthorizedError diff --git a/.mock/definition/components.yml b/.mock/definition/components.yml index 15a09125..a3df2ac8 100644 --- a/.mock/definition/components.yml +++ b/.mock/definition/components.yml @@ -74,7 +74,8 @@ service: auth: true docs: > Get static content from a component definition. This includes text - nodes, image nodes and nested component instances. + nodes, image nodes, select nodes, text input nodes, submit button nodes, + and nested component instances. To retrieve dynamic content set by component properties, use the [get component @@ -125,8 +126,7 @@ service: - root.TooManyRequestsError - root.InternalServerError examples: - - name: ComponentDOM - path-parameters: + - path-parameters: site_id: 580e63e98c9a982ac9b8b741 component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b query-parameters: @@ -151,43 +151,32 @@ service: key: value type: image - id: id - componentId: componentId - propertyOverrides: - - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 - type: component-instance - pagination: - limit: 4 - offset: 0 - total: 4 - - name: LocalizedComponentDOM - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - response: - body: - componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 - nodes: + placeholder: placeholder + attributes: + key: value + type: text-input - id: id - image: {} + choices: + - value: value + text: text attributes: key: value - type: image + type: select - id: id - text: {} + value: value + waitingText: waitingText attributes: key: value - type: text + type: submit-button - id: id componentId: componentId propertyOverrides: - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 type: component-instance pagination: - limit: 100 + limit: 7 offset: 0 - total: 3 + total: 7 update-content: path: /sites/{site_id}/components/{component_id}/dom method: POST @@ -268,6 +257,17 @@ service: text: >-

Don't Panic!

Always know where your towel is.

+ - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad635 + choices: + - value: choice-1 + text: First choice + - value: choice-2 + text: Second choice + - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad642 + placeholder: Enter something here... + - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad671 + value: Submit + waitingText: Submitting... - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad629 propertyOverrides: - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 @@ -437,6 +437,10 @@ types: union: - root.TextNodeWrite - root.ComponentInstanceNodePropertyOverridesWrite + - root.SelectNodeWrite + - root.TextInputNodeWrite + - root.SubmitButtonNodeWrite + - root.SearchButtonNodeWrite source: openapi: ../../../openapi/referenced-specs/v2.yml inline: true diff --git a/.mock/definition/pages.yml b/.mock/definition/pages.yml index fbfcd682..c0bd9f7a 100644 --- a/.mock/definition/pages.yml +++ b/.mock/definition/pages.yml @@ -276,7 +276,8 @@ service: auth: true docs: > Get content from a static page. This includes text nodes, image nodes, - and component instances with [property + select nodes, text input nodes, submit button nodes, and component + instances with [property overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). @@ -327,8 +328,7 @@ service: - root.TooManyRequestsError - root.InternalServerError examples: - - name: PageDOM - path-parameters: + - path-parameters: page_id: 63c720f9347c2139b248e552 query-parameters: localeId: 65427cf400e02b306eaa04a0 @@ -351,6 +351,23 @@ service: attributes: key: value type: image + - id: id + choices: + - value: value + text: text + attributes: + key: value + type: select + - id: id + placeholder: placeholder + attributes: + key: value + type: text-input + - id: id + text: {} + attributes: + key: value + type: text - id: id componentId: componentId propertyOverrides: @@ -433,6 +450,17 @@ service: text: >-

Don't Panic!

Always know where your towel is.

+ - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad635 + choices: + - value: choice-1 + text: First choice + - value: choice-2 + text: Second choice + - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad642 + placeholder: Enter something here... + - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad671 + value: Submit + waitingText: Submitting... - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad629 propertyOverrides: - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 @@ -453,6 +481,10 @@ types: union: - root.TextNodeWrite - root.ComponentInstanceNodePropertyOverridesWrite + - root.SelectNodeWrite + - root.TextInputNodeWrite + - root.SubmitButtonNodeWrite + - root.SearchButtonNodeWrite source: openapi: ../../../openapi/referenced-specs/v2.yml inline: true diff --git a/.mock/definition/products.yml b/.mock/definition/products.yml index 966236a1..1f251307 100644 --- a/.mock/definition/products.yml +++ b/.mock/definition/products.yml @@ -84,13 +84,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue pagination: limit: 100 offset: 0 @@ -100,20 +111,14 @@ service: method: POST auth: true docs: > - Create a new product and SKU. + Create a new ecommerce product and defaultSKU. A product, at minimum, + must have a single SKU. - When you create a product, you will always create a SKU, since a Product - Item must have, at minimum, a single SKU. - - - To create a Product with multiple SKUs - for example a T-shirt in sizes - small, medium and large: - - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). - - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) + To create a product with multiple SKUs: + - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. + - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) + - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the @@ -133,8 +138,8 @@ service: body: properties: publishStatus: optional - product: optional - sku: optional + product: ProductSkuCreateProduct + sku: ProductSkuCreateSku content-type: application/json response: docs: Request was successful @@ -151,7 +156,50 @@ service: examples: - path-parameters: site_id: 580e63e98c9a982ac9b8b741 - request: {} + request: + publishStatus: staging + product: + fieldData: + name: Colorful T-shirt + slug: colorful-t-shirt + description: >- + Our best-selling t-shirt available in multiple colors and + sizes + sku-properties: + - id: color + name: Color + enum: + - id: red + name: Red + slug: red + - id: yellow + name: Yellow + slug: yellow + - id: blue + name: Blue + slug: blue + - id: size + name: Size + enum: + - id: small + name: Small + slug: small + - id: medium + name: Medium + slug: medium + - id: large + name: Large + slug: large + sku: + fieldData: + name: Colorful T-shirt - Red Small + slug: colorful-t-shirt-red-small + price: + value: 2499 + unit: USD + currency: USD + main-image: >- + https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987 response: body: product: @@ -187,13 +235,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue get: path: /sites/{site_id}/products/{product_id} method: GET @@ -264,13 +323,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue update: path: /sites/{site_id}/products/{product_id} method: PATCH @@ -370,7 +440,7 @@ service: product_id: type: string docs: Unique identifier for a Product - display-name: Create SKU + display-name: Create SKUs request: name: ProductsCreateSkuRequest body: @@ -398,11 +468,15 @@ service: product_id: 580e63fc8c9a982ac9b8b745 request: skus: - - {} + - fieldData: + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default + price: + value: 2499 + unit: USD + currency: USD response: body: - required: - key: value skus: - id: 580e63fc8c9a982ac9b8b745 cmsLocaleId: 653ad57de882f528b32e810e @@ -411,13 +485,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue update-sku: path: /sites/{site_id}/products/{product_id}/skus/{sku_id} method: PATCH @@ -470,7 +555,14 @@ service: product_id: 580e63fc8c9a982ac9b8b745 sku_id: 5e8518516e147040726cc415 request: - sku: {} + sku: + fieldData: + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default + price: + value: 2499 + unit: USD + currency: USD response: body: id: 580e63fc8c9a982ac9b8b745 @@ -480,12 +572,14 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD compare-at-price: value: 100 unit: USD @@ -498,12 +592,32 @@ service: - {} track-inventory: true quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue source: openapi: ../../../openapi/referenced-specs/v2.yml types: + ProductSkuCreateProduct: + properties: + fieldData: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + ProductSkuCreateSku: + properties: + fieldData: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true ProductsCreateSkuResponse: properties: - required: optional - skus: optional> + skus: list source: openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml index ef1064de..09721146 100644 --- a/.mock/definition/sites.yml +++ b/.mock/definition/sites.yml @@ -60,7 +60,7 @@ service: id: 670ecf86817e3cc7a510eb6a workspaceId: 625860a7a6c16d624927122f createdOn: '2024-10-15T20:24:38Z' - displayName: The Hitchiker‘s Guide + displayName: The Hitchiker's Guide shortName: hitchikers-guide lastUpdated: '2024-10-15T20:24:38Z' parentFolderId: 670ece123598db72d9648be1 diff --git a/.mock/definition/sites/comments.yml b/.mock/definition/sites/comments.yml new file mode 100644 index 00000000..3e3b4960 --- /dev/null +++ b/.mock/definition/sites/comments.yml @@ -0,0 +1,325 @@ +types: + CommentsListCommentThreadsRequestSortBy: + enum: + - createdOn + - lastUpdated + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsListCommentThreadsRequestSortOrder: + enum: + - asc + - desc + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsGetCommentThreadRequestSortBy: + enum: + - createdOn + - lastUpdated + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsGetCommentThreadRequestSortOrder: + enum: + - asc + - desc + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsListCommentRepliesRequestSortBy: + enum: + - createdOn + - lastUpdated + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsListCommentRepliesRequestSortOrder: + enum: + - asc + - desc + source: + openapi: ../../../openapi/referenced-specs/v2.yml +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + list-comment-threads: + path: /sites/{site_id}/comments + method: GET + auth: true + docs: | + List all comment threads for a site. + + + There may be a delay of up to 5 minutes before new comments appear in the system. + + + Required scope | `comments:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: List Comment Threads + request: + name: CommentsListCommentThreadsRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + sortBy: + type: optional + docs: >- + Sort results by the provided value. Only allowed when sortOrder is + provided. + sortOrder: + type: optional + docs: Sorts the results by asc or desc + response: + docs: Request was successful + type: root.CommentThreadList + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + comments: + - id: 679d2ddb5196117ad04d1ffa + siteId: 679826b3b20b045e176bc4b5 + pageId: 679826b3b20b045e176bc4bc + localeId: 67993753d910db250db64b3e + itemId: 580e64008c9a982ac9b8b754 + breakpoint: main + url: >- + https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc + content: 'Let''s go to the pub! [[6287ec36a841b25637c663df]] ' + isResolved: false + author: + userId: 6287ec36a841b25637c663df + email: ford.prefect@heartofgold.spaceship + name: Ford Prefect + mentionedUsers: + - userId: 6287ec36a841b25637c663df + email: arthur.dent@heartofgold.spaceship + name: Arthur Dent + createdOn: '2025-01-31T20:08:59.759Z' + lastUpdated: '2025-01-31T20:08:59.759Z' + - id: 679d2ddb5196117ad04d1ffc + siteId: 679826b3b20b045e176bc4b5 + pageId: 679826b3b20b045e176bc4bc + localeId: 67993753d910db250db64b3e + itemId: 580e64008c9a982ac9b8b754 + breakpoint: main + url: >- + https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc + content: >- + You have five minutes left to drink it + [[6287ec36a841b25637c663df]] + isResolved: false + author: + userId: 6287ec36a841b25637c663df + email: ford.prefect@heartofgold.spaceship + name: Ford Prefect + mentionedUsers: + - userId: 6287ec36a841b25637c663df + email: arthur.dent@heartofgold.spaceship + name: Arthur Dent + createdOn: '2025-01-31T20:08:59.759Z' + lastUpdated: '2025-01-31T20:08:59.759Z' + pagination: + limit: 2 + offset: 0 + total: 2 + get-comment-thread: + path: /sites/{site_id}/comments/{comment_thread_id} + method: GET + auth: true + docs: | + Get details of a specific comment thread. + + + There may be a delay of up to 5 minutes before new comments appear in the system. + + + Required scope | `comments:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + comment_thread_id: + type: string + docs: Unique identifier for a Comment Thread + display-name: Get Comment Thread + request: + name: CommentsGetCommentThreadRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + sortBy: + type: optional + docs: >- + Sort results by the provided value. Only allowed when sortOrder is + provided. + sortOrder: + type: optional + docs: Sorts the results by asc or desc + response: + docs: Request was successful + type: root.CommentThread + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + comment_thread_id: 580e63e98c9a982ac9b8b741 + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + id: 580e64008c9a982ac9b8b754 + siteId: 580e64008c9a982ac9b8b754 + pageId: 580e64008c9a982ac9b8b754 + localeId: 580e64008c9a982ac9b8b754 + itemId: 580e64008c9a982ac9b8b754 + breakpoint: main + url: >- + https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc + content: This is a comment reply + isResolved: true + author: + userId: userId + email: email + name: name + mentionedUsers: + - userId: 6287ec36a841b25637c663df + email: arthur.dent@heartofgold.spaceship + name: Arthur Dent + createdOn: '2023-03-17T18:47:35.560Z' + lastUpdated: '2023-03-17T18:47:35.560Z' + list-comment-replies: + path: /sites/{site_id}/comments/{comment_thread_id}/replies + method: GET + auth: true + docs: | + List all replies to a specific comment thread. + + + There may be a delay of up to 5 minutes before new comments appear in the system. + + + Required scope | `comments:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + comment_thread_id: + type: string + docs: Unique identifier for a Comment Thread + display-name: List Comment Replies + request: + name: CommentsListCommentRepliesRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + sortBy: + type: optional + docs: >- + Sort results by the provided value. Only allowed when sortOrder is + provided. + sortOrder: + type: optional + docs: Sorts the results by asc or desc + response: + docs: Request was successful + type: root.CommentReplyList + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + comment_thread_id: 580e63e98c9a982ac9b8b741 + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + comments: + - id: 679d2ddb5196117ad04d1ffa + commentId: 679d2ddb5196117ad04d1ff8 + siteId: 679826b3b20b045e176bc4b5 + pageId: 679826b3b20b045e176bc4bc + localeId: 67993753d910db250db64b3e + breakpoint: main + content: >- + This comment mentions another user + [[6287ec36a841b25637c663df]] + isResolved: false + author: + id: id + email: email + name: name + mentionedUsers: + - id: id + email: arthur.dent@example.com + name: Arthur Dent + lastUpdated: '2025-01-31T20:08:59.759Z' + createdOn: '2025-01-31T20:08:59.759Z' + pagination: + limit: 2 + offset: 0 + total: 1 + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/robotsTxt.yml b/.mock/definition/sites/robotsTxt.yml index 032bce5d..1259a149 100644 --- a/.mock/definition/sites/robotsTxt.yml +++ b/.mock/definition/sites/robotsTxt.yml @@ -8,9 +8,14 @@ service: path: /sites/{site_id}/robots_txt method: GET auth: true - docs: | + docs: > Retrieve the robots.txt configuration for various user agents. + + This endpoint requires an Enterprise + workspace. + + Required scope: `site_config:read` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -46,9 +51,14 @@ service: path: /sites/{site_id}/robots_txt method: PUT auth: true - docs: | + docs: > Replace the `robots.txt` configuration for various user agents. + + This endpoint requires an Enterprise + workspace. + + Required scope | `site_config:write` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -107,6 +117,10 @@ service: access unrestricted unless other directives apply. + This endpoint requires an Enterprise + workspace. + + Required scope: `site_config:write` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -152,9 +166,14 @@ service: path: /sites/{site_id}/robots_txt method: PATCH auth: true - docs: | + docs: > Update the `robots.txt` configuration for various user agents. + + This endpoint requires an Enterprise + workspace. + + Required scope | `site_config:write` source: openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/wellKnown.yml b/.mock/definition/sites/wellKnown.yml new file mode 100644 index 00000000..0ba91e13 --- /dev/null +++ b/.mock/definition/sites/wellKnown.yml @@ -0,0 +1,114 @@ +types: + WellKnownFileContentType: + enum: + - value: application/json + name: ApplicationJson + - value: text/plain + name: TextPlain + docs: The content type of the file. Defaults to application/json + default: application/json + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + put: + path: /sites/{site_id}/well_known + method: PUT + auth: true + docs: > + Upload a supported well-known file to a site. + + + The current restrictions on well-known files are as follows: + - Each file must be smaller than 100kb + - Less than 30 total files + - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + + + `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. + + + This endpoint requires an Enterprise + workspace. + + + Required scope: `site_config:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Set a well-known file + request: + name: WellKnownFile + body: + properties: + fileName: + type: string + docs: The name of the file + fileData: + type: string + docs: The contents of the file + contentType: + type: optional + docs: The content type of the file. Defaults to application/json + default: application/json + content-type: application/json + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: + fileName: fileName + fileData: fileData + delete: + path: /sites/{site_id}/well_known + method: DELETE + auth: true + docs: > + Delete existing well-known files from a site. + + + This endpoint requires an Enterprise + workspace. + + + Required scope: `site_config:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Delete a well-known file + request: + name: WellKnownDeleteRequest + body: + properties: + fileNames: + type: optional> + docs: A list of file names to delete + content-type: application/json + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: {} + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/workspaces/auditLogs.yml b/.mock/definition/workspaces/auditLogs.yml new file mode 100644 index 00000000..73ae4df3 --- /dev/null +++ b/.mock/definition/workspaces/auditLogs.yml @@ -0,0 +1,119 @@ +types: + AuditLogsGetWorkspaceAuditLogsRequestSortOrder: + enum: + - asc + - desc + source: + openapi: ../../../openapi/referenced-specs/v2.yml + AuditLogsGetWorkspaceAuditLogsRequestEventType: + enum: + - user_access + - custom_role + - workspace_membership + - site_membership + - workspace_invitation + source: + openapi: ../../../openapi/referenced-specs/v2.yml +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + get-workspace-audit_logs: + path: /workspaces/{workspace_id_or_slug}/audit_logs + method: GET + auth: true + docs: > + Get audit logs for a workspace. + + + This endpoint + requires an Enterprise workspace and a workspace token with the + `workspace_activity:read` scope. Create a workspace token from your + workspace dashboard integrations page to use this endpoint. + + + Required scope | `workspace_activity:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + workspace_id_or_slug: + type: string + docs: Unique identifier or slug for a Workspace + display-name: Get Workspace Audit Logs + request: + name: AuditLogsGetWorkspaceAuditLogsRequest + query-parameters: + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + sortOrder: + type: optional + docs: Sorts the results by asc or desc + eventType: + type: optional + docs: The event type to filter by + from: + type: optional + docs: The start date to filter by + to: + type: optional + docs: The end date to filter by + response: + docs: A list of workspace audit logs + type: root.WorkspaceAuditLogResponse + status-code: 200 + errors: + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + workspace_id_or_slug: hitchhikers-workspace + query-parameters: + from: '2024-04-22T16:00:31Z' + to: '2024-04-22T16:00:31Z' + response: + body: + items: + - eventSubType: login + eventType: user_access + timestamp: '2025-04-29T20:30:06Z' + actor: + id: 6661ccb359b561c69f29d554 + email: someone@email.com + workspace: + id: 6621ccb459b561c69f29d57c + slug: hitchhikers-workspace + - eventSubType: user_added + eventType: workspace_membership + timestamp: '2025-04-30T20:30:06Z' + actor: + id: 60492e55bbddce079561cd7a + email: someone@webflow.com + workspace: + id: 6621ccb459b561c69f29d57c + slug: hitchhikers-workspace + - eventSubType: user_added + eventType: site_membership + timestamp: '2025-04-30T00:33:31Z' + actor: + id: 671fe00d185fc8c1ad409d37 + email: someone@webflow.com + workspace: + id: 6621ccb459b561c69f29d57c + slug: hitchhikers-workspace + pagination: + limit: 10 + offset: 0 + total: 3 + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/fern.config.json b/.mock/fern.config.json index cc6319dc..7838ceaf 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "webflow", - "version" : "0.56.16" + "version" : "0.56.34" } \ No newline at end of file diff --git a/package.json b/package.json index 63f18ad4..6307c67f 100644 --- a/package.json +++ b/package.json @@ -12,35 +12,37 @@ "test": "jest" }, "dependencies": { - "crypto-browserify": "^3.12.1", + "url-join": "4.0.1", "form-data": "^4.0.0", "formdata-node": "^6.0.3", - "js-base64": "3.7.2", "node-fetch": "2.7.0", "qs": "6.11.2", "readable-stream": "^4.5.2", - "url-join": "4.0.1" + "js-base64": "3.7.2", + "crypto-browserify": "^3.12.0" }, "devDependencies": { - "@types/jest": "29.5.5", - "@types/node": "17.0.33", - "@types/node-fetch": "2.6.9", + "@types/url-join": "4.0.1", "@types/qs": "6.9.8", + "@types/node-fetch": "2.6.9", "@types/readable-stream": "^4.0.15", - "@types/url-join": "4.0.1", + "webpack": "^5.94.0", + "ts-loader": "^9.3.1", "jest": "29.7.0", + "@types/jest": "29.5.5", + "ts-jest": "29.1.1", "jest-environment-jsdom": "29.7.0", - "jest-fetch-mock": "^3.0.3", + "@types/node": "17.0.33", "prettier": "2.7.1", - "ts-jest": "29.1.1", - "ts-loader": "^9.3.1", - "typescript": "4.6.4", - "webpack": "^5.94.0" + "typescript": "4.6.4" }, "browser": { "fs": false, "os": false, "path": false, "crypto": false + }, + "resolutions": { + "@types/babel__traverse": "7.20.6" } } diff --git a/reference.md b/reference.md index 9bb92edc..9c4f63ed 100644 --- a/reference.md +++ b/reference.md @@ -1164,7 +1164,7 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-Get content from a static page. This includes text nodes, image nodes, and component instances with [property overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). +Get content from a static page. This includes text nodes, image nodes, select nodes, text input nodes, submit button nodes, and component instances with [property overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). To retrieve the static content of a component instance, use the [Get Component Content](/data/reference/pages-and-components/components/get-content) endpoint. @@ -1281,6 +1281,28 @@ await client.pages.updateStaticContent("63c720f9347c2139b248e552", { nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", text: "

Don't Panic!

Always know where your towel is.

", }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad635", + choices: [ + { + value: "choice-1", + text: "First choice", + }, + { + value: "choice-2", + text: "Second choice", + }, + ], + }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad642", + placeholder: "Enter something here...", + }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad671", + value: "Submit", + waitingText: "Submitting...", + }, { nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", propertyOverrides: [ @@ -1425,7 +1447,7 @@ await client.components.list("580e63e98c9a982ac9b8b741");
-Get static content from a component definition. This includes text nodes, image nodes and nested component instances. +Get static content from a component definition. This includes text nodes, image nodes, select nodes, text input nodes, submit button nodes, and nested component instances. To retrieve dynamic content set by component properties, use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint. If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. @@ -1549,6 +1571,28 @@ await client.components.updateContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72 nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", text: "

Don't Panic!

Always know where your towel is.

", }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad635", + choices: [ + { + value: "choice-1", + text: "First choice", + }, + { + value: "choice-2", + text: "Second choice", + }, + ], + }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad642", + placeholder: "Enter something here...", + }, + { + nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad671", + value: "Submit", + waitingText: "Submitting...", + }, { nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", propertyOverrides: [ @@ -3920,17 +3964,13 @@ await client.products.list("580e63e98c9a982ac9b8b741");
-Create a new product and SKU. +Create a new ecommerce product and defaultSKU. A product, at minimum, must have a single SKU. -When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. +To create a product with multiple SKUs: -To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: - -- Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). -- A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. -- Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. -- In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. -- After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) +- First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. +- Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) +- After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. @@ -3950,7 +3990,73 @@ Required scope | `ecommerce:write`
```typescript -await client.products.create("580e63e98c9a982ac9b8b741"); +await client.products.create("580e63e98c9a982ac9b8b741", { + publishStatus: "staging", + product: { + fieldData: { + name: "Colorful T-shirt", + slug: "colorful-t-shirt", + description: "Our best-selling t-shirt available in multiple colors and sizes", + skuProperties: [ + { + id: "color", + name: "Color", + enum: [ + { + id: "red", + name: "Red", + slug: "red", + }, + { + id: "yellow", + name: "Yellow", + slug: "yellow", + }, + { + id: "blue", + name: "Blue", + slug: "blue", + }, + ], + }, + { + id: "size", + name: "Size", + enum: [ + { + id: "small", + name: "Small", + slug: "small", + }, + { + id: "medium", + name: "Medium", + slug: "medium", + }, + { + id: "large", + name: "Large", + slug: "large", + }, + ], + }, + ], + }, + }, + sku: { + fieldData: { + name: "Colorful T-shirt - Red Small", + slug: "colorful-t-shirt-red-small", + price: { + value: 2499, + unit: "USD", + currency: "USD", + }, + mainImage: + "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987", + }, + }, +}); ```
@@ -4183,7 +4289,19 @@ Required scope | `ecommerce:write` ```typescript await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { - skus: [{}], + skus: [ + { + fieldData: { + name: "Colorful T-shirt - Default", + slug: "colorful-t-shirt-default", + price: { + value: 2499, + unit: "USD", + currency: "USD", + }, + }, + }, + ], }); ``` @@ -4268,7 +4386,17 @@ Required scope | `ecommerce:write` ```typescript await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { - sku: {}, + sku: { + fieldData: { + name: "Colorful T-shirt - Default", + slug: "colorful-t-shirt-default", + price: { + value: 2499, + unit: "USD", + currency: "USD", + }, + }, + }, }); ``` @@ -5064,6 +5192,7 @@ Required scope | `cms:write` ```typescript await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + id: "562ac0395358780a1f5e6fbc", isEditable: true, isRequired: false, type: "RichText", @@ -5459,7 +5588,13 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745"); +await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", { + items: [ + { + id: "580e64008c9a982ac9b8b754", + }, + ], +}); ```
@@ -5628,6 +5763,11 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", { List all published items in a collection. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read`
@@ -5720,6 +5860,9 @@ Required scope | `CMS:write` ```typescript await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { + lastPublished: "2023-03-17T18:47:35.560Z", + lastUpdated: "2023-03-17T18:47:35.560Z", + createdOn: "2023-03-17T18:47:35.560Z", isArchived: false, isDraft: false, fieldData: { @@ -5803,7 +5946,13 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745"); +await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", { + items: [ + { + id: "580e64008c9a982ac9b8b754", + }, + ], +}); ```
@@ -6306,6 +6455,11 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008 Get details of a selected Collection live Item. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read`
@@ -7247,6 +7401,8 @@ await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741"); Retrieve the robots.txt configuration for various user agents. +This endpoint requires an Enterprise workspace. + Required scope: `site_config:read` @@ -7312,6 +7468,8 @@ await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741"); Replace the `robots.txt` configuration for various user agents. +This endpoint requires an Enterprise workspace. + Required scope | `site_config:write` @@ -7396,6 +7554,8 @@ Remove specific rules for a user-agent in your `robots.txt` file. To delete all **Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. +This endpoint requires an Enterprise workspace. + Required scope: `site_config:write` @@ -7477,6 +7637,8 @@ await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", { Update the `robots.txt` configuration for various user agents. +This endpoint requires an Enterprise workspace. + Required scope | `site_config:write` @@ -7545,6 +7707,171 @@ await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", {
+## Sites WellKnown + +
client.sites.wellKnown.put(siteId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Upload a supported well-known file to a site. + +The current restrictions on well-known files are as follows: + +- Each file must be smaller than 100kb +- Less than 30 total files +- Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + + + `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. + + +This endpoint requires an Enterprise workspace. + +Required scope: `site_config:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", { + fileName: "fileName", + fileData: "fileData", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.sites.WellKnownFile` + +
+
+ +
+
+ +**requestOptions:** `WellKnown.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.wellKnown.delete(siteId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete existing well-known files from a site. + +This endpoint requires an Enterprise workspace. + +Required scope: `site_config:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.sites.WellKnownDeleteRequest` + +
+
+ +
+
+ +**requestOptions:** `WellKnown.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Sites ActivityLogs
client.sites.activityLogs.list(siteId, { ...params }) -> Webflow.SiteActivityLogResponse @@ -7622,6 +7949,261 @@ await client.sites.activityLogs.list("580e63e98c9a982ac9b8b741");
+## Sites Comments + +
client.sites.comments.listCommentThreads(siteId, { ...params }) -> Webflow.CommentThreadList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all comment threads for a site. + + + There may be a delay of up to 5 minutes before new comments appear in the system. + + +Required scope | `comments:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.comments.listCommentThreads("580e63e98c9a982ac9b8b741", { + localeId: "65427cf400e02b306eaa04a0", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.sites.CommentsListCommentThreadsRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.comments.getCommentThread(siteId, commentThreadId, { ...params }) -> Webflow.CommentThread +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details of a specific comment thread. + + + There may be a delay of up to 5 minutes before new comments appear in the system. + + +Required scope | `comments:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.comments.getCommentThread("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + localeId: "65427cf400e02b306eaa04a0", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**commentThreadId:** `string` — Unique identifier for a Comment Thread + +
+
+ +
+
+ +**request:** `Webflow.sites.CommentsGetCommentThreadRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.comments.listCommentReplies(siteId, commentThreadId, { ...params }) -> Webflow.CommentReplyList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all replies to a specific comment thread. + + + There may be a delay of up to 5 minutes before new comments appear in the system. + + +Required scope | `comments:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.comments.listCommentReplies("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + localeId: "65427cf400e02b306eaa04a0", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**commentThreadId:** `string` — Unique identifier for a Comment Thread + +
+
+ +
+
+ +**request:** `Webflow.sites.CommentsListCommentRepliesRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Sites Scripts
client.sites.scripts.getCustomCode(siteId) -> Webflow.ScriptApplyList @@ -7929,3 +8511,83 @@ await client.sites.scripts.listCustomCodeBlocks("580e63e98c9a982ac9b8b741");
+ +## Workspaces AuditLogs + +
client.workspaces.auditLogs.getWorkspaceAuditLogs(workspaceIdOrSlug, { ...params }) -> Webflow.WorkspaceAuditLogResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get audit logs for a workspace. + +This endpoint requires an Enterprise workspace and a workspace token with the `workspace_activity:read` scope. Create a workspace token from your workspace dashboard integrations page to use this endpoint. + +Required scope | `workspace_activity:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.workspaces.auditLogs.getWorkspaceAuditLogs("hitchhikers-workspace", { + from: "2024-04-22T16:00:31Z", + to: "2024-04-22T16:00:31Z", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**workspaceIdOrSlug:** `string` — Unique identifier or slug for a Workspace + +
+
+ +
+
+ +**request:** `Webflow.workspaces.AuditLogsGetWorkspaceAuditLogsRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditLogs.RequestOptions` + +
+
+
+
+ +
+
+
diff --git a/src/Client.ts b/src/Client.ts index 8794a022..7dee7ba9 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -19,10 +19,11 @@ import { Products } from "./api/resources/products/client/Client"; import { Orders } from "./api/resources/orders/client/Client"; import { Inventory } from "./api/resources/inventory/client/Client"; import { Ecommerce } from "./api/resources/ecommerce/client/Client"; +import { Workspaces } from "./api/resources/workspaces/client/Client"; export declare namespace WebflowClient { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -130,4 +131,10 @@ export class WebflowClient { public get ecommerce(): Ecommerce { return (this._ecommerce ??= new Ecommerce(this._options)); } + + protected _workspaces: Workspaces | undefined; + + public get workspaces(): Workspaces { + return (this._workspaces ??= new Workspaces(this._options)); + } } diff --git a/src/api/resources/accessGroups/client/Client.ts b/src/api/resources/accessGroups/client/Client.ts index 962c2473..8e1ac251 100644 --- a/src/api/resources/accessGroups/client/Client.ts +++ b/src/api/resources/accessGroups/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace AccessGroups { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class AccessGroups { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/accessgroups` ), method: "GET", diff --git a/src/api/resources/assets/client/Client.ts b/src/api/resources/assets/client/Client.ts index fd510b0b..810251c6 100644 --- a/src/api/resources/assets/client/Client.ts +++ b/src/api/resources/assets/client/Client.ts @@ -8,14 +8,10 @@ import * as Webflow from "../../../index"; import urlJoin from "url-join"; import * as serializers from "../../../../serialization/index"; import * as errors from "../../../../errors/index"; -import crypto from "crypto"; -import fetch from "node-fetch"; -import FormData from 'form-data'; -import { Readable } from 'stream'; export declare namespace Assets { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -57,7 +53,7 @@ export class Assets { public async list(siteId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/assets` ), method: "GET", @@ -66,7 +62,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -191,7 +187,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/assets` ), method: "POST", @@ -200,7 +196,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -313,7 +309,7 @@ export class Assets { public async get(assetId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `assets/${encodeURIComponent(assetId)}` ), method: "GET", @@ -322,7 +318,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,7 +426,7 @@ export class Assets { public async delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `assets/${encodeURIComponent(assetId)}` ), method: "DELETE", @@ -439,7 +435,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -546,7 +542,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `assets/${encodeURIComponent(assetId)}` ), method: "PATCH", @@ -555,7 +551,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -668,7 +664,7 @@ export class Assets { public async listFolders(siteId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/asset_folders` ), method: "GET", @@ -677,7 +673,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -794,7 +790,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/asset_folders` ), method: "POST", @@ -803,7 +799,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -921,7 +917,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `asset_folders/${encodeURIComponent(assetFolderId)}` ), method: "GET", @@ -930,7 +926,7 @@ export class Assets { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/client/Client.ts b/src/api/resources/collections/client/Client.ts index 6dfa2fb0..19304f71 100644 --- a/src/api/resources/collections/client/Client.ts +++ b/src/api/resources/collections/client/Client.ts @@ -13,7 +13,7 @@ import { Items } from "../resources/items/client/Client"; export declare namespace Collections { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -55,7 +55,7 @@ export class Collections { public async list(siteId: string, requestOptions?: Collections.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/collections` ), method: "GET", @@ -64,7 +64,7 @@ export class Collections { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -201,7 +201,7 @@ export class Collections { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/collections` ), method: "POST", @@ -210,7 +210,7 @@ export class Collections { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -327,7 +327,7 @@ export class Collections { public async get(collectionId: string, requestOptions?: Collections.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}` ), method: "GET", @@ -336,7 +336,7 @@ export class Collections { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -444,7 +444,7 @@ export class Collections { public async delete(collectionId: string, requestOptions?: Collections.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}` ), method: "DELETE", @@ -453,7 +453,7 @@ export class Collections { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/fields/client/Client.ts b/src/api/resources/collections/resources/fields/client/Client.ts index 83b421d9..cd63a459 100644 --- a/src/api/resources/collections/resources/fields/client/Client.ts +++ b/src/api/resources/collections/resources/fields/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Fields { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -53,6 +53,7 @@ export class Fields { * * @example * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + * id: "562ac0395358780a1f5e6fbc", * isEditable: true, * isRequired: false, * type: "RichText", @@ -62,6 +63,7 @@ export class Fields { * * @example * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + * id: "562ac0395358780a1f5e6fbc", * isEditable: true, * isRequired: false, * type: "Option", @@ -80,6 +82,7 @@ export class Fields { * * @example * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + * id: "562ac0395358780a1f5e6fbd", * isEditable: true, * isRequired: false, * type: "Reference", @@ -97,7 +100,7 @@ export class Fields { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/fields` ), method: "POST", @@ -106,7 +109,7 @@ export class Fields { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -224,7 +227,7 @@ export class Fields { public async delete(collectionId: string, fieldId: string, requestOptions?: Fields.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/fields/${encodeURIComponent(fieldId)}` ), method: "DELETE", @@ -233,7 +236,7 @@ export class Fields { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -348,7 +351,7 @@ export class Fields { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/fields/${encodeURIComponent(fieldId)}` ), method: "PATCH", @@ -357,7 +360,7 @@ export class Fields { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/items/client/Client.ts b/src/api/resources/collections/resources/items/client/Client.ts index 8c9fa670..5c5c2bf4 100644 --- a/src/api/resources/collections/resources/items/client/Client.ts +++ b/src/api/resources/collections/resources/items/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Items { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -85,7 +85,7 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "GET", @@ -94,7 +94,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,7 +239,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "POST", @@ -248,7 +248,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -362,16 +362,20 @@ export class Items { * @throws {@link Webflow.InternalServerError} * * @example - * await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745") + * await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * }) */ public async deleteItems( collectionId: string, - request: Webflow.collections.ItemsDeleteItemsRequest = {}, + request: Webflow.collections.ItemsDeleteItemsRequest, requestOptions?: Items.RequestOptions ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "DELETE", @@ -380,7 +384,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -551,7 +555,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "PATCH", @@ -560,7 +564,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -658,6 +662,11 @@ export class Items { /** * List all published items in a collection. * + * + * To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + * + * + * * Required scope | `CMS:read` * * @param {string} collectionId - Unique identifier for a Collection @@ -710,7 +719,8 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .dataApi, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "GET", @@ -719,7 +729,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -831,6 +841,9 @@ export class Items { * * @example * await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { + * lastPublished: "2023-03-17T18:47:35.560Z", + * lastUpdated: "2023-03-17T18:47:35.560Z", + * createdOn: "2023-03-17T18:47:35.560Z", * isArchived: false, * isDraft: false, * fieldData: { @@ -842,6 +855,9 @@ export class Items { * @example * await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { * items: [{ + * lastPublished: "2023-03-17T18:47:35.560Z", + * lastUpdated: "2023-03-17T18:47:35.560Z", + * createdOn: "2023-03-17T18:47:35.560Z", * isArchived: false, * isDraft: false, * fieldData: { @@ -849,6 +865,9 @@ export class Items { * slug: "senior-data-analyst" * } * }, { + * lastPublished: "2023-03-17T18:47:35.560Z", + * lastUpdated: "2023-03-17T18:47:35.560Z", + * createdOn: "2023-03-17T18:47:35.560Z", * isArchived: false, * isDraft: false, * fieldData: { @@ -865,7 +884,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "POST", @@ -874,7 +893,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -989,16 +1008,20 @@ export class Items { * @throws {@link Webflow.InternalServerError} * * @example - * await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745") + * await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * }) */ public async deleteItemsLive( collectionId: string, - request: Webflow.collections.ItemsDeleteItemsLiveRequest = {}, + request: Webflow.collections.ItemsDeleteItemsLiveRequest, requestOptions?: Items.RequestOptions ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "DELETE", @@ -1007,7 +1030,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1175,7 +1198,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "PATCH", @@ -1184,7 +1207,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1333,7 +1356,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/bulk` ), method: "POST", @@ -1342,7 +1365,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1470,7 +1493,8 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .production, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}` ), method: "GET", @@ -1479,7 +1503,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1603,7 +1627,7 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}` ), method: "DELETE", @@ -1612,7 +1636,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1731,7 +1755,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}` ), method: "PATCH", @@ -1740,7 +1764,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1838,6 +1862,11 @@ export class Items { /** * Get details of a selected Collection live Item. * + * + * To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + * + * + * * Required scope | `CMS:read` * * @param {string} collectionId - Unique identifier for a Collection @@ -1868,7 +1897,8 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .dataApi, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live` ), method: "GET", @@ -1877,7 +1907,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2003,7 +2033,7 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live` ), method: "DELETE", @@ -2012,7 +2042,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2132,7 +2162,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live` ), method: "PATCH", @@ -2141,7 +2171,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2266,7 +2296,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/publish` ), method: "POST", @@ -2275,7 +2305,7 @@ export class Items { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts index 88fa549f..779fb410 100644 --- a/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts +++ b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts @@ -6,8 +6,12 @@ import * as Webflow from "../../../../../../index"; /** * @example - * {} + * { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * } */ export interface ItemsDeleteItemsLiveRequest { - items?: Webflow.collections.ItemsDeleteItemsLiveRequestItemsItem[]; + items: Webflow.collections.ItemsDeleteItemsLiveRequestItemsItem[]; } diff --git a/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts index 39d30414..503c93a0 100644 --- a/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts +++ b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts @@ -6,8 +6,12 @@ import * as Webflow from "../../../../../../index"; /** * @example - * {} + * { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * } */ export interface ItemsDeleteItemsRequest { - items?: Webflow.collections.ItemsDeleteItemsRequestItemsItem[]; + items: Webflow.collections.ItemsDeleteItemsRequestItemsItem[]; } diff --git a/src/api/resources/components/client/Client.ts b/src/api/resources/components/client/Client.ts index 4b59cb64..8cdee2ff 100644 --- a/src/api/resources/components/client/Client.ts +++ b/src/api/resources/components/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Components { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -65,7 +65,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components` ), method: "GET", @@ -74,7 +74,7 @@ export class Components { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,7 +164,7 @@ export class Components { } /** - * Get static content from a component definition. This includes text nodes, image nodes and nested component instances. + * Get static content from a component definition. This includes text nodes, image nodes, select nodes, text input nodes, submit button nodes, and nested component instances. * To retrieve dynamic content set by component properties, use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint. * * If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. @@ -209,7 +209,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` ), method: "GET", @@ -218,7 +218,7 @@ export class Components { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -344,6 +344,22 @@ export class Components { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", * text: "

Don't Panic!

Always know where your towel is.

" * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad635", + * choices: [{ + * value: "choice-1", + * text: "First choice" + * }, { + * value: "choice-2", + * text: "Second choice" + * }] + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad642", + * placeholder: "Enter something here..." + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad671", + * value: "Submit", + * waitingText: "Submitting..." + * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", * propertyOverrides: [{ * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", @@ -369,7 +385,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` ), method: "POST", @@ -378,7 +394,7 @@ export class Components { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -521,7 +537,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` ), method: "GET", @@ -530,7 +546,7 @@ export class Components { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -667,7 +683,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` ), method: "POST", @@ -676,7 +692,7 @@ export class Components { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/components/client/requests/ComponentDomWrite.ts b/src/api/resources/components/client/requests/ComponentDomWrite.ts index 0a7b7b99..ef0cd579 100644 --- a/src/api/resources/components/client/requests/ComponentDomWrite.ts +++ b/src/api/resources/components/client/requests/ComponentDomWrite.ts @@ -15,6 +15,22 @@ import * as Webflow from "../../../../index"; * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", * text: "

Don't Panic!

Always know where your towel is.

" * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad635", + * choices: [{ + * value: "choice-1", + * text: "First choice" + * }, { + * value: "choice-2", + * text: "Second choice" + * }] + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad642", + * placeholder: "Enter something here..." + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad671", + * value: "Submit", + * waitingText: "Submitting..." + * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", * propertyOverrides: [{ * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", diff --git a/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts b/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts index 043c8f2b..1b37c893 100644 --- a/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts +++ b/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts @@ -3,11 +3,6 @@ */ /** - * @example - * { - * localeId: "65427cf400e02b306eaa04a0" - * } - * * @example * { * localeId: "65427cf400e02b306eaa04a0" diff --git a/src/api/resources/components/types/ComponentDomWriteNodesItem.ts b/src/api/resources/components/types/ComponentDomWriteNodesItem.ts index f9884a29..3c82bc99 100644 --- a/src/api/resources/components/types/ComponentDomWriteNodesItem.ts +++ b/src/api/resources/components/types/ComponentDomWriteNodesItem.ts @@ -4,4 +4,10 @@ import * as Webflow from "../../../index"; -export type ComponentDomWriteNodesItem = Webflow.TextNodeWrite | Webflow.ComponentInstanceNodePropertyOverridesWrite; +export type ComponentDomWriteNodesItem = + | Webflow.TextNodeWrite + | Webflow.ComponentInstanceNodePropertyOverridesWrite + | Webflow.SelectNodeWrite + | Webflow.TextInputNodeWrite + | Webflow.SubmitButtonNodeWrite + | Webflow.SearchButtonNodeWrite; diff --git a/src/api/resources/ecommerce/client/Client.ts b/src/api/resources/ecommerce/client/Client.ts index e75b33b4..adb153b7 100644 --- a/src/api/resources/ecommerce/client/Client.ts +++ b/src/api/resources/ecommerce/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Ecommerce { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -55,7 +55,7 @@ export class Ecommerce { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/ecommerce/settings` ), method: "GET", @@ -64,7 +64,7 @@ export class Ecommerce { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/forms/client/Client.ts b/src/api/resources/forms/client/Client.ts index 4eca07bc..ac7079bd 100644 --- a/src/api/resources/forms/client/Client.ts +++ b/src/api/resources/forms/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Forms { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class Forms { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/forms` ), method: "GET", @@ -79,7 +79,7 @@ export class Forms { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -193,7 +193,7 @@ export class Forms { public async get(formId: string, requestOptions?: Forms.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `forms/${encodeURIComponent(formId)}` ), method: "GET", @@ -202,7 +202,7 @@ export class Forms { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -334,7 +334,7 @@ export class Forms { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `forms/${encodeURIComponent(formId)}/submissions` ), method: "GET", @@ -343,7 +343,7 @@ export class Forms { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -458,7 +458,7 @@ export class Forms { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `form_submissions/${encodeURIComponent(formSubmissionId)}` ), method: "GET", @@ -467,7 +467,7 @@ export class Forms { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -582,7 +582,7 @@ export class Forms { public async deleteSubmission(formSubmissionId: string, requestOptions?: Forms.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `form_submissions/${encodeURIComponent(formSubmissionId)}` ), method: "DELETE", @@ -591,7 +591,7 @@ export class Forms { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -706,7 +706,7 @@ export class Forms { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `form_submissions/${encodeURIComponent(formSubmissionId)}` ), method: "PATCH", @@ -715,7 +715,7 @@ export class Forms { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -858,7 +858,7 @@ export class Forms { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/form_submissions` ), method: "GET", @@ -867,7 +867,7 @@ export class Forms { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index b099c929..8ce422fe 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -15,6 +15,7 @@ export * from "./orders/types"; export * as inventory from "./inventory"; export * from "./inventory/types"; export * as collections from "./collections"; +export * as workspaces from "./workspaces"; export * as token from "./token"; export * as scripts from "./scripts"; export * as assets from "./assets"; diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts index ee2207cc..5421aab5 100644 --- a/src/api/resources/inventory/client/Client.ts +++ b/src/api/resources/inventory/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Inventory { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -60,7 +60,7 @@ export class Inventory { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/inventory` ), method: "GET", @@ -69,7 +69,7 @@ export class Inventory { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -198,7 +198,7 @@ export class Inventory { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/inventory` ), method: "PATCH", @@ -207,7 +207,7 @@ export class Inventory { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index a2d3ebc4..3c32f5bc 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Orders { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -74,7 +74,7 @@ export class Orders { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders` ), method: "GET", @@ -83,7 +83,7 @@ export class Orders { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -200,7 +200,7 @@ export class Orders { public async get(siteId: string, orderId: string, requestOptions?: Orders.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}` ), method: "GET", @@ -209,7 +209,7 @@ export class Orders { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -334,7 +334,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}` ), method: "PATCH", @@ -343,7 +343,7 @@ export class Orders { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -471,7 +471,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}/fulfill` ), method: "POST", @@ -480,7 +480,7 @@ export class Orders { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -606,7 +606,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}/unfulfill` ), method: "POST", @@ -615,7 +615,7 @@ export class Orders { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -739,7 +739,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}/refund` ), method: "POST", @@ -748,7 +748,7 @@ export class Orders { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pages/client/Client.ts b/src/api/resources/pages/client/Client.ts index 999f1af8..c8940488 100644 --- a/src/api/resources/pages/client/Client.ts +++ b/src/api/resources/pages/client/Client.ts @@ -12,7 +12,7 @@ import { Scripts } from "../resources/scripts/client/Client"; export declare namespace Pages { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -75,7 +75,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/pages` ), method: "GET", @@ -84,7 +84,7 @@ export class Pages { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -206,7 +206,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}` ), method: "GET", @@ -215,7 +215,7 @@ export class Pages { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -365,7 +365,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}` ), method: "PUT", @@ -374,7 +374,7 @@ export class Pages { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -469,7 +469,7 @@ export class Pages { } /** - * Get content from a static page. This includes text nodes, image nodes, and component instances with [property overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). + * Get content from a static page. This includes text nodes, image nodes, select nodes, text input nodes, submit button nodes, and component instances with [property overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). * * To retrieve the static content of a component instance, use the [Get Component Content](/data/reference/pages-and-components/components/get-content) endpoint. * @@ -514,7 +514,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/dom` ), method: "GET", @@ -523,7 +523,7 @@ export class Pages { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -648,6 +648,22 @@ export class Pages { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", * text: "

Don't Panic!

Always know where your towel is.

" * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad635", + * choices: [{ + * value: "choice-1", + * text: "First choice" + * }, { + * value: "choice-2", + * text: "Second choice" + * }] + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad642", + * placeholder: "Enter something here..." + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad671", + * value: "Submit", + * waitingText: "Submitting..." + * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", * propertyOverrides: [{ * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", @@ -669,7 +685,7 @@ export class Pages { _queryParams["localeId"] = localeId; const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/dom` ), method: "POST", @@ -678,7 +694,7 @@ export class Pages { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pages/client/requests/PageDomWrite.ts b/src/api/resources/pages/client/requests/PageDomWrite.ts index 9a4c0adc..84e5f5f3 100644 --- a/src/api/resources/pages/client/requests/PageDomWrite.ts +++ b/src/api/resources/pages/client/requests/PageDomWrite.ts @@ -15,6 +15,22 @@ import * as Webflow from "../../../../index"; * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", * text: "

Don't Panic!

Always know where your towel is.

" * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad635", + * choices: [{ + * value: "choice-1", + * text: "First choice" + * }, { + * value: "choice-2", + * text: "Second choice" + * }] + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad642", + * placeholder: "Enter something here..." + * }, { + * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad671", + * value: "Submit", + * waitingText: "Submitting..." + * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", * propertyOverrides: [{ * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", diff --git a/src/api/resources/pages/resources/scripts/client/Client.ts b/src/api/resources/pages/resources/scripts/client/Client.ts index ee6953c5..c4d6064d 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Scripts { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -53,7 +53,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/custom_code` ), method: "GET", @@ -62,7 +62,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -193,7 +193,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/custom_code` ), method: "PUT", @@ -202,7 +202,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -319,7 +319,7 @@ export class Scripts { public async deleteCustomCode(pageId: string, requestOptions?: Scripts.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/custom_code` ), method: "DELETE", @@ -328,7 +328,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pages/types/PageDomWriteNodesItem.ts b/src/api/resources/pages/types/PageDomWriteNodesItem.ts index 037cfcbf..62ffea7c 100644 --- a/src/api/resources/pages/types/PageDomWriteNodesItem.ts +++ b/src/api/resources/pages/types/PageDomWriteNodesItem.ts @@ -4,4 +4,10 @@ import * as Webflow from "../../../index"; -export type PageDomWriteNodesItem = Webflow.TextNodeWrite | Webflow.ComponentInstanceNodePropertyOverridesWrite; +export type PageDomWriteNodesItem = + | Webflow.TextNodeWrite + | Webflow.ComponentInstanceNodePropertyOverridesWrite + | Webflow.SelectNodeWrite + | Webflow.TextInputNodeWrite + | Webflow.SubmitButtonNodeWrite + | Webflow.SearchButtonNodeWrite; diff --git a/src/api/resources/products/client/Client.ts b/src/api/resources/products/client/Client.ts index 04f3bb37..3b0ea51d 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Products { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class Products { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products` ), method: "GET", @@ -79,7 +79,7 @@ export class Products { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -173,16 +173,12 @@ export class Products { } /** - * Create a new product and SKU. + * Create a new ecommerce product and defaultSKU. A product, at minimum, must have a single SKU. * - * When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. - * - * To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: - * - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). - * - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - * - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - * - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - * - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) + * To create a product with multiple SKUs: + * - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. + * - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) + * - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) * * Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. * @@ -201,16 +197,70 @@ export class Products { * @throws {@link Webflow.InternalServerError} * * @example - * await client.products.create("580e63e98c9a982ac9b8b741") + * await client.products.create("580e63e98c9a982ac9b8b741", { + * publishStatus: "staging", + * product: { + * fieldData: { + * name: "Colorful T-shirt", + * slug: "colorful-t-shirt", + * description: "Our best-selling t-shirt available in multiple colors and sizes", + * skuProperties: [{ + * id: "color", + * name: "Color", + * enum: [{ + * id: "red", + * name: "Red", + * slug: "red" + * }, { + * id: "yellow", + * name: "Yellow", + * slug: "yellow" + * }, { + * id: "blue", + * name: "Blue", + * slug: "blue" + * }] + * }, { + * id: "size", + * name: "Size", + * enum: [{ + * id: "small", + * name: "Small", + * slug: "small" + * }, { + * id: "medium", + * name: "Medium", + * slug: "medium" + * }, { + * id: "large", + * name: "Large", + * slug: "large" + * }] + * }] + * } + * }, + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Red Small", + * slug: "colorful-t-shirt-red-small", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * }, + * mainImage: "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987" + * } + * } + * }) */ public async create( siteId: string, - request: Webflow.ProductSkuCreate = {}, + request: Webflow.ProductSkuCreate, requestOptions?: Products.RequestOptions ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products` ), method: "POST", @@ -219,7 +269,7 @@ export class Products { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -344,7 +394,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}` ), method: "GET", @@ -353,7 +403,7 @@ export class Products { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -478,7 +528,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}` ), method: "PATCH", @@ -487,7 +537,7 @@ export class Products { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -608,7 +658,17 @@ export class Products { * * @example * await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { - * skus: [{}] + * skus: [{ + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * }] * }) */ public async createSku( @@ -619,7 +679,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}/skus` ), method: "POST", @@ -628,7 +688,7 @@ export class Products { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -750,7 +810,17 @@ export class Products { * * @example * await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { - * sku: {} + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * } * }) */ public async updateSku( @@ -762,7 +832,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent( productId )}/skus/${encodeURIComponent(skuId)}` @@ -773,7 +843,7 @@ export class Products { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/products/client/requests/ProductSkuCreate.ts b/src/api/resources/products/client/requests/ProductSkuCreate.ts index f5eeb9a9..d8dd5b6c 100644 --- a/src/api/resources/products/client/requests/ProductSkuCreate.ts +++ b/src/api/resources/products/client/requests/ProductSkuCreate.ts @@ -6,10 +6,64 @@ import * as Webflow from "../../../../index"; /** * @example - * {} + * { + * publishStatus: "staging", + * product: { + * fieldData: { + * name: "Colorful T-shirt", + * slug: "colorful-t-shirt", + * description: "Our best-selling t-shirt available in multiple colors and sizes", + * skuProperties: [{ + * id: "color", + * name: "Color", + * enum: [{ + * id: "red", + * name: "Red", + * slug: "red" + * }, { + * id: "yellow", + * name: "Yellow", + * slug: "yellow" + * }, { + * id: "blue", + * name: "Blue", + * slug: "blue" + * }] + * }, { + * id: "size", + * name: "Size", + * enum: [{ + * id: "small", + * name: "Small", + * slug: "small" + * }, { + * id: "medium", + * name: "Medium", + * slug: "medium" + * }, { + * id: "large", + * name: "Large", + * slug: "large" + * }] + * }] + * } + * }, + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Red Small", + * slug: "colorful-t-shirt-red-small", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * }, + * mainImage: "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987" + * } + * } + * } */ export interface ProductSkuCreate { publishStatus?: Webflow.PublishStatus; - product?: Webflow.Product; - sku?: Webflow.Sku; + product: Webflow.ProductSkuCreateProduct; + sku: Webflow.ProductSkuCreateSku; } diff --git a/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts b/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts index 6d2e7fd0..3abc641b 100644 --- a/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts +++ b/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts @@ -7,7 +7,17 @@ import * as Webflow from "../../../../index"; /** * @example * { - * skus: [{}] + * skus: [{ + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * }] * } */ export interface ProductsCreateSkuRequest { diff --git a/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts b/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts index 9f79e47a..168ef74b 100644 --- a/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts +++ b/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts @@ -7,7 +7,17 @@ import * as Webflow from "../../../../index"; /** * @example * { - * sku: {} + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * } * } */ export interface ProductsUpdateSkuRequest { diff --git a/src/api/resources/products/types/ProductSkuCreateProduct.ts b/src/api/resources/products/types/ProductSkuCreateProduct.ts new file mode 100644 index 00000000..c8638f46 --- /dev/null +++ b/src/api/resources/products/types/ProductSkuCreateProduct.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export interface ProductSkuCreateProduct { + fieldData?: Webflow.ProductFieldData; +} diff --git a/src/api/resources/products/types/ProductSkuCreateSku.ts b/src/api/resources/products/types/ProductSkuCreateSku.ts new file mode 100644 index 00000000..c704fa2f --- /dev/null +++ b/src/api/resources/products/types/ProductSkuCreateSku.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export interface ProductSkuCreateSku { + fieldData?: Webflow.SkuFieldData; +} diff --git a/src/api/resources/products/types/ProductsCreateSkuResponse.ts b/src/api/resources/products/types/ProductsCreateSkuResponse.ts index 0f1f0c50..c0a565fa 100644 --- a/src/api/resources/products/types/ProductsCreateSkuResponse.ts +++ b/src/api/resources/products/types/ProductsCreateSkuResponse.ts @@ -5,5 +5,5 @@ import * as Webflow from "../../../index"; export interface ProductsCreateSkuResponse { - skus?: Webflow.Sku[]; + skus: Webflow.Sku[]; } diff --git a/src/api/resources/products/types/index.ts b/src/api/resources/products/types/index.ts index e286df49..61d70f8d 100644 --- a/src/api/resources/products/types/index.ts +++ b/src/api/resources/products/types/index.ts @@ -1 +1,3 @@ +export * from "./ProductSkuCreateProduct"; +export * from "./ProductSkuCreateSku"; export * from "./ProductsCreateSkuResponse"; diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index 59f15ac7..7eb642ff 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Scripts { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -54,7 +54,7 @@ export class Scripts { public async list(siteId: string, requestOptions?: Scripts.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/registered_scripts` ), method: "GET", @@ -63,7 +63,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -187,7 +187,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/registered_scripts/hosted` ), method: "POST", @@ -196,7 +196,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,7 +324,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/registered_scripts/inline` ), method: "POST", @@ -333,7 +333,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index 88974213..c2164bb2 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -11,12 +11,14 @@ import * as errors from "../../../../errors/index"; import { Redirects } from "../resources/redirects/client/Client"; import { Plans } from "../resources/plans/client/Client"; import { RobotsTxt } from "../resources/robotsTxt/client/Client"; +import { WellKnown } from "../resources/wellKnown/client/Client"; import { ActivityLogs } from "../resources/activityLogs/client/Client"; +import { Comments } from "../resources/comments/client/Client"; import { Scripts } from "../resources/scripts/client/Client"; export declare namespace Sites { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -68,7 +70,7 @@ export class Sites { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `workspaces/${encodeURIComponent(workspaceId)}/sites` ), method: "POST", @@ -77,7 +79,7 @@ export class Sites { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -191,7 +193,7 @@ export class Sites { public async list(requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, "sites" ), method: "GET", @@ -200,7 +202,7 @@ export class Sites { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -296,7 +298,7 @@ export class Sites { public async get(siteId: string, requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}` ), method: "GET", @@ -305,7 +307,7 @@ export class Sites { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -416,7 +418,7 @@ export class Sites { public async delete(siteId: string, requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}` ), method: "DELETE", @@ -425,7 +427,7 @@ export class Sites { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -537,7 +539,7 @@ export class Sites { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}` ), method: "PATCH", @@ -546,7 +548,7 @@ export class Sites { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -661,7 +663,7 @@ export class Sites { public async getCustomDomain(siteId: string, requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_domains` ), method: "GET", @@ -670,7 +672,7 @@ export class Sites { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -787,7 +789,7 @@ export class Sites { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/publish` ), method: "POST", @@ -796,7 +798,7 @@ export class Sites { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -899,12 +901,24 @@ export class Sites { return (this._robotsTxt ??= new RobotsTxt(this._options)); } + protected _wellKnown: WellKnown | undefined; + + public get wellKnown(): WellKnown { + return (this._wellKnown ??= new WellKnown(this._options)); + } + protected _activityLogs: ActivityLogs | undefined; public get activityLogs(): ActivityLogs { return (this._activityLogs ??= new ActivityLogs(this._options)); } + protected _comments: Comments | undefined; + + public get comments(): Comments { + return (this._comments ??= new Comments(this._options)); + } + protected _scripts: Scripts | undefined; public get scripts(): Scripts { diff --git a/src/api/resources/sites/index.ts b/src/api/resources/sites/index.ts index 848e75ab..a931b363 100644 --- a/src/api/resources/sites/index.ts +++ b/src/api/resources/sites/index.ts @@ -1,3 +1,3 @@ export * from "./types"; -export * from "./client"; export * from "./resources"; +export * from "./client"; diff --git a/src/api/resources/sites/resources/activityLogs/client/Client.ts b/src/api/resources/sites/resources/activityLogs/client/Client.ts index 62db4a0e..7f75b0f5 100644 --- a/src/api/resources/sites/resources/activityLogs/client/Client.ts +++ b/src/api/resources/sites/resources/activityLogs/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace ActivityLogs { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -66,7 +66,7 @@ export class ActivityLogs { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/activity_logs` ), method: "GET", @@ -75,7 +75,7 @@ export class ActivityLogs { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/comments/client/Client.ts b/src/api/resources/sites/resources/comments/client/Client.ts new file mode 100644 index 00000000..4f78551d --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/Client.ts @@ -0,0 +1,497 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Webflow from "../../../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Comments { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Comments { + constructor(protected readonly _options: Comments.Options) {} + + /** + * List all comment threads for a site. + * + * + * There may be a delay of up to 5 minutes before new comments appear in the system. + * + * + * Required scope | `comments:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.sites.CommentsListCommentThreadsRequest} request + * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.comments.listCommentThreads("580e63e98c9a982ac9b8b741", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async listCommentThreads( + siteId: string, + request: Webflow.sites.CommentsListCommentThreadsRequest = {}, + requestOptions?: Comments.RequestOptions + ): Promise { + const { localeId, offset, limit, sortBy, sortOrder } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (sortBy != null) { + _queryParams["sortBy"] = sortBy; + } + + if (sortOrder != null) { + _queryParams["sortOrder"] = sortOrder; + } + + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/comments` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CommentThreadList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/comments."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get details of a specific comment thread. + * + * + * There may be a delay of up to 5 minutes before new comments appear in the system. + * + * + * Required scope | `comments:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} commentThreadId - Unique identifier for a Comment Thread + * @param {Webflow.sites.CommentsGetCommentThreadRequest} request + * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.comments.getCommentThread("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async getCommentThread( + siteId: string, + commentThreadId: string, + request: Webflow.sites.CommentsGetCommentThreadRequest = {}, + requestOptions?: Comments.RequestOptions + ): Promise { + const { localeId, offset, limit, sortBy, sortOrder } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (sortBy != null) { + _queryParams["sortBy"] = sortBy; + } + + if (sortOrder != null) { + _queryParams["sortOrder"] = sortOrder; + } + + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/comments/${encodeURIComponent(commentThreadId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CommentThread.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/comments/{comment_thread_id}." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * List all replies to a specific comment thread. + * + * + * There may be a delay of up to 5 minutes before new comments appear in the system. + * + * + * Required scope | `comments:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} commentThreadId - Unique identifier for a Comment Thread + * @param {Webflow.sites.CommentsListCommentRepliesRequest} request + * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.comments.listCommentReplies("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async listCommentReplies( + siteId: string, + commentThreadId: string, + request: Webflow.sites.CommentsListCommentRepliesRequest = {}, + requestOptions?: Comments.RequestOptions + ): Promise { + const { localeId, offset, limit, sortBy, sortOrder } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (sortBy != null) { + _queryParams["sortBy"] = sortBy; + } + + if (sortOrder != null) { + _queryParams["sortOrder"] = sortOrder; + } + + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/comments/${encodeURIComponent(commentThreadId)}/replies` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CommentReplyList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/comments/{comment_thread_id}/replies." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/sites/resources/comments/client/index.ts b/src/api/resources/sites/resources/comments/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts b/src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts new file mode 100644 index 00000000..451ff87b --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface CommentsGetCommentThreadRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Sort results by the provided value. Only allowed when sortOrder is provided. + */ + sortBy?: Webflow.sites.CommentsGetCommentThreadRequestSortBy; + /** + * Sorts the results by asc or desc + */ + sortOrder?: Webflow.sites.CommentsGetCommentThreadRequestSortOrder; +} diff --git a/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.ts b/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.ts new file mode 100644 index 00000000..5e2589dd --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface CommentsListCommentRepliesRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Sort results by the provided value. Only allowed when sortOrder is provided. + */ + sortBy?: Webflow.sites.CommentsListCommentRepliesRequestSortBy; + /** + * Sorts the results by asc or desc + */ + sortOrder?: Webflow.sites.CommentsListCommentRepliesRequestSortOrder; +} diff --git a/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts b/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts new file mode 100644 index 00000000..2f9fac0b --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface CommentsListCommentThreadsRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Sort results by the provided value. Only allowed when sortOrder is provided. + */ + sortBy?: Webflow.sites.CommentsListCommentThreadsRequestSortBy; + /** + * Sorts the results by asc or desc + */ + sortOrder?: Webflow.sites.CommentsListCommentThreadsRequestSortOrder; +} diff --git a/src/api/resources/sites/resources/comments/client/requests/index.ts b/src/api/resources/sites/resources/comments/client/requests/index.ts new file mode 100644 index 00000000..6a4c7581 --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/requests/index.ts @@ -0,0 +1,3 @@ +export { type CommentsListCommentThreadsRequest } from "./CommentsListCommentThreadsRequest"; +export { type CommentsGetCommentThreadRequest } from "./CommentsGetCommentThreadRequest"; +export { type CommentsListCommentRepliesRequest } from "./CommentsListCommentRepliesRequest"; diff --git a/src/api/resources/sites/resources/comments/index.ts b/src/api/resources/sites/resources/comments/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/sites/resources/comments/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts new file mode 100644 index 00000000..b4890b59 --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsGetCommentThreadRequestSortBy = "createdOn" | "lastUpdated"; + +export const CommentsGetCommentThreadRequestSortBy = { + CreatedOn: "createdOn", + LastUpdated: "lastUpdated", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts new file mode 100644 index 00000000..4d59c9ec --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsGetCommentThreadRequestSortOrder = "asc" | "desc"; + +export const CommentsGetCommentThreadRequestSortOrder = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts b/src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts new file mode 100644 index 00000000..495bb8ca --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsListCommentRepliesRequestSortBy = "createdOn" | "lastUpdated"; + +export const CommentsListCommentRepliesRequestSortBy = { + CreatedOn: "createdOn", + LastUpdated: "lastUpdated", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts b/src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts new file mode 100644 index 00000000..7e890721 --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsListCommentRepliesRequestSortOrder = "asc" | "desc"; + +export const CommentsListCommentRepliesRequestSortOrder = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts new file mode 100644 index 00000000..4f903c7c --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsListCommentThreadsRequestSortBy = "createdOn" | "lastUpdated"; + +export const CommentsListCommentThreadsRequestSortBy = { + CreatedOn: "createdOn", + LastUpdated: "lastUpdated", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts new file mode 100644 index 00000000..f8c50a9b --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsListCommentThreadsRequestSortOrder = "asc" | "desc"; + +export const CommentsListCommentThreadsRequestSortOrder = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/index.ts b/src/api/resources/sites/resources/comments/types/index.ts new file mode 100644 index 00000000..0d2c5090 --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/index.ts @@ -0,0 +1,6 @@ +export * from "./CommentsListCommentThreadsRequestSortBy"; +export * from "./CommentsListCommentThreadsRequestSortOrder"; +export * from "./CommentsGetCommentThreadRequestSortBy"; +export * from "./CommentsGetCommentThreadRequestSortOrder"; +export * from "./CommentsListCommentRepliesRequestSortBy"; +export * from "./CommentsListCommentRepliesRequestSortOrder"; diff --git a/src/api/resources/sites/resources/index.ts b/src/api/resources/sites/resources/index.ts index 35fcc5b7..e0f7c245 100644 --- a/src/api/resources/sites/resources/index.ts +++ b/src/api/resources/sites/resources/index.ts @@ -1,7 +1,13 @@ +export * as wellKnown from "./wellKnown"; +export * from "./wellKnown/types"; +export * as comments from "./comments"; +export * from "./comments/types"; export * as redirects from "./redirects"; export * as plans from "./plans"; export * as robotsTxt from "./robotsTxt"; export * as activityLogs from "./activityLogs"; export * as scripts from "./scripts"; +export * from "./wellKnown/client/requests"; export * from "./activityLogs/client/requests"; +export * from "./comments/client/requests"; export * from "./scripts/client/requests"; diff --git a/src/api/resources/sites/resources/plans/client/Client.ts b/src/api/resources/sites/resources/plans/client/Client.ts index 4de9faff..118700a9 100644 --- a/src/api/resources/sites/resources/plans/client/Client.ts +++ b/src/api/resources/sites/resources/plans/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Plans { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -52,7 +52,7 @@ export class Plans { public async getSitePlan(siteId: string, requestOptions?: Plans.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/plan` ), method: "GET", @@ -61,7 +61,7 @@ export class Plans { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/redirects/client/Client.ts b/src/api/resources/sites/resources/redirects/client/Client.ts index 1070e592..a88b7b64 100644 --- a/src/api/resources/sites/resources/redirects/client/Client.ts +++ b/src/api/resources/sites/resources/redirects/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Redirects { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -54,7 +54,7 @@ export class Redirects { public async list(siteId: string, requestOptions?: Redirects.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects` ), method: "GET", @@ -63,7 +63,7 @@ export class Redirects { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -184,7 +184,7 @@ export class Redirects { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects` ), method: "POST", @@ -193,7 +193,7 @@ export class Redirects { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -315,7 +315,7 @@ export class Redirects { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` ), method: "DELETE", @@ -324,7 +324,7 @@ export class Redirects { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -447,7 +447,7 @@ export class Redirects { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` ), method: "PATCH", @@ -456,7 +456,7 @@ export class Redirects { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/robotsTxt/client/Client.ts b/src/api/resources/sites/resources/robotsTxt/client/Client.ts index bad94d8a..b010a215 100644 --- a/src/api/resources/sites/resources/robotsTxt/client/Client.ts +++ b/src/api/resources/sites/resources/robotsTxt/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace RobotsTxt { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -33,6 +33,8 @@ export class RobotsTxt { /** * Retrieve the robots.txt configuration for various user agents. * + * This endpoint requires an Enterprise workspace. + * * Required scope: `site_config:read` * * @param {string} siteId - Unique identifier for a Site @@ -50,7 +52,7 @@ export class RobotsTxt { public async get(siteId: string, requestOptions?: RobotsTxt.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "GET", @@ -59,7 +61,7 @@ export class RobotsTxt { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,6 +152,8 @@ export class RobotsTxt { /** * Replace the `robots.txt` configuration for various user agents. * + * This endpoint requires an Enterprise workspace. + * * Required scope | `site_config:write` * * @param {string} siteId - Unique identifier for a Site @@ -179,7 +183,7 @@ export class RobotsTxt { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "PUT", @@ -188,7 +192,7 @@ export class RobotsTxt { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -286,6 +290,8 @@ export class RobotsTxt { * * **Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. * + * This endpoint requires an Enterprise workspace. + * * Required scope: `site_config:write` * * @param {string} siteId - Unique identifier for a Site @@ -314,7 +320,7 @@ export class RobotsTxt { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "DELETE", @@ -323,7 +329,7 @@ export class RobotsTxt { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -421,6 +427,8 @@ export class RobotsTxt { /** * Update the `robots.txt` configuration for various user agents. * + * This endpoint requires an Enterprise workspace. + * * Required scope | `site_config:write` * * @param {string} siteId - Unique identifier for a Site @@ -450,7 +458,7 @@ export class RobotsTxt { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "PATCH", @@ -459,7 +467,7 @@ export class RobotsTxt { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/scripts/client/Client.ts b/src/api/resources/sites/resources/scripts/client/Client.ts index eb175c83..a0351114 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Scripts { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -57,7 +57,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code` ), method: "GET", @@ -66,7 +66,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -196,7 +196,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code` ), method: "PUT", @@ -205,7 +205,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -318,7 +318,7 @@ export class Scripts { public async deleteCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code` ), method: "DELETE", @@ -327,7 +327,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -452,7 +452,7 @@ export class Scripts { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code/blocks` ), method: "GET", @@ -461,7 +461,7 @@ export class Scripts { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/wellKnown/client/Client.ts b/src/api/resources/sites/resources/wellKnown/client/Client.ts new file mode 100644 index 00000000..d6e6a29b --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/Client.ts @@ -0,0 +1,296 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Webflow from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace WellKnown { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class WellKnown { + constructor(protected readonly _options: WellKnown.Options) {} + + /** + * Upload a supported well-known file to a site. + * + * The current restrictions on well-known files are as follows: + * - Each file must be smaller than 100kb + * - Less than 30 total files + * - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + * + * + * `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. + * + * + * This endpoint requires an Enterprise workspace. + * + * Required scope: `site_config:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.sites.WellKnownFile} request + * @param {WellKnown.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", { + * fileName: "fileName", + * fileData: "fileData" + * }) + */ + public async put( + siteId: string, + request: Webflow.sites.WellKnownFile, + requestOptions?: WellKnown.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/well_known` + ), + method: "PUT", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.sites.WellKnownFile.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling PUT /sites/{site_id}/well_known."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Delete existing well-known files from a site. + * + * This endpoint requires an Enterprise workspace. + * + * Required scope: `site_config:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.sites.WellKnownDeleteRequest} request + * @param {WellKnown.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741") + */ + public async delete( + siteId: string, + request: Webflow.sites.WellKnownDeleteRequest = {}, + requestOptions?: WellKnown.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/well_known` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.sites.WellKnownDeleteRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling DELETE /sites/{site_id}/well_known." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/sites/resources/wellKnown/client/index.ts b/src/api/resources/sites/resources/wellKnown/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts new file mode 100644 index 00000000..12b026fe --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface WellKnownDeleteRequest { + /** A list of file names to delete */ + fileNames?: string[]; +} diff --git a/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts new file mode 100644 index 00000000..14b408f6 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * fileName: "fileName", + * fileData: "fileData" + * } + */ +export interface WellKnownFile { + /** The name of the file */ + fileName: string; + /** The contents of the file */ + fileData: string; + /** The content type of the file. Defaults to application/json */ + contentType?: Webflow.sites.WellKnownFileContentType; +} diff --git a/src/api/resources/sites/resources/wellKnown/client/requests/index.ts b/src/api/resources/sites/resources/wellKnown/client/requests/index.ts new file mode 100644 index 00000000..80d597d9 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type WellKnownFile } from "./WellKnownFile"; +export { type WellKnownDeleteRequest } from "./WellKnownDeleteRequest"; diff --git a/src/api/resources/sites/resources/wellKnown/index.ts b/src/api/resources/sites/resources/wellKnown/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts b/src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts new file mode 100644 index 00000000..459443e3 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The content type of the file. Defaults to application/json + */ +export type WellKnownFileContentType = "application/json" | "text/plain"; + +export const WellKnownFileContentType = { + ApplicationJson: "application/json", + TextPlain: "text/plain", +} as const; diff --git a/src/api/resources/sites/resources/wellKnown/types/index.ts b/src/api/resources/sites/resources/wellKnown/types/index.ts new file mode 100644 index 00000000..e9347565 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/types/index.ts @@ -0,0 +1 @@ +export * from "./WellKnownFileContentType"; diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index 316cbddf..66e67b22 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Token { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -46,7 +46,7 @@ export class Token { public async authorizedBy(requestOptions?: Token.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, "token/authorized_by" ), method: "GET", @@ -55,7 +55,7 @@ export class Token { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -128,7 +128,7 @@ export class Token { public async introspect(requestOptions?: Token.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, "token/introspect" ), method: "GET", @@ -137,7 +137,7 @@ export class Token { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/users/client/Client.ts b/src/api/resources/users/client/Client.ts index 12307359..fcbee63c 100644 --- a/src/api/resources/users/client/Client.ts +++ b/src/api/resources/users/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Users { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class Users { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users` ), method: "GET", @@ -79,7 +79,7 @@ export class Users { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -192,7 +192,7 @@ export class Users { public async get(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/${encodeURIComponent(userId)}` ), method: "GET", @@ -201,7 +201,7 @@ export class Users { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -315,7 +315,7 @@ export class Users { public async delete(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/${encodeURIComponent(userId)}` ), method: "DELETE", @@ -324,7 +324,7 @@ export class Users { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -448,7 +448,7 @@ export class Users { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/${encodeURIComponent(userId)}` ), method: "PATCH", @@ -457,7 +457,7 @@ export class Users { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -586,7 +586,7 @@ export class Users { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/invite` ), method: "POST", @@ -595,7 +595,7 @@ export class Users { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index e8b80e8b..b4eaa2c3 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Webhooks { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -53,7 +53,7 @@ export class Webhooks { public async list(siteId: string, requestOptions?: Webhooks.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/webhooks` ), method: "GET", @@ -62,7 +62,7 @@ export class Webhooks { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -186,7 +186,7 @@ export class Webhooks { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/webhooks` ), method: "POST", @@ -195,7 +195,7 @@ export class Webhooks { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -308,7 +308,7 @@ export class Webhooks { public async get(webhookId: string, requestOptions?: Webhooks.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `webhooks/${encodeURIComponent(webhookId)}` ), method: "GET", @@ -317,7 +317,7 @@ export class Webhooks { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -425,7 +425,7 @@ export class Webhooks { public async delete(webhookId: string, requestOptions?: Webhooks.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `webhooks/${encodeURIComponent(webhookId)}` ), method: "DELETE", @@ -434,7 +434,7 @@ export class Webhooks { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.1.2", - "User-Agent": "webflow-api/3.1.1", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/workspaces/client/Client.ts b/src/api/resources/workspaces/client/Client.ts new file mode 100644 index 00000000..487d672b --- /dev/null +++ b/src/api/resources/workspaces/client/Client.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import { AuditLogs } from "../resources/auditLogs/client/Client"; + +export declare namespace Workspaces { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Workspaces { + constructor(protected readonly _options: Workspaces.Options) {} + + protected _auditLogs: AuditLogs | undefined; + + public get auditLogs(): AuditLogs { + return (this._auditLogs ??= new AuditLogs(this._options)); + } +} diff --git a/src/api/resources/workspaces/client/index.ts b/src/api/resources/workspaces/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/workspaces/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/workspaces/index.ts b/src/api/resources/workspaces/index.ts new file mode 100644 index 00000000..4ce0f390 --- /dev/null +++ b/src/api/resources/workspaces/index.ts @@ -0,0 +1,2 @@ +export * from "./resources"; +export * from "./client"; diff --git a/src/api/resources/workspaces/resources/auditLogs/client/Client.ts b/src/api/resources/workspaces/resources/auditLogs/client/Client.ts new file mode 100644 index 00000000..03fe79f8 --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/client/Client.ts @@ -0,0 +1,192 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Webflow from "../../../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace AuditLogs { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class AuditLogs { + constructor(protected readonly _options: AuditLogs.Options) {} + + /** + * Get audit logs for a workspace. + * + * This endpoint requires an Enterprise workspace and a workspace token with the `workspace_activity:read` scope. Create a workspace token from your workspace dashboard integrations page to use this endpoint. + * + * Required scope | `workspace_activity:read` + * + * @param {string} workspaceIdOrSlug - Unique identifier or slug for a Workspace + * @param {Webflow.workspaces.AuditLogsGetWorkspaceAuditLogsRequest} request + * @param {AuditLogs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.workspaces.auditLogs.getWorkspaceAuditLogs("hitchhikers-workspace", { + * from: "2024-04-22T16:00:31Z", + * to: "2024-04-22T16:00:31Z" + * }) + */ + public async getWorkspaceAuditLogs( + workspaceIdOrSlug: string, + request: Webflow.workspaces.AuditLogsGetWorkspaceAuditLogsRequest = {}, + requestOptions?: AuditLogs.RequestOptions + ): Promise { + const { limit, offset, sortOrder, eventType, from: from_, to } = request; + const _queryParams: Record = {}; + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (sortOrder != null) { + _queryParams["sortOrder"] = sortOrder; + } + + if (eventType != null) { + _queryParams["eventType"] = eventType; + } + + if (from_ != null) { + _queryParams["from"] = from_.toISOString(); + } + + if (to != null) { + _queryParams["to"] = to.toISOString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `workspaces/${encodeURIComponent(workspaceIdOrSlug)}/audit_logs` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.WorkspaceAuditLogResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /workspaces/{workspace_id_or_slug}/audit_logs." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/workspaces/resources/auditLogs/client/index.ts b/src/api/resources/workspaces/resources/auditLogs/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.ts b/src/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.ts new file mode 100644 index 00000000..bc439142 --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * from: "2024-04-22T16:00:31Z", + * to: "2024-04-22T16:00:31Z" + * } + */ +export interface AuditLogsGetWorkspaceAuditLogsRequest { + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; + /** + * Sorts the results by asc or desc + */ + sortOrder?: Webflow.workspaces.AuditLogsGetWorkspaceAuditLogsRequestSortOrder; + /** + * The event type to filter by + */ + eventType?: Webflow.workspaces.AuditLogsGetWorkspaceAuditLogsRequestEventType; + /** + * The start date to filter by + */ + from?: Date; + /** + * The end date to filter by + */ + to?: Date; +} diff --git a/src/api/resources/workspaces/resources/auditLogs/client/requests/index.ts b/src/api/resources/workspaces/resources/auditLogs/client/requests/index.ts new file mode 100644 index 00000000..bd4dd6b0 --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/client/requests/index.ts @@ -0,0 +1 @@ +export { type AuditLogsGetWorkspaceAuditLogsRequest } from "./AuditLogsGetWorkspaceAuditLogsRequest"; diff --git a/src/api/resources/workspaces/resources/auditLogs/index.ts b/src/api/resources/workspaces/resources/auditLogs/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts b/src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts new file mode 100644 index 00000000..26859844 --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AuditLogsGetWorkspaceAuditLogsRequestEventType = + | "user_access" + | "custom_role" + | "workspace_membership" + | "site_membership" + | "workspace_invitation"; + +export const AuditLogsGetWorkspaceAuditLogsRequestEventType = { + UserAccess: "user_access", + CustomRole: "custom_role", + WorkspaceMembership: "workspace_membership", + SiteMembership: "site_membership", + WorkspaceInvitation: "workspace_invitation", +} as const; diff --git a/src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts b/src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts new file mode 100644 index 00000000..05669337 --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AuditLogsGetWorkspaceAuditLogsRequestSortOrder = "asc" | "desc"; + +export const AuditLogsGetWorkspaceAuditLogsRequestSortOrder = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/resources/workspaces/resources/auditLogs/types/index.ts b/src/api/resources/workspaces/resources/auditLogs/types/index.ts new file mode 100644 index 00000000..cfaf464d --- /dev/null +++ b/src/api/resources/workspaces/resources/auditLogs/types/index.ts @@ -0,0 +1,2 @@ +export * from "./AuditLogsGetWorkspaceAuditLogsRequestSortOrder"; +export * from "./AuditLogsGetWorkspaceAuditLogsRequestEventType"; diff --git a/src/api/resources/workspaces/resources/index.ts b/src/api/resources/workspaces/resources/index.ts new file mode 100644 index 00000000..7c178d39 --- /dev/null +++ b/src/api/resources/workspaces/resources/index.ts @@ -0,0 +1,3 @@ +export * as auditLogs from "./auditLogs"; +export * from "./auditLogs/types"; +export * from "./auditLogs/client/requests"; diff --git a/src/api/types/Asset.ts b/src/api/types/Asset.ts index 3b875559..54c7a8b0 100644 --- a/src/api/types/Asset.ts +++ b/src/api/types/Asset.ts @@ -9,25 +9,25 @@ import * as Webflow from "../index"; */ export interface Asset { /** Unique identifier for this asset */ - id?: string; + id: string; /** File format type */ - contentType?: string; + contentType: string; /** size in bytes */ - size?: number; + size: number; /** Unique identifier for the site that hosts this asset */ - siteId?: string; + siteId: string; /** Link to the asset */ - hostedUrl?: string; + hostedUrl: string; /** Original file name at the time of upload */ - originalFileName?: string; + originalFileName: string; /** Display name of the asset */ - displayName?: string; + displayName: string; /** Date the asset metadata was last updated */ - lastUpdated?: Date; + lastUpdated: Date; /** Date the asset metadata was created */ - createdOn?: Date; + createdOn: Date; /** A list of [asset variants](https://help.webflow.com/hc/en-us/articles/33961378697107-Responsive-images) created by Webflow to serve your site responsively. */ - variants?: Webflow.AssetVariant[]; + variants: Webflow.AssetVariant[]; /** The visual description of the asset */ altText?: string; } diff --git a/src/api/types/AssetVariant.ts b/src/api/types/AssetVariant.ts index 2f5052d8..7d2c25c8 100644 --- a/src/api/types/AssetVariant.ts +++ b/src/api/types/AssetVariant.ts @@ -7,19 +7,19 @@ */ export interface AssetVariant { /** URL of where the asset variant is hosted */ - hostedUrl?: string; + hostedUrl: string; /** Original file name of the variant */ - originalFileName?: string; + originalFileName: string; /** Display name of the variant */ - displayName?: string; + displayName: string; /** format of the variant */ - format?: string; + format: string; /** Width in pixels */ - width?: number; + width: number; /** Height in pixels */ - height?: number; + height: number; /** Value between 0 and 100 representing the image quality */ - quality?: number; + quality: number; /** Any associated validation errors */ error?: string; } diff --git a/src/api/types/Collection.ts b/src/api/types/Collection.ts index 1dba545f..5214eec9 100644 --- a/src/api/types/Collection.ts +++ b/src/api/types/Collection.ts @@ -11,9 +11,9 @@ export interface Collection { /** Unique identifier for a Collection */ id: string; /** Name given to the Collection */ - displayName?: string; + displayName: string; /** The name of one Item in Collection (e.g. ”Blog Post” if the Collection is called “Blog Posts”) */ - singularName?: string; + singularName: string; /** Slug of Collection in Site URL structure */ slug?: string; /** The date the collection was created */ diff --git a/src/api/types/CollectionItem.ts b/src/api/types/CollectionItem.ts index 2783d84b..67536fe9 100644 --- a/src/api/types/CollectionItem.ts +++ b/src/api/types/CollectionItem.ts @@ -17,11 +17,11 @@ export interface CollectionItem { /** Identifier for the locale of the CMS item */ cmsLocaleId?: string; /** The date the item was last published */ - lastPublished?: string; + lastPublished: string; /** The date the item was last updated */ - lastUpdated?: string; + lastUpdated: string; /** The date the item was created */ - createdOn?: string; + createdOn: string; /** Boolean determining if the Item is set to archived */ isArchived?: boolean; /** Boolean determining if the Item is set to draft */ diff --git a/src/api/types/CommentReply.ts b/src/api/types/CommentReply.ts new file mode 100644 index 00000000..da62cc86 --- /dev/null +++ b/src/api/types/CommentReply.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A comment thread represents a conversation between users on a specific page. Each comment thread has a unique identifier and can contain multiple comments. + */ +export interface CommentReply { + /** Unique identifier for the comment thread */ + id: string; + /** The comment reply unique identifier */ + commentId: string; + /** The site unique identifier */ + siteId: string; + /** The page unique identifier */ + pageId: string; + /** The locale unique identifier */ + localeId?: string; + /** The breakpoint the comment was left on */ + breakpoint: string; + /** The content of the comment reply */ + content: string; + /** Boolean determining if the comment thread is resolved */ + isResolved: boolean; + author: Webflow.CommentReplyAuthor; + /** List of mentioned users is an empty array until email notifications are sent. */ + mentionedUsers?: Webflow.CommentReplyMentionedUsersItem[]; + /** The date the item was last updated */ + lastUpdated: string; + /** The date the item was created */ + createdOn: string; +} diff --git a/src/api/types/CommentReplyAuthor.ts b/src/api/types/CommentReplyAuthor.ts new file mode 100644 index 00000000..a2e04427 --- /dev/null +++ b/src/api/types/CommentReplyAuthor.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentReplyAuthor { + /** The unique identifier of the author */ + id: string; + /** Email of the author */ + email: string; + /** Name of the author */ + name: string; +} diff --git a/src/api/types/CommentReplyList.ts b/src/api/types/CommentReplyList.ts new file mode 100644 index 00000000..16884f3c --- /dev/null +++ b/src/api/types/CommentReplyList.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A list of comment replies. + */ +export interface CommentReplyList { + comments: Webflow.CommentReply[]; + pagination: Webflow.CommentReplyListPagination; +} diff --git a/src/api/types/CommentReplyListPagination.ts b/src/api/types/CommentReplyListPagination.ts new file mode 100644 index 00000000..e96f3972 --- /dev/null +++ b/src/api/types/CommentReplyListPagination.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentReplyListPagination { + /** The limit specified in the request (default 100) */ + limit: number; + /** The offset specified for pagination */ + offset: number; + /** Total number of comment replies */ + total: number; +} diff --git a/src/api/types/CommentReplyMentionedUsersItem.ts b/src/api/types/CommentReplyMentionedUsersItem.ts new file mode 100644 index 00000000..3d1a27ba --- /dev/null +++ b/src/api/types/CommentReplyMentionedUsersItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentReplyMentionedUsersItem { + /** The unique identifier of the mentioned user */ + id: string; + /** Email of the user */ + email: string; + /** Name of the User */ + name: string; +} diff --git a/src/api/types/CommentThread.ts b/src/api/types/CommentThread.ts new file mode 100644 index 00000000..c8e3e685 --- /dev/null +++ b/src/api/types/CommentThread.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A comment thread represents a conversation between users on a specific page. Each comment thread has a unique identifier and can contain multiple comments. Retrieve comment replies using the replies API endpoint. + */ +export interface CommentThread { + /** Unique identifier for the comment thread */ + id: string; + /** The site unique identifier */ + siteId: string; + /** The page unique identifier */ + pageId: string; + /** The locale unique identifier */ + localeId?: string; + /** The item unique identifier */ + itemId?: string; + /** The breakpoint the comment was left on */ + breakpoint: string; + /** The URL of the page the comment was left on */ + url: string; + /** The content of the comment reply */ + content: string; + /** Boolean determining if the comment thread is resolved */ + isResolved: boolean; + author: Webflow.CommentThreadAuthor; + /** List of mentioned users. This is an empty array until email notifications are sent, which can take up to 5 minutes after the comment is created. */ + mentionedUsers: Webflow.CommentThreadMentionedUsersItem[]; + /** The date the item was created */ + createdOn: string; + /** The date the item was last updated */ + lastUpdated: string; +} diff --git a/src/api/types/CommentThreadAuthor.ts b/src/api/types/CommentThreadAuthor.ts new file mode 100644 index 00000000..3dd3cdb4 --- /dev/null +++ b/src/api/types/CommentThreadAuthor.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentThreadAuthor { + /** The unique identifier of the author */ + userId: string; + /** Email of the author */ + email: string; + /** Name of the author */ + name: string; +} diff --git a/src/api/types/CommentThreadList.ts b/src/api/types/CommentThreadList.ts new file mode 100644 index 00000000..dd90cfcc --- /dev/null +++ b/src/api/types/CommentThreadList.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A list of comment threads on the site. Contains the content of the first reply. + */ +export interface CommentThreadList { + comments: Webflow.CommentThread[]; + pagination: Webflow.CommentThreadListPagination; +} diff --git a/src/api/types/CommentThreadListPagination.ts b/src/api/types/CommentThreadListPagination.ts new file mode 100644 index 00000000..6399f3e5 --- /dev/null +++ b/src/api/types/CommentThreadListPagination.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentThreadListPagination { + /** The limit specified in the request (default 100) */ + limit: number; + /** The offset specified for pagination */ + offset: number; + /** Total number of comment threads */ + total: number; +} diff --git a/src/api/types/CommentThreadMentionedUsersItem.ts b/src/api/types/CommentThreadMentionedUsersItem.ts new file mode 100644 index 00000000..851363c9 --- /dev/null +++ b/src/api/types/CommentThreadMentionedUsersItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentThreadMentionedUsersItem { + /** The unique identifier of the mentioned user */ + userId: string; + /** Email of the user */ + email: string; + /** Name of the User */ + name: string; +} diff --git a/src/api/types/ComponentDom.ts b/src/api/types/ComponentDom.ts index aaf5e2a8..3f0b29af 100644 --- a/src/api/types/ComponentDom.ts +++ b/src/api/types/ComponentDom.ts @@ -5,7 +5,7 @@ import * as Webflow from "../index"; /** - * The Component DOM schema represents the content structure of a component. Similar to Page DOM, it captures various content nodes and their associated attributes, but specifically for a component's structure. Each node has a unique identifier and can contain text, images, or nested component instances. + * The Component DOM schema represents the content structure of a component. Similar to Page DOM, it captures various content nodes and their associated attributes, but specifically for a component's structure. Each node has a unique identifier and can contain text, images, select or text inputs, submit buttons, or nested component instances. */ export interface ComponentDom { /** Component ID */ diff --git a/src/api/types/ComponentNode.ts b/src/api/types/ComponentNode.ts index 33b9349c..6b1d4a62 100644 --- a/src/api/types/ComponentNode.ts +++ b/src/api/types/ComponentNode.ts @@ -9,9 +9,9 @@ import * as Webflow from "../index"; */ export interface ComponentNode { /** The unique identifier of the component instance node */ - id?: string; + id: string; /** The unique identifier of the component */ - componentId?: string; + componentId: string; /** List of component properties with overrides for a component instance. */ - propertyOverrides?: Webflow.ComponentProperty[]; + propertyOverrides: Webflow.ComponentProperty[]; } diff --git a/src/api/types/CustomRole.ts b/src/api/types/CustomRole.ts new file mode 100644 index 00000000..2e4c1762 --- /dev/null +++ b/src/api/types/CustomRole.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CustomRole { + /** The name of the custom role */ + roleName?: string; + /** The previous name of the custom role */ + previousRoleName?: string; +} diff --git a/src/api/types/CustomRoleAuditLogItem.ts b/src/api/types/CustomRoleAuditLogItem.ts new file mode 100644 index 00000000..ec3dced4 --- /dev/null +++ b/src/api/types/CustomRoleAuditLogItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface CustomRoleAuditLogItem { + eventSubType?: Webflow.CustomRoleAuditLogItemEventSubType; + payload?: Webflow.CustomRole; +} diff --git a/src/api/types/CustomRoleAuditLogItemEventSubType.ts b/src/api/types/CustomRoleAuditLogItemEventSubType.ts new file mode 100644 index 00000000..dcbbfc5a --- /dev/null +++ b/src/api/types/CustomRoleAuditLogItemEventSubType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CustomRoleAuditLogItemEventSubType = "role_created" | "role_updated" | "role_deleted"; + +export const CustomRoleAuditLogItemEventSubType = { + RoleCreated: "role_created", + RoleUpdated: "role_updated", + RoleDeleted: "role_deleted", +} as const; diff --git a/src/api/types/FieldType.ts b/src/api/types/FieldType.ts index 2cda2301..f8298384 100644 --- a/src/api/types/FieldType.ts +++ b/src/api/types/FieldType.ts @@ -10,32 +10,36 @@ export type FieldType = | "DateTime" | "Email" | "ExtFileRef" + | "File" | "Image" | "Link" | "MultiImage" | "MultiReference" | "Number" + | "Option" | "Phone" | "PlainText" | "Reference" | "RichText" | "Switch" - | "Video"; + | "VideoLink"; export const FieldType = { Color: "Color", DateTime: "DateTime", Email: "Email", ExtFileRef: "ExtFileRef", + File: "File", Image: "Image", Link: "Link", MultiImage: "MultiImage", MultiReference: "MultiReference", Number: "Number", + Option: "Option", Phone: "Phone", PlainText: "PlainText", Reference: "Reference", RichText: "RichText", Switch: "Switch", - Video: "Video", + VideoLink: "VideoLink", } as const; diff --git a/src/api/types/ImageNode.ts b/src/api/types/ImageNode.ts index fa70785b..8134be46 100644 --- a/src/api/types/ImageNode.ts +++ b/src/api/types/ImageNode.ts @@ -9,9 +9,9 @@ import * as Webflow from "../index"; */ export interface ImageNode { /** Node UUID */ - id?: string; + id: string; /** The image details of the node */ - image?: Webflow.ImageNodeImage; + image: Webflow.ImageNodeImage; /** The custom attributes of the node */ attributes?: Record; } diff --git a/src/api/types/Node.ts b/src/api/types/Node.ts index 74e961bd..d38a2fe9 100644 --- a/src/api/types/Node.ts +++ b/src/api/types/Node.ts @@ -7,7 +7,14 @@ import * as Webflow from "../index"; /** * A generic representation of a content element within the Document Object Model (DOM). Each node has a unique identifier and a specific type that determines its content structure and attributes. */ -export type Node = Webflow.Node.Text | Webflow.Node.Image | Webflow.Node.ComponentInstance; +export type Node = + | Webflow.Node.Text + | Webflow.Node.Image + | Webflow.Node.ComponentInstance + | Webflow.Node.TextInput + | Webflow.Node.Select + | Webflow.Node.SubmitButton + | Webflow.Node.SearchButton; export declare namespace Node { interface Text extends Webflow.TextNode { @@ -21,4 +28,20 @@ export declare namespace Node { interface ComponentInstance extends Webflow.ComponentNode { type: "component-instance"; } + + interface TextInput extends Webflow.TextInputNode { + type: "text-input"; + } + + interface Select extends Webflow.SelectNode { + type: "select"; + } + + interface SubmitButton extends Webflow.SubmitButtonNode { + type: "submit-button"; + } + + interface SearchButton extends Webflow.SearchButtonNode { + type: "search-button"; + } } diff --git a/src/api/types/Pagination.ts b/src/api/types/Pagination.ts index 1ee7cd06..3f34a0c1 100644 --- a/src/api/types/Pagination.ts +++ b/src/api/types/Pagination.ts @@ -7,9 +7,9 @@ */ export interface Pagination { /** The limit used for pagination */ - limit?: number; + limit: number; /** The offset used for pagination */ - offset?: number; + offset: number; /** The total number of records */ - total?: number; + total: number; } diff --git a/src/api/types/SearchButtonNode.ts b/src/api/types/SearchButtonNode.ts new file mode 100644 index 00000000..5c05178b --- /dev/null +++ b/src/api/types/SearchButtonNode.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Represents search button elements within the DOM. It contains the text of the button. Additional attributes can be associated with the text for styling or other purposes. + */ +export interface SearchButtonNode { + /** Node UUID */ + id: string; + /** The text content of the search button. */ + value: string; + /** The custom attributes of the node */ + attributes?: Record; +} diff --git a/src/api/types/SearchButtonNodeWrite.ts b/src/api/types/SearchButtonNodeWrite.ts new file mode 100644 index 00000000..b3e53d29 --- /dev/null +++ b/src/api/types/SearchButtonNodeWrite.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Update a search button node + */ +export interface SearchButtonNodeWrite { + /** Node UUID */ + nodeId: string; + /** The text content of the search button. */ + value: string; +} diff --git a/src/api/types/SelectNode.ts b/src/api/types/SelectNode.ts new file mode 100644 index 00000000..772862be --- /dev/null +++ b/src/api/types/SelectNode.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Represents select elements within the DOM. It contains the list of choices in the select. Additional attributes can be associated with the text for styling or other purposes. + */ +export interface SelectNode { + /** Node UUID */ + id: string; + /** The list of choices in this select node. */ + choices: Webflow.SelectNodeChoicesItem[]; + /** The custom attributes of the node */ + attributes?: Record; +} diff --git a/src/api/types/SelectNodeChoicesItem.ts b/src/api/types/SelectNodeChoicesItem.ts new file mode 100644 index 00000000..770af4d6 --- /dev/null +++ b/src/api/types/SelectNodeChoicesItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface SelectNodeChoicesItem { + /** The value of the choice when selected. */ + value: string; + /** The text to display for the choice. */ + text: string; +} diff --git a/src/api/types/SelectNodeWrite.ts b/src/api/types/SelectNodeWrite.ts new file mode 100644 index 00000000..ed46ca1d --- /dev/null +++ b/src/api/types/SelectNodeWrite.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Update choices on a select node + */ +export interface SelectNodeWrite { + /** Node UUID */ + nodeId: string; + /** The list of choices to set on the select node. */ + choices: Webflow.SelectNodeWriteChoicesItem[]; +} diff --git a/src/api/types/SelectNodeWriteChoicesItem.ts b/src/api/types/SelectNodeWriteChoicesItem.ts new file mode 100644 index 00000000..eb919862 --- /dev/null +++ b/src/api/types/SelectNodeWriteChoicesItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface SelectNodeWriteChoicesItem { + /** The value of the choice when selected. */ + value: string; + /** The text to display for the choice. */ + text: string; +} diff --git a/src/api/types/SiteMembership.ts b/src/api/types/SiteMembership.ts new file mode 100644 index 00000000..48318af1 --- /dev/null +++ b/src/api/types/SiteMembership.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface SiteMembership { + site?: Webflow.WorkspaceAuditLogItemPayloadSiteMembershipSite; + targetUser?: Webflow.WorkspaceAuditLogItemPayloadSiteMembershipTargetUser; + method?: Webflow.WorkspaceAuditLogItemPayloadSiteMembershipMethod; + userType?: Webflow.WorkspaceAuditLogItemPayloadSiteMembershipUserType; + /** The name of the role that was assigned to the user */ + roleName?: string; + /** The previous role that the user had */ + previousRoleName?: string; +} diff --git a/src/api/types/SiteMembershipAuditLogItem.ts b/src/api/types/SiteMembershipAuditLogItem.ts new file mode 100644 index 00000000..3079e592 --- /dev/null +++ b/src/api/types/SiteMembershipAuditLogItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface SiteMembershipAuditLogItem { + eventSubType?: Webflow.SiteMembershipAuditLogItemEventSubType; + payload?: Webflow.SiteMembership; +} diff --git a/src/api/types/SiteMembershipAuditLogItemEventSubType.ts b/src/api/types/SiteMembershipAuditLogItemEventSubType.ts new file mode 100644 index 00000000..3f63ebc8 --- /dev/null +++ b/src/api/types/SiteMembershipAuditLogItemEventSubType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type SiteMembershipAuditLogItemEventSubType = "user_added" | "user_removed" | "user_role_updated"; + +export const SiteMembershipAuditLogItemEventSubType = { + UserAdded: "user_added", + UserRemoved: "user_removed", + UserRoleUpdated: "user_role_updated", +} as const; diff --git a/src/api/types/SkuFieldData.ts b/src/api/types/SkuFieldData.ts index 9c4e5e84..19807009 100644 --- a/src/api/types/SkuFieldData.ts +++ b/src/api/types/SkuFieldData.ts @@ -25,4 +25,10 @@ export interface SkuFieldData { trackInventory?: boolean; /** Quantity of SKU that will be tracked as items are ordered. */ quantity?: number; + /** The URL for the main image of the SKU */ + mainImage?: string; + /** A unique identifier for the SKU */ + sku?: string; + /** The properties of the SKU */ + skuProperties?: Webflow.SkuPropertyList[]; } diff --git a/src/api/types/SkuFieldDataPrice.ts b/src/api/types/SkuFieldDataPrice.ts index 3266db3a..d37d51d9 100644 --- a/src/api/types/SkuFieldDataPrice.ts +++ b/src/api/types/SkuFieldDataPrice.ts @@ -10,4 +10,6 @@ export interface SkuFieldDataPrice { value?: number; /** Currency of Item */ unit?: string; + /** Currency of Item (alternative representation) */ + currency?: string; } diff --git a/src/api/types/SkuValueList.ts b/src/api/types/SkuValueList.ts index a090b5d2..be5dd1f7 100644 --- a/src/api/types/SkuValueList.ts +++ b/src/api/types/SkuValueList.ts @@ -3,6 +3,6 @@ */ /** - * A dictionary that maps a SKU property to a SKU value. The key of the dictionary is the SKU property ID, and the value is the SKU value ID. + * A mapping between SKU properties and their values, represented as key-value pairs. Each key represents a SKU Property ID (e.g. "color") and maps to its corresponding SKU Value ID (e.g. "blue"). This structure defines the specific variant combination for a SKU. */ export type SkuValueList = Record; diff --git a/src/api/types/StaticFieldType.ts b/src/api/types/StaticFieldType.ts index 8d7749ef..56bd6d20 100644 --- a/src/api/types/StaticFieldType.ts +++ b/src/api/types/StaticFieldType.ts @@ -18,7 +18,7 @@ export type StaticFieldType = | "PlainText" | "RichText" | "Switch" - | "Video"; + | "VideoLink"; export const StaticFieldType = { Color: "Color", @@ -33,5 +33,5 @@ export const StaticFieldType = { PlainText: "PlainText", RichText: "RichText", Switch: "Switch", - Video: "Video", + VideoLink: "VideoLink", } as const; diff --git a/src/api/types/SubmitButtonNode.ts b/src/api/types/SubmitButtonNode.ts new file mode 100644 index 00000000..18b31327 --- /dev/null +++ b/src/api/types/SubmitButtonNode.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Represents submit button elements within the DOM. It contains the text and waiting text of the button. Additional attributes can be associated with the text for styling or other purposes. + */ +export interface SubmitButtonNode { + /** Node UUID */ + id: string; + /** The text content of the submit button. */ + value: string; + /** The text to show while the form is submitting. */ + waitingText: string; + /** The custom attributes of the node */ + attributes?: Record; +} diff --git a/src/api/types/SubmitButtonNodeWrite.ts b/src/api/types/SubmitButtonNodeWrite.ts new file mode 100644 index 00000000..f7f5e428 --- /dev/null +++ b/src/api/types/SubmitButtonNodeWrite.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Update a submit button node + */ +export interface SubmitButtonNodeWrite { + /** Node UUID */ + nodeId: string; + /** The text content of the submit button. */ + value?: string; + /** The text to show while the form is submitting. */ + waitingText?: string; +} diff --git a/src/api/types/TextInputNode.ts b/src/api/types/TextInputNode.ts new file mode 100644 index 00000000..17dca89c --- /dev/null +++ b/src/api/types/TextInputNode.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Represents text input and textarea elements within the DOM. It contains the placeholder text in the input. Additional attributes can be associated with the text for styling or other purposes. + */ +export interface TextInputNode { + /** Node UUID */ + id: string; + /** The placeholder text of the input node */ + placeholder: string; + /** The custom attributes of the node */ + attributes?: Record; +} diff --git a/src/api/types/TextInputNodeWrite.ts b/src/api/types/TextInputNodeWrite.ts new file mode 100644 index 00000000..4e25aded --- /dev/null +++ b/src/api/types/TextInputNodeWrite.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Update placeholder text on a text input node + */ +export interface TextInputNodeWrite { + /** Node UUID */ + nodeId: string; + /** The placeholder text of the input node */ + placeholder: string; +} diff --git a/src/api/types/TextNode.ts b/src/api/types/TextNode.ts index cbd68242..13015905 100644 --- a/src/api/types/TextNode.ts +++ b/src/api/types/TextNode.ts @@ -9,9 +9,9 @@ import * as Webflow from "../index"; */ export interface TextNode { /** Node UUID */ - id?: string; + id: string; /** The text content of the node */ - text?: Webflow.TextNodeText; + text: Webflow.TextNodeText; /** The custom attributes of the node */ attributes?: Record; } diff --git a/src/api/types/TriggerType.ts b/src/api/types/TriggerType.ts index edcf942f..858a5e6c 100644 --- a/src/api/types/TriggerType.ts +++ b/src/api/types/TriggerType.ts @@ -20,7 +20,8 @@ export type TriggerType = | "collection_item_created" | "collection_item_changed" | "collection_item_deleted" - | "collection_item_unpublished"; + | "collection_item_unpublished" + | "comment_created"; export const TriggerType = { FormSubmission: "form_submission", @@ -38,4 +39,5 @@ export const TriggerType = { CollectionItemChanged: "collection_item_changed", CollectionItemDeleted: "collection_item_deleted", CollectionItemUnpublished: "collection_item_unpublished", + CommentCreated: "comment_created", } as const; diff --git a/src/api/types/UserAccess.ts b/src/api/types/UserAccess.ts new file mode 100644 index 00000000..bd05d769 --- /dev/null +++ b/src/api/types/UserAccess.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface UserAccess { + method?: Webflow.WorkspaceAuditLogItemPayloadUserAccessMethod; + /** The geolocation based on the logged IP address */ + location?: string; + /** The captured IP address of the user */ + ipAddress?: string; +} diff --git a/src/api/types/UserAccessAuditLogItem.ts b/src/api/types/UserAccessAuditLogItem.ts new file mode 100644 index 00000000..bbc3d213 --- /dev/null +++ b/src/api/types/UserAccessAuditLogItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface UserAccessAuditLogItem { + eventSubType?: Webflow.UserAccessAuditLogItemEventSubType; + payload?: Webflow.UserAccess; +} diff --git a/src/api/types/UserAccessAuditLogItemEventSubType.ts b/src/api/types/UserAccessAuditLogItemEventSubType.ts new file mode 100644 index 00000000..051d2412 --- /dev/null +++ b/src/api/types/UserAccessAuditLogItemEventSubType.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type UserAccessAuditLogItemEventSubType = "login" | "logout"; + +export const UserAccessAuditLogItemEventSubType = { + Login: "login", + Logout: "logout", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItem.ts b/src/api/types/WorkspaceAuditLogItem.ts new file mode 100644 index 00000000..34e1a108 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItem.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export type WorkspaceAuditLogItem = + | Webflow.WorkspaceAuditLogItem.UserAccess + | Webflow.WorkspaceAuditLogItem.CustomRole + | Webflow.WorkspaceAuditLogItem.WorkspaceMembership + | Webflow.WorkspaceAuditLogItem.SiteMembership + | Webflow.WorkspaceAuditLogItem.WorkspaceInvitation; + +export declare namespace WorkspaceAuditLogItem { + interface UserAccess extends Webflow.UserAccessAuditLogItem, _Base { + eventType: "user_access"; + } + + interface CustomRole extends Webflow.CustomRoleAuditLogItem, _Base { + eventType: "custom_role"; + } + + interface WorkspaceMembership extends Webflow.WorkspaceMembershipAuditLogItem, _Base { + eventType: "workspace_membership"; + } + + interface SiteMembership extends Webflow.SiteMembershipAuditLogItem, _Base { + eventType: "site_membership"; + } + + interface WorkspaceInvitation extends Webflow.WorkspaceInvitationAuditLogItem, _Base { + eventType: "workspace_invitation"; + } + + interface _Base { + timestamp?: Date; + actor?: Webflow.WorkspaceAuditLogItemActor; + workspace?: Webflow.WorkspaceAuditLogItemWorkspace; + } +} diff --git a/src/api/types/WorkspaceAuditLogItemActor.ts b/src/api/types/WorkspaceAuditLogItemActor.ts new file mode 100644 index 00000000..1f8f45bb --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemActor.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WorkspaceAuditLogItemActor { + id?: string; + email?: string; +} diff --git a/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts new file mode 100644 index 00000000..e15de58f --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceAuditLogItemPayloadSiteMembershipMethod = "sso" | "invite" | "scim" | "dashboard" | "admin"; + +export const WorkspaceAuditLogItemPayloadSiteMembershipMethod = { + Sso: "sso", + Invite: "invite", + Scim: "scim", + Dashboard: "dashboard", + Admin: "admin", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts new file mode 100644 index 00000000..d02ed3f9 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WorkspaceAuditLogItemPayloadSiteMembershipSite { + id?: string; + slug?: string; +} diff --git a/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts new file mode 100644 index 00000000..19275a27 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WorkspaceAuditLogItemPayloadSiteMembershipTargetUser { + id?: string; + email?: string; +} diff --git a/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts new file mode 100644 index 00000000..4195478d --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceAuditLogItemPayloadSiteMembershipUserType = "member" | "guest" | "reviewer" | "client"; + +export const WorkspaceAuditLogItemPayloadSiteMembershipUserType = { + Member: "member", + Guest: "guest", + Reviewer: "reviewer", + Client: "client", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts b/src/api/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts new file mode 100644 index 00000000..29368af6 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceAuditLogItemPayloadUserAccessMethod = "dashboard" | "sso" | "api" | "google"; + +export const WorkspaceAuditLogItemPayloadUserAccessMethod = { + Dashboard: "dashboard", + Sso: "sso", + Api: "api", + Google: "google", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts new file mode 100644 index 00000000..9329ca4f --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod = "sso" | "dashboard" | "admin"; + +export const WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod = { + Sso: "sso", + Dashboard: "dashboard", + Admin: "admin", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts new file mode 100644 index 00000000..cd74ed4c --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser { + id?: string; + email?: string; +} diff --git a/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts new file mode 100644 index 00000000..5982b845 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType = "member" | "guest" | "reviewer" | "client"; + +export const WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType = { + Member: "member", + Guest: "guest", + Reviewer: "reviewer", + Client: "client", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts new file mode 100644 index 00000000..55fc9da9 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod = "sso" | "dashboard" | "admin"; + +export const WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod = { + Sso: "sso", + Dashboard: "dashboard", + Admin: "admin", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts new file mode 100644 index 00000000..1747e827 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser { + id?: string; + email?: string; +} diff --git a/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts new file mode 100644 index 00000000..4dd2bbe2 --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType = "member" | "guest" | "reviewer" | "client"; + +export const WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType = { + Member: "member", + Guest: "guest", + Reviewer: "reviewer", + Client: "client", +} as const; diff --git a/src/api/types/WorkspaceAuditLogItemWorkspace.ts b/src/api/types/WorkspaceAuditLogItemWorkspace.ts new file mode 100644 index 00000000..f60d705b --- /dev/null +++ b/src/api/types/WorkspaceAuditLogItemWorkspace.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WorkspaceAuditLogItemWorkspace { + id?: string; + slug?: string; +} diff --git a/src/api/types/WorkspaceAuditLogResponse.ts b/src/api/types/WorkspaceAuditLogResponse.ts new file mode 100644 index 00000000..4c740f8d --- /dev/null +++ b/src/api/types/WorkspaceAuditLogResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface WorkspaceAuditLogResponse { + items?: Webflow.WorkspaceAuditLogItem[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/WorkspaceInvitation.ts b/src/api/types/WorkspaceInvitation.ts new file mode 100644 index 00000000..59aa2857 --- /dev/null +++ b/src/api/types/WorkspaceInvitation.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface WorkspaceInvitation { + targetUser?: Webflow.WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser; + method?: Webflow.WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod; + userType?: Webflow.WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType; + /** The name of the role that was assigned to the user */ + roleName?: string; + /** The previous role that the user had */ + previousRoleName?: string; +} diff --git a/src/api/types/WorkspaceInvitationAuditLogItem.ts b/src/api/types/WorkspaceInvitationAuditLogItem.ts new file mode 100644 index 00000000..0a3dea4c --- /dev/null +++ b/src/api/types/WorkspaceInvitationAuditLogItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface WorkspaceInvitationAuditLogItem { + eventSubType?: Webflow.WorkspaceInvitationAuditLogItemEventSubType; + payload?: Webflow.WorkspaceInvitation; +} diff --git a/src/api/types/WorkspaceInvitationAuditLogItemEventSubType.ts b/src/api/types/WorkspaceInvitationAuditLogItemEventSubType.ts new file mode 100644 index 00000000..8b1f837c --- /dev/null +++ b/src/api/types/WorkspaceInvitationAuditLogItemEventSubType.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceInvitationAuditLogItemEventSubType = + | "invite_sent" + | "invite_accepted" + | "invite_updated" + | "invite_canceled" + | "invite_declined"; + +export const WorkspaceInvitationAuditLogItemEventSubType = { + InviteSent: "invite_sent", + InviteAccepted: "invite_accepted", + InviteUpdated: "invite_updated", + InviteCanceled: "invite_canceled", + InviteDeclined: "invite_declined", +} as const; diff --git a/src/api/types/WorkspaceMembership.ts b/src/api/types/WorkspaceMembership.ts new file mode 100644 index 00000000..62df5b26 --- /dev/null +++ b/src/api/types/WorkspaceMembership.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface WorkspaceMembership { + targetUser?: Webflow.WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser; + method?: Webflow.WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod; + userType?: Webflow.WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType; + /** The name of the role that was assigned to the user */ + roleName?: string; + /** The previous role that the user had */ + previousRoleName?: string; +} diff --git a/src/api/types/WorkspaceMembershipAuditLogItem.ts b/src/api/types/WorkspaceMembershipAuditLogItem.ts new file mode 100644 index 00000000..df5fcff1 --- /dev/null +++ b/src/api/types/WorkspaceMembershipAuditLogItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface WorkspaceMembershipAuditLogItem { + eventSubType?: Webflow.WorkspaceMembershipAuditLogItemEventSubType; + payload?: Webflow.WorkspaceMembership; +} diff --git a/src/api/types/WorkspaceMembershipAuditLogItemEventSubType.ts b/src/api/types/WorkspaceMembershipAuditLogItemEventSubType.ts new file mode 100644 index 00000000..1e530391 --- /dev/null +++ b/src/api/types/WorkspaceMembershipAuditLogItemEventSubType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type WorkspaceMembershipAuditLogItemEventSubType = "user_added" | "user_removed" | "user_role_updated"; + +export const WorkspaceMembershipAuditLogItemEventSubType = { + UserAdded: "user_added", + UserRemoved: "user_removed", + UserRoleUpdated: "user_role_updated", +} as const; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index d6442032..ccdd7fa1 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -15,13 +15,43 @@ export * from "./SiteDataCollectionType"; export * from "./Site"; export * from "./InvalidScopes"; export * from "./NotEnterprisePlanWorkspace"; +export * from "./WorkspaceAuditLogItemPayloadUserAccessMethod"; +export * from "./UserAccess"; +export * from "./UserAccessAuditLogItemEventSubType"; +export * from "./UserAccessAuditLogItem"; +export * from "./CustomRole"; +export * from "./CustomRoleAuditLogItemEventSubType"; +export * from "./CustomRoleAuditLogItem"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType"; +export * from "./WorkspaceMembership"; +export * from "./WorkspaceMembershipAuditLogItemEventSubType"; +export * from "./WorkspaceMembershipAuditLogItem"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipSite"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipTargetUser"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipMethod"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipUserType"; +export * from "./SiteMembership"; +export * from "./SiteMembershipAuditLogItemEventSubType"; +export * from "./SiteMembershipAuditLogItem"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType"; +export * from "./WorkspaceInvitation"; +export * from "./WorkspaceInvitationAuditLogItemEventSubType"; +export * from "./WorkspaceInvitationAuditLogItem"; +export * from "./WorkspaceAuditLogItemActor"; +export * from "./WorkspaceAuditLogItemWorkspace"; +export * from "./WorkspaceAuditLogItem"; +export * from "./Pagination"; +export * from "./WorkspaceAuditLogResponse"; export * from "./Sites"; export * from "./NotEnterprisePlanSite"; export * from "./Domains"; export * from "./InvalidDomain"; export * from "./NoDomains"; export * from "./Redirect"; -export * from "./Pagination"; export * from "./Redirects"; export * from "./SitePlanId"; export * from "./SitePlanName"; @@ -61,6 +91,16 @@ export * from "./BulkCollectionItemFieldData"; export * from "./BulkCollectionItem"; export * from "./CollectionItemPatchSingleFieldData"; export * from "./CollectionItemPatchSingle"; +export * from "./CommentThreadAuthor"; +export * from "./CommentThreadMentionedUsersItem"; +export * from "./CommentThread"; +export * from "./CommentThreadListPagination"; +export * from "./CommentThreadList"; +export * from "./CommentReplyAuthor"; +export * from "./CommentReplyMentionedUsersItem"; +export * from "./CommentReply"; +export * from "./CommentReplyListPagination"; +export * from "./CommentReplyList"; export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; @@ -73,11 +113,21 @@ export * from "./Text"; export * from "./ComponentPropertyType"; export * from "./ComponentProperty"; export * from "./ComponentNode"; +export * from "./TextInputNode"; +export * from "./SelectNodeChoicesItem"; +export * from "./SelectNode"; +export * from "./SubmitButtonNode"; +export * from "./SearchButtonNode"; export * from "./Node"; export * from "./Dom"; export * from "./TextNodeWrite"; export * from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; export * from "./ComponentInstanceNodePropertyOverridesWrite"; +export * from "./SelectNodeWriteChoicesItem"; +export * from "./SelectNodeWrite"; +export * from "./TextInputNodeWrite"; +export * from "./SubmitButtonNodeWrite"; +export * from "./SearchButtonNodeWrite"; export * from "./Component"; export * from "./ComponentList"; export * from "./ComponentDom"; diff --git a/src/environments.ts b/src/environments.ts index fcea4017..84e3537b 100644 --- a/src/environments.ts +++ b/src/environments.ts @@ -2,8 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ +export interface WebflowEnvironmentUrls { + base: string; + dataApi: string; + contentDeliveryApi: string; + production: string; + cdn: string; +} + export const WebflowEnvironment = { - Default: "https://api.webflow.com/v2", + DataApi: { + base: "https://api.webflow.com/v2", + dataApi: "https://api.webflow.com/v2", + contentDeliveryApi: "https://api-cdn.webflow.com/v2", + production: "https://api.webflow.com/v2", + cdn: "https://api-cdn.webflow.com/v2", + }, } as const; -export type WebflowEnvironment = typeof WebflowEnvironment.Default; +export type WebflowEnvironment = typeof WebflowEnvironment.DataApi; diff --git a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts index cb601ac2..8977f03a 100644 --- a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts +++ b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts @@ -11,11 +11,11 @@ export const ItemsDeleteItemsLiveRequest: core.serialization.Schema< serializers.collections.ItemsDeleteItemsLiveRequest.Raw, Webflow.collections.ItemsDeleteItemsLiveRequest > = core.serialization.object({ - items: core.serialization.list(ItemsDeleteItemsLiveRequestItemsItem).optional(), + items: core.serialization.list(ItemsDeleteItemsLiveRequestItemsItem), }); export declare namespace ItemsDeleteItemsLiveRequest { interface Raw { - items?: ItemsDeleteItemsLiveRequestItemsItem.Raw[] | null; + items: ItemsDeleteItemsLiveRequestItemsItem.Raw[]; } } diff --git a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts index 28d2785c..19db962e 100644 --- a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts +++ b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts @@ -11,11 +11,11 @@ export const ItemsDeleteItemsRequest: core.serialization.Schema< serializers.collections.ItemsDeleteItemsRequest.Raw, Webflow.collections.ItemsDeleteItemsRequest > = core.serialization.object({ - items: core.serialization.list(ItemsDeleteItemsRequestItemsItem).optional(), + items: core.serialization.list(ItemsDeleteItemsRequestItemsItem), }); export declare namespace ItemsDeleteItemsRequest { interface Raw { - items?: ItemsDeleteItemsRequestItemsItem.Raw[] | null; + items: ItemsDeleteItemsRequestItemsItem.Raw[]; } } diff --git a/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts b/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts index 5aaf2383..a02ca834 100644 --- a/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts +++ b/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts @@ -7,12 +7,29 @@ import * as Webflow from "../../../../api/index"; import * as core from "../../../../core"; import { TextNodeWrite } from "../../../types/TextNodeWrite"; import { ComponentInstanceNodePropertyOverridesWrite } from "../../../types/ComponentInstanceNodePropertyOverridesWrite"; +import { SelectNodeWrite } from "../../../types/SelectNodeWrite"; +import { TextInputNodeWrite } from "../../../types/TextInputNodeWrite"; +import { SubmitButtonNodeWrite } from "../../../types/SubmitButtonNodeWrite"; +import { SearchButtonNodeWrite } from "../../../types/SearchButtonNodeWrite"; export const ComponentDomWriteNodesItem: core.serialization.Schema< serializers.ComponentDomWriteNodesItem.Raw, Webflow.ComponentDomWriteNodesItem -> = core.serialization.undiscriminatedUnion([TextNodeWrite, ComponentInstanceNodePropertyOverridesWrite]); +> = core.serialization.undiscriminatedUnion([ + TextNodeWrite, + ComponentInstanceNodePropertyOverridesWrite, + SelectNodeWrite, + TextInputNodeWrite, + SubmitButtonNodeWrite, + SearchButtonNodeWrite, +]); export declare namespace ComponentDomWriteNodesItem { - type Raw = TextNodeWrite.Raw | ComponentInstanceNodePropertyOverridesWrite.Raw; + type Raw = + | TextNodeWrite.Raw + | ComponentInstanceNodePropertyOverridesWrite.Raw + | SelectNodeWrite.Raw + | TextInputNodeWrite.Raw + | SubmitButtonNodeWrite.Raw + | SearchButtonNodeWrite.Raw; } diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index daa4176c..dbcf7a65 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -15,6 +15,7 @@ export * from "./orders/types"; export * as inventory from "./inventory"; export * from "./inventory/types"; export * as collections from "./collections"; +export * as workspaces from "./workspaces"; export * from "./sites/client/requests"; export * from "./collections/client/requests"; export * from "./pages/client/requests"; diff --git a/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts b/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts index 4d32f518..5fcac58f 100644 --- a/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts +++ b/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts @@ -7,12 +7,29 @@ import * as Webflow from "../../../../api/index"; import * as core from "../../../../core"; import { TextNodeWrite } from "../../../types/TextNodeWrite"; import { ComponentInstanceNodePropertyOverridesWrite } from "../../../types/ComponentInstanceNodePropertyOverridesWrite"; +import { SelectNodeWrite } from "../../../types/SelectNodeWrite"; +import { TextInputNodeWrite } from "../../../types/TextInputNodeWrite"; +import { SubmitButtonNodeWrite } from "../../../types/SubmitButtonNodeWrite"; +import { SearchButtonNodeWrite } from "../../../types/SearchButtonNodeWrite"; export const PageDomWriteNodesItem: core.serialization.Schema< serializers.PageDomWriteNodesItem.Raw, Webflow.PageDomWriteNodesItem -> = core.serialization.undiscriminatedUnion([TextNodeWrite, ComponentInstanceNodePropertyOverridesWrite]); +> = core.serialization.undiscriminatedUnion([ + TextNodeWrite, + ComponentInstanceNodePropertyOverridesWrite, + SelectNodeWrite, + TextInputNodeWrite, + SubmitButtonNodeWrite, + SearchButtonNodeWrite, +]); export declare namespace PageDomWriteNodesItem { - type Raw = TextNodeWrite.Raw | ComponentInstanceNodePropertyOverridesWrite.Raw; + type Raw = + | TextNodeWrite.Raw + | ComponentInstanceNodePropertyOverridesWrite.Raw + | SelectNodeWrite.Raw + | TextInputNodeWrite.Raw + | SubmitButtonNodeWrite.Raw + | SearchButtonNodeWrite.Raw; } diff --git a/src/serialization/resources/products/client/requests/ProductSkuCreate.ts b/src/serialization/resources/products/client/requests/ProductSkuCreate.ts index 48fee055..27e7b36e 100644 --- a/src/serialization/resources/products/client/requests/ProductSkuCreate.ts +++ b/src/serialization/resources/products/client/requests/ProductSkuCreate.ts @@ -6,20 +6,20 @@ import * as serializers from "../../../../index"; import * as Webflow from "../../../../../api/index"; import * as core from "../../../../../core"; import { PublishStatus } from "../../../../types/PublishStatus"; -import { Product } from "../../../../types/Product"; -import { Sku } from "../../../../types/Sku"; +import { ProductSkuCreateProduct } from "../../types/ProductSkuCreateProduct"; +import { ProductSkuCreateSku } from "../../types/ProductSkuCreateSku"; export const ProductSkuCreate: core.serialization.Schema = core.serialization.object({ publishStatus: PublishStatus.optional(), - product: Product.optional(), - sku: Sku.optional(), + product: ProductSkuCreateProduct, + sku: ProductSkuCreateSku, }); export declare namespace ProductSkuCreate { interface Raw { publishStatus?: PublishStatus.Raw | null; - product?: Product.Raw | null; - sku?: Sku.Raw | null; + product: ProductSkuCreateProduct.Raw; + sku: ProductSkuCreateSku.Raw; } } diff --git a/src/serialization/resources/products/types/ProductSkuCreateProduct.ts b/src/serialization/resources/products/types/ProductSkuCreateProduct.ts new file mode 100644 index 00000000..8e6003b8 --- /dev/null +++ b/src/serialization/resources/products/types/ProductSkuCreateProduct.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import { ProductFieldData } from "../../../types/ProductFieldData"; + +export const ProductSkuCreateProduct: core.serialization.ObjectSchema< + serializers.ProductSkuCreateProduct.Raw, + Webflow.ProductSkuCreateProduct +> = core.serialization.object({ + fieldData: ProductFieldData.optional(), +}); + +export declare namespace ProductSkuCreateProduct { + interface Raw { + fieldData?: ProductFieldData.Raw | null; + } +} diff --git a/src/serialization/resources/products/types/ProductSkuCreateSku.ts b/src/serialization/resources/products/types/ProductSkuCreateSku.ts new file mode 100644 index 00000000..7a2e3082 --- /dev/null +++ b/src/serialization/resources/products/types/ProductSkuCreateSku.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import { SkuFieldData } from "../../../types/SkuFieldData"; + +export const ProductSkuCreateSku: core.serialization.ObjectSchema< + serializers.ProductSkuCreateSku.Raw, + Webflow.ProductSkuCreateSku +> = core.serialization.object({ + fieldData: SkuFieldData.optional(), +}); + +export declare namespace ProductSkuCreateSku { + interface Raw { + fieldData?: SkuFieldData.Raw | null; + } +} diff --git a/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts b/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts index 4ca5e4a7..c92b5e4e 100644 --- a/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts +++ b/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts @@ -11,11 +11,11 @@ export const ProductsCreateSkuResponse: core.serialization.ObjectSchema< serializers.ProductsCreateSkuResponse.Raw, Webflow.ProductsCreateSkuResponse > = core.serialization.object({ - skus: core.serialization.list(Sku).optional(), + skus: core.serialization.list(Sku), }); export declare namespace ProductsCreateSkuResponse { interface Raw { - skus?: Sku.Raw[] | null; + skus: Sku.Raw[]; } } diff --git a/src/serialization/resources/products/types/index.ts b/src/serialization/resources/products/types/index.ts index e286df49..61d70f8d 100644 --- a/src/serialization/resources/products/types/index.ts +++ b/src/serialization/resources/products/types/index.ts @@ -1 +1,3 @@ +export * from "./ProductSkuCreateProduct"; +export * from "./ProductSkuCreateSku"; export * from "./ProductsCreateSkuResponse"; diff --git a/src/serialization/resources/sites/index.ts b/src/serialization/resources/sites/index.ts index c9240f83..a931b363 100644 --- a/src/serialization/resources/sites/index.ts +++ b/src/serialization/resources/sites/index.ts @@ -1,2 +1,3 @@ export * from "./types"; +export * from "./resources"; export * from "./client"; diff --git a/src/serialization/resources/sites/resources/comments/index.ts b/src/serialization/resources/sites/resources/comments/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts new file mode 100644 index 00000000..65c623fa --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const CommentsGetCommentThreadRequestSortBy: core.serialization.Schema< + serializers.sites.CommentsGetCommentThreadRequestSortBy.Raw, + Webflow.sites.CommentsGetCommentThreadRequestSortBy +> = core.serialization.enum_(["createdOn", "lastUpdated"]); + +export declare namespace CommentsGetCommentThreadRequestSortBy { + type Raw = "createdOn" | "lastUpdated"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts new file mode 100644 index 00000000..48f607bb --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const CommentsGetCommentThreadRequestSortOrder: core.serialization.Schema< + serializers.sites.CommentsGetCommentThreadRequestSortOrder.Raw, + Webflow.sites.CommentsGetCommentThreadRequestSortOrder +> = core.serialization.enum_(["asc", "desc"]); + +export declare namespace CommentsGetCommentThreadRequestSortOrder { + type Raw = "asc" | "desc"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts new file mode 100644 index 00000000..1e2133d3 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortBy.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const CommentsListCommentRepliesRequestSortBy: core.serialization.Schema< + serializers.sites.CommentsListCommentRepliesRequestSortBy.Raw, + Webflow.sites.CommentsListCommentRepliesRequestSortBy +> = core.serialization.enum_(["createdOn", "lastUpdated"]); + +export declare namespace CommentsListCommentRepliesRequestSortBy { + type Raw = "createdOn" | "lastUpdated"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts new file mode 100644 index 00000000..68233b45 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentRepliesRequestSortOrder.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const CommentsListCommentRepliesRequestSortOrder: core.serialization.Schema< + serializers.sites.CommentsListCommentRepliesRequestSortOrder.Raw, + Webflow.sites.CommentsListCommentRepliesRequestSortOrder +> = core.serialization.enum_(["asc", "desc"]); + +export declare namespace CommentsListCommentRepliesRequestSortOrder { + type Raw = "asc" | "desc"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts new file mode 100644 index 00000000..4671c2ee --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const CommentsListCommentThreadsRequestSortBy: core.serialization.Schema< + serializers.sites.CommentsListCommentThreadsRequestSortBy.Raw, + Webflow.sites.CommentsListCommentThreadsRequestSortBy +> = core.serialization.enum_(["createdOn", "lastUpdated"]); + +export declare namespace CommentsListCommentThreadsRequestSortBy { + type Raw = "createdOn" | "lastUpdated"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts new file mode 100644 index 00000000..f978dba3 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const CommentsListCommentThreadsRequestSortOrder: core.serialization.Schema< + serializers.sites.CommentsListCommentThreadsRequestSortOrder.Raw, + Webflow.sites.CommentsListCommentThreadsRequestSortOrder +> = core.serialization.enum_(["asc", "desc"]); + +export declare namespace CommentsListCommentThreadsRequestSortOrder { + type Raw = "asc" | "desc"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/index.ts b/src/serialization/resources/sites/resources/comments/types/index.ts new file mode 100644 index 00000000..0d2c5090 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/index.ts @@ -0,0 +1,6 @@ +export * from "./CommentsListCommentThreadsRequestSortBy"; +export * from "./CommentsListCommentThreadsRequestSortOrder"; +export * from "./CommentsGetCommentThreadRequestSortBy"; +export * from "./CommentsGetCommentThreadRequestSortOrder"; +export * from "./CommentsListCommentRepliesRequestSortBy"; +export * from "./CommentsListCommentRepliesRequestSortOrder"; diff --git a/src/serialization/resources/sites/resources/index.ts b/src/serialization/resources/sites/resources/index.ts new file mode 100644 index 00000000..134f72ad --- /dev/null +++ b/src/serialization/resources/sites/resources/index.ts @@ -0,0 +1,5 @@ +export * as wellKnown from "./wellKnown"; +export * from "./wellKnown/types"; +export * as comments from "./comments"; +export * from "./comments/types"; +export * from "./wellKnown/client/requests"; diff --git a/src/serialization/resources/sites/resources/wellKnown/client/index.ts b/src/serialization/resources/sites/resources/wellKnown/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts new file mode 100644 index 00000000..268f0571 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../../index"; +import * as Webflow from "../../../../../../../api/index"; +import * as core from "../../../../../../../core"; + +export const WellKnownDeleteRequest: core.serialization.Schema< + serializers.sites.WellKnownDeleteRequest.Raw, + Webflow.sites.WellKnownDeleteRequest +> = core.serialization.object({ + fileNames: core.serialization.list(core.serialization.string()).optional(), +}); + +export declare namespace WellKnownDeleteRequest { + interface Raw { + fileNames?: string[] | null; + } +} diff --git a/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts new file mode 100644 index 00000000..c26ad88f --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../../index"; +import * as Webflow from "../../../../../../../api/index"; +import * as core from "../../../../../../../core"; +import { WellKnownFileContentType } from "../../types/WellKnownFileContentType"; + +export const WellKnownFile: core.serialization.Schema< + serializers.sites.WellKnownFile.Raw, + Webflow.sites.WellKnownFile +> = core.serialization.object({ + fileName: core.serialization.string(), + fileData: core.serialization.string(), + contentType: WellKnownFileContentType.optional(), +}); + +export declare namespace WellKnownFile { + interface Raw { + fileName: string; + fileData: string; + contentType?: WellKnownFileContentType.Raw | null; + } +} diff --git a/src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts b/src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts new file mode 100644 index 00000000..64acd63b --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts @@ -0,0 +1,2 @@ +export { WellKnownFile } from "./WellKnownFile"; +export { WellKnownDeleteRequest } from "./WellKnownDeleteRequest"; diff --git a/src/serialization/resources/sites/resources/wellKnown/index.ts b/src/serialization/resources/sites/resources/wellKnown/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts b/src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts new file mode 100644 index 00000000..293cc580 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const WellKnownFileContentType: core.serialization.Schema< + serializers.sites.WellKnownFileContentType.Raw, + Webflow.sites.WellKnownFileContentType +> = core.serialization.enum_(["application/json", "text/plain"]); + +export declare namespace WellKnownFileContentType { + type Raw = "application/json" | "text/plain"; +} diff --git a/src/serialization/resources/sites/resources/wellKnown/types/index.ts b/src/serialization/resources/sites/resources/wellKnown/types/index.ts new file mode 100644 index 00000000..e9347565 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/types/index.ts @@ -0,0 +1 @@ +export * from "./WellKnownFileContentType"; diff --git a/src/serialization/resources/workspaces/index.ts b/src/serialization/resources/workspaces/index.ts new file mode 100644 index 00000000..3e5335fe --- /dev/null +++ b/src/serialization/resources/workspaces/index.ts @@ -0,0 +1 @@ +export * from "./resources"; diff --git a/src/serialization/resources/workspaces/resources/auditLogs/index.ts b/src/serialization/resources/workspaces/resources/auditLogs/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/serialization/resources/workspaces/resources/auditLogs/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts b/src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts new file mode 100644 index 00000000..bd11c66a --- /dev/null +++ b/src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const AuditLogsGetWorkspaceAuditLogsRequestEventType: core.serialization.Schema< + serializers.workspaces.AuditLogsGetWorkspaceAuditLogsRequestEventType.Raw, + Webflow.workspaces.AuditLogsGetWorkspaceAuditLogsRequestEventType +> = core.serialization.enum_([ + "user_access", + "custom_role", + "workspace_membership", + "site_membership", + "workspace_invitation", +]); + +export declare namespace AuditLogsGetWorkspaceAuditLogsRequestEventType { + type Raw = "user_access" | "custom_role" | "workspace_membership" | "site_membership" | "workspace_invitation"; +} diff --git a/src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts b/src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts new file mode 100644 index 00000000..93e52c9c --- /dev/null +++ b/src/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestSortOrder.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Webflow from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const AuditLogsGetWorkspaceAuditLogsRequestSortOrder: core.serialization.Schema< + serializers.workspaces.AuditLogsGetWorkspaceAuditLogsRequestSortOrder.Raw, + Webflow.workspaces.AuditLogsGetWorkspaceAuditLogsRequestSortOrder +> = core.serialization.enum_(["asc", "desc"]); + +export declare namespace AuditLogsGetWorkspaceAuditLogsRequestSortOrder { + type Raw = "asc" | "desc"; +} diff --git a/src/serialization/resources/workspaces/resources/auditLogs/types/index.ts b/src/serialization/resources/workspaces/resources/auditLogs/types/index.ts new file mode 100644 index 00000000..cfaf464d --- /dev/null +++ b/src/serialization/resources/workspaces/resources/auditLogs/types/index.ts @@ -0,0 +1,2 @@ +export * from "./AuditLogsGetWorkspaceAuditLogsRequestSortOrder"; +export * from "./AuditLogsGetWorkspaceAuditLogsRequestEventType"; diff --git a/src/serialization/resources/workspaces/resources/index.ts b/src/serialization/resources/workspaces/resources/index.ts new file mode 100644 index 00000000..dc704ce7 --- /dev/null +++ b/src/serialization/resources/workspaces/resources/index.ts @@ -0,0 +1,2 @@ +export * as auditLogs from "./auditLogs"; +export * from "./auditLogs/types"; diff --git a/src/serialization/types/Asset.ts b/src/serialization/types/Asset.ts index 12f39e6a..7a3f5c8d 100644 --- a/src/serialization/types/Asset.ts +++ b/src/serialization/types/Asset.ts @@ -8,31 +8,31 @@ import * as core from "../../core"; import { AssetVariant } from "./AssetVariant"; export const Asset: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - contentType: core.serialization.string().optional(), - size: core.serialization.number().optional(), - siteId: core.serialization.string().optional(), - hostedUrl: core.serialization.string().optional(), - originalFileName: core.serialization.string().optional(), - displayName: core.serialization.string().optional(), - lastUpdated: core.serialization.date().optional(), - createdOn: core.serialization.date().optional(), - variants: core.serialization.list(AssetVariant).optional(), + id: core.serialization.string(), + contentType: core.serialization.string(), + size: core.serialization.number(), + siteId: core.serialization.string(), + hostedUrl: core.serialization.string(), + originalFileName: core.serialization.string(), + displayName: core.serialization.string(), + lastUpdated: core.serialization.date(), + createdOn: core.serialization.date(), + variants: core.serialization.list(AssetVariant), altText: core.serialization.string().optional(), }); export declare namespace Asset { interface Raw { - id?: string | null; - contentType?: string | null; - size?: number | null; - siteId?: string | null; - hostedUrl?: string | null; - originalFileName?: string | null; - displayName?: string | null; - lastUpdated?: string | null; - createdOn?: string | null; - variants?: AssetVariant.Raw[] | null; + id: string; + contentType: string; + size: number; + siteId: string; + hostedUrl: string; + originalFileName: string; + displayName: string; + lastUpdated: string; + createdOn: string; + variants: AssetVariant.Raw[]; altText?: string | null; } } diff --git a/src/serialization/types/AssetVariant.ts b/src/serialization/types/AssetVariant.ts index 094173b7..64b5f71a 100644 --- a/src/serialization/types/AssetVariant.ts +++ b/src/serialization/types/AssetVariant.ts @@ -8,25 +8,25 @@ import * as core from "../../core"; export const AssetVariant: core.serialization.ObjectSchema = core.serialization.object({ - hostedUrl: core.serialization.string().optional(), - originalFileName: core.serialization.string().optional(), - displayName: core.serialization.string().optional(), - format: core.serialization.string().optional(), - width: core.serialization.number().optional(), - height: core.serialization.number().optional(), - quality: core.serialization.number().optional(), + hostedUrl: core.serialization.string(), + originalFileName: core.serialization.string(), + displayName: core.serialization.string(), + format: core.serialization.string(), + width: core.serialization.number(), + height: core.serialization.number(), + quality: core.serialization.number(), error: core.serialization.string().optional(), }); export declare namespace AssetVariant { interface Raw { - hostedUrl?: string | null; - originalFileName?: string | null; - displayName?: string | null; - format?: string | null; - width?: number | null; - height?: number | null; - quality?: number | null; + hostedUrl: string; + originalFileName: string; + displayName: string; + format: string; + width: number; + height: number; + quality: number; error?: string | null; } } diff --git a/src/serialization/types/Collection.ts b/src/serialization/types/Collection.ts index 5e5b5e66..fd55335c 100644 --- a/src/serialization/types/Collection.ts +++ b/src/serialization/types/Collection.ts @@ -10,8 +10,8 @@ import { Field } from "./Field"; export const Collection: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string(), - displayName: core.serialization.string().optional(), - singularName: core.serialization.string().optional(), + displayName: core.serialization.string(), + singularName: core.serialization.string(), slug: core.serialization.string().optional(), createdOn: core.serialization.date().optional(), lastUpdated: core.serialization.date().optional(), @@ -21,8 +21,8 @@ export const Collection: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + commentId: core.serialization.string(), + siteId: core.serialization.string(), + pageId: core.serialization.string(), + localeId: core.serialization.string().optional(), + breakpoint: core.serialization.string(), + content: core.serialization.string(), + isResolved: core.serialization.boolean(), + author: CommentReplyAuthor, + mentionedUsers: core.serialization.list(CommentReplyMentionedUsersItem).optional(), + lastUpdated: core.serialization.string(), + createdOn: core.serialization.string(), + }); + +export declare namespace CommentReply { + interface Raw { + id: string; + commentId: string; + siteId: string; + pageId: string; + localeId?: string | null; + breakpoint: string; + content: string; + isResolved: boolean; + author: CommentReplyAuthor.Raw; + mentionedUsers?: CommentReplyMentionedUsersItem.Raw[] | null; + lastUpdated: string; + createdOn: string; + } +} diff --git a/src/serialization/types/CommentReplyAuthor.ts b/src/serialization/types/CommentReplyAuthor.ts new file mode 100644 index 00000000..43c33b43 --- /dev/null +++ b/src/serialization/types/CommentReplyAuthor.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CommentReplyAuthor: core.serialization.ObjectSchema< + serializers.CommentReplyAuthor.Raw, + Webflow.CommentReplyAuthor +> = core.serialization.object({ + id: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentReplyAuthor { + interface Raw { + id: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/CommentReplyList.ts b/src/serialization/types/CommentReplyList.ts new file mode 100644 index 00000000..114fd508 --- /dev/null +++ b/src/serialization/types/CommentReplyList.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { CommentReply } from "./CommentReply"; +import { CommentReplyListPagination } from "./CommentReplyListPagination"; + +export const CommentReplyList: core.serialization.ObjectSchema< + serializers.CommentReplyList.Raw, + Webflow.CommentReplyList +> = core.serialization.object({ + comments: core.serialization.list(CommentReply), + pagination: CommentReplyListPagination, +}); + +export declare namespace CommentReplyList { + interface Raw { + comments: CommentReply.Raw[]; + pagination: CommentReplyListPagination.Raw; + } +} diff --git a/src/serialization/types/CommentReplyListPagination.ts b/src/serialization/types/CommentReplyListPagination.ts new file mode 100644 index 00000000..86ed8d08 --- /dev/null +++ b/src/serialization/types/CommentReplyListPagination.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CommentReplyListPagination: core.serialization.ObjectSchema< + serializers.CommentReplyListPagination.Raw, + Webflow.CommentReplyListPagination +> = core.serialization.object({ + limit: core.serialization.number(), + offset: core.serialization.number(), + total: core.serialization.number(), +}); + +export declare namespace CommentReplyListPagination { + interface Raw { + limit: number; + offset: number; + total: number; + } +} diff --git a/src/serialization/types/CommentReplyMentionedUsersItem.ts b/src/serialization/types/CommentReplyMentionedUsersItem.ts new file mode 100644 index 00000000..d08e20e5 --- /dev/null +++ b/src/serialization/types/CommentReplyMentionedUsersItem.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CommentReplyMentionedUsersItem: core.serialization.ObjectSchema< + serializers.CommentReplyMentionedUsersItem.Raw, + Webflow.CommentReplyMentionedUsersItem +> = core.serialization.object({ + id: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentReplyMentionedUsersItem { + interface Raw { + id: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/CommentThread.ts b/src/serialization/types/CommentThread.ts new file mode 100644 index 00000000..636bcc25 --- /dev/null +++ b/src/serialization/types/CommentThread.ts @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { CommentThreadAuthor } from "./CommentThreadAuthor"; +import { CommentThreadMentionedUsersItem } from "./CommentThreadMentionedUsersItem"; + +export const CommentThread: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + siteId: core.serialization.string(), + pageId: core.serialization.string(), + localeId: core.serialization.string().optional(), + itemId: core.serialization.string().optional(), + breakpoint: core.serialization.string(), + url: core.serialization.string(), + content: core.serialization.string(), + isResolved: core.serialization.boolean(), + author: CommentThreadAuthor, + mentionedUsers: core.serialization.list(CommentThreadMentionedUsersItem), + createdOn: core.serialization.string(), + lastUpdated: core.serialization.string(), + }); + +export declare namespace CommentThread { + interface Raw { + id: string; + siteId: string; + pageId: string; + localeId?: string | null; + itemId?: string | null; + breakpoint: string; + url: string; + content: string; + isResolved: boolean; + author: CommentThreadAuthor.Raw; + mentionedUsers: CommentThreadMentionedUsersItem.Raw[]; + createdOn: string; + lastUpdated: string; + } +} diff --git a/src/serialization/types/CommentThreadAuthor.ts b/src/serialization/types/CommentThreadAuthor.ts new file mode 100644 index 00000000..0b876243 --- /dev/null +++ b/src/serialization/types/CommentThreadAuthor.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CommentThreadAuthor: core.serialization.ObjectSchema< + serializers.CommentThreadAuthor.Raw, + Webflow.CommentThreadAuthor +> = core.serialization.object({ + userId: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentThreadAuthor { + interface Raw { + userId: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/CommentThreadList.ts b/src/serialization/types/CommentThreadList.ts new file mode 100644 index 00000000..20858bb6 --- /dev/null +++ b/src/serialization/types/CommentThreadList.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { CommentThread } from "./CommentThread"; +import { CommentThreadListPagination } from "./CommentThreadListPagination"; + +export const CommentThreadList: core.serialization.ObjectSchema< + serializers.CommentThreadList.Raw, + Webflow.CommentThreadList +> = core.serialization.object({ + comments: core.serialization.list(CommentThread), + pagination: CommentThreadListPagination, +}); + +export declare namespace CommentThreadList { + interface Raw { + comments: CommentThread.Raw[]; + pagination: CommentThreadListPagination.Raw; + } +} diff --git a/src/serialization/types/CommentThreadListPagination.ts b/src/serialization/types/CommentThreadListPagination.ts new file mode 100644 index 00000000..83f463ed --- /dev/null +++ b/src/serialization/types/CommentThreadListPagination.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CommentThreadListPagination: core.serialization.ObjectSchema< + serializers.CommentThreadListPagination.Raw, + Webflow.CommentThreadListPagination +> = core.serialization.object({ + limit: core.serialization.number(), + offset: core.serialization.number(), + total: core.serialization.number(), +}); + +export declare namespace CommentThreadListPagination { + interface Raw { + limit: number; + offset: number; + total: number; + } +} diff --git a/src/serialization/types/CommentThreadMentionedUsersItem.ts b/src/serialization/types/CommentThreadMentionedUsersItem.ts new file mode 100644 index 00000000..2eabece3 --- /dev/null +++ b/src/serialization/types/CommentThreadMentionedUsersItem.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CommentThreadMentionedUsersItem: core.serialization.ObjectSchema< + serializers.CommentThreadMentionedUsersItem.Raw, + Webflow.CommentThreadMentionedUsersItem +> = core.serialization.object({ + userId: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentThreadMentionedUsersItem { + interface Raw { + userId: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/ComponentNode.ts b/src/serialization/types/ComponentNode.ts index 4118e39d..41f7160c 100644 --- a/src/serialization/types/ComponentNode.ts +++ b/src/serialization/types/ComponentNode.ts @@ -9,15 +9,15 @@ import { ComponentProperty } from "./ComponentProperty"; export const ComponentNode: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - componentId: core.serialization.string().optional(), - propertyOverrides: core.serialization.list(ComponentProperty).optional(), + id: core.serialization.string(), + componentId: core.serialization.string(), + propertyOverrides: core.serialization.list(ComponentProperty), }); export declare namespace ComponentNode { interface Raw { - id?: string | null; - componentId?: string | null; - propertyOverrides?: ComponentProperty.Raw[] | null; + id: string; + componentId: string; + propertyOverrides: ComponentProperty.Raw[]; } } diff --git a/src/serialization/types/CustomRole.ts b/src/serialization/types/CustomRole.ts new file mode 100644 index 00000000..319567d1 --- /dev/null +++ b/src/serialization/types/CustomRole.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CustomRole: core.serialization.ObjectSchema = + core.serialization.object({ + roleName: core.serialization.string().optional(), + previousRoleName: core.serialization.string().optional(), + }); + +export declare namespace CustomRole { + interface Raw { + roleName?: string | null; + previousRoleName?: string | null; + } +} diff --git a/src/serialization/types/CustomRoleAuditLogItem.ts b/src/serialization/types/CustomRoleAuditLogItem.ts new file mode 100644 index 00000000..fad8c760 --- /dev/null +++ b/src/serialization/types/CustomRoleAuditLogItem.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { CustomRoleAuditLogItemEventSubType } from "./CustomRoleAuditLogItemEventSubType"; +import { CustomRole } from "./CustomRole"; + +export const CustomRoleAuditLogItem: core.serialization.ObjectSchema< + serializers.CustomRoleAuditLogItem.Raw, + Webflow.CustomRoleAuditLogItem +> = core.serialization.object({ + eventSubType: CustomRoleAuditLogItemEventSubType.optional(), + payload: CustomRole.optional(), +}); + +export declare namespace CustomRoleAuditLogItem { + interface Raw { + eventSubType?: CustomRoleAuditLogItemEventSubType.Raw | null; + payload?: CustomRole.Raw | null; + } +} diff --git a/src/serialization/types/CustomRoleAuditLogItemEventSubType.ts b/src/serialization/types/CustomRoleAuditLogItemEventSubType.ts new file mode 100644 index 00000000..2c6671ba --- /dev/null +++ b/src/serialization/types/CustomRoleAuditLogItemEventSubType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const CustomRoleAuditLogItemEventSubType: core.serialization.Schema< + serializers.CustomRoleAuditLogItemEventSubType.Raw, + Webflow.CustomRoleAuditLogItemEventSubType +> = core.serialization.enum_(["role_created", "role_updated", "role_deleted"]); + +export declare namespace CustomRoleAuditLogItemEventSubType { + type Raw = "role_created" | "role_updated" | "role_deleted"; +} diff --git a/src/serialization/types/FieldType.ts b/src/serialization/types/FieldType.ts index 57d06f96..368daa41 100644 --- a/src/serialization/types/FieldType.ts +++ b/src/serialization/types/FieldType.ts @@ -12,17 +12,19 @@ export const FieldType: core.serialization.Schema = core.serialization.object({ - id: core.serialization.string().optional(), - image: ImageNodeImage.optional(), + id: core.serialization.string(), + image: ImageNodeImage, attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace ImageNode { interface Raw { - id?: string | null; - image?: ImageNodeImage.Raw | null; + id: string; + image: ImageNodeImage.Raw; attributes?: Record | null; } } diff --git a/src/serialization/types/Node.ts b/src/serialization/types/Node.ts index 311ff02b..97ad60bc 100644 --- a/src/serialization/types/Node.ts +++ b/src/serialization/types/Node.ts @@ -8,12 +8,20 @@ import * as core from "../../core"; import { TextNode } from "./TextNode"; import { ImageNode } from "./ImageNode"; import { ComponentNode } from "./ComponentNode"; +import { TextInputNode } from "./TextInputNode"; +import { SelectNode } from "./SelectNode"; +import { SubmitButtonNode } from "./SubmitButtonNode"; +import { SearchButtonNode } from "./SearchButtonNode"; export const Node: core.serialization.Schema = core.serialization .union("type", { text: TextNode, image: ImageNode, "component-instance": ComponentNode, + "text-input": TextInputNode, + select: SelectNode, + "submit-button": SubmitButtonNode, + "search-button": SearchButtonNode, }) .transform({ transform: (value) => value, @@ -21,7 +29,14 @@ export const Node: core.serialization.Schema }); export declare namespace Node { - type Raw = Node.Text | Node.Image | Node.ComponentInstance; + type Raw = + | Node.Text + | Node.Image + | Node.ComponentInstance + | Node.TextInput + | Node.Select + | Node.SubmitButton + | Node.SearchButton; interface Text extends TextNode.Raw { type: "text"; @@ -34,4 +49,20 @@ export declare namespace Node { interface ComponentInstance extends ComponentNode.Raw { type: "component-instance"; } + + interface TextInput extends TextInputNode.Raw { + type: "text-input"; + } + + interface Select extends SelectNode.Raw { + type: "select"; + } + + interface SubmitButton extends SubmitButtonNode.Raw { + type: "submit-button"; + } + + interface SearchButton extends SearchButtonNode.Raw { + type: "search-button"; + } } diff --git a/src/serialization/types/Pagination.ts b/src/serialization/types/Pagination.ts index 4d81b8f8..cd186256 100644 --- a/src/serialization/types/Pagination.ts +++ b/src/serialization/types/Pagination.ts @@ -8,15 +8,15 @@ import * as core from "../../core"; export const Pagination: core.serialization.ObjectSchema = core.serialization.object({ - limit: core.serialization.number().optional(), - offset: core.serialization.number().optional(), - total: core.serialization.number().optional(), + limit: core.serialization.number(), + offset: core.serialization.number(), + total: core.serialization.number(), }); export declare namespace Pagination { interface Raw { - limit?: number | null; - offset?: number | null; - total?: number | null; + limit: number; + offset: number; + total: number; } } diff --git a/src/serialization/types/SearchButtonNode.ts b/src/serialization/types/SearchButtonNode.ts new file mode 100644 index 00000000..e92959c6 --- /dev/null +++ b/src/serialization/types/SearchButtonNode.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SearchButtonNode: core.serialization.ObjectSchema< + serializers.SearchButtonNode.Raw, + Webflow.SearchButtonNode +> = core.serialization.object({ + id: core.serialization.string(), + value: core.serialization.string(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), +}); + +export declare namespace SearchButtonNode { + interface Raw { + id: string; + value: string; + attributes?: Record | null; + } +} diff --git a/src/serialization/types/SearchButtonNodeWrite.ts b/src/serialization/types/SearchButtonNodeWrite.ts new file mode 100644 index 00000000..0d3a8319 --- /dev/null +++ b/src/serialization/types/SearchButtonNodeWrite.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SearchButtonNodeWrite: core.serialization.ObjectSchema< + serializers.SearchButtonNodeWrite.Raw, + Webflow.SearchButtonNodeWrite +> = core.serialization.object({ + nodeId: core.serialization.string(), + value: core.serialization.string(), +}); + +export declare namespace SearchButtonNodeWrite { + interface Raw { + nodeId: string; + value: string; + } +} diff --git a/src/serialization/types/SelectNode.ts b/src/serialization/types/SelectNode.ts new file mode 100644 index 00000000..cddb30f9 --- /dev/null +++ b/src/serialization/types/SelectNode.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { SelectNodeChoicesItem } from "./SelectNodeChoicesItem"; + +export const SelectNode: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + choices: core.serialization.list(SelectNodeChoicesItem), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + }); + +export declare namespace SelectNode { + interface Raw { + id: string; + choices: SelectNodeChoicesItem.Raw[]; + attributes?: Record | null; + } +} diff --git a/src/serialization/types/SelectNodeChoicesItem.ts b/src/serialization/types/SelectNodeChoicesItem.ts new file mode 100644 index 00000000..0d442d94 --- /dev/null +++ b/src/serialization/types/SelectNodeChoicesItem.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SelectNodeChoicesItem: core.serialization.ObjectSchema< + serializers.SelectNodeChoicesItem.Raw, + Webflow.SelectNodeChoicesItem +> = core.serialization.object({ + value: core.serialization.string(), + text: core.serialization.string(), +}); + +export declare namespace SelectNodeChoicesItem { + interface Raw { + value: string; + text: string; + } +} diff --git a/src/serialization/types/SelectNodeWrite.ts b/src/serialization/types/SelectNodeWrite.ts new file mode 100644 index 00000000..e9747759 --- /dev/null +++ b/src/serialization/types/SelectNodeWrite.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { SelectNodeWriteChoicesItem } from "./SelectNodeWriteChoicesItem"; + +export const SelectNodeWrite: core.serialization.ObjectSchema< + serializers.SelectNodeWrite.Raw, + Webflow.SelectNodeWrite +> = core.serialization.object({ + nodeId: core.serialization.string(), + choices: core.serialization.list(SelectNodeWriteChoicesItem), +}); + +export declare namespace SelectNodeWrite { + interface Raw { + nodeId: string; + choices: SelectNodeWriteChoicesItem.Raw[]; + } +} diff --git a/src/serialization/types/SelectNodeWriteChoicesItem.ts b/src/serialization/types/SelectNodeWriteChoicesItem.ts new file mode 100644 index 00000000..7fdd4631 --- /dev/null +++ b/src/serialization/types/SelectNodeWriteChoicesItem.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SelectNodeWriteChoicesItem: core.serialization.ObjectSchema< + serializers.SelectNodeWriteChoicesItem.Raw, + Webflow.SelectNodeWriteChoicesItem +> = core.serialization.object({ + value: core.serialization.string(), + text: core.serialization.string(), +}); + +export declare namespace SelectNodeWriteChoicesItem { + interface Raw { + value: string; + text: string; + } +} diff --git a/src/serialization/types/SiteMembership.ts b/src/serialization/types/SiteMembership.ts new file mode 100644 index 00000000..e8867d0d --- /dev/null +++ b/src/serialization/types/SiteMembership.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { WorkspaceAuditLogItemPayloadSiteMembershipSite } from "./WorkspaceAuditLogItemPayloadSiteMembershipSite"; +import { WorkspaceAuditLogItemPayloadSiteMembershipTargetUser } from "./WorkspaceAuditLogItemPayloadSiteMembershipTargetUser"; +import { WorkspaceAuditLogItemPayloadSiteMembershipMethod } from "./WorkspaceAuditLogItemPayloadSiteMembershipMethod"; +import { WorkspaceAuditLogItemPayloadSiteMembershipUserType } from "./WorkspaceAuditLogItemPayloadSiteMembershipUserType"; + +export const SiteMembership: core.serialization.ObjectSchema = + core.serialization.object({ + site: WorkspaceAuditLogItemPayloadSiteMembershipSite.optional(), + targetUser: WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.optional(), + method: WorkspaceAuditLogItemPayloadSiteMembershipMethod.optional(), + userType: WorkspaceAuditLogItemPayloadSiteMembershipUserType.optional(), + roleName: core.serialization.string().optional(), + previousRoleName: core.serialization.string().optional(), + }); + +export declare namespace SiteMembership { + interface Raw { + site?: WorkspaceAuditLogItemPayloadSiteMembershipSite.Raw | null; + targetUser?: WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.Raw | null; + method?: WorkspaceAuditLogItemPayloadSiteMembershipMethod.Raw | null; + userType?: WorkspaceAuditLogItemPayloadSiteMembershipUserType.Raw | null; + roleName?: string | null; + previousRoleName?: string | null; + } +} diff --git a/src/serialization/types/SiteMembershipAuditLogItem.ts b/src/serialization/types/SiteMembershipAuditLogItem.ts new file mode 100644 index 00000000..167935e3 --- /dev/null +++ b/src/serialization/types/SiteMembershipAuditLogItem.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { SiteMembershipAuditLogItemEventSubType } from "./SiteMembershipAuditLogItemEventSubType"; +import { SiteMembership } from "./SiteMembership"; + +export const SiteMembershipAuditLogItem: core.serialization.ObjectSchema< + serializers.SiteMembershipAuditLogItem.Raw, + Webflow.SiteMembershipAuditLogItem +> = core.serialization.object({ + eventSubType: SiteMembershipAuditLogItemEventSubType.optional(), + payload: SiteMembership.optional(), +}); + +export declare namespace SiteMembershipAuditLogItem { + interface Raw { + eventSubType?: SiteMembershipAuditLogItemEventSubType.Raw | null; + payload?: SiteMembership.Raw | null; + } +} diff --git a/src/serialization/types/SiteMembershipAuditLogItemEventSubType.ts b/src/serialization/types/SiteMembershipAuditLogItemEventSubType.ts new file mode 100644 index 00000000..c709e77b --- /dev/null +++ b/src/serialization/types/SiteMembershipAuditLogItemEventSubType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SiteMembershipAuditLogItemEventSubType: core.serialization.Schema< + serializers.SiteMembershipAuditLogItemEventSubType.Raw, + Webflow.SiteMembershipAuditLogItemEventSubType +> = core.serialization.enum_(["user_added", "user_removed", "user_role_updated"]); + +export declare namespace SiteMembershipAuditLogItemEventSubType { + type Raw = "user_added" | "user_removed" | "user_role_updated"; +} diff --git a/src/serialization/types/SkuFieldData.ts b/src/serialization/types/SkuFieldData.ts index 4bd54836..6c789187 100644 --- a/src/serialization/types/SkuFieldData.ts +++ b/src/serialization/types/SkuFieldData.ts @@ -10,6 +10,7 @@ import { SkuFieldDataPrice } from "./SkuFieldDataPrice"; import { SkuFieldDataCompareAtPrice } from "./SkuFieldDataCompareAtPrice"; import { SkuFieldDataEcSkuBillingMethod } from "./SkuFieldDataEcSkuBillingMethod"; import { SkuFieldDataEcSkuSubscriptionPlan } from "./SkuFieldDataEcSkuSubscriptionPlan"; +import { SkuPropertyList } from "./SkuPropertyList"; export const SkuFieldData: core.serialization.ObjectSchema = core.serialization.object({ @@ -28,6 +29,12 @@ export const SkuFieldData: core.serialization.ObjectSchema = core.serialization.object({ value: core.serialization.number().optional(), unit: core.serialization.string().optional(), + currency: core.serialization.string().optional(), }); export declare namespace SkuFieldDataPrice { interface Raw { value?: number | null; unit?: string | null; + currency?: string | null; } } diff --git a/src/serialization/types/StaticFieldType.ts b/src/serialization/types/StaticFieldType.ts index 642b3abc..30e9710a 100644 --- a/src/serialization/types/StaticFieldType.ts +++ b/src/serialization/types/StaticFieldType.ts @@ -20,7 +20,7 @@ export const StaticFieldType: core.serialization.Schema = core.serialization.object({ + id: core.serialization.string(), + value: core.serialization.string(), + waitingText: core.serialization.string(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), +}); + +export declare namespace SubmitButtonNode { + interface Raw { + id: string; + value: string; + waitingText: string; + attributes?: Record | null; + } +} diff --git a/src/serialization/types/SubmitButtonNodeWrite.ts b/src/serialization/types/SubmitButtonNodeWrite.ts new file mode 100644 index 00000000..2ed52eec --- /dev/null +++ b/src/serialization/types/SubmitButtonNodeWrite.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SubmitButtonNodeWrite: core.serialization.ObjectSchema< + serializers.SubmitButtonNodeWrite.Raw, + Webflow.SubmitButtonNodeWrite +> = core.serialization.object({ + nodeId: core.serialization.string(), + value: core.serialization.string().optional(), + waitingText: core.serialization.string().optional(), +}); + +export declare namespace SubmitButtonNodeWrite { + interface Raw { + nodeId: string; + value?: string | null; + waitingText?: string | null; + } +} diff --git a/src/serialization/types/TextInputNode.ts b/src/serialization/types/TextInputNode.ts new file mode 100644 index 00000000..2985c288 --- /dev/null +++ b/src/serialization/types/TextInputNode.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const TextInputNode: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + placeholder: core.serialization.string(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + }); + +export declare namespace TextInputNode { + interface Raw { + id: string; + placeholder: string; + attributes?: Record | null; + } +} diff --git a/src/serialization/types/TextInputNodeWrite.ts b/src/serialization/types/TextInputNodeWrite.ts new file mode 100644 index 00000000..10630fec --- /dev/null +++ b/src/serialization/types/TextInputNodeWrite.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const TextInputNodeWrite: core.serialization.ObjectSchema< + serializers.TextInputNodeWrite.Raw, + Webflow.TextInputNodeWrite +> = core.serialization.object({ + nodeId: core.serialization.string(), + placeholder: core.serialization.string(), +}); + +export declare namespace TextInputNodeWrite { + interface Raw { + nodeId: string; + placeholder: string; + } +} diff --git a/src/serialization/types/TextNode.ts b/src/serialization/types/TextNode.ts index b97e6956..4da979ac 100644 --- a/src/serialization/types/TextNode.ts +++ b/src/serialization/types/TextNode.ts @@ -9,15 +9,15 @@ import { TextNodeText } from "./TextNodeText"; export const TextNode: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - text: TextNodeText.optional(), + id: core.serialization.string(), + text: TextNodeText, attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace TextNode { interface Raw { - id?: string | null; - text?: TextNodeText.Raw | null; + id: string; + text: TextNodeText.Raw; attributes?: Record | null; } } diff --git a/src/serialization/types/TriggerType.ts b/src/serialization/types/TriggerType.ts index b6411437..671583db 100644 --- a/src/serialization/types/TriggerType.ts +++ b/src/serialization/types/TriggerType.ts @@ -23,6 +23,7 @@ export const TriggerType: core.serialization.Schema = + core.serialization.object({ + method: WorkspaceAuditLogItemPayloadUserAccessMethod.optional(), + location: core.serialization.string().optional(), + ipAddress: core.serialization.string().optional(), + }); + +export declare namespace UserAccess { + interface Raw { + method?: WorkspaceAuditLogItemPayloadUserAccessMethod.Raw | null; + location?: string | null; + ipAddress?: string | null; + } +} diff --git a/src/serialization/types/UserAccessAuditLogItem.ts b/src/serialization/types/UserAccessAuditLogItem.ts new file mode 100644 index 00000000..56eec340 --- /dev/null +++ b/src/serialization/types/UserAccessAuditLogItem.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { UserAccessAuditLogItemEventSubType } from "./UserAccessAuditLogItemEventSubType"; +import { UserAccess } from "./UserAccess"; + +export const UserAccessAuditLogItem: core.serialization.ObjectSchema< + serializers.UserAccessAuditLogItem.Raw, + Webflow.UserAccessAuditLogItem +> = core.serialization.object({ + eventSubType: UserAccessAuditLogItemEventSubType.optional(), + payload: UserAccess.optional(), +}); + +export declare namespace UserAccessAuditLogItem { + interface Raw { + eventSubType?: UserAccessAuditLogItemEventSubType.Raw | null; + payload?: UserAccess.Raw | null; + } +} diff --git a/src/serialization/types/UserAccessAuditLogItemEventSubType.ts b/src/serialization/types/UserAccessAuditLogItemEventSubType.ts new file mode 100644 index 00000000..790c745e --- /dev/null +++ b/src/serialization/types/UserAccessAuditLogItemEventSubType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const UserAccessAuditLogItemEventSubType: core.serialization.Schema< + serializers.UserAccessAuditLogItemEventSubType.Raw, + Webflow.UserAccessAuditLogItemEventSubType +> = core.serialization.enum_(["login", "logout"]); + +export declare namespace UserAccessAuditLogItemEventSubType { + type Raw = "login" | "logout"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItem.ts b/src/serialization/types/WorkspaceAuditLogItem.ts new file mode 100644 index 00000000..2ccc247e --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItem.ts @@ -0,0 +1,70 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { WorkspaceAuditLogItemActor } from "./WorkspaceAuditLogItemActor"; +import { WorkspaceAuditLogItemWorkspace } from "./WorkspaceAuditLogItemWorkspace"; +import * as core from "../../core"; +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import { UserAccessAuditLogItem } from "./UserAccessAuditLogItem"; +import { CustomRoleAuditLogItem } from "./CustomRoleAuditLogItem"; +import { WorkspaceMembershipAuditLogItem } from "./WorkspaceMembershipAuditLogItem"; +import { SiteMembershipAuditLogItem } from "./SiteMembershipAuditLogItem"; +import { WorkspaceInvitationAuditLogItem } from "./WorkspaceInvitationAuditLogItem"; + +const _Base = core.serialization.object({ + timestamp: core.serialization.date().optional(), + actor: WorkspaceAuditLogItemActor.optional(), + workspace: WorkspaceAuditLogItemWorkspace.optional(), +}); +export const WorkspaceAuditLogItem: core.serialization.Schema< + serializers.WorkspaceAuditLogItem.Raw, + Webflow.WorkspaceAuditLogItem +> = core.serialization + .union("eventType", { + user_access: UserAccessAuditLogItem.extend(_Base), + custom_role: CustomRoleAuditLogItem.extend(_Base), + workspace_membership: WorkspaceMembershipAuditLogItem.extend(_Base), + site_membership: SiteMembershipAuditLogItem.extend(_Base), + workspace_invitation: WorkspaceInvitationAuditLogItem.extend(_Base), + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace WorkspaceAuditLogItem { + type Raw = + | WorkspaceAuditLogItem.UserAccess + | WorkspaceAuditLogItem.CustomRole + | WorkspaceAuditLogItem.WorkspaceMembership + | WorkspaceAuditLogItem.SiteMembership + | WorkspaceAuditLogItem.WorkspaceInvitation; + + interface UserAccess extends _Base, UserAccessAuditLogItem.Raw { + eventType: "user_access"; + } + + interface CustomRole extends _Base, CustomRoleAuditLogItem.Raw { + eventType: "custom_role"; + } + + interface WorkspaceMembership extends _Base, WorkspaceMembershipAuditLogItem.Raw { + eventType: "workspace_membership"; + } + + interface SiteMembership extends _Base, SiteMembershipAuditLogItem.Raw { + eventType: "site_membership"; + } + + interface WorkspaceInvitation extends _Base, WorkspaceInvitationAuditLogItem.Raw { + eventType: "workspace_invitation"; + } + + interface _Base { + timestamp?: string | null; + actor?: WorkspaceAuditLogItemActor.Raw | null; + workspace?: WorkspaceAuditLogItemWorkspace.Raw | null; + } +} diff --git a/src/serialization/types/WorkspaceAuditLogItemActor.ts b/src/serialization/types/WorkspaceAuditLogItemActor.ts new file mode 100644 index 00000000..46877d98 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemActor.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemActor: core.serialization.ObjectSchema< + serializers.WorkspaceAuditLogItemActor.Raw, + Webflow.WorkspaceAuditLogItemActor +> = core.serialization.object({ + id: core.serialization.string().optional(), + email: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceAuditLogItemActor { + interface Raw { + id?: string | null; + email?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts new file mode 100644 index 00000000..03c11db8 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipMethod.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadSiteMembershipMethod: core.serialization.Schema< + serializers.WorkspaceAuditLogItemPayloadSiteMembershipMethod.Raw, + Webflow.WorkspaceAuditLogItemPayloadSiteMembershipMethod +> = core.serialization.enum_(["sso", "invite", "scim", "dashboard", "admin"]); + +export declare namespace WorkspaceAuditLogItemPayloadSiteMembershipMethod { + type Raw = "sso" | "invite" | "scim" | "dashboard" | "admin"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts new file mode 100644 index 00000000..f361b62b --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipSite.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadSiteMembershipSite: core.serialization.ObjectSchema< + serializers.WorkspaceAuditLogItemPayloadSiteMembershipSite.Raw, + Webflow.WorkspaceAuditLogItemPayloadSiteMembershipSite +> = core.serialization.object({ + id: core.serialization.string().optional(), + slug: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceAuditLogItemPayloadSiteMembershipSite { + interface Raw { + id?: string | null; + slug?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts new file mode 100644 index 00000000..bc23ba5e --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadSiteMembershipTargetUser: core.serialization.ObjectSchema< + serializers.WorkspaceAuditLogItemPayloadSiteMembershipTargetUser.Raw, + Webflow.WorkspaceAuditLogItemPayloadSiteMembershipTargetUser +> = core.serialization.object({ + id: core.serialization.string().optional(), + email: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceAuditLogItemPayloadSiteMembershipTargetUser { + interface Raw { + id?: string | null; + email?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts new file mode 100644 index 00000000..6efa0dd2 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadSiteMembershipUserType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadSiteMembershipUserType: core.serialization.Schema< + serializers.WorkspaceAuditLogItemPayloadSiteMembershipUserType.Raw, + Webflow.WorkspaceAuditLogItemPayloadSiteMembershipUserType +> = core.serialization.enum_(["member", "guest", "reviewer", "client"]); + +export declare namespace WorkspaceAuditLogItemPayloadSiteMembershipUserType { + type Raw = "member" | "guest" | "reviewer" | "client"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts new file mode 100644 index 00000000..d29e7dfa --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadUserAccessMethod.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadUserAccessMethod: core.serialization.Schema< + serializers.WorkspaceAuditLogItemPayloadUserAccessMethod.Raw, + Webflow.WorkspaceAuditLogItemPayloadUserAccessMethod +> = core.serialization.enum_(["dashboard", "sso", "api", "google"]); + +export declare namespace WorkspaceAuditLogItemPayloadUserAccessMethod { + type Raw = "dashboard" | "sso" | "api" | "google"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts new file mode 100644 index 00000000..6e370bf2 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod: core.serialization.Schema< + serializers.WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.Raw, + Webflow.WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod +> = core.serialization.enum_(["sso", "dashboard", "admin"]); + +export declare namespace WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod { + type Raw = "sso" | "dashboard" | "admin"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts new file mode 100644 index 00000000..1c05d9f9 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser: core.serialization.ObjectSchema< + serializers.WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.Raw, + Webflow.WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser +> = core.serialization.object({ + id: core.serialization.string().optional(), + email: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser { + interface Raw { + id?: string | null; + email?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts new file mode 100644 index 00000000..fe7472ed --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType: core.serialization.Schema< + serializers.WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.Raw, + Webflow.WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType +> = core.serialization.enum_(["member", "guest", "reviewer", "client"]); + +export declare namespace WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType { + type Raw = "member" | "guest" | "reviewer" | "client"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts new file mode 100644 index 00000000..3b5aefe5 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod: core.serialization.Schema< + serializers.WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.Raw, + Webflow.WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod +> = core.serialization.enum_(["sso", "dashboard", "admin"]); + +export declare namespace WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod { + type Raw = "sso" | "dashboard" | "admin"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts new file mode 100644 index 00000000..4ebcbd93 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser: core.serialization.ObjectSchema< + serializers.WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.Raw, + Webflow.WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser +> = core.serialization.object({ + id: core.serialization.string().optional(), + email: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser { + interface Raw { + id?: string | null; + email?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts new file mode 100644 index 00000000..5cf9dd9c --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType: core.serialization.Schema< + serializers.WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.Raw, + Webflow.WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType +> = core.serialization.enum_(["member", "guest", "reviewer", "client"]); + +export declare namespace WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType { + type Raw = "member" | "guest" | "reviewer" | "client"; +} diff --git a/src/serialization/types/WorkspaceAuditLogItemWorkspace.ts b/src/serialization/types/WorkspaceAuditLogItemWorkspace.ts new file mode 100644 index 00000000..36c42271 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogItemWorkspace.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceAuditLogItemWorkspace: core.serialization.ObjectSchema< + serializers.WorkspaceAuditLogItemWorkspace.Raw, + Webflow.WorkspaceAuditLogItemWorkspace +> = core.serialization.object({ + id: core.serialization.string().optional(), + slug: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceAuditLogItemWorkspace { + interface Raw { + id?: string | null; + slug?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceAuditLogResponse.ts b/src/serialization/types/WorkspaceAuditLogResponse.ts new file mode 100644 index 00000000..b7731da5 --- /dev/null +++ b/src/serialization/types/WorkspaceAuditLogResponse.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { WorkspaceAuditLogItem } from "./WorkspaceAuditLogItem"; +import { Pagination } from "./Pagination"; + +export const WorkspaceAuditLogResponse: core.serialization.ObjectSchema< + serializers.WorkspaceAuditLogResponse.Raw, + Webflow.WorkspaceAuditLogResponse +> = core.serialization.object({ + items: core.serialization.list(WorkspaceAuditLogItem).optional(), + pagination: Pagination.optional(), +}); + +export declare namespace WorkspaceAuditLogResponse { + interface Raw { + items?: WorkspaceAuditLogItem.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/WorkspaceInvitation.ts b/src/serialization/types/WorkspaceInvitation.ts new file mode 100644 index 00000000..5a5dbb4d --- /dev/null +++ b/src/serialization/types/WorkspaceInvitation.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser } from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser"; +import { WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod } from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod"; +import { WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType } from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType"; + +export const WorkspaceInvitation: core.serialization.ObjectSchema< + serializers.WorkspaceInvitation.Raw, + Webflow.WorkspaceInvitation +> = core.serialization.object({ + targetUser: WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.optional(), + method: WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.optional(), + userType: WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.optional(), + roleName: core.serialization.string().optional(), + previousRoleName: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceInvitation { + interface Raw { + targetUser?: WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser.Raw | null; + method?: WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod.Raw | null; + userType?: WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType.Raw | null; + roleName?: string | null; + previousRoleName?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceInvitationAuditLogItem.ts b/src/serialization/types/WorkspaceInvitationAuditLogItem.ts new file mode 100644 index 00000000..05b69203 --- /dev/null +++ b/src/serialization/types/WorkspaceInvitationAuditLogItem.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { WorkspaceInvitationAuditLogItemEventSubType } from "./WorkspaceInvitationAuditLogItemEventSubType"; +import { WorkspaceInvitation } from "./WorkspaceInvitation"; + +export const WorkspaceInvitationAuditLogItem: core.serialization.ObjectSchema< + serializers.WorkspaceInvitationAuditLogItem.Raw, + Webflow.WorkspaceInvitationAuditLogItem +> = core.serialization.object({ + eventSubType: WorkspaceInvitationAuditLogItemEventSubType.optional(), + payload: WorkspaceInvitation.optional(), +}); + +export declare namespace WorkspaceInvitationAuditLogItem { + interface Raw { + eventSubType?: WorkspaceInvitationAuditLogItemEventSubType.Raw | null; + payload?: WorkspaceInvitation.Raw | null; + } +} diff --git a/src/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.ts b/src/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.ts new file mode 100644 index 00000000..0affa78b --- /dev/null +++ b/src/serialization/types/WorkspaceInvitationAuditLogItemEventSubType.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceInvitationAuditLogItemEventSubType: core.serialization.Schema< + serializers.WorkspaceInvitationAuditLogItemEventSubType.Raw, + Webflow.WorkspaceInvitationAuditLogItemEventSubType +> = core.serialization.enum_([ + "invite_sent", + "invite_accepted", + "invite_updated", + "invite_canceled", + "invite_declined", +]); + +export declare namespace WorkspaceInvitationAuditLogItemEventSubType { + type Raw = "invite_sent" | "invite_accepted" | "invite_updated" | "invite_canceled" | "invite_declined"; +} diff --git a/src/serialization/types/WorkspaceMembership.ts b/src/serialization/types/WorkspaceMembership.ts new file mode 100644 index 00000000..85ae7382 --- /dev/null +++ b/src/serialization/types/WorkspaceMembership.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser } from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser"; +import { WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod } from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod"; +import { WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType } from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType"; + +export const WorkspaceMembership: core.serialization.ObjectSchema< + serializers.WorkspaceMembership.Raw, + Webflow.WorkspaceMembership +> = core.serialization.object({ + targetUser: WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.optional(), + method: WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.optional(), + userType: WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.optional(), + roleName: core.serialization.string().optional(), + previousRoleName: core.serialization.string().optional(), +}); + +export declare namespace WorkspaceMembership { + interface Raw { + targetUser?: WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser.Raw | null; + method?: WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod.Raw | null; + userType?: WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType.Raw | null; + roleName?: string | null; + previousRoleName?: string | null; + } +} diff --git a/src/serialization/types/WorkspaceMembershipAuditLogItem.ts b/src/serialization/types/WorkspaceMembershipAuditLogItem.ts new file mode 100644 index 00000000..fc2f34f2 --- /dev/null +++ b/src/serialization/types/WorkspaceMembershipAuditLogItem.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { WorkspaceMembershipAuditLogItemEventSubType } from "./WorkspaceMembershipAuditLogItemEventSubType"; +import { WorkspaceMembership } from "./WorkspaceMembership"; + +export const WorkspaceMembershipAuditLogItem: core.serialization.ObjectSchema< + serializers.WorkspaceMembershipAuditLogItem.Raw, + Webflow.WorkspaceMembershipAuditLogItem +> = core.serialization.object({ + eventSubType: WorkspaceMembershipAuditLogItemEventSubType.optional(), + payload: WorkspaceMembership.optional(), +}); + +export declare namespace WorkspaceMembershipAuditLogItem { + interface Raw { + eventSubType?: WorkspaceMembershipAuditLogItemEventSubType.Raw | null; + payload?: WorkspaceMembership.Raw | null; + } +} diff --git a/src/serialization/types/WorkspaceMembershipAuditLogItemEventSubType.ts b/src/serialization/types/WorkspaceMembershipAuditLogItemEventSubType.ts new file mode 100644 index 00000000..42cfa104 --- /dev/null +++ b/src/serialization/types/WorkspaceMembershipAuditLogItemEventSubType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const WorkspaceMembershipAuditLogItemEventSubType: core.serialization.Schema< + serializers.WorkspaceMembershipAuditLogItemEventSubType.Raw, + Webflow.WorkspaceMembershipAuditLogItemEventSubType +> = core.serialization.enum_(["user_added", "user_removed", "user_role_updated"]); + +export declare namespace WorkspaceMembershipAuditLogItemEventSubType { + type Raw = "user_added" | "user_removed" | "user_role_updated"; +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index d6442032..ccdd7fa1 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -15,13 +15,43 @@ export * from "./SiteDataCollectionType"; export * from "./Site"; export * from "./InvalidScopes"; export * from "./NotEnterprisePlanWorkspace"; +export * from "./WorkspaceAuditLogItemPayloadUserAccessMethod"; +export * from "./UserAccess"; +export * from "./UserAccessAuditLogItemEventSubType"; +export * from "./UserAccessAuditLogItem"; +export * from "./CustomRole"; +export * from "./CustomRoleAuditLogItemEventSubType"; +export * from "./CustomRoleAuditLogItem"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType"; +export * from "./WorkspaceMembership"; +export * from "./WorkspaceMembershipAuditLogItemEventSubType"; +export * from "./WorkspaceMembershipAuditLogItem"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipSite"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipTargetUser"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipMethod"; +export * from "./WorkspaceAuditLogItemPayloadSiteMembershipUserType"; +export * from "./SiteMembership"; +export * from "./SiteMembershipAuditLogItemEventSubType"; +export * from "./SiteMembershipAuditLogItem"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod"; +export * from "./WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType"; +export * from "./WorkspaceInvitation"; +export * from "./WorkspaceInvitationAuditLogItemEventSubType"; +export * from "./WorkspaceInvitationAuditLogItem"; +export * from "./WorkspaceAuditLogItemActor"; +export * from "./WorkspaceAuditLogItemWorkspace"; +export * from "./WorkspaceAuditLogItem"; +export * from "./Pagination"; +export * from "./WorkspaceAuditLogResponse"; export * from "./Sites"; export * from "./NotEnterprisePlanSite"; export * from "./Domains"; export * from "./InvalidDomain"; export * from "./NoDomains"; export * from "./Redirect"; -export * from "./Pagination"; export * from "./Redirects"; export * from "./SitePlanId"; export * from "./SitePlanName"; @@ -61,6 +91,16 @@ export * from "./BulkCollectionItemFieldData"; export * from "./BulkCollectionItem"; export * from "./CollectionItemPatchSingleFieldData"; export * from "./CollectionItemPatchSingle"; +export * from "./CommentThreadAuthor"; +export * from "./CommentThreadMentionedUsersItem"; +export * from "./CommentThread"; +export * from "./CommentThreadListPagination"; +export * from "./CommentThreadList"; +export * from "./CommentReplyAuthor"; +export * from "./CommentReplyMentionedUsersItem"; +export * from "./CommentReply"; +export * from "./CommentReplyListPagination"; +export * from "./CommentReplyList"; export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; @@ -73,11 +113,21 @@ export * from "./Text"; export * from "./ComponentPropertyType"; export * from "./ComponentProperty"; export * from "./ComponentNode"; +export * from "./TextInputNode"; +export * from "./SelectNodeChoicesItem"; +export * from "./SelectNode"; +export * from "./SubmitButtonNode"; +export * from "./SearchButtonNode"; export * from "./Node"; export * from "./Dom"; export * from "./TextNodeWrite"; export * from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; export * from "./ComponentInstanceNodePropertyOverridesWrite"; +export * from "./SelectNodeWriteChoicesItem"; +export * from "./SelectNodeWrite"; +export * from "./TextInputNodeWrite"; +export * from "./SubmitButtonNodeWrite"; +export * from "./SearchButtonNodeWrite"; export * from "./Component"; export * from "./ComponentList"; export * from "./ComponentDom"; diff --git a/tests/wrapper/AssetsUtilitiesClient.test.ts b/tests/wrapper/AssetsUtilitiesClient.test.ts deleted file mode 100644 index 7ccfa38d..00000000 --- a/tests/wrapper/AssetsUtilitiesClient.test.ts +++ /dev/null @@ -1,178 +0,0 @@ -require('jest-fetch-mock').enableMocks(); -import { Client as AssetsUtilitiesClient } from "../../src/wrapper/AssetsUtilitiesClient"; -import * as Webflow from "../../src/api"; -import fetchMock from "jest-fetch-mock"; -import crypto from "crypto"; -import FormDataConstructor from 'form-data'; - -fetchMock.enableMocks(); - -describe("AssetsUtilitiesClient", () => { - const mockOptions = { - environment: () => "test-environment", - accessToken: () => "test-access-token", - }; - - const siteId = "test-site-id"; - const mockUploadUrl = "https://mock-s3-upload-url.com"; - const mockFileName = "test-file.txt"; - const mockFileContent = "Hello, world!"; - const mockFileBuffer = Buffer.from(mockFileContent); - const mockFileHash = crypto.createHash("md5").update(mockFileBuffer).digest("hex"); - - let client: AssetsUtilitiesClient; - - beforeEach(() => { - fetchMock.resetMocks(); - client = new AssetsUtilitiesClient(mockOptions); - }); - - it("should throw an error if it cannot fetch the asset successfully", async () => { - const invalidUrl = "https://invalid-url.com"; - - // Mock the fetch response to simulate a failure - fetchMock.mockResponseOnce("", { status: 404, statusText: "Not Found" }); - - await expect(client["_getBufferFromUrl"](invalidUrl)).rejects.toThrow( - "Failed to fetch asset from URL: https://invalid-url.com. Status: 404 Not Found" - ); - - // Ensure fetch was called with the correct URL - expect(fetchMock).toHaveBeenCalledWith(invalidUrl); - }); - - it("should throw an error for invalid file input", async () => { - await expect(client.createAndUpload(siteId, { - fileName: mockFileName, - file: null as unknown as ArrayBuffer, // Invalid file - })).rejects.toThrow(); - }); - - it("should throw an error if it fails to create Webflow Asset metadata", async () => { - // Mock the Webflow API to throw an error - jest.spyOn(client, "create").mockRejectedValue(new Error("Webflow API error")); - - await expect(client.createAndUpload(siteId, { - fileName: mockFileName, - file: mockFileBuffer.buffer, // Pass ArrayBuffer - })).rejects.toThrow(); - - // Ensure the create method was called - expect(client.create).toHaveBeenCalledWith(siteId, expect.objectContaining({ - fileName: mockFileName, - fileHash: expect.any(String), - }), undefined); - }); - - it("should throw an error if it fails to upload to S3", async () => { - // Mock the Webflow API response for creating asset metadata - const mockCreateResponse = { - uploadUrl: mockUploadUrl, - uploadDetails: { - "xAmzAlgorithm": "AWS4-HMAC-SHA256", - "xAmzDate": "20231010T000000Z", - "xAmzCredential": "mock-credential", - "xAmzSignature": "mock-signature", - "successActionStatus": "201", - "contentType": "text/plain", - }, - }; - jest.spyOn(client, "create").mockResolvedValue(mockCreateResponse as Webflow.AssetUpload); - - // Mock the S3 upload response to fail - fetchMock.mockResponseOnce("S3 upload error", { status: 500 }); - - await expect(client.createAndUpload(siteId, { - fileName: mockFileName, - file: mockFileBuffer.buffer, // Pass ArrayBuffer - })).rejects.toThrow(); - - // Ensure the S3 upload was attempted - expect(fetchMock).toHaveBeenCalledWith(mockUploadUrl, expect.objectContaining({ - method: "POST", - body: expect.any(FormDataConstructor), - })); - }); - - it("should create and upload a file from an ArrayBuffer", async () => { - // Mock the Webflow API response for creating asset metadata - const mockCreateResponse = { - uploadUrl: mockUploadUrl, - uploadDetails: { - "xAmzAlgorithm": "AWS4-HMAC-SHA256", - "xAmzDate": "20231010T000000Z", - "xAmzCredential": "mock-credential", - "xAmzSignature": "mock-signature", - "successActionStatus": "201", - "contentType": "text/plain", - }, - }; - jest.spyOn(client, "create").mockResolvedValue(mockCreateResponse as Webflow.AssetUpload); - - // Mock the S3 upload response - fetchMock.mockResponseOnce(JSON.stringify({ success: true }), { status: 201 }); - - const result = await client.createAndUpload(siteId, { - fileName: mockFileName, - file: mockFileBuffer.buffer, // Pass ArrayBuffer - }); - - // Assertions - expect(client.create).toHaveBeenCalledWith(siteId, expect.objectContaining({ - fileName: mockFileName, - fileHash: expect.any(String), - }), undefined); - - expect(fetchMock).toHaveBeenCalledWith(mockUploadUrl, expect.objectContaining({ - method: "POST", - body: expect.any(FormDataConstructor), - })); - - expect(result).toEqual(mockCreateResponse); - }); - - it("should create and upload a file from a URL", async () => { - // Mock the file fetch response (first fetch call) - fetchMock.mockResponseOnce(mockFileContent); - - // Mock the Webflow API response for creating asset metadata - const mockCreateResponse = { - uploadUrl: mockUploadUrl, - uploadDetails: { - "xAmzAlgorithm": "AWS4-HMAC-SHA256", - "xAmzDate": "20231010T000000Z", - "xAmzCredential": "mock-credential", - "xAmzSignature": "mock-signature", - "successActionStatus": "201", - "contentType": "text/plain", - }, - }; - jest.spyOn(client, "create").mockResolvedValue(mockCreateResponse as Webflow.AssetUpload); - - // Mock the S3 upload response (second fetch call) - fetchMock.mockResponseOnce(JSON.stringify({ success: true }), { status: 201 }); - - const result = await client.createAndUpload(siteId, { - fileName: mockFileName, - file: "https://mock-file-url.com", // Pass asset URL - }); - - // Assertions for the file fetch - expect(fetchMock).toHaveBeenNthCalledWith(1, "https://mock-file-url.com"); - - // Assertions for the Webflow API call - expect(client.create).toHaveBeenCalledWith(siteId, { - fileName: mockFileName, - fileHash: mockFileHash, - }, undefined); - - // Assertions for the S3 upload - expect(fetchMock).toHaveBeenNthCalledWith(2, mockUploadUrl, expect.objectContaining({ - method: "POST", - body: expect.any(FormDataConstructor), - })); - - expect(result).toEqual(mockCreateResponse); - }); -}); - diff --git a/yarn.lock b/yarn.lock index 201802c7..a14f8cbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,114 +10,114 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.26.2": - version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" - integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" + integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== dependencies: - "@babel/helper-validator-identifier" "^7.25.9" + "@babel/helper-validator-identifier" "^7.27.1" js-tokens "^4.0.0" - picocolors "^1.0.0" + picocolors "^1.1.1" -"@babel/compat-data@^7.26.5": - version "7.26.8" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.8.tgz#821c1d35641c355284d4a870b8a4a7b0c141e367" - integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== +"@babel/compat-data@^7.27.2": + version "7.27.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.27.2.tgz#4183f9e642fd84e74e3eea7ffa93a412e3b102c9" + integrity sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.10.tgz#5c876f83c8c4dcb233ee4b670c0606f2ac3000f9" - integrity sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ== + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.27.1.tgz#89de51e86bd12246003e3524704c49541b16c3e6" + integrity sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.10" - "@babel/helper-compilation-targets" "^7.26.5" - "@babel/helper-module-transforms" "^7.26.0" - "@babel/helpers" "^7.26.10" - "@babel/parser" "^7.26.10" - "@babel/template" "^7.26.9" - "@babel/traverse" "^7.26.10" - "@babel/types" "^7.26.10" + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.27.1" + "@babel/helper-compilation-targets" "^7.27.1" + "@babel/helper-module-transforms" "^7.27.1" + "@babel/helpers" "^7.27.1" + "@babel/parser" "^7.27.1" + "@babel/template" "^7.27.1" + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.26.10", "@babel/generator@^7.7.2": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.10.tgz#a60d9de49caca16744e6340c3658dfef6138c3f7" - integrity sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang== +"@babel/generator@^7.27.1", "@babel/generator@^7.7.2": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.1.tgz#862d4fad858f7208edd487c28b58144036b76230" + integrity sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w== dependencies: - "@babel/parser" "^7.26.10" - "@babel/types" "^7.26.10" + "@babel/parser" "^7.27.1" + "@babel/types" "^7.27.1" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.26.5": - version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" - integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== +"@babel/helper-compilation-targets@^7.27.1": + version "7.27.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" + integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== dependencies: - "@babel/compat-data" "^7.26.5" - "@babel/helper-validator-option" "^7.25.9" + "@babel/compat-data" "^7.27.2" + "@babel/helper-validator-option" "^7.27.1" browserslist "^4.24.0" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-module-imports@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" - integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== +"@babel/helper-module-imports@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" + integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== dependencies: - "@babel/traverse" "^7.25.9" - "@babel/types" "^7.25.9" + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" -"@babel/helper-module-transforms@^7.26.0": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" - integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== +"@babel/helper-module-transforms@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz#e1663b8b71d2de948da5c4fb2a20ca4f3ec27a6f" + integrity sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g== dependencies: - "@babel/helper-module-imports" "^7.25.9" - "@babel/helper-validator-identifier" "^7.25.9" - "@babel/traverse" "^7.25.9" + "@babel/helper-module-imports" "^7.27.1" + "@babel/helper-validator-identifier" "^7.27.1" + "@babel/traverse" "^7.27.1" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": - version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz#18580d00c9934117ad719392c4f6585c9333cc35" - integrity sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" + integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== -"@babel/helper-string-parser@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" - integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== -"@babel/helper-validator-identifier@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" - integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== +"@babel/helper-validator-identifier@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" + integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== -"@babel/helper-validator-option@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" - integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== -"@babel/helpers@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" - integrity sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g== +"@babel/helpers@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.1.tgz#ffc27013038607cdba3288e692c3611c06a18aa4" + integrity sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ== dependencies: - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + "@babel/template" "^7.27.1" + "@babel/types" "^7.27.1" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.26.9": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.10.tgz#e9bdb82f14b97df6569b0b038edd436839c57749" - integrity sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.1", "@babel/parser@^7.27.2": + version "7.27.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.2.tgz#577518bedb17a2ce4212afd052e01f7df0941127" + integrity sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw== dependencies: - "@babel/types" "^7.26.10" + "@babel/types" "^7.27.1" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -148,11 +148,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz#3b1412847699eea739b4f2602c74ce36f6b0b0f7" - integrity sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A== + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz#34c017d54496f9b11b61474e7ea3dfd5563ffe07" + integrity sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww== dependencies: - "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-plugin-utils" "^7.27.1" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" @@ -169,11 +169,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz#a34313a178ea56f1951599b929c1ceacee719290" - integrity sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA== + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" + integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== dependencies: - "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-plugin-utils" "^7.27.1" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" @@ -232,41 +232,41 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399" - integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/template@^7.26.9", "@babel/template@^7.3.3": - version "7.26.9" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.26.9.tgz#4577ad3ddf43d194528cff4e1fa6b232fa609bb2" - integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== - dependencies: - "@babel/code-frame" "^7.26.2" - "@babel/parser" "^7.26.9" - "@babel/types" "^7.26.9" - -"@babel/traverse@^7.25.9", "@babel/traverse@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.10.tgz#43cca33d76005dbaa93024fae536cc1946a4c380" - integrity sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A== - dependencies: - "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.10" - "@babel/parser" "^7.26.10" - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" + integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/template@^7.27.1", "@babel/template@^7.3.3": + version "7.27.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" + integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/parser" "^7.27.2" + "@babel/types" "^7.27.1" + +"@babel/traverse@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.1.tgz#4db772902b133bbddd1c4f7a7ee47761c1b9f291" + integrity sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.27.1" + "@babel/parser" "^7.27.1" + "@babel/template" "^7.27.1" + "@babel/types" "^7.27.1" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.10", "@babel/types@^7.26.9", "@babel/types@^7.3.3": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259" - integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.3.3": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.1.tgz#9defc53c16fc899e46941fc6901a9eea1c9d8560" + integrity sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q== dependencies: - "@babel/helper-string-parser" "^7.25.9" - "@babel/helper-validator-identifier" "^7.25.9" + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.27.1" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" @@ -557,9 +557,9 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.8" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" - integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== dependencies: "@babel/types" "^7.0.0" @@ -571,7 +571,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*", "@types/babel__traverse@7.20.6", "@types/babel__traverse@^7.0.6": version "7.20.6" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== @@ -595,9 +595,9 @@ "@types/json-schema" "*" "@types/estree@*", "@types/estree@^1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" - integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.7.tgz#4158d3105276773d5b7695cd4834b1722e4f37a8" + integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ== "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -642,7 +642,7 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -656,11 +656,11 @@ form-data "^4.0.0" "@types/node@*": - version "22.13.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.10.tgz#df9ea358c5ed991266becc3109dc2dc9125d77e4" - integrity sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw== + version "22.15.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.12.tgz#9ce54e51e09536faa94e4ec300c4728ee83bfa85" + integrity sha512-K0fpC/ZVeb8G9rm7bH7vI0KAec4XHEhBam616nVJCV51bKzJ6oA3luG4WdKoaztxe70QaNjS/xBmcDLmr4PiGw== dependencies: - undici-types "~6.20.0" + undici-types "~6.21.0" "@types/node@17.0.33": version "17.0.33" @@ -1028,14 +1028,14 @@ base64-js@^1.3.1: integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: - version "4.12.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.1.tgz#215741fe3c9dba2d7e12c001d0cfdbae43975ba7" - integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== + version "4.12.2" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.2.tgz#3d8fed6796c24e177737f7cc5172ee04ef39ec99" + integrity sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw== bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + version "5.2.2" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.2.tgz#82c09f9ebbb17107cd72cb7fd39bd1f9d0aaa566" + integrity sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw== brace-expansion@^1.1.7: version "1.1.11" @@ -1114,14 +1114,14 @@ browserify-sign@^4.2.3: safe-buffer "^5.2.1" browserslist@^4.24.0: - version "4.24.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.4.tgz#c6b2865a3f08bcb860a0e827389003b9fe686e4b" - integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== + version "4.24.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.5.tgz#aa0f5b8560fe81fde84c6dcb38f759bafba0e11b" + integrity sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw== dependencies: - caniuse-lite "^1.0.30001688" - electron-to-chromium "^1.5.73" + caniuse-lite "^1.0.30001716" + electron-to-chromium "^1.5.149" node-releases "^2.0.19" - update-browserslist-db "^1.1.1" + update-browserslist-db "^1.1.3" bs-logger@0.x: version "0.2.6" @@ -1186,10 +1186,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001688: - version "1.0.30001704" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz#6644fe909d924ac3a7125e8a0ab6af95b1f32990" - integrity sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew== +caniuse-lite@^1.0.30001716: + version "1.0.30001717" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001717.tgz#5d9fec5ce09796a1893013825510678928aca129" + integrity sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1329,13 +1329,6 @@ create-jest@^29.7.0: jest-util "^29.7.0" prompts "^2.0.1" -cross-fetch@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.2.0.tgz#34e9192f53bc757d6614304d9e5e6fb4edb782e3" - integrity sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q== - dependencies: - node-fetch "^2.7.0" - cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" @@ -1345,7 +1338,7 @@ cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.12.1: +crypto-browserify@^3.12.0: version "3.12.1" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.1.tgz#bb8921bec9acc81633379aa8f52d69b0b69e0dac" integrity sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ== @@ -1402,9 +1395,9 @@ decimal.js@^10.4.2: integrity sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw== dedent@^1.0.0: - version "1.5.3" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" - integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== + version "1.6.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.6.0.tgz#79d52d6389b1ffa67d2bcef59ba51847a9d503b2" + integrity sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA== deepmerge@^4.2.2: version "4.3.1" @@ -1459,10 +1452,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.73: - version "1.5.116" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.116.tgz#b779d73cd0cc75305d12ae4f061d7f7bcee4c761" - integrity sha512-mufxTCJzLBQVvSdZzX1s5YAuXsN1M4tTyYxOOL1TcSKtIzQ9rjIrm7yFK80rN5dwGTePgdoABDSHpuVtRQh0Zw== +electron-to-chromium@^1.5.149: + version "1.5.150" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.150.tgz#3120bf34453a7a82cb4d9335df20680b2bb40649" + integrity sha512-rOOkP2ZUMx1yL4fCxXQKDHQ8ZXwisb2OycOQVKHgvB3ZI4CvehOd4y2tfnnLDieJ3Zs1RL1Dlp3cMkyIn7nnXA== elliptic@^6.5.3, elliptic@^6.5.5: version "6.6.1" @@ -1495,10 +1488,10 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: graceful-fs "^4.2.4" tapable "^2.2.0" -entities@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== +entities@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-6.0.0.tgz#09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51" + integrity sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw== error-ex@^1.3.1: version "1.3.2" @@ -1518,9 +1511,9 @@ es-errors@^1.3.0: integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-module-lexer@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.6.0.tgz#da49f587fd9e68ee2404fe4e256c0c7d3a81be21" - integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ== + version "1.7.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz#9159601561880a85f2734560a9099b2c31e5372a" + integrity sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA== es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: version "1.1.1" @@ -2151,14 +2144,6 @@ jest-environment-node@^29.7.0: jest-mock "^29.7.0" jest-util "^29.7.0" -jest-fetch-mock@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz#31749c456ae27b8919d69824f1c2bd85fe0a1f3b" - integrity sha512-Ux1nWprtLrdrH4XwE7O7InRY6psIi3GOsqNESJgMJ+M5cv4A8Lh7SN9d2V2kKRZ8ebAfcd1LNyZguAOb6JiDqw== - dependencies: - cross-fetch "^3.0.4" - promise-polyfill "^8.1.3" - jest-get-type@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" @@ -2618,7 +2603,7 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -node-fetch@2.7.0, node-fetch@^2.7.0: +node-fetch@2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -2648,9 +2633,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" nwsapi@^2.2.2: - version "2.2.18" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.18.tgz#3c4d7927e1ef4d042d319438ecfda6cd81b7ee41" - integrity sha512-p1TRH/edngVEHVbwqWnxUViEmq5znDvyB+Sik5cmuLpGOIfDf/39zLiq3swPF8Vakqn+gvNiOQAZu8djYlQILA== + version "2.2.20" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.20.tgz#22e53253c61e7b0e7e93cef42c891154bcca11ef" + integrity sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA== object-inspect@^1.13.3: version "1.13.4" @@ -2720,11 +2705,11 @@ parse-json@^5.2.0: lines-and-columns "^1.1.6" parse5@^7.0.0, parse5@^7.1.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.1.tgz#8928f55915e6125f430cc44309765bf17556a33a" - integrity sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ== + version "7.3.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.3.0.tgz#d7e224fa72399c7a175099f45fc2ad024b05ec05" + integrity sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw== dependencies: - entities "^4.5.0" + entities "^6.0.0" path-exists@^4.0.0: version "4.0.0" @@ -2757,7 +2742,7 @@ pbkdf2@^3.1.2: safe-buffer "^5.0.1" sha.js "^2.4.8" -picocolors@^1.0.0, picocolors@^1.1.1: +picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -2768,9 +2753,9 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== pkg-dir@^4.2.0: version "4.2.0" @@ -2803,11 +2788,6 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -promise-polyfill@^8.1.3: - version "8.3.0" - resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.3.0.tgz#9284810268138d103807b11f4e23d5e945a4db63" - integrity sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg== - prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -2981,10 +2961,10 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -schema-utils@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0" - integrity sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g== +schema-utils@^4.3.0, schema-utils@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.2.tgz#0c10878bf4a73fd2b1dfd14b9462b26788c806ae" + integrity sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ== dependencies: "@types/json-schema" "^7.0.9" ajv "^8.9.0" @@ -3307,17 +3287,17 @@ typescript@4.6.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== -undici-types@~6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" - integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== -update-browserslist-db@^1.1.1: +update-browserslist-db@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420" integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== @@ -3390,12 +3370,13 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.94.0: - version "5.98.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.98.0.tgz#44ae19a8f2ba97537978246072fb89d10d1fbd17" - integrity sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA== + version "5.99.8" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.99.8.tgz#dd31a020b7c092d30c4c6d9a4edb95809e7f5946" + integrity sha512-lQ3CPiSTpfOnrEGeXDwoq5hIGzSjmwD72GdfVzF7CQAI7t47rJG9eDWvcEkEn3CUQymAElVvDg3YNTlCYj+qUQ== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" "@webassemblyjs/ast" "^1.14.1" "@webassemblyjs/wasm-edit" "^1.14.1" "@webassemblyjs/wasm-parser" "^1.14.1" @@ -3412,7 +3393,7 @@ webpack@^5.94.0: loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" - schema-utils "^4.3.0" + schema-utils "^4.3.2" tapable "^2.1.1" terser-webpack-plugin "^5.3.11" watchpack "^2.4.1" @@ -3476,9 +3457,9 @@ write-file-atomic@^4.0.2: signal-exit "^3.0.7" ws@^8.11.0: - version "8.18.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.1.tgz#ea131d3784e1dfdff91adb0a4a116b127515e3cb" - integrity sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w== + version "8.18.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.2.tgz#42738b2be57ced85f46154320aabb51ab003705a" + integrity sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ== xml-name-validator@^4.0.0: version "4.0.0"