webflow-api 3.3.0-beta → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseClient.d.ts +1 -1
- package/Client.d.ts +1 -7
- package/Client.js +31 -41
- package/LICENSE +18 -18
- package/README.md +55 -28
- package/api/resources/assets/client/Client.d.ts +4 -4
- package/api/resources/assets/client/Client.js +7 -8
- package/api/resources/assets/client/requests/AssetsListRequest.d.ts +2 -2
- package/api/resources/collections/client/Client.d.ts +2 -2
- package/api/resources/collections/client/Client.js +3 -6
- package/api/resources/collections/resources/fields/client/Client.d.ts +2 -2
- package/api/resources/collections/resources/fields/client/Client.js +4 -6
- package/api/resources/collections/resources/items/client/Client.d.ts +6 -6
- package/api/resources/collections/resources/items/client/Client.js +24 -12
- package/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
- package/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
- package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +1 -1
- package/{dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts → api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.d.ts} +1 -1
- package/api/resources/collections/resources/items/types/index.d.ts +1 -1
- package/api/resources/collections/resources/items/types/index.js +1 -1
- package/api/resources/components/client/Client.d.ts +8 -8
- package/api/resources/components/client/Client.js +10 -12
- package/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +2 -2
- package/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +2 -2
- package/api/resources/components/client/requests/ComponentsListRequest.d.ts +2 -2
- package/api/resources/ecommerce/client/Client.d.ts +2 -2
- package/api/resources/ecommerce/client/Client.js +2 -6
- package/api/resources/forms/client/Client.d.ts +6 -6
- package/api/resources/forms/client/Client.js +7 -10
- package/api/resources/forms/client/requests/FormsListRequest.d.ts +2 -2
- package/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +2 -2
- package/api/resources/index.d.ts +0 -6
- package/api/resources/index.js +1 -7
- package/api/resources/inventory/client/Client.d.ts +2 -2
- package/api/resources/inventory/client/Client.js +3 -6
- package/api/resources/orders/client/Client.d.ts +4 -4
- package/api/resources/orders/client/Client.js +8 -8
- package/api/resources/orders/client/requests/OrdersListRequest.d.ts +2 -2
- package/api/resources/pages/client/Client.d.ts +6 -6
- package/api/resources/pages/client/Client.js +8 -10
- package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
- package/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
- package/api/resources/pages/resources/scripts/client/Client.d.ts +2 -2
- package/api/resources/pages/resources/scripts/client/Client.js +3 -6
- package/api/resources/products/client/Client.d.ts +4 -4
- package/api/resources/products/client/Client.js +8 -8
- package/api/resources/products/client/requests/ProductsListRequest.d.ts +2 -2
- package/api/resources/scripts/client/Client.d.ts +2 -2
- package/api/resources/scripts/client/Client.js +4 -6
- package/api/resources/sites/client/Client.d.ts +2 -2
- package/api/resources/sites/client/Client.js +5 -6
- package/api/resources/sites/resources/activityLogs/client/Client.d.ts +4 -4
- package/api/resources/sites/resources/activityLogs/client/Client.js +4 -8
- package/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +2 -2
- package/api/resources/sites/resources/comments/client/Client.d.ts +8 -8
- package/api/resources/sites/resources/comments/client/Client.js +14 -12
- package/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.d.ts +2 -2
- package/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.d.ts +2 -2
- package/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.d.ts +2 -2
- package/api/resources/sites/resources/forms/client/Client.d.ts +6 -6
- package/api/resources/sites/resources/forms/client/Client.js +7 -10
- package/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.d.ts +2 -2
- package/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +2 -2
- package/api/resources/sites/resources/plans/client/Client.d.ts +2 -2
- package/api/resources/sites/resources/plans/client/Client.js +2 -6
- package/api/resources/sites/resources/redirects/client/Client.d.ts +4 -4
- package/api/resources/sites/resources/redirects/client/Client.js +6 -8
- package/api/resources/sites/resources/robotsTxt/client/Client.d.ts +2 -2
- package/api/resources/sites/resources/robotsTxt/client/Client.js +5 -6
- package/api/resources/sites/resources/scripts/client/Client.d.ts +4 -4
- package/api/resources/sites/resources/scripts/client/Client.js +5 -8
- package/api/resources/sites/resources/scripts/client/requests/ScriptsListCustomCodeBlocksRequest.d.ts +2 -2
- package/api/resources/sites/resources/wellKnown/client/Client.d.ts +2 -2
- package/api/resources/sites/resources/wellKnown/client/Client.js +4 -6
- package/api/resources/token/client/Client.d.ts +2 -2
- package/api/resources/token/client/Client.js +2 -6
- package/api/resources/webhooks/client/Client.d.ts +2 -2
- package/api/resources/webhooks/client/Client.js +3 -6
- package/api/resources/workspaces/client/Client.d.ts +1 -1
- package/api/resources/workspaces/client/Client.js +1 -1
- package/api/resources/workspaces/resources/auditLogs/client/Client.d.ts +4 -4
- package/api/resources/workspaces/resources/auditLogs/client/Client.js +6 -8
- package/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.d.ts +2 -2
- package/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.d.ts +1 -0
- package/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.js +1 -0
- package/api/types/AssetVariant.d.ts +6 -6
- package/api/types/ComponentDom.d.ts +1 -1
- package/api/types/ForbiddenErrorBody.d.ts +1 -1
- package/api/types/ProductFieldData.d.ts +1 -1
- package/api/types/SettingChange.d.ts +7 -0
- package/api/types/SettingChangeAuditLogItem.d.ts +5 -0
- package/api/types/TriggerType.d.ts +0 -3
- package/api/types/TriggerType.js +0 -3
- package/api/types/WorkspaceAuditLogItem.d.ts +4 -1
- package/api/types/WorkspaceAuditLogItemPayloadSettingChangeMethod.d.ts +5 -0
- package/api/types/WorkspaceAuditLogItemPayloadSettingChangeMethod.js +8 -0
- package/api/types/index.d.ts +3 -13
- package/api/types/index.js +3 -13
- package/dist/BaseClient.d.ts +1 -1
- package/dist/Client.d.ts +1 -7
- package/dist/Client.js +31 -41
- package/dist/api/resources/assets/client/Client.d.ts +4 -4
- package/dist/api/resources/assets/client/Client.js +7 -8
- package/dist/api/resources/assets/client/requests/AssetsListRequest.d.ts +2 -2
- package/dist/api/resources/collections/client/Client.d.ts +2 -2
- package/dist/api/resources/collections/client/Client.js +3 -6
- package/dist/api/resources/collections/resources/fields/client/Client.d.ts +2 -2
- package/dist/api/resources/collections/resources/fields/client/Client.js +4 -6
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +6 -6
- package/dist/api/resources/collections/resources/items/client/Client.js +24 -12
- package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
- package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +1 -1
- package/{api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts → dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.d.ts} +1 -1
- package/dist/api/resources/collections/resources/items/types/index.d.ts +1 -1
- package/dist/api/resources/collections/resources/items/types/index.js +1 -1
- package/dist/api/resources/components/client/Client.d.ts +8 -8
- package/dist/api/resources/components/client/Client.js +10 -12
- package/dist/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +2 -2
- package/dist/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +2 -2
- package/dist/api/resources/components/client/requests/ComponentsListRequest.d.ts +2 -2
- package/dist/api/resources/ecommerce/client/Client.d.ts +2 -2
- package/dist/api/resources/ecommerce/client/Client.js +2 -6
- package/dist/api/resources/forms/client/Client.d.ts +6 -6
- package/dist/api/resources/forms/client/Client.js +7 -10
- package/dist/api/resources/forms/client/requests/FormsListRequest.d.ts +2 -2
- package/dist/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +2 -2
- package/dist/api/resources/index.d.ts +0 -6
- package/dist/api/resources/index.js +1 -7
- package/dist/api/resources/inventory/client/Client.d.ts +2 -2
- package/dist/api/resources/inventory/client/Client.js +3 -6
- package/dist/api/resources/orders/client/Client.d.ts +4 -4
- package/dist/api/resources/orders/client/Client.js +8 -8
- package/dist/api/resources/orders/client/requests/OrdersListRequest.d.ts +2 -2
- package/dist/api/resources/pages/client/Client.d.ts +6 -6
- package/dist/api/resources/pages/client/Client.js +8 -10
- package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
- package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
- package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +2 -2
- package/dist/api/resources/pages/resources/scripts/client/Client.js +3 -6
- package/dist/api/resources/products/client/Client.d.ts +4 -4
- package/dist/api/resources/products/client/Client.js +8 -8
- package/dist/api/resources/products/client/requests/ProductsListRequest.d.ts +2 -2
- package/dist/api/resources/scripts/client/Client.d.ts +2 -2
- package/dist/api/resources/scripts/client/Client.js +4 -6
- package/dist/api/resources/sites/client/Client.d.ts +2 -2
- package/dist/api/resources/sites/client/Client.js +5 -6
- package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +4 -4
- package/dist/api/resources/sites/resources/activityLogs/client/Client.js +4 -8
- package/dist/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/comments/client/Client.d.ts +8 -8
- package/dist/api/resources/sites/resources/comments/client/Client.js +14 -12
- package/dist/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/forms/client/Client.d.ts +6 -6
- package/dist/api/resources/sites/resources/forms/client/Client.js +7 -10
- package/dist/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/plans/client/Client.d.ts +2 -2
- package/dist/api/resources/sites/resources/plans/client/Client.js +2 -6
- package/dist/api/resources/sites/resources/redirects/client/Client.d.ts +4 -4
- package/dist/api/resources/sites/resources/redirects/client/Client.js +6 -8
- package/dist/api/resources/sites/resources/robotsTxt/client/Client.d.ts +2 -2
- package/dist/api/resources/sites/resources/robotsTxt/client/Client.js +5 -6
- package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +4 -4
- package/dist/api/resources/sites/resources/scripts/client/Client.js +5 -8
- package/dist/api/resources/sites/resources/scripts/client/requests/ScriptsListCustomCodeBlocksRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/wellKnown/client/Client.d.ts +2 -2
- package/dist/api/resources/sites/resources/wellKnown/client/Client.js +4 -6
- package/dist/api/resources/token/client/Client.d.ts +2 -2
- package/dist/api/resources/token/client/Client.js +2 -6
- package/dist/api/resources/webhooks/client/Client.d.ts +2 -2
- package/dist/api/resources/webhooks/client/Client.js +3 -6
- package/dist/api/resources/workspaces/client/Client.d.ts +1 -1
- package/dist/api/resources/workspaces/client/Client.js +1 -1
- package/dist/api/resources/workspaces/resources/auditLogs/client/Client.d.ts +4 -4
- package/dist/api/resources/workspaces/resources/auditLogs/client/Client.js +6 -8
- package/dist/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.d.ts +2 -2
- package/dist/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.d.ts +1 -0
- package/dist/api/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.js +1 -0
- package/dist/api/types/AssetVariant.d.ts +6 -6
- package/dist/api/types/ComponentDom.d.ts +1 -1
- package/dist/api/types/ForbiddenErrorBody.d.ts +1 -1
- package/dist/api/types/ProductFieldData.d.ts +1 -1
- package/dist/api/types/SettingChange.d.ts +7 -0
- package/dist/api/types/SettingChangeAuditLogItem.d.ts +5 -0
- package/dist/api/types/TriggerType.d.ts +0 -3
- package/dist/api/types/TriggerType.js +0 -3
- package/dist/api/types/WorkspaceAuditLogItem.d.ts +4 -1
- package/dist/api/types/WorkspaceAuditLogItemPayloadSettingChangeMethod.d.ts +5 -0
- package/dist/api/types/WorkspaceAuditLogItemPayloadSettingChangeMethod.js +8 -0
- package/dist/api/types/index.d.ts +3 -13
- package/dist/api/types/index.js +3 -13
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +2 -2
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +2 -2
- package/{serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts → dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.d.ts} +2 -2
- package/{serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js → dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.js} +2 -2
- package/dist/serialization/resources/collections/resources/items/types/index.d.ts +1 -1
- package/dist/serialization/resources/collections/resources/items/types/index.js +1 -1
- package/dist/serialization/resources/index.d.ts +0 -5
- package/dist/serialization/resources/index.js +1 -6
- package/dist/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.d.ts +1 -1
- package/dist/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.js +1 -0
- package/dist/serialization/types/AssetVariant.d.ts +6 -6
- package/dist/serialization/types/AssetVariant.js +6 -6
- package/dist/serialization/types/ForbiddenErrorBody.d.ts +2 -2
- package/dist/serialization/types/ForbiddenErrorBody.js +2 -2
- package/dist/serialization/types/SettingChange.d.ts +13 -0
- package/dist/serialization/types/{AccessGroup.js → SettingChange.js} +7 -7
- package/dist/serialization/types/SettingChangeAuditLogItem.d.ts +11 -0
- package/dist/serialization/types/{UserAccessGroupsItem.js → SettingChangeAuditLogItem.js} +5 -5
- package/dist/serialization/types/TriggerType.d.ts +1 -1
- package/dist/serialization/types/TriggerType.js +0 -3
- package/dist/serialization/types/WorkspaceAuditLogItem.d.ts +5 -1
- package/dist/serialization/types/WorkspaceAuditLogItem.js +2 -0
- package/dist/serialization/types/WorkspaceAuditLogItemPayloadSettingChangeMethod.d.ts +7 -0
- package/dist/serialization/types/{UserStatus.js → WorkspaceAuditLogItemPayloadSettingChangeMethod.js} +2 -2
- package/dist/serialization/types/index.d.ts +3 -13
- package/dist/serialization/types/index.js +3 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AssetsUtilitiesClient.d.ts +1 -1
- package/dist/wrapper/FormsClient.js +5 -5
- package/dist/wrapper/ItemsClient.js +20 -20
- package/dist/wrapper/PagesClient.js +5 -5
- package/dist/wrapper/WebflowClient.js +1 -1
- package/jest.config.mjs +1 -1
- package/package.json +2 -1
- package/reference.md +68 -544
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +2 -2
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +2 -2
- package/{dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts → serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.d.ts} +2 -2
- package/{dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js → serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.js} +2 -2
- package/serialization/resources/collections/resources/items/types/index.d.ts +1 -1
- package/serialization/resources/collections/resources/items/types/index.js +1 -1
- package/serialization/resources/index.d.ts +0 -5
- package/serialization/resources/index.js +1 -6
- package/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.d.ts +1 -1
- package/serialization/resources/workspaces/resources/auditLogs/types/AuditLogsGetWorkspaceAuditLogsRequestEventType.js +1 -0
- package/serialization/types/AssetVariant.d.ts +6 -6
- package/serialization/types/AssetVariant.js +6 -6
- package/serialization/types/ForbiddenErrorBody.d.ts +2 -2
- package/serialization/types/ForbiddenErrorBody.js +2 -2
- package/serialization/types/SettingChange.d.ts +13 -0
- package/{dist/serialization/types/AccessGroupList.js → serialization/types/SettingChange.js} +7 -8
- package/serialization/types/SettingChangeAuditLogItem.d.ts +11 -0
- package/serialization/types/{UserAccessGroupsItem.js → SettingChangeAuditLogItem.js} +5 -5
- package/serialization/types/TriggerType.d.ts +1 -1
- package/serialization/types/TriggerType.js +0 -3
- package/serialization/types/WorkspaceAuditLogItem.d.ts +5 -1
- package/serialization/types/WorkspaceAuditLogItem.js +2 -0
- package/serialization/types/WorkspaceAuditLogItemPayloadSettingChangeMethod.d.ts +7 -0
- package/{dist/serialization/types/UserLimitReached.js → serialization/types/WorkspaceAuditLogItemPayloadSettingChangeMethod.js} +2 -2
- package/serialization/types/index.d.ts +3 -13
- package/serialization/types/index.js +3 -13
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AssetsUtilitiesClient.d.ts +1 -1
- package/wrapper/FormsClient.js +5 -5
- package/wrapper/ItemsClient.js +20 -20
- package/wrapper/PagesClient.js +5 -5
- package/wrapper/WebflowClient.js +1 -1
- package/.mock/definition/__package__.yml +0 -4471
- package/.mock/definition/accessGroups.yml +0 -87
- package/.mock/definition/api.yml +0 -18
- package/.mock/definition/assets.yml +0 -487
- package/.mock/definition/collections/fields.yml +0 -212
- package/.mock/definition/collections/items.yml +0 -2145
- package/.mock/definition/collections.yml +0 -350
- package/.mock/definition/comments.yml +0 -41
- package/.mock/definition/components.yml +0 -548
- package/.mock/definition/ecommerce.yml +0 -45
- package/.mock/definition/forms.yml +0 -399
- package/.mock/definition/inventory.yml +0 -152
- package/.mock/definition/items.yml +0 -112
- package/.mock/definition/orders.yml +0 -1971
- package/.mock/definition/pages/scripts.yml +0 -155
- package/.mock/definition/pages.yml +0 -611
- package/.mock/definition/products.yml +0 -642
- package/.mock/definition/scripts.yml +0 -236
- package/.mock/definition/sites/activityLogs.yml +0 -77
- package/.mock/definition/sites/comments.yml +0 -352
- package/.mock/definition/sites/forms.yml +0 -316
- package/.mock/definition/sites/plans.yml +0 -48
- package/.mock/definition/sites/redirects.yml +0 -221
- package/.mock/definition/sites/robotsTxt.yml +0 -229
- package/.mock/definition/sites/scripts.yml +0 -243
- package/.mock/definition/sites/wellKnown.yml +0 -130
- package/.mock/definition/sites.yml +0 -558
- package/.mock/definition/token.yml +0 -75
- package/.mock/definition/users.yml +0 -594
- package/.mock/definition/webhooks.yml +0 -188
- package/.mock/definition/workspaces/auditLogs.yml +0 -125
- package/.mock/fern.config.json +0 -4
- package/api/resources/accessGroups/client/Client.d.ts +0 -39
- package/api/resources/accessGroups/client/Client.js +0 -197
- package/api/resources/accessGroups/client/index.d.ts +0 -1
- package/api/resources/accessGroups/client/index.js +0 -17
- package/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +0 -20
- package/api/resources/accessGroups/client/requests/index.d.ts +0 -1
- package/api/resources/accessGroups/client/requests/index.js +0 -2
- package/api/resources/accessGroups/index.d.ts +0 -2
- package/api/resources/accessGroups/index.js +0 -18
- package/api/resources/accessGroups/types/AccessGroupsListRequestSort.d.ts +0 -9
- package/api/resources/accessGroups/types/AccessGroupsListRequestSort.js +0 -12
- package/api/resources/accessGroups/types/index.d.ts +0 -1
- package/api/resources/accessGroups/types/index.js +0 -17
- package/api/resources/users/client/Client.d.ts +0 -145
- package/api/resources/users/client/Client.js +0 -670
- package/api/resources/users/client/index.d.ts +0 -1
- package/api/resources/users/client/index.js +0 -17
- package/api/resources/users/client/requests/UsersInviteRequest.d.ts +0 -13
- package/api/resources/users/client/requests/UsersListRequest.d.ts +0 -23
- package/api/resources/users/client/requests/index.d.ts +0 -2
- package/api/resources/users/client/requests/index.js +0 -2
- package/api/resources/users/index.d.ts +0 -2
- package/api/resources/users/index.js +0 -18
- package/api/resources/users/types/UserAccountAddedPayload.d.ts +0 -5
- package/api/resources/users/types/UserAccountAddedPayloadPayload.d.ts +0 -20
- package/api/resources/users/types/UserAccountAddedPayloadPayloadData.d.ts +0 -9
- package/api/resources/users/types/UserAccountAddedPayloadPayloadData.js +0 -3
- package/api/resources/users/types/UserAccountDeletedPayload.d.ts +0 -5
- package/api/resources/users/types/UserAccountDeletedPayload.js +0 -3
- package/api/resources/users/types/UserAccountDeletedPayloadPayload.d.ts +0 -20
- package/api/resources/users/types/UserAccountDeletedPayloadPayload.js +0 -3
- package/api/resources/users/types/UserAccountDeletedPayloadPayloadData.d.ts +0 -9
- package/api/resources/users/types/UserAccountDeletedPayloadPayloadData.js +0 -3
- package/api/resources/users/types/UserAccountUpdatedPayload.d.ts +0 -5
- package/api/resources/users/types/UserAccountUpdatedPayload.js +0 -3
- package/api/resources/users/types/UserAccountUpdatedPayloadPayload.d.ts +0 -20
- package/api/resources/users/types/UserAccountUpdatedPayloadPayload.js +0 -3
- package/api/resources/users/types/UserAccountUpdatedPayloadPayloadData.d.ts +0 -9
- package/api/resources/users/types/UserAccountUpdatedPayloadPayloadData.js +0 -3
- package/api/resources/users/types/UsersListRequestSort.d.ts +0 -33
- package/api/resources/users/types/UsersListRequestSort.js +0 -36
- package/api/resources/users/types/index.d.ts +0 -10
- package/api/resources/users/types/index.js +0 -26
- package/api/types/AccessGroup.d.ts +0 -12
- package/api/types/AccessGroup.js +0 -3
- package/api/types/AccessGroupList.d.ts +0 -16
- package/api/types/AccessGroupList.js +0 -3
- package/api/types/ConflictErrorBody.d.ts +0 -2
- package/api/types/ConflictErrorBody.js +0 -3
- package/api/types/DuplicateUserEmail.d.ts +0 -1
- package/api/types/DuplicateUserEmail.js +0 -3
- package/api/types/User.d.ts +0 -22
- package/api/types/User.js +0 -3
- package/api/types/UserAccessGroupsItem.d.ts +0 -14
- package/api/types/UserAccessGroupsItem.js +0 -3
- package/api/types/UserAccessGroupsItemType.d.ts +0 -10
- package/api/types/UserAccessGroupsItemType.js +0 -13
- package/api/types/UserData.d.ts +0 -7
- package/api/types/UserData.js +0 -3
- package/api/types/UserDataData.d.ts +0 -12
- package/api/types/UserDataData.js +0 -3
- package/api/types/UserLimitReached.d.ts +0 -1
- package/api/types/UserLimitReached.js +0 -3
- package/api/types/UserList.d.ts +0 -16
- package/api/types/UserList.js +0 -3
- package/api/types/UserStatus.d.ts +0 -7
- package/api/types/UserStatus.js +0 -10
- package/api/types/UsersNotEnabled.d.ts +0 -1
- package/api/types/UsersNotEnabled.js +0 -3
- package/dist/api/resources/accessGroups/client/Client.d.ts +0 -39
- package/dist/api/resources/accessGroups/client/Client.js +0 -197
- package/dist/api/resources/accessGroups/client/index.d.ts +0 -1
- package/dist/api/resources/accessGroups/client/index.js +0 -17
- package/dist/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +0 -20
- package/dist/api/resources/accessGroups/client/requests/AccessGroupsListRequest.js +0 -3
- package/dist/api/resources/accessGroups/client/requests/index.d.ts +0 -1
- package/dist/api/resources/accessGroups/client/requests/index.js +0 -2
- package/dist/api/resources/accessGroups/index.d.ts +0 -2
- package/dist/api/resources/accessGroups/index.js +0 -18
- package/dist/api/resources/accessGroups/types/AccessGroupsListRequestSort.d.ts +0 -9
- package/dist/api/resources/accessGroups/types/AccessGroupsListRequestSort.js +0 -12
- package/dist/api/resources/accessGroups/types/index.d.ts +0 -1
- package/dist/api/resources/accessGroups/types/index.js +0 -17
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +0 -3
- package/dist/api/resources/users/client/Client.d.ts +0 -145
- package/dist/api/resources/users/client/Client.js +0 -670
- package/dist/api/resources/users/client/index.d.ts +0 -1
- package/dist/api/resources/users/client/index.js +0 -17
- package/dist/api/resources/users/client/requests/UsersInviteRequest.d.ts +0 -13
- package/dist/api/resources/users/client/requests/UsersInviteRequest.js +0 -3
- package/dist/api/resources/users/client/requests/UsersListRequest.d.ts +0 -23
- package/dist/api/resources/users/client/requests/UsersListRequest.js +0 -3
- package/dist/api/resources/users/client/requests/index.d.ts +0 -2
- package/dist/api/resources/users/client/requests/index.js +0 -2
- package/dist/api/resources/users/index.d.ts +0 -2
- package/dist/api/resources/users/index.js +0 -18
- package/dist/api/resources/users/types/UserAccountAddedPayload.d.ts +0 -5
- package/dist/api/resources/users/types/UserAccountAddedPayload.js +0 -3
- package/dist/api/resources/users/types/UserAccountAddedPayloadPayload.d.ts +0 -20
- package/dist/api/resources/users/types/UserAccountAddedPayloadPayload.js +0 -3
- package/dist/api/resources/users/types/UserAccountAddedPayloadPayloadData.d.ts +0 -9
- package/dist/api/resources/users/types/UserAccountAddedPayloadPayloadData.js +0 -3
- package/dist/api/resources/users/types/UserAccountDeletedPayload.d.ts +0 -5
- package/dist/api/resources/users/types/UserAccountDeletedPayload.js +0 -3
- package/dist/api/resources/users/types/UserAccountDeletedPayloadPayload.d.ts +0 -20
- package/dist/api/resources/users/types/UserAccountDeletedPayloadPayload.js +0 -3
- package/dist/api/resources/users/types/UserAccountDeletedPayloadPayloadData.d.ts +0 -9
- package/dist/api/resources/users/types/UserAccountDeletedPayloadPayloadData.js +0 -3
- package/dist/api/resources/users/types/UserAccountUpdatedPayload.d.ts +0 -5
- package/dist/api/resources/users/types/UserAccountUpdatedPayload.js +0 -3
- package/dist/api/resources/users/types/UserAccountUpdatedPayloadPayload.d.ts +0 -20
- package/dist/api/resources/users/types/UserAccountUpdatedPayloadPayload.js +0 -3
- package/dist/api/resources/users/types/UserAccountUpdatedPayloadPayloadData.d.ts +0 -9
- package/dist/api/resources/users/types/UserAccountUpdatedPayloadPayloadData.js +0 -3
- package/dist/api/resources/users/types/UsersListRequestSort.d.ts +0 -33
- package/dist/api/resources/users/types/UsersListRequestSort.js +0 -36
- package/dist/api/resources/users/types/index.d.ts +0 -10
- package/dist/api/resources/users/types/index.js +0 -26
- package/dist/api/types/AccessGroup.d.ts +0 -12
- package/dist/api/types/AccessGroup.js +0 -3
- package/dist/api/types/AccessGroupList.d.ts +0 -16
- package/dist/api/types/AccessGroupList.js +0 -3
- package/dist/api/types/ConflictErrorBody.d.ts +0 -2
- package/dist/api/types/ConflictErrorBody.js +0 -3
- package/dist/api/types/DuplicateUserEmail.d.ts +0 -1
- package/dist/api/types/DuplicateUserEmail.js +0 -3
- package/dist/api/types/User.d.ts +0 -22
- package/dist/api/types/User.js +0 -3
- package/dist/api/types/UserAccessGroupsItem.d.ts +0 -14
- package/dist/api/types/UserAccessGroupsItem.js +0 -3
- package/dist/api/types/UserAccessGroupsItemType.d.ts +0 -10
- package/dist/api/types/UserAccessGroupsItemType.js +0 -13
- package/dist/api/types/UserData.d.ts +0 -7
- package/dist/api/types/UserData.js +0 -3
- package/dist/api/types/UserDataData.d.ts +0 -12
- package/dist/api/types/UserDataData.js +0 -3
- package/dist/api/types/UserLimitReached.d.ts +0 -1
- package/dist/api/types/UserLimitReached.js +0 -3
- package/dist/api/types/UserList.d.ts +0 -16
- package/dist/api/types/UserList.js +0 -3
- package/dist/api/types/UserStatus.d.ts +0 -7
- package/dist/api/types/UserStatus.js +0 -10
- package/dist/api/types/UsersNotEnabled.d.ts +0 -1
- package/dist/api/types/UsersNotEnabled.js +0 -3
- package/dist/serialization/resources/accessGroups/index.d.ts +0 -1
- package/dist/serialization/resources/accessGroups/index.js +0 -17
- package/dist/serialization/resources/accessGroups/types/AccessGroupsListRequestSort.d.ts +0 -7
- package/dist/serialization/resources/accessGroups/types/AccessGroupsListRequestSort.js +0 -39
- package/dist/serialization/resources/accessGroups/types/index.d.ts +0 -1
- package/dist/serialization/resources/accessGroups/types/index.js +0 -17
- package/dist/serialization/resources/users/client/index.d.ts +0 -1
- package/dist/serialization/resources/users/client/index.js +0 -17
- package/dist/serialization/resources/users/client/requests/UsersInviteRequest.d.ts +0 -10
- package/dist/serialization/resources/users/client/requests/UsersInviteRequest.js +0 -42
- package/dist/serialization/resources/users/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/users/client/requests/index.js +0 -5
- package/dist/serialization/resources/users/index.d.ts +0 -2
- package/dist/serialization/resources/users/index.js +0 -18
- package/dist/serialization/resources/users/types/UserAccountAddedPayload.d.ts +0 -11
- package/dist/serialization/resources/users/types/UserAccountAddedPayload.js +0 -43
- package/dist/serialization/resources/users/types/UserAccountAddedPayloadPayload.d.ts +0 -20
- package/dist/serialization/resources/users/types/UserAccountAddedPayloadPayload.js +0 -52
- package/dist/serialization/resources/users/types/UserAccountAddedPayloadPayloadData.d.ts +0 -12
- package/dist/serialization/resources/users/types/UserAccountAddedPayloadPayloadData.js +0 -44
- package/dist/serialization/resources/users/types/UserAccountDeletedPayload.d.ts +0 -11
- package/dist/serialization/resources/users/types/UserAccountDeletedPayload.js +0 -43
- package/dist/serialization/resources/users/types/UserAccountDeletedPayloadPayload.d.ts +0 -20
- package/dist/serialization/resources/users/types/UserAccountDeletedPayloadPayload.js +0 -52
- package/dist/serialization/resources/users/types/UserAccountDeletedPayloadPayloadData.d.ts +0 -12
- package/dist/serialization/resources/users/types/UserAccountDeletedPayloadPayloadData.js +0 -44
- package/dist/serialization/resources/users/types/UserAccountUpdatedPayload.d.ts +0 -11
- package/dist/serialization/resources/users/types/UserAccountUpdatedPayload.js +0 -43
- package/dist/serialization/resources/users/types/UserAccountUpdatedPayloadPayload.d.ts +0 -20
- package/dist/serialization/resources/users/types/UserAccountUpdatedPayloadPayload.js +0 -52
- package/dist/serialization/resources/users/types/UserAccountUpdatedPayloadPayloadData.d.ts +0 -12
- package/dist/serialization/resources/users/types/UserAccountUpdatedPayloadPayloadData.js +0 -44
- package/dist/serialization/resources/users/types/UsersListRequestSort.d.ts +0 -7
- package/dist/serialization/resources/users/types/UsersListRequestSort.js +0 -50
- package/dist/serialization/resources/users/types/index.d.ts +0 -10
- package/dist/serialization/resources/users/types/index.js +0 -26
- package/dist/serialization/types/AccessGroup.d.ts +0 -13
- package/dist/serialization/types/AccessGroupList.d.ts +0 -14
- package/dist/serialization/types/ConflictErrorBody.d.ts +0 -9
- package/dist/serialization/types/ConflictErrorBody.js +0 -41
- package/dist/serialization/types/DuplicateUserEmail.d.ts +0 -7
- package/dist/serialization/types/DuplicateUserEmail.js +0 -39
- package/dist/serialization/types/User.d.ts +0 -20
- package/dist/serialization/types/User.js +0 -52
- package/dist/serialization/types/UserAccessGroupsItem.d.ts +0 -11
- package/dist/serialization/types/UserAccessGroupsItemType.d.ts +0 -7
- package/dist/serialization/types/UserAccessGroupsItemType.js +0 -39
- package/dist/serialization/types/UserData.d.ts +0 -10
- package/dist/serialization/types/UserData.js +0 -42
- package/dist/serialization/types/UserDataData.d.ts +0 -13
- package/dist/serialization/types/UserDataData.js +0 -45
- package/dist/serialization/types/UserLimitReached.d.ts +0 -7
- package/dist/serialization/types/UserList.d.ts +0 -14
- package/dist/serialization/types/UserList.js +0 -46
- package/dist/serialization/types/UserStatus.d.ts +0 -7
- package/dist/serialization/types/UsersNotEnabled.d.ts +0 -7
- package/dist/serialization/types/UsersNotEnabled.js +0 -39
- package/serialization/resources/accessGroups/index.d.ts +0 -1
- package/serialization/resources/accessGroups/index.js +0 -17
- package/serialization/resources/accessGroups/types/AccessGroupsListRequestSort.d.ts +0 -7
- package/serialization/resources/accessGroups/types/AccessGroupsListRequestSort.js +0 -39
- package/serialization/resources/accessGroups/types/index.d.ts +0 -1
- package/serialization/resources/accessGroups/types/index.js +0 -17
- package/serialization/resources/users/client/index.d.ts +0 -1
- package/serialization/resources/users/client/index.js +0 -17
- package/serialization/resources/users/client/requests/UsersInviteRequest.d.ts +0 -10
- package/serialization/resources/users/client/requests/UsersInviteRequest.js +0 -42
- package/serialization/resources/users/client/requests/index.d.ts +0 -1
- package/serialization/resources/users/client/requests/index.js +0 -5
- package/serialization/resources/users/index.d.ts +0 -2
- package/serialization/resources/users/index.js +0 -18
- package/serialization/resources/users/types/UserAccountAddedPayload.d.ts +0 -11
- package/serialization/resources/users/types/UserAccountAddedPayload.js +0 -43
- package/serialization/resources/users/types/UserAccountAddedPayloadPayload.d.ts +0 -20
- package/serialization/resources/users/types/UserAccountAddedPayloadPayload.js +0 -52
- package/serialization/resources/users/types/UserAccountAddedPayloadPayloadData.d.ts +0 -12
- package/serialization/resources/users/types/UserAccountAddedPayloadPayloadData.js +0 -44
- package/serialization/resources/users/types/UserAccountDeletedPayload.d.ts +0 -11
- package/serialization/resources/users/types/UserAccountDeletedPayload.js +0 -43
- package/serialization/resources/users/types/UserAccountDeletedPayloadPayload.d.ts +0 -20
- package/serialization/resources/users/types/UserAccountDeletedPayloadPayload.js +0 -52
- package/serialization/resources/users/types/UserAccountDeletedPayloadPayloadData.d.ts +0 -12
- package/serialization/resources/users/types/UserAccountDeletedPayloadPayloadData.js +0 -44
- package/serialization/resources/users/types/UserAccountUpdatedPayload.d.ts +0 -11
- package/serialization/resources/users/types/UserAccountUpdatedPayload.js +0 -43
- package/serialization/resources/users/types/UserAccountUpdatedPayloadPayload.d.ts +0 -20
- package/serialization/resources/users/types/UserAccountUpdatedPayloadPayload.js +0 -52
- package/serialization/resources/users/types/UserAccountUpdatedPayloadPayloadData.d.ts +0 -12
- package/serialization/resources/users/types/UserAccountUpdatedPayloadPayloadData.js +0 -44
- package/serialization/resources/users/types/UsersListRequestSort.d.ts +0 -7
- package/serialization/resources/users/types/UsersListRequestSort.js +0 -50
- package/serialization/resources/users/types/index.d.ts +0 -10
- package/serialization/resources/users/types/index.js +0 -26
- package/serialization/types/AccessGroup.d.ts +0 -13
- package/serialization/types/AccessGroup.js +0 -45
- package/serialization/types/AccessGroupList.d.ts +0 -14
- package/serialization/types/AccessGroupList.js +0 -46
- package/serialization/types/ConflictErrorBody.d.ts +0 -9
- package/serialization/types/ConflictErrorBody.js +0 -41
- package/serialization/types/DuplicateUserEmail.d.ts +0 -7
- package/serialization/types/DuplicateUserEmail.js +0 -39
- package/serialization/types/User.d.ts +0 -20
- package/serialization/types/User.js +0 -52
- package/serialization/types/UserAccessGroupsItem.d.ts +0 -11
- package/serialization/types/UserAccessGroupsItemType.d.ts +0 -7
- package/serialization/types/UserAccessGroupsItemType.js +0 -39
- package/serialization/types/UserData.d.ts +0 -10
- package/serialization/types/UserData.js +0 -42
- package/serialization/types/UserDataData.d.ts +0 -13
- package/serialization/types/UserDataData.js +0 -45
- package/serialization/types/UserLimitReached.d.ts +0 -7
- package/serialization/types/UserLimitReached.js +0 -39
- package/serialization/types/UserList.d.ts +0 -14
- package/serialization/types/UserList.js +0 -46
- package/serialization/types/UserStatus.d.ts +0 -7
- package/serialization/types/UserStatus.js +0 -39
- package/serialization/types/UsersNotEnabled.d.ts +0 -7
- package/serialization/types/UsersNotEnabled.js +0 -39
- /package/api/resources/{accessGroups/client/requests/AccessGroupsListRequest.js → collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.js} +0 -0
- /package/api/{resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js → types/SettingChange.js} +0 -0
- /package/api/{resources/users/client/requests/UsersInviteRequest.js → types/SettingChangeAuditLogItem.js} +0 -0
- /package/{api/resources/users/client/requests/UsersListRequest.js → dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataOneItem.js} +0 -0
- /package/{api/resources/users/types/UserAccountAddedPayload.js → dist/api/types/SettingChange.js} +0 -0
- /package/{api/resources/users/types/UserAccountAddedPayloadPayload.js → dist/api/types/SettingChangeAuditLogItem.js} +0 -0
|
@@ -1,670 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.Users = void 0;
|
|
47
|
-
const core = __importStar(require("../../../../core"));
|
|
48
|
-
const headers_1 = require("../../../../core/headers");
|
|
49
|
-
const environments = __importStar(require("../../../../environments"));
|
|
50
|
-
const errors = __importStar(require("../../../../errors/index"));
|
|
51
|
-
const serializers = __importStar(require("../../../../serialization/index"));
|
|
52
|
-
const Webflow = __importStar(require("../../../index"));
|
|
53
|
-
class Users {
|
|
54
|
-
constructor(_options = {}) {
|
|
55
|
-
this._options = _options;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Get a list of users for a site
|
|
59
|
-
*
|
|
60
|
-
* Required scope | `users:read`
|
|
61
|
-
*
|
|
62
|
-
* @param {string} siteId - Unique identifier for a Site
|
|
63
|
-
* @param {Webflow.UsersListRequest} request
|
|
64
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
-
*
|
|
66
|
-
* @throws {@link Webflow.BadRequestError}
|
|
67
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
68
|
-
* @throws {@link Webflow.ForbiddenError}
|
|
69
|
-
* @throws {@link Webflow.NotFoundError}
|
|
70
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
71
|
-
* @throws {@link Webflow.InternalServerError}
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* await client.users.list("580e63e98c9a982ac9b8b741", {
|
|
75
|
-
* offset: 1.1,
|
|
76
|
-
* limit: 1.1,
|
|
77
|
-
* sort: "CreatedOn"
|
|
78
|
-
* })
|
|
79
|
-
*/
|
|
80
|
-
list(siteId, request = {}, requestOptions) {
|
|
81
|
-
return core.HttpResponsePromise.fromPromise(this.__list(siteId, request, requestOptions));
|
|
82
|
-
}
|
|
83
|
-
__list(siteId_1) {
|
|
84
|
-
return __awaiter(this, arguments, void 0, function* (siteId, request = {}, requestOptions) {
|
|
85
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
86
|
-
const { offset, limit, sort } = request;
|
|
87
|
-
const _queryParams = {};
|
|
88
|
-
if (offset != null) {
|
|
89
|
-
_queryParams.offset = offset.toString();
|
|
90
|
-
}
|
|
91
|
-
if (limit != null) {
|
|
92
|
-
_queryParams.limit = limit.toString();
|
|
93
|
-
}
|
|
94
|
-
if (sort != null) {
|
|
95
|
-
_queryParams.sort = serializers.UsersListRequestSort.jsonOrThrow(sort, {
|
|
96
|
-
unrecognizedObjectKeys: "passthrough",
|
|
97
|
-
allowUnrecognizedUnionMembers: true,
|
|
98
|
-
allowUnrecognizedEnumValues: true,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
102
|
-
const _response = yield core.fetcher({
|
|
103
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.WebflowEnvironment.DataApi)
|
|
104
|
-
.base, `sites/${core.url.encodePathParam(siteId)}/users`),
|
|
105
|
-
method: "GET",
|
|
106
|
-
headers: _headers,
|
|
107
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
108
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
109
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
110
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
});
|
|
112
|
-
if (_response.ok) {
|
|
113
|
-
return {
|
|
114
|
-
data: serializers.UserList.parseOrThrow(_response.body, {
|
|
115
|
-
unrecognizedObjectKeys: "passthrough",
|
|
116
|
-
allowUnrecognizedUnionMembers: true,
|
|
117
|
-
allowUnrecognizedEnumValues: true,
|
|
118
|
-
skipValidation: true,
|
|
119
|
-
breadcrumbsPrefix: ["response"],
|
|
120
|
-
}),
|
|
121
|
-
rawResponse: _response.rawResponse,
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
if (_response.error.reason === "status-code") {
|
|
125
|
-
switch (_response.error.statusCode) {
|
|
126
|
-
case 400:
|
|
127
|
-
throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
|
|
128
|
-
case 401:
|
|
129
|
-
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
130
|
-
unrecognizedObjectKeys: "passthrough",
|
|
131
|
-
allowUnrecognizedUnionMembers: true,
|
|
132
|
-
allowUnrecognizedEnumValues: true,
|
|
133
|
-
skipValidation: true,
|
|
134
|
-
breadcrumbsPrefix: ["response"],
|
|
135
|
-
}), _response.rawResponse);
|
|
136
|
-
case 403:
|
|
137
|
-
throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
138
|
-
case 404:
|
|
139
|
-
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
140
|
-
unrecognizedObjectKeys: "passthrough",
|
|
141
|
-
allowUnrecognizedUnionMembers: true,
|
|
142
|
-
allowUnrecognizedEnumValues: true,
|
|
143
|
-
skipValidation: true,
|
|
144
|
-
breadcrumbsPrefix: ["response"],
|
|
145
|
-
}), _response.rawResponse);
|
|
146
|
-
case 429:
|
|
147
|
-
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
148
|
-
unrecognizedObjectKeys: "passthrough",
|
|
149
|
-
allowUnrecognizedUnionMembers: true,
|
|
150
|
-
allowUnrecognizedEnumValues: true,
|
|
151
|
-
skipValidation: true,
|
|
152
|
-
breadcrumbsPrefix: ["response"],
|
|
153
|
-
}), _response.rawResponse);
|
|
154
|
-
case 500:
|
|
155
|
-
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
156
|
-
unrecognizedObjectKeys: "passthrough",
|
|
157
|
-
allowUnrecognizedUnionMembers: true,
|
|
158
|
-
allowUnrecognizedEnumValues: true,
|
|
159
|
-
skipValidation: true,
|
|
160
|
-
breadcrumbsPrefix: ["response"],
|
|
161
|
-
}), _response.rawResponse);
|
|
162
|
-
default:
|
|
163
|
-
throw new errors.WebflowError({
|
|
164
|
-
statusCode: _response.error.statusCode,
|
|
165
|
-
body: _response.error.body,
|
|
166
|
-
rawResponse: _response.rawResponse,
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
switch (_response.error.reason) {
|
|
171
|
-
case "non-json":
|
|
172
|
-
throw new errors.WebflowError({
|
|
173
|
-
statusCode: _response.error.statusCode,
|
|
174
|
-
body: _response.error.rawBody,
|
|
175
|
-
rawResponse: _response.rawResponse,
|
|
176
|
-
});
|
|
177
|
-
case "timeout":
|
|
178
|
-
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/users.");
|
|
179
|
-
case "unknown":
|
|
180
|
-
throw new errors.WebflowError({
|
|
181
|
-
message: _response.error.errorMessage,
|
|
182
|
-
rawResponse: _response.rawResponse,
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Get a User by ID
|
|
189
|
-
*
|
|
190
|
-
* Required scope | `users:read`
|
|
191
|
-
*
|
|
192
|
-
* @param {string} siteId - Unique identifier for a Site
|
|
193
|
-
* @param {string} userId - Unique identifier for a User
|
|
194
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
|
-
*
|
|
196
|
-
* @throws {@link Webflow.BadRequestError}
|
|
197
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
198
|
-
* @throws {@link Webflow.ForbiddenError}
|
|
199
|
-
* @throws {@link Webflow.NotFoundError}
|
|
200
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
201
|
-
* @throws {@link Webflow.InternalServerError}
|
|
202
|
-
*
|
|
203
|
-
* @example
|
|
204
|
-
* await client.users.get("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741")
|
|
205
|
-
*/
|
|
206
|
-
get(siteId, userId, requestOptions) {
|
|
207
|
-
return core.HttpResponsePromise.fromPromise(this.__get(siteId, userId, requestOptions));
|
|
208
|
-
}
|
|
209
|
-
__get(siteId, userId, requestOptions) {
|
|
210
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
212
|
-
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
213
|
-
const _response = yield core.fetcher({
|
|
214
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.WebflowEnvironment.DataApi)
|
|
215
|
-
.base, `sites/${core.url.encodePathParam(siteId)}/users/${core.url.encodePathParam(userId)}`),
|
|
216
|
-
method: "GET",
|
|
217
|
-
headers: _headers,
|
|
218
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
219
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
220
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
221
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
222
|
-
});
|
|
223
|
-
if (_response.ok) {
|
|
224
|
-
return {
|
|
225
|
-
data: serializers.User.parseOrThrow(_response.body, {
|
|
226
|
-
unrecognizedObjectKeys: "passthrough",
|
|
227
|
-
allowUnrecognizedUnionMembers: true,
|
|
228
|
-
allowUnrecognizedEnumValues: true,
|
|
229
|
-
skipValidation: true,
|
|
230
|
-
breadcrumbsPrefix: ["response"],
|
|
231
|
-
}),
|
|
232
|
-
rawResponse: _response.rawResponse,
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
if (_response.error.reason === "status-code") {
|
|
236
|
-
switch (_response.error.statusCode) {
|
|
237
|
-
case 400:
|
|
238
|
-
throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
|
|
239
|
-
case 401:
|
|
240
|
-
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
241
|
-
unrecognizedObjectKeys: "passthrough",
|
|
242
|
-
allowUnrecognizedUnionMembers: true,
|
|
243
|
-
allowUnrecognizedEnumValues: true,
|
|
244
|
-
skipValidation: true,
|
|
245
|
-
breadcrumbsPrefix: ["response"],
|
|
246
|
-
}), _response.rawResponse);
|
|
247
|
-
case 403:
|
|
248
|
-
throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
249
|
-
case 404:
|
|
250
|
-
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
251
|
-
unrecognizedObjectKeys: "passthrough",
|
|
252
|
-
allowUnrecognizedUnionMembers: true,
|
|
253
|
-
allowUnrecognizedEnumValues: true,
|
|
254
|
-
skipValidation: true,
|
|
255
|
-
breadcrumbsPrefix: ["response"],
|
|
256
|
-
}), _response.rawResponse);
|
|
257
|
-
case 429:
|
|
258
|
-
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
259
|
-
unrecognizedObjectKeys: "passthrough",
|
|
260
|
-
allowUnrecognizedUnionMembers: true,
|
|
261
|
-
allowUnrecognizedEnumValues: true,
|
|
262
|
-
skipValidation: true,
|
|
263
|
-
breadcrumbsPrefix: ["response"],
|
|
264
|
-
}), _response.rawResponse);
|
|
265
|
-
case 500:
|
|
266
|
-
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
267
|
-
unrecognizedObjectKeys: "passthrough",
|
|
268
|
-
allowUnrecognizedUnionMembers: true,
|
|
269
|
-
allowUnrecognizedEnumValues: true,
|
|
270
|
-
skipValidation: true,
|
|
271
|
-
breadcrumbsPrefix: ["response"],
|
|
272
|
-
}), _response.rawResponse);
|
|
273
|
-
default:
|
|
274
|
-
throw new errors.WebflowError({
|
|
275
|
-
statusCode: _response.error.statusCode,
|
|
276
|
-
body: _response.error.body,
|
|
277
|
-
rawResponse: _response.rawResponse,
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
switch (_response.error.reason) {
|
|
282
|
-
case "non-json":
|
|
283
|
-
throw new errors.WebflowError({
|
|
284
|
-
statusCode: _response.error.statusCode,
|
|
285
|
-
body: _response.error.rawBody,
|
|
286
|
-
rawResponse: _response.rawResponse,
|
|
287
|
-
});
|
|
288
|
-
case "timeout":
|
|
289
|
-
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/users/{user_id}.");
|
|
290
|
-
case "unknown":
|
|
291
|
-
throw new errors.WebflowError({
|
|
292
|
-
message: _response.error.errorMessage,
|
|
293
|
-
rawResponse: _response.rawResponse,
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Delete a User by ID
|
|
300
|
-
*
|
|
301
|
-
* Required scope | `users:write`
|
|
302
|
-
*
|
|
303
|
-
* @param {string} siteId - Unique identifier for a Site
|
|
304
|
-
* @param {string} userId - Unique identifier for a User
|
|
305
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
306
|
-
*
|
|
307
|
-
* @throws {@link Webflow.BadRequestError}
|
|
308
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
309
|
-
* @throws {@link Webflow.ForbiddenError}
|
|
310
|
-
* @throws {@link Webflow.NotFoundError}
|
|
311
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
312
|
-
* @throws {@link Webflow.InternalServerError}
|
|
313
|
-
*
|
|
314
|
-
* @example
|
|
315
|
-
* await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741")
|
|
316
|
-
*/
|
|
317
|
-
delete(siteId, userId, requestOptions) {
|
|
318
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(siteId, userId, requestOptions));
|
|
319
|
-
}
|
|
320
|
-
__delete(siteId, userId, requestOptions) {
|
|
321
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
323
|
-
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
324
|
-
const _response = yield core.fetcher({
|
|
325
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.WebflowEnvironment.DataApi)
|
|
326
|
-
.base, `sites/${core.url.encodePathParam(siteId)}/users/${core.url.encodePathParam(userId)}`),
|
|
327
|
-
method: "DELETE",
|
|
328
|
-
headers: _headers,
|
|
329
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
330
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
331
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
332
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
333
|
-
});
|
|
334
|
-
if (_response.ok) {
|
|
335
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
336
|
-
}
|
|
337
|
-
if (_response.error.reason === "status-code") {
|
|
338
|
-
switch (_response.error.statusCode) {
|
|
339
|
-
case 400:
|
|
340
|
-
throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
|
|
341
|
-
case 401:
|
|
342
|
-
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
343
|
-
unrecognizedObjectKeys: "passthrough",
|
|
344
|
-
allowUnrecognizedUnionMembers: true,
|
|
345
|
-
allowUnrecognizedEnumValues: true,
|
|
346
|
-
skipValidation: true,
|
|
347
|
-
breadcrumbsPrefix: ["response"],
|
|
348
|
-
}), _response.rawResponse);
|
|
349
|
-
case 403:
|
|
350
|
-
throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
351
|
-
case 404:
|
|
352
|
-
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
353
|
-
unrecognizedObjectKeys: "passthrough",
|
|
354
|
-
allowUnrecognizedUnionMembers: true,
|
|
355
|
-
allowUnrecognizedEnumValues: true,
|
|
356
|
-
skipValidation: true,
|
|
357
|
-
breadcrumbsPrefix: ["response"],
|
|
358
|
-
}), _response.rawResponse);
|
|
359
|
-
case 429:
|
|
360
|
-
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
361
|
-
unrecognizedObjectKeys: "passthrough",
|
|
362
|
-
allowUnrecognizedUnionMembers: true,
|
|
363
|
-
allowUnrecognizedEnumValues: true,
|
|
364
|
-
skipValidation: true,
|
|
365
|
-
breadcrumbsPrefix: ["response"],
|
|
366
|
-
}), _response.rawResponse);
|
|
367
|
-
case 500:
|
|
368
|
-
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
369
|
-
unrecognizedObjectKeys: "passthrough",
|
|
370
|
-
allowUnrecognizedUnionMembers: true,
|
|
371
|
-
allowUnrecognizedEnumValues: true,
|
|
372
|
-
skipValidation: true,
|
|
373
|
-
breadcrumbsPrefix: ["response"],
|
|
374
|
-
}), _response.rawResponse);
|
|
375
|
-
default:
|
|
376
|
-
throw new errors.WebflowError({
|
|
377
|
-
statusCode: _response.error.statusCode,
|
|
378
|
-
body: _response.error.body,
|
|
379
|
-
rawResponse: _response.rawResponse,
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
switch (_response.error.reason) {
|
|
384
|
-
case "non-json":
|
|
385
|
-
throw new errors.WebflowError({
|
|
386
|
-
statusCode: _response.error.statusCode,
|
|
387
|
-
body: _response.error.rawBody,
|
|
388
|
-
rawResponse: _response.rawResponse,
|
|
389
|
-
});
|
|
390
|
-
case "timeout":
|
|
391
|
-
throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}/users/{user_id}.");
|
|
392
|
-
case "unknown":
|
|
393
|
-
throw new errors.WebflowError({
|
|
394
|
-
message: _response.error.errorMessage,
|
|
395
|
-
rawResponse: _response.rawResponse,
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* Update a User by ID
|
|
402
|
-
*
|
|
403
|
-
* Required scope | `users:write`
|
|
404
|
-
*
|
|
405
|
-
* <Note class="notice">The <code>email</code> and <code>password</code>
|
|
406
|
-
* fields cannot be updated using this endpoint</Note>
|
|
407
|
-
*
|
|
408
|
-
* @param {string} siteId - Unique identifier for a Site
|
|
409
|
-
* @param {string} userId - Unique identifier for a User
|
|
410
|
-
* @param {Webflow.User} request
|
|
411
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
412
|
-
*
|
|
413
|
-
* @throws {@link Webflow.BadRequestError}
|
|
414
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
415
|
-
* @throws {@link Webflow.ForbiddenError}
|
|
416
|
-
* @throws {@link Webflow.NotFoundError}
|
|
417
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
418
|
-
* @throws {@link Webflow.InternalServerError}
|
|
419
|
-
*
|
|
420
|
-
* @example
|
|
421
|
-
* await client.users.update("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", {
|
|
422
|
-
* id: "6287ec36a841b25637c663df",
|
|
423
|
-
* isEmailVerified: true,
|
|
424
|
-
* lastUpdated: new Date("2022-05-20T13:46:12.000Z"),
|
|
425
|
-
* invitedOn: new Date("2022-05-20T13:46:12.000Z"),
|
|
426
|
-
* createdOn: new Date("2022-05-20T13:46:12.000Z"),
|
|
427
|
-
* lastLogin: new Date("2022-05-20T13:46:12.000Z"),
|
|
428
|
-
* status: "verified",
|
|
429
|
-
* accessGroups: [{
|
|
430
|
-
* slug: "webflowers",
|
|
431
|
-
* type: "admin"
|
|
432
|
-
* }]
|
|
433
|
-
* })
|
|
434
|
-
*/
|
|
435
|
-
update(siteId, userId, request, requestOptions) {
|
|
436
|
-
return core.HttpResponsePromise.fromPromise(this.__update(siteId, userId, request, requestOptions));
|
|
437
|
-
}
|
|
438
|
-
__update(siteId, userId, request, requestOptions) {
|
|
439
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
440
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
441
|
-
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
442
|
-
const _response = yield core.fetcher({
|
|
443
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.WebflowEnvironment.DataApi)
|
|
444
|
-
.base, `sites/${core.url.encodePathParam(siteId)}/users/${core.url.encodePathParam(userId)}`),
|
|
445
|
-
method: "PATCH",
|
|
446
|
-
headers: _headers,
|
|
447
|
-
contentType: "application/json",
|
|
448
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
449
|
-
requestType: "json",
|
|
450
|
-
body: serializers.User.jsonOrThrow(request, {
|
|
451
|
-
unrecognizedObjectKeys: "passthrough",
|
|
452
|
-
allowUnrecognizedUnionMembers: true,
|
|
453
|
-
allowUnrecognizedEnumValues: true,
|
|
454
|
-
}),
|
|
455
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
456
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
457
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
458
|
-
});
|
|
459
|
-
if (_response.ok) {
|
|
460
|
-
return {
|
|
461
|
-
data: serializers.User.parseOrThrow(_response.body, {
|
|
462
|
-
unrecognizedObjectKeys: "passthrough",
|
|
463
|
-
allowUnrecognizedUnionMembers: true,
|
|
464
|
-
allowUnrecognizedEnumValues: true,
|
|
465
|
-
skipValidation: true,
|
|
466
|
-
breadcrumbsPrefix: ["response"],
|
|
467
|
-
}),
|
|
468
|
-
rawResponse: _response.rawResponse,
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
if (_response.error.reason === "status-code") {
|
|
472
|
-
switch (_response.error.statusCode) {
|
|
473
|
-
case 400:
|
|
474
|
-
throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
|
|
475
|
-
case 401:
|
|
476
|
-
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
477
|
-
unrecognizedObjectKeys: "passthrough",
|
|
478
|
-
allowUnrecognizedUnionMembers: true,
|
|
479
|
-
allowUnrecognizedEnumValues: true,
|
|
480
|
-
skipValidation: true,
|
|
481
|
-
breadcrumbsPrefix: ["response"],
|
|
482
|
-
}), _response.rawResponse);
|
|
483
|
-
case 403:
|
|
484
|
-
throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
485
|
-
case 404:
|
|
486
|
-
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
487
|
-
unrecognizedObjectKeys: "passthrough",
|
|
488
|
-
allowUnrecognizedUnionMembers: true,
|
|
489
|
-
allowUnrecognizedEnumValues: true,
|
|
490
|
-
skipValidation: true,
|
|
491
|
-
breadcrumbsPrefix: ["response"],
|
|
492
|
-
}), _response.rawResponse);
|
|
493
|
-
case 429:
|
|
494
|
-
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
495
|
-
unrecognizedObjectKeys: "passthrough",
|
|
496
|
-
allowUnrecognizedUnionMembers: true,
|
|
497
|
-
allowUnrecognizedEnumValues: true,
|
|
498
|
-
skipValidation: true,
|
|
499
|
-
breadcrumbsPrefix: ["response"],
|
|
500
|
-
}), _response.rawResponse);
|
|
501
|
-
case 500:
|
|
502
|
-
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
503
|
-
unrecognizedObjectKeys: "passthrough",
|
|
504
|
-
allowUnrecognizedUnionMembers: true,
|
|
505
|
-
allowUnrecognizedEnumValues: true,
|
|
506
|
-
skipValidation: true,
|
|
507
|
-
breadcrumbsPrefix: ["response"],
|
|
508
|
-
}), _response.rawResponse);
|
|
509
|
-
default:
|
|
510
|
-
throw new errors.WebflowError({
|
|
511
|
-
statusCode: _response.error.statusCode,
|
|
512
|
-
body: _response.error.body,
|
|
513
|
-
rawResponse: _response.rawResponse,
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
switch (_response.error.reason) {
|
|
518
|
-
case "non-json":
|
|
519
|
-
throw new errors.WebflowError({
|
|
520
|
-
statusCode: _response.error.statusCode,
|
|
521
|
-
body: _response.error.rawBody,
|
|
522
|
-
rawResponse: _response.rawResponse,
|
|
523
|
-
});
|
|
524
|
-
case "timeout":
|
|
525
|
-
throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}/users/{user_id}.");
|
|
526
|
-
case "unknown":
|
|
527
|
-
throw new errors.WebflowError({
|
|
528
|
-
message: _response.error.errorMessage,
|
|
529
|
-
rawResponse: _response.rawResponse,
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* Create and invite a user with an email address.
|
|
536
|
-
*
|
|
537
|
-
* The user will be sent and invite via email, which they will need to accept in order to join paid any paid access group.
|
|
538
|
-
*
|
|
539
|
-
* Required scope | `users:write`
|
|
540
|
-
*
|
|
541
|
-
* @param {string} siteId - Unique identifier for a Site
|
|
542
|
-
* @param {Webflow.UsersInviteRequest} request
|
|
543
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
544
|
-
*
|
|
545
|
-
* @throws {@link Webflow.BadRequestError}
|
|
546
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
547
|
-
* @throws {@link Webflow.ForbiddenError}
|
|
548
|
-
* @throws {@link Webflow.NotFoundError}
|
|
549
|
-
* @throws {@link Webflow.ConflictError}
|
|
550
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
551
|
-
* @throws {@link Webflow.InternalServerError}
|
|
552
|
-
*
|
|
553
|
-
* @example
|
|
554
|
-
* await client.users.invite("580e63e98c9a982ac9b8b741", {
|
|
555
|
-
* email: "some.one@home.com",
|
|
556
|
-
* accessGroups: ["accessGroups"]
|
|
557
|
-
* })
|
|
558
|
-
*/
|
|
559
|
-
invite(siteId, request, requestOptions) {
|
|
560
|
-
return core.HttpResponsePromise.fromPromise(this.__invite(siteId, request, requestOptions));
|
|
561
|
-
}
|
|
562
|
-
__invite(siteId, request, requestOptions) {
|
|
563
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
564
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
565
|
-
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
566
|
-
const _response = yield core.fetcher({
|
|
567
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.WebflowEnvironment.DataApi)
|
|
568
|
-
.base, `sites/${core.url.encodePathParam(siteId)}/users/invite`),
|
|
569
|
-
method: "POST",
|
|
570
|
-
headers: _headers,
|
|
571
|
-
contentType: "application/json",
|
|
572
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
573
|
-
requestType: "json",
|
|
574
|
-
body: serializers.UsersInviteRequest.jsonOrThrow(request, {
|
|
575
|
-
unrecognizedObjectKeys: "passthrough",
|
|
576
|
-
allowUnrecognizedUnionMembers: true,
|
|
577
|
-
allowUnrecognizedEnumValues: true,
|
|
578
|
-
}),
|
|
579
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
580
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
581
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
582
|
-
});
|
|
583
|
-
if (_response.ok) {
|
|
584
|
-
return {
|
|
585
|
-
data: serializers.User.parseOrThrow(_response.body, {
|
|
586
|
-
unrecognizedObjectKeys: "passthrough",
|
|
587
|
-
allowUnrecognizedUnionMembers: true,
|
|
588
|
-
allowUnrecognizedEnumValues: true,
|
|
589
|
-
skipValidation: true,
|
|
590
|
-
breadcrumbsPrefix: ["response"],
|
|
591
|
-
}),
|
|
592
|
-
rawResponse: _response.rawResponse,
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
if (_response.error.reason === "status-code") {
|
|
596
|
-
switch (_response.error.statusCode) {
|
|
597
|
-
case 400:
|
|
598
|
-
throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
|
|
599
|
-
case 401:
|
|
600
|
-
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
601
|
-
unrecognizedObjectKeys: "passthrough",
|
|
602
|
-
allowUnrecognizedUnionMembers: true,
|
|
603
|
-
allowUnrecognizedEnumValues: true,
|
|
604
|
-
skipValidation: true,
|
|
605
|
-
breadcrumbsPrefix: ["response"],
|
|
606
|
-
}), _response.rawResponse);
|
|
607
|
-
case 403:
|
|
608
|
-
throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
609
|
-
case 404:
|
|
610
|
-
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
611
|
-
unrecognizedObjectKeys: "passthrough",
|
|
612
|
-
allowUnrecognizedUnionMembers: true,
|
|
613
|
-
allowUnrecognizedEnumValues: true,
|
|
614
|
-
skipValidation: true,
|
|
615
|
-
breadcrumbsPrefix: ["response"],
|
|
616
|
-
}), _response.rawResponse);
|
|
617
|
-
case 409:
|
|
618
|
-
throw new Webflow.ConflictError(_response.error.body, _response.rawResponse);
|
|
619
|
-
case 429:
|
|
620
|
-
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
621
|
-
unrecognizedObjectKeys: "passthrough",
|
|
622
|
-
allowUnrecognizedUnionMembers: true,
|
|
623
|
-
allowUnrecognizedEnumValues: true,
|
|
624
|
-
skipValidation: true,
|
|
625
|
-
breadcrumbsPrefix: ["response"],
|
|
626
|
-
}), _response.rawResponse);
|
|
627
|
-
case 500:
|
|
628
|
-
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
629
|
-
unrecognizedObjectKeys: "passthrough",
|
|
630
|
-
allowUnrecognizedUnionMembers: true,
|
|
631
|
-
allowUnrecognizedEnumValues: true,
|
|
632
|
-
skipValidation: true,
|
|
633
|
-
breadcrumbsPrefix: ["response"],
|
|
634
|
-
}), _response.rawResponse);
|
|
635
|
-
default:
|
|
636
|
-
throw new errors.WebflowError({
|
|
637
|
-
statusCode: _response.error.statusCode,
|
|
638
|
-
body: _response.error.body,
|
|
639
|
-
rawResponse: _response.rawResponse,
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
switch (_response.error.reason) {
|
|
644
|
-
case "non-json":
|
|
645
|
-
throw new errors.WebflowError({
|
|
646
|
-
statusCode: _response.error.statusCode,
|
|
647
|
-
body: _response.error.rawBody,
|
|
648
|
-
rawResponse: _response.rawResponse,
|
|
649
|
-
});
|
|
650
|
-
case "timeout":
|
|
651
|
-
throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/users/invite.");
|
|
652
|
-
case "unknown":
|
|
653
|
-
throw new errors.WebflowError({
|
|
654
|
-
message: _response.error.errorMessage,
|
|
655
|
-
rawResponse: _response.rawResponse,
|
|
656
|
-
});
|
|
657
|
-
}
|
|
658
|
-
});
|
|
659
|
-
}
|
|
660
|
-
_getAuthorizationHeader() {
|
|
661
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
662
|
-
const bearer = yield core.Supplier.get(this._options.accessToken);
|
|
663
|
-
if (bearer != null) {
|
|
664
|
-
return `Bearer ${bearer}`;
|
|
665
|
-
}
|
|
666
|
-
return undefined;
|
|
667
|
-
});
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
exports.Users = Users;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./requests";
|