intercom-client 6.0.0-beta.3 → 6.0.0
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/.gitattributes +1 -0
- package/Client.d.ts +90 -0
- package/Client.js +112 -0
- package/LICENSE +10 -198
- package/README.md +129 -208
- package/REPO_OWNER +1 -0
- package/api/errors/BadRequestError.d.ts +7 -0
- package/api/errors/BadRequestError.js +41 -0
- package/api/errors/ForbiddenError.d.ts +8 -0
- package/api/errors/ForbiddenError.js +41 -0
- package/api/errors/NotFoundError.d.ts +7 -0
- package/api/errors/NotFoundError.js +41 -0
- package/api/errors/UnauthorizedError.d.ts +8 -0
- package/api/errors/UnauthorizedError.js +41 -0
- package/api/errors/UnprocessableEntityError.d.ts +7 -0
- package/api/errors/UnprocessableEntityError.js +41 -0
- package/api/errors/index.d.ts +5 -0
- package/api/errors/index.js +21 -0
- package/api/index.d.ts +4 -0
- package/api/index.js +19 -0
- package/api/resources/admins/client/Client.d.ts +107 -0
- package/api/resources/admins/client/Client.js +364 -0
- package/api/resources/admins/client/index.d.ts +1 -0
- package/api/resources/admins/client/index.js +17 -0
- package/api/resources/admins/client/requests/ConfigureAwayAdminRequest.d.ts +35 -0
- package/api/resources/admins/client/requests/ConfigureAwayAdminRequest.js +5 -0
- package/api/resources/admins/client/requests/FindAdminRequest.d.ts +15 -0
- package/api/resources/admins/client/requests/FindAdminRequest.js +5 -0
- package/api/resources/admins/client/requests/ListAllActivityLogsRequest.d.ts +20 -0
- package/api/resources/admins/client/requests/ListAllActivityLogsRequest.js +5 -0
- package/api/resources/admins/client/requests/index.d.ts +3 -0
- package/api/resources/admins/client/requests/index.js +2 -0
- package/api/resources/admins/index.d.ts +2 -0
- package/api/resources/admins/index.js +18 -0
- package/api/resources/admins/types/Admin.d.ts +30 -0
- package/api/resources/admins/types/Admin.js +5 -0
- package/api/resources/admins/types/index.d.ts +1 -0
- package/api/resources/admins/types/index.js +17 -0
- package/api/resources/aiAgent/index.d.ts +1 -0
- package/api/resources/aiAgent/index.js +17 -0
- package/api/resources/aiAgent/types/AiAgent.d.ts +35 -0
- package/api/resources/aiAgent/types/AiAgent.js +16 -0
- package/api/resources/aiAgent/types/index.d.ts +1 -0
- package/api/resources/aiAgent/types/index.js +17 -0
- package/api/resources/aiContentSource/index.d.ts +1 -0
- package/api/resources/aiContentSource/index.js +17 -0
- package/api/resources/aiContentSource/types/ContentSource.d.ts +29 -0
- package/api/resources/aiContentSource/types/ContentSource.js +16 -0
- package/api/resources/aiContentSource/types/index.d.ts +1 -0
- package/api/resources/aiContentSource/types/index.js +17 -0
- package/api/resources/articles/client/Client.d.ts +153 -0
- package/api/resources/articles/client/Client.js +491 -0
- package/api/resources/articles/client/index.d.ts +1 -0
- package/api/resources/articles/client/index.js +17 -0
- package/api/resources/articles/client/requests/CreateArticleRequest.d.ts +62 -0
- package/api/resources/articles/client/requests/CreateArticleRequest.js +13 -0
- package/api/resources/articles/client/requests/DeleteArticleRequest.d.ts +15 -0
- package/api/resources/articles/client/requests/DeleteArticleRequest.js +5 -0
- package/api/resources/articles/client/requests/FindArticleRequest.d.ts +15 -0
- package/api/resources/articles/client/requests/FindArticleRequest.js +5 -0
- package/api/resources/articles/client/requests/ListArticlesRequest.d.ts +17 -0
- package/api/resources/articles/client/requests/ListArticlesRequest.js +5 -0
- package/api/resources/articles/client/requests/SearchArticlesRequest.d.ts +28 -0
- package/api/resources/articles/client/requests/SearchArticlesRequest.js +5 -0
- package/api/resources/articles/client/requests/UpdateArticleRequest.d.ts +50 -0
- package/api/resources/articles/client/requests/UpdateArticleRequest.js +13 -0
- package/api/resources/articles/client/requests/index.d.ts +6 -0
- package/api/resources/articles/client/requests/index.js +2 -0
- package/api/resources/articles/index.d.ts +2 -0
- package/api/resources/articles/index.js +18 -0
- package/api/resources/articles/types/Article.d.ts +10 -0
- package/api/resources/articles/types/Article.js +5 -0
- package/api/resources/articles/types/ArticleListItem.d.ts +50 -0
- package/api/resources/articles/types/ArticleListItem.js +13 -0
- package/api/resources/articles/types/ArticleSearchHighlights.d.ts +60 -0
- package/api/resources/articles/types/ArticleSearchHighlights.js +29 -0
- package/api/resources/articles/types/SearchArticlesResponse.d.ts +27 -0
- package/api/resources/articles/types/SearchArticlesResponse.js +5 -0
- package/api/resources/articles/types/index.d.ts +4 -0
- package/api/resources/articles/types/index.js +20 -0
- package/api/resources/companies/client/Client.d.ts +263 -0
- package/api/resources/companies/client/Client.js +855 -0
- package/api/resources/companies/client/index.d.ts +1 -0
- package/api/resources/companies/client/index.js +17 -0
- package/api/resources/companies/client/requests/AttachContactToCompanyRequest.d.ts +30 -0
- package/api/resources/companies/client/requests/AttachContactToCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/CreateOrUpdateCompanyRequest.d.ts +34 -0
- package/api/resources/companies/client/requests/CreateOrUpdateCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/DeleteCompanyRequest.d.ts +15 -0
- package/api/resources/companies/client/requests/DeleteCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/DetachContactFromCompanyRequest.d.ts +20 -0
- package/api/resources/companies/client/requests/DetachContactFromCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/FindCompanyRequest.d.ts +15 -0
- package/api/resources/companies/client/requests/FindCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/ListAttachedContactsRequest.d.ts +23 -0
- package/api/resources/companies/client/requests/ListAttachedContactsRequest.js +5 -0
- package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +23 -0
- package/api/resources/companies/client/requests/ListCompaniesRequest.js +5 -0
- package/api/resources/companies/client/requests/ListSegmentsAttachedToCompanyRequest.d.ts +15 -0
- package/api/resources/companies/client/requests/ListSegmentsAttachedToCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/RetrieveCompanyRequest.d.ts +38 -0
- package/api/resources/companies/client/requests/RetrieveCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/ScrollCompaniesRequest.d.ts +13 -0
- package/api/resources/companies/client/requests/ScrollCompaniesRequest.js +5 -0
- package/api/resources/companies/client/requests/UpdateCompanyRequest.d.ts +15 -0
- package/api/resources/companies/client/requests/UpdateCompanyRequest.js +5 -0
- package/api/resources/companies/client/requests/index.d.ts +11 -0
- package/api/resources/companies/client/requests/index.js +2 -0
- package/api/resources/companies/index.d.ts +2 -0
- package/api/resources/companies/index.js +18 -0
- package/api/resources/companies/types/Company.d.ts +72 -0
- package/api/resources/companies/types/Company.js +5 -0
- package/api/resources/companies/types/index.d.ts +1 -0
- package/api/resources/companies/types/index.js +17 -0
- package/api/resources/contacts/client/Client.d.ts +383 -0
- package/api/resources/contacts/client/Client.js +1113 -0
- package/api/resources/contacts/client/index.d.ts +1 -0
- package/api/resources/contacts/client/index.js +17 -0
- package/api/resources/contacts/client/requests/ArchiveContactRequest.d.ts +15 -0
- package/api/resources/contacts/client/requests/ArchiveContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/AttachSubscriptionToContactRequest.d.ts +35 -0
- package/api/resources/contacts/client/requests/AttachSubscriptionToContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/DeleteContactRequest.d.ts +15 -0
- package/api/resources/contacts/client/requests/DeleteContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/DetachSubscriptionFromContactRequest.d.ts +20 -0
- package/api/resources/contacts/client/requests/DetachSubscriptionFromContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/FindContactRequest.d.ts +15 -0
- package/api/resources/contacts/client/requests/FindContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/ListAttachedCompaniesRequest.d.ts +23 -0
- package/api/resources/contacts/client/requests/ListAttachedCompaniesRequest.js +5 -0
- package/api/resources/contacts/client/requests/ListAttachedSubscriptionsRequest.d.ts +15 -0
- package/api/resources/contacts/client/requests/ListAttachedSubscriptionsRequest.js +5 -0
- package/api/resources/contacts/client/requests/ListContactsRequest.d.ts +21 -0
- package/api/resources/contacts/client/requests/ListContactsRequest.js +5 -0
- package/api/resources/contacts/client/requests/ListSegmentsAttachedToContactRequest.d.ts +15 -0
- package/api/resources/contacts/client/requests/ListSegmentsAttachedToContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/ListTagsAttachedToContactRequest.d.ts +15 -0
- package/api/resources/contacts/client/requests/ListTagsAttachedToContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/MergeContactsRequest.d.ts +16 -0
- package/api/resources/contacts/client/requests/MergeContactsRequest.js +5 -0
- package/api/resources/contacts/client/requests/UnarchiveContactRequest.d.ts +15 -0
- package/api/resources/contacts/client/requests/UnarchiveContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +39 -0
- package/api/resources/contacts/client/requests/UpdateContactRequest.js +5 -0
- package/api/resources/contacts/client/requests/index.d.ts +13 -0
- package/api/resources/contacts/client/requests/index.js +2 -0
- package/api/resources/contacts/index.d.ts +2 -0
- package/api/resources/contacts/index.js +18 -0
- package/api/resources/contacts/types/Contact.d.ts +103 -0
- package/api/resources/contacts/types/Contact.js +5 -0
- package/api/resources/contacts/types/index.d.ts +1 -0
- package/api/resources/contacts/types/index.js +17 -0
- package/api/resources/conversations/client/Client.d.ts +487 -0
- package/api/resources/conversations/client/Client.js +1113 -0
- package/api/resources/conversations/client/index.d.ts +1 -0
- package/api/resources/conversations/client/index.js +17 -0
- package/api/resources/conversations/client/requests/AttachContactToConversationRequest.d.ts +44 -0
- package/api/resources/conversations/client/requests/AttachContactToConversationRequest.js +5 -0
- package/api/resources/conversations/client/requests/AutoAssignConversationRequest.d.ts +15 -0
- package/api/resources/conversations/client/requests/AutoAssignConversationRequest.js +5 -0
- package/api/resources/conversations/client/requests/ConvertConversationToTicketRequest.d.ts +26 -0
- package/api/resources/conversations/client/requests/ConvertConversationToTicketRequest.js +5 -0
- package/api/resources/conversations/client/requests/CreateConversationRequest.d.ts +46 -0
- package/api/resources/conversations/client/requests/CreateConversationRequest.js +17 -0
- package/api/resources/conversations/client/requests/DetachContactFromConversationRequest.d.ts +44 -0
- package/api/resources/conversations/client/requests/DetachContactFromConversationRequest.js +5 -0
- package/api/resources/conversations/client/requests/FindConversationRequest.d.ts +20 -0
- package/api/resources/conversations/client/requests/FindConversationRequest.js +5 -0
- package/api/resources/conversations/client/requests/ListConversationsRequest.d.ts +17 -0
- package/api/resources/conversations/client/requests/ListConversationsRequest.js +5 -0
- package/api/resources/conversations/client/requests/ManageConversationPartsRequest.d.ts +72 -0
- package/api/resources/conversations/client/requests/ManageConversationPartsRequest.js +5 -0
- package/api/resources/conversations/client/requests/ReplyToConversationRequest.d.ts +89 -0
- package/api/resources/conversations/client/requests/ReplyToConversationRequest.js +5 -0
- package/api/resources/conversations/client/requests/UpdateConversationRequest.d.ts +40 -0
- package/api/resources/conversations/client/requests/UpdateConversationRequest.js +5 -0
- package/api/resources/conversations/client/requests/index.d.ts +10 -0
- package/api/resources/conversations/client/requests/index.js +2 -0
- package/api/resources/conversations/index.d.ts +2 -0
- package/api/resources/conversations/index.js +18 -0
- package/api/resources/conversations/types/Conversation.d.ts +68 -0
- package/api/resources/conversations/types/Conversation.js +18 -0
- package/api/resources/conversations/types/ConversationsManageRequestBody.d.ts +19 -0
- package/api/resources/conversations/types/ConversationsManageRequestBody.js +5 -0
- package/api/resources/conversations/types/index.d.ts +2 -0
- package/api/resources/conversations/types/index.js +18 -0
- package/api/resources/customObjectInstances/index.d.ts +1 -0
- package/api/resources/customObjectInstances/index.js +17 -0
- package/api/resources/customObjectInstances/types/CustomObjectInstance.d.ts +16 -0
- package/api/resources/customObjectInstances/types/CustomObjectInstance.js +5 -0
- package/api/resources/customObjectInstances/types/index.d.ts +1 -0
- package/api/resources/customObjectInstances/types/index.js +17 -0
- package/api/resources/dataAttributes/client/Client.d.ts +149 -0
- package/api/resources/dataAttributes/client/Client.js +335 -0
- package/api/resources/dataAttributes/client/index.d.ts +1 -0
- package/api/resources/dataAttributes/client/index.js +17 -0
- package/api/resources/dataAttributes/client/requests/CreateDataAttributeRequest.d.ts +84 -0
- package/api/resources/dataAttributes/client/requests/CreateDataAttributeRequest.js +21 -0
- package/api/resources/dataAttributes/client/requests/ListDataAttributesRequest.d.ts +18 -0
- package/api/resources/dataAttributes/client/requests/ListDataAttributesRequest.js +5 -0
- package/api/resources/dataAttributes/client/requests/UpdateDataAttributeRequest.d.ts +69 -0
- package/api/resources/dataAttributes/client/requests/UpdateDataAttributeRequest.js +5 -0
- package/api/resources/dataAttributes/client/requests/index.d.ts +3 -0
- package/api/resources/dataAttributes/client/requests/index.js +2 -0
- package/api/resources/dataAttributes/index.d.ts +2 -0
- package/api/resources/dataAttributes/index.js +18 -0
- package/api/resources/dataAttributes/types/DataAttribute.d.ts +63 -0
- package/api/resources/dataAttributes/types/DataAttribute.js +20 -0
- package/api/resources/dataAttributes/types/DataAttributesListRequestModel.d.ts +9 -0
- package/api/resources/dataAttributes/types/DataAttributesListRequestModel.js +11 -0
- package/api/resources/dataAttributes/types/index.d.ts +2 -0
- package/api/resources/dataAttributes/types/index.js +18 -0
- package/api/resources/dataEvents/index.d.ts +1 -0
- package/api/resources/dataEvents/index.js +17 -0
- package/api/resources/dataEvents/types/DataEvent.d.ts +24 -0
- package/api/resources/dataEvents/types/DataEvent.js +5 -0
- package/api/resources/dataEvents/types/index.d.ts +1 -0
- package/api/resources/dataEvents/types/index.js +17 -0
- package/api/resources/dataExport/client/Client.d.ts +108 -0
- package/api/resources/dataExport/client/Client.js +287 -0
- package/api/resources/dataExport/client/index.d.ts +1 -0
- package/api/resources/dataExport/client/index.js +17 -0
- package/api/resources/dataExport/client/requests/CancelDataExportRequest.d.ts +15 -0
- package/api/resources/dataExport/client/requests/CancelDataExportRequest.js +5 -0
- package/api/resources/dataExport/client/requests/CreateDataExportRequest.d.ts +16 -0
- package/api/resources/dataExport/client/requests/CreateDataExportRequest.js +5 -0
- package/api/resources/dataExport/client/requests/DownloadDataExportRequest.d.ts +15 -0
- package/api/resources/dataExport/client/requests/DownloadDataExportRequest.js +5 -0
- package/api/resources/dataExport/client/requests/FindDataExportRequest.d.ts +15 -0
- package/api/resources/dataExport/client/requests/FindDataExportRequest.js +5 -0
- package/api/resources/dataExport/client/requests/index.d.ts +4 -0
- package/api/resources/dataExport/client/requests/index.js +2 -0
- package/api/resources/dataExport/index.d.ts +2 -0
- package/api/resources/dataExport/index.js +18 -0
- package/api/resources/dataExport/types/DataExport.d.ts +30 -0
- package/api/resources/dataExport/types/DataExport.js +17 -0
- package/api/resources/dataExport/types/index.d.ts +1 -0
- package/api/resources/dataExport/types/index.js +17 -0
- package/api/resources/events/client/Client.d.ts +129 -0
- package/api/resources/events/client/Client.js +305 -0
- package/api/resources/events/client/index.d.ts +1 -0
- package/api/resources/events/client/index.js +17 -0
- package/api/resources/events/client/requests/ListEventSummariesRequest.d.ts +28 -0
- package/api/resources/events/client/requests/ListEventSummariesRequest.js +5 -0
- package/api/resources/events/client/requests/ListEventsRequest.d.ts +35 -0
- package/api/resources/events/client/requests/ListEventsRequest.js +5 -0
- package/api/resources/events/client/requests/index.d.ts +2 -0
- package/api/resources/events/client/requests/index.js +2 -0
- package/api/resources/events/index.d.ts +1 -0
- package/api/resources/events/index.js +17 -0
- package/api/resources/helpCenter/index.d.ts +1 -0
- package/api/resources/helpCenter/index.js +17 -0
- package/api/resources/helpCenter/types/Collection.d.ts +34 -0
- package/api/resources/helpCenter/types/Collection.js +5 -0
- package/api/resources/helpCenter/types/HelpCenter.d.ts +22 -0
- package/api/resources/helpCenter/types/HelpCenter.js +5 -0
- package/api/resources/helpCenter/types/HelpCenterList.d.ts +13 -0
- package/api/resources/helpCenter/types/HelpCenterList.js +5 -0
- package/api/resources/helpCenter/types/index.d.ts +3 -0
- package/api/resources/helpCenter/types/index.js +19 -0
- package/api/resources/helpCenters/client/Client.d.ts +62 -0
- package/api/resources/helpCenters/client/Client.js +202 -0
- package/api/resources/helpCenters/client/index.d.ts +1 -0
- package/api/resources/helpCenters/client/index.js +17 -0
- package/api/resources/helpCenters/client/requests/FindHelpCenterRequest.d.ts +15 -0
- package/api/resources/helpCenters/client/requests/FindHelpCenterRequest.js +5 -0
- package/api/resources/helpCenters/client/requests/ListHelpCentersRequest.d.ts +17 -0
- package/api/resources/helpCenters/client/requests/ListHelpCentersRequest.js +5 -0
- package/api/resources/helpCenters/client/requests/index.d.ts +2 -0
- package/api/resources/helpCenters/client/requests/index.js +2 -0
- package/api/resources/helpCenters/index.d.ts +2 -0
- package/api/resources/helpCenters/index.js +18 -0
- package/api/resources/helpCenters/resources/collections/client/Client.d.ts +113 -0
- package/api/resources/helpCenters/resources/collections/client/Client.js +395 -0
- package/api/resources/helpCenters/resources/collections/client/index.d.ts +1 -0
- package/api/resources/helpCenters/resources/collections/client/index.js +17 -0
- package/api/resources/helpCenters/resources/collections/client/requests/CreateCollectionRequest.d.ts +27 -0
- package/api/resources/helpCenters/resources/collections/client/requests/CreateCollectionRequest.js +5 -0
- package/api/resources/helpCenters/resources/collections/client/requests/DeleteCollectionRequest.d.ts +15 -0
- package/api/resources/helpCenters/resources/collections/client/requests/DeleteCollectionRequest.js +5 -0
- package/api/resources/helpCenters/resources/collections/client/requests/FindCollectionRequest.d.ts +15 -0
- package/api/resources/helpCenters/resources/collections/client/requests/FindCollectionRequest.js +5 -0
- package/api/resources/helpCenters/resources/collections/client/requests/ListCollectionsRequest.d.ts +17 -0
- package/api/resources/helpCenters/resources/collections/client/requests/ListCollectionsRequest.js +5 -0
- package/api/resources/helpCenters/resources/collections/client/requests/UpdateCollectionRequest.d.ts +30 -0
- package/api/resources/helpCenters/resources/collections/client/requests/UpdateCollectionRequest.js +5 -0
- package/api/resources/helpCenters/resources/collections/client/requests/index.d.ts +5 -0
- package/api/resources/helpCenters/resources/collections/client/requests/index.js +2 -0
- package/api/resources/helpCenters/resources/collections/index.d.ts +1 -0
- package/api/resources/helpCenters/resources/collections/index.js +17 -0
- package/api/resources/helpCenters/resources/index.d.ts +2 -0
- package/api/resources/helpCenters/resources/index.js +31 -0
- package/api/resources/index.d.ts +62 -0
- package/api/resources/index.js +91 -0
- package/api/resources/messages/client/Client.d.ts +147 -0
- package/api/resources/messages/client/Client.js +227 -0
- package/api/resources/messages/client/index.d.ts +1 -0
- package/api/resources/messages/client/index.js +2 -0
- package/api/resources/messages/index.d.ts +2 -0
- package/api/resources/messages/index.js +18 -0
- package/api/resources/messages/types/Message.d.ts +34 -0
- package/api/resources/messages/types/Message.js +15 -0
- package/api/resources/messages/types/index.d.ts +1 -0
- package/api/resources/messages/types/index.js +17 -0
- package/api/resources/news/client/Client.d.ts +36 -0
- package/api/resources/news/client/Client.js +22 -0
- package/api/resources/news/client/index.d.ts +1 -0
- package/api/resources/news/client/index.js +2 -0
- package/api/resources/news/index.d.ts +3 -0
- package/api/resources/news/index.js +19 -0
- package/api/resources/news/resources/feeds/client/Client.d.ts +71 -0
- package/api/resources/news/resources/feeds/client/Client.js +228 -0
- package/api/resources/news/resources/feeds/client/index.d.ts +1 -0
- package/api/resources/news/resources/feeds/client/index.js +17 -0
- package/api/resources/news/resources/feeds/client/requests/FindNewsFeedRequest.d.ts +15 -0
- package/api/resources/news/resources/feeds/client/requests/FindNewsFeedRequest.js +5 -0
- package/api/resources/news/resources/feeds/client/requests/ListNewsFeedItemsRequest.d.ts +15 -0
- package/api/resources/news/resources/feeds/client/requests/ListNewsFeedItemsRequest.js +5 -0
- package/api/resources/news/resources/feeds/client/requests/index.d.ts +2 -0
- package/api/resources/news/resources/feeds/client/requests/index.js +2 -0
- package/api/resources/news/resources/feeds/index.d.ts +1 -0
- package/api/resources/news/resources/feeds/index.js +17 -0
- package/api/resources/news/resources/index.d.ts +4 -0
- package/api/resources/news/resources/index.js +33 -0
- package/api/resources/news/resources/items/client/Client.d.ts +127 -0
- package/api/resources/news/resources/items/client/Client.js +375 -0
- package/api/resources/news/resources/items/client/index.d.ts +1 -0
- package/api/resources/news/resources/items/client/index.js +17 -0
- package/api/resources/news/resources/items/client/requests/DeleteNewsItemRequest.d.ts +15 -0
- package/api/resources/news/resources/items/client/requests/DeleteNewsItemRequest.js +5 -0
- package/api/resources/news/resources/items/client/requests/FindNewsItemRequest.d.ts +15 -0
- package/api/resources/news/resources/items/client/requests/FindNewsItemRequest.js +5 -0
- package/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.d.ts +34 -0
- package/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.js +5 -0
- package/api/resources/news/resources/items/client/requests/index.d.ts +3 -0
- package/api/resources/news/resources/items/client/requests/index.js +2 -0
- package/api/resources/news/resources/items/index.d.ts +1 -0
- package/api/resources/news/resources/items/index.js +17 -0
- package/api/resources/news/types/NewsItem.d.ts +47 -0
- package/api/resources/news/types/NewsItem.js +13 -0
- package/api/resources/news/types/Newsfeed.d.ts +20 -0
- package/api/resources/news/types/Newsfeed.js +5 -0
- package/api/resources/news/types/NewsfeedAssignment.d.ts +12 -0
- package/api/resources/news/types/NewsfeedAssignment.js +5 -0
- package/api/resources/news/types/index.d.ts +3 -0
- package/api/resources/news/types/index.js +19 -0
- package/api/resources/notes/client/Client.d.ts +80 -0
- package/api/resources/notes/client/Client.js +272 -0
- package/api/resources/notes/client/index.d.ts +1 -0
- package/api/resources/notes/client/index.js +17 -0
- package/api/resources/notes/client/requests/CreateContactNoteRequest.d.ts +35 -0
- package/api/resources/notes/client/requests/CreateContactNoteRequest.js +5 -0
- package/api/resources/notes/client/requests/FindNoteRequest.d.ts +15 -0
- package/api/resources/notes/client/requests/FindNoteRequest.js +5 -0
- package/api/resources/notes/client/requests/ListContactNotesRequest.d.ts +23 -0
- package/api/resources/notes/client/requests/ListContactNotesRequest.js +5 -0
- package/api/resources/notes/client/requests/index.d.ts +3 -0
- package/api/resources/notes/client/requests/index.js +2 -0
- package/api/resources/notes/index.d.ts +2 -0
- package/api/resources/notes/index.js +18 -0
- package/api/resources/notes/types/Note.d.ts +32 -0
- package/api/resources/notes/types/Note.js +5 -0
- package/api/resources/notes/types/index.d.ts +1 -0
- package/api/resources/notes/types/index.js +17 -0
- package/api/resources/phoneCallRedirects/client/Client.d.ts +64 -0
- package/api/resources/phoneCallRedirects/client/Client.js +142 -0
- package/api/resources/phoneCallRedirects/client/index.d.ts +1 -0
- package/api/resources/phoneCallRedirects/client/index.js +17 -0
- package/api/resources/phoneCallRedirects/client/requests/CreatePhoneCallRedirectRequest.d.ts +46 -0
- package/api/resources/phoneCallRedirects/client/requests/CreatePhoneCallRedirectRequest.js +5 -0
- package/api/resources/phoneCallRedirects/client/requests/index.d.ts +1 -0
- package/api/resources/phoneCallRedirects/client/requests/index.js +2 -0
- package/api/resources/phoneCallRedirects/index.d.ts +1 -0
- package/api/resources/phoneCallRedirects/index.js +17 -0
- package/api/resources/segments/client/Client.d.ts +62 -0
- package/api/resources/segments/client/Client.js +185 -0
- package/api/resources/segments/client/index.d.ts +1 -0
- package/api/resources/segments/client/index.js +17 -0
- package/api/resources/segments/client/requests/FindSegmentRequest.d.ts +15 -0
- package/api/resources/segments/client/requests/FindSegmentRequest.js +5 -0
- package/api/resources/segments/client/requests/ListSegmentsRequest.d.ts +13 -0
- package/api/resources/segments/client/requests/ListSegmentsRequest.js +5 -0
- package/api/resources/segments/client/requests/index.d.ts +2 -0
- package/api/resources/segments/client/requests/index.js +2 -0
- package/api/resources/segments/index.d.ts +2 -0
- package/api/resources/segments/index.js +18 -0
- package/api/resources/segments/types/Segment.d.ts +32 -0
- package/api/resources/segments/types/Segment.js +13 -0
- package/api/resources/segments/types/index.d.ts +1 -0
- package/api/resources/segments/types/index.js +17 -0
- package/api/resources/subscriptionTypes/client/Client.d.ts +46 -0
- package/api/resources/subscriptionTypes/client/Client.js +119 -0
- package/api/resources/subscriptionTypes/client/index.d.ts +1 -0
- package/api/resources/subscriptionTypes/client/index.js +2 -0
- package/api/resources/subscriptionTypes/index.d.ts +2 -0
- package/api/resources/subscriptionTypes/index.js +18 -0
- package/api/resources/subscriptionTypes/types/SubscriptionType.d.ts +49 -0
- package/api/resources/subscriptionTypes/types/SubscriptionType.js +25 -0
- package/api/resources/subscriptionTypes/types/index.d.ts +1 -0
- package/api/resources/subscriptionTypes/types/index.js +17 -0
- package/api/resources/tags/client/Client.d.ts +234 -0
- package/api/resources/tags/client/Client.js +723 -0
- package/api/resources/tags/client/index.d.ts +1 -0
- package/api/resources/tags/client/index.js +17 -0
- package/api/resources/tags/client/requests/DeleteTagRequest.d.ts +15 -0
- package/api/resources/tags/client/requests/DeleteTagRequest.js +5 -0
- package/api/resources/tags/client/requests/FindTagRequest.d.ts +15 -0
- package/api/resources/tags/client/requests/FindTagRequest.js +5 -0
- package/api/resources/tags/client/requests/TagContactRequest.d.ts +30 -0
- package/api/resources/tags/client/requests/TagContactRequest.js +5 -0
- package/api/resources/tags/client/requests/TagConversationRequest.d.ts +28 -0
- package/api/resources/tags/client/requests/TagConversationRequest.js +5 -0
- package/api/resources/tags/client/requests/TagTicketRequest.d.ts +28 -0
- package/api/resources/tags/client/requests/TagTicketRequest.js +5 -0
- package/api/resources/tags/client/requests/UntagContactRequest.d.ts +20 -0
- package/api/resources/tags/client/requests/UntagContactRequest.js +5 -0
- package/api/resources/tags/client/requests/UntagConversationRequest.d.ts +37 -0
- package/api/resources/tags/client/requests/UntagConversationRequest.js +5 -0
- package/api/resources/tags/client/requests/UntagTicketRequest.d.ts +37 -0
- package/api/resources/tags/client/requests/UntagTicketRequest.js +5 -0
- package/api/resources/tags/client/requests/index.d.ts +8 -0
- package/api/resources/tags/client/requests/index.js +2 -0
- package/api/resources/tags/index.d.ts +2 -0
- package/api/resources/tags/index.js +18 -0
- package/api/resources/tags/types/Tag.d.ts +18 -0
- package/api/resources/tags/types/Tag.js +5 -0
- package/api/resources/tags/types/TagsCreateRequestBody.d.ts +5 -0
- package/api/resources/tags/types/TagsCreateRequestBody.js +5 -0
- package/api/resources/tags/types/index.d.ts +2 -0
- package/api/resources/tags/types/index.js +18 -0
- package/api/resources/teams/client/Client.d.ts +61 -0
- package/api/resources/teams/client/Client.js +178 -0
- package/api/resources/teams/client/index.d.ts +1 -0
- package/api/resources/teams/client/index.js +17 -0
- package/api/resources/teams/client/requests/FindTeamRequest.d.ts +15 -0
- package/api/resources/teams/client/requests/FindTeamRequest.js +5 -0
- package/api/resources/teams/client/requests/index.d.ts +1 -0
- package/api/resources/teams/client/requests/index.js +2 -0
- package/api/resources/teams/index.d.ts +2 -0
- package/api/resources/teams/index.js +18 -0
- package/api/resources/teams/types/Team.d.ts +18 -0
- package/api/resources/teams/types/Team.js +5 -0
- package/api/resources/teams/types/index.d.ts +1 -0
- package/api/resources/teams/types/index.js +17 -0
- package/api/resources/ticketTypes/client/Client.d.ts +104 -0
- package/api/resources/ticketTypes/client/Client.js +317 -0
- package/api/resources/ticketTypes/client/index.d.ts +1 -0
- package/api/resources/ticketTypes/client/index.js +17 -0
- package/api/resources/ticketTypes/client/requests/CreateTicketTypeRequest.d.ts +35 -0
- package/api/resources/ticketTypes/client/requests/CreateTicketTypeRequest.js +14 -0
- package/api/resources/ticketTypes/client/requests/FindTicketTypeRequest.d.ts +15 -0
- package/api/resources/ticketTypes/client/requests/FindTicketTypeRequest.js +5 -0
- package/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.ts +39 -0
- package/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.js +14 -0
- package/api/resources/ticketTypes/client/requests/index.d.ts +3 -0
- package/api/resources/ticketTypes/client/requests/index.js +2 -0
- package/api/resources/ticketTypes/index.d.ts +2 -0
- package/api/resources/ticketTypes/index.js +18 -0
- package/api/resources/ticketTypes/resources/attributes/client/Client.d.ts +66 -0
- package/api/resources/ticketTypes/resources/attributes/client/Client.js +195 -0
- package/api/resources/ticketTypes/resources/attributes/client/index.d.ts +1 -0
- package/api/resources/ticketTypes/resources/attributes/client/index.js +17 -0
- package/api/resources/ticketTypes/resources/attributes/client/requests/CreateTicketTypeAttributeRequest.d.ts +54 -0
- package/api/resources/ticketTypes/resources/attributes/client/requests/CreateTicketTypeAttributeRequest.js +18 -0
- package/api/resources/ticketTypes/resources/attributes/client/requests/UpdateTicketTypeAttributeRequest.d.ts +41 -0
- package/api/resources/ticketTypes/resources/attributes/client/requests/UpdateTicketTypeAttributeRequest.js +5 -0
- package/api/resources/ticketTypes/resources/attributes/client/requests/index.d.ts +2 -0
- package/api/resources/ticketTypes/resources/attributes/client/requests/index.js +2 -0
- package/api/resources/ticketTypes/resources/attributes/index.d.ts +1 -0
- package/api/resources/ticketTypes/resources/attributes/index.js +17 -0
- package/api/resources/ticketTypes/resources/index.d.ts +2 -0
- package/api/resources/ticketTypes/resources/index.js +31 -0
- package/api/resources/tickets/client/Client.d.ts +267 -0
- package/api/resources/tickets/client/Client.js +534 -0
- package/api/resources/tickets/client/index.d.ts +1 -0
- package/api/resources/tickets/client/index.js +17 -0
- package/api/resources/tickets/client/requests/CreateTicketRequest.d.ts +40 -0
- package/api/resources/tickets/client/requests/CreateTicketRequest.js +5 -0
- package/api/resources/tickets/client/requests/FindTicketRequest.d.ts +15 -0
- package/api/resources/tickets/client/requests/FindTicketRequest.js +5 -0
- package/api/resources/tickets/client/requests/ReplyToTicketRequest.d.ts +81 -0
- package/api/resources/tickets/client/requests/ReplyToTicketRequest.js +5 -0
- package/api/resources/tickets/client/requests/UpdateTicketRequest.d.ts +82 -0
- package/api/resources/tickets/client/requests/UpdateTicketRequest.js +14 -0
- package/api/resources/tickets/client/requests/index.d.ts +4 -0
- package/api/resources/tickets/client/requests/index.js +2 -0
- package/api/resources/tickets/index.d.ts +2 -0
- package/api/resources/tickets/index.js +18 -0
- package/api/resources/tickets/types/Ticket.d.ts +63 -0
- package/api/resources/tickets/types/Ticket.js +20 -0
- package/api/resources/tickets/types/TicketContacts.d.ts +13 -0
- package/api/resources/tickets/types/TicketContacts.js +5 -0
- package/api/resources/tickets/types/TicketPart.d.ts +56 -0
- package/api/resources/tickets/types/TicketPart.js +21 -0
- package/api/resources/tickets/types/TicketType.d.ts +41 -0
- package/api/resources/tickets/types/TicketType.js +14 -0
- package/api/resources/tickets/types/TicketsReplyRequestBody.d.ts +5 -0
- package/api/resources/tickets/types/TicketsReplyRequestBody.js +5 -0
- package/api/resources/tickets/types/index.d.ts +5 -0
- package/api/resources/tickets/types/index.js +21 -0
- package/api/resources/visitors/client/Client.d.ts +101 -0
- package/api/resources/visitors/client/Client.js +266 -0
- package/api/resources/visitors/client/index.d.ts +1 -0
- package/api/resources/visitors/client/index.js +17 -0
- package/api/resources/visitors/client/requests/FindVisitorRequest.d.ts +15 -0
- package/api/resources/visitors/client/requests/FindVisitorRequest.js +5 -0
- package/api/resources/visitors/client/requests/MergeVisitorToContactRequest.d.ts +46 -0
- package/api/resources/visitors/client/requests/MergeVisitorToContactRequest.js +5 -0
- package/api/resources/visitors/client/requests/index.d.ts +2 -0
- package/api/resources/visitors/client/requests/index.js +2 -0
- package/api/resources/visitors/index.d.ts +1 -0
- package/api/resources/visitors/index.js +17 -0
- package/api/types/ActivityLog.d.ts +104 -0
- package/api/types/ActivityLog.js +78 -0
- package/api/types/ActivityLogList.d.ts +14 -0
- package/api/types/ActivityLogList.js +5 -0
- package/api/types/ActivityLogMetadata.d.ts +26 -0
- package/api/types/ActivityLogMetadata.js +5 -0
- package/api/types/AddressableList.d.ts +14 -0
- package/api/types/AddressableList.js +5 -0
- package/api/types/AdminList.d.ts +13 -0
- package/api/types/AdminList.js +5 -0
- package/api/types/AdminPriorityLevel.d.ts +12 -0
- package/api/types/AdminPriorityLevel.js +5 -0
- package/api/types/AdminReplyConversationRequest.d.ts +28 -0
- package/api/types/AdminReplyConversationRequest.js +13 -0
- package/api/types/AdminReplyTicketRequest.d.ts +37 -0
- package/api/types/AdminReplyTicketRequest.js +14 -0
- package/api/types/AdminWithApp.d.ts +44 -0
- package/api/types/AdminWithApp.js +5 -0
- package/api/types/App.d.ts +22 -0
- package/api/types/App.js +5 -0
- package/api/types/ArticleContent.d.ts +36 -0
- package/api/types/ArticleContent.js +13 -0
- package/api/types/ArticleList.d.ts +16 -0
- package/api/types/ArticleList.js +5 -0
- package/api/types/ArticleStatistics.d.ts +22 -0
- package/api/types/ArticleStatistics.js +5 -0
- package/api/types/ArticleTranslatedContent.d.ts +85 -0
- package/api/types/ArticleTranslatedContent.js +5 -0
- package/api/types/AssignConversationRequest.d.ts +22 -0
- package/api/types/AssignConversationRequest.js +13 -0
- package/api/types/CloseConversationRequest.d.ts +13 -0
- package/api/types/CloseConversationRequest.js +5 -0
- package/api/types/CollectionList.d.ts +16 -0
- package/api/types/CollectionList.js +5 -0
- package/api/types/CompanyAttachedContacts.d.ts +16 -0
- package/api/types/CompanyAttachedContacts.js +5 -0
- package/api/types/CompanyAttachedSegments.d.ts +13 -0
- package/api/types/CompanyAttachedSegments.js +5 -0
- package/api/types/CompanyList.d.ts +16 -0
- package/api/types/CompanyList.js +5 -0
- package/api/types/CompanyScroll.d.ts +17 -0
- package/api/types/CompanyScroll.js +5 -0
- package/api/types/ContactArchived.d.ts +16 -0
- package/api/types/ContactArchived.js +5 -0
- package/api/types/ContactAttachedCompanies.d.ts +16 -0
- package/api/types/ContactAttachedCompanies.js +5 -0
- package/api/types/ContactCompanies.d.ts +14 -0
- package/api/types/ContactCompanies.js +5 -0
- package/api/types/ContactDeleted.d.ts +16 -0
- package/api/types/ContactDeleted.js +5 -0
- package/api/types/ContactList.d.ts +16 -0
- package/api/types/ContactList.js +5 -0
- package/api/types/ContactLocation.d.ts +16 -0
- package/api/types/ContactLocation.js +5 -0
- package/api/types/ContactNotes.d.ts +17 -0
- package/api/types/ContactNotes.js +5 -0
- package/api/types/ContactReference.d.ts +14 -0
- package/api/types/ContactReference.js +5 -0
- package/api/types/ContactReplyBaseRequest.d.ts +13 -0
- package/api/types/ContactReplyBaseRequest.js +5 -0
- package/api/types/ContactReplyConversationRequest.d.ts +5 -0
- package/api/types/ContactReplyConversationRequest.js +5 -0
- package/api/types/ContactReplyEmailRequest.d.ts +13 -0
- package/api/types/ContactReplyEmailRequest.js +5 -0
- package/api/types/ContactReplyIntercomUserIdRequest.d.ts +13 -0
- package/api/types/ContactReplyIntercomUserIdRequest.js +5 -0
- package/api/types/ContactReplyTicketEmailRequest.d.ts +11 -0
- package/api/types/ContactReplyTicketEmailRequest.js +5 -0
- package/api/types/ContactReplyTicketIntercomUserIdRequest.d.ts +11 -0
- package/api/types/ContactReplyTicketIntercomUserIdRequest.js +5 -0
- package/api/types/ContactReplyTicketRequest.d.ts +5 -0
- package/api/types/ContactReplyTicketRequest.js +5 -0
- package/api/types/ContactReplyTicketUserIdRequest.d.ts +11 -0
- package/api/types/ContactReplyTicketUserIdRequest.js +5 -0
- package/api/types/ContactReplyUserIdRequest.d.ts +13 -0
- package/api/types/ContactReplyUserIdRequest.js +5 -0
- package/api/types/ContactSegments.d.ts +13 -0
- package/api/types/ContactSegments.js +5 -0
- package/api/types/ContactSocialProfiles.d.ts +11 -0
- package/api/types/ContactSocialProfiles.js +5 -0
- package/api/types/ContactSubscriptionTypes.d.ts +17 -0
- package/api/types/ContactSubscriptionTypes.js +5 -0
- package/api/types/ContactTags.d.ts +17 -0
- package/api/types/ContactTags.js +5 -0
- package/api/types/ContactUnarchived.d.ts +16 -0
- package/api/types/ContactUnarchived.js +5 -0
- package/api/types/ContentSourcesList.d.ts +11 -0
- package/api/types/ContentSourcesList.js +5 -0
- package/api/types/ConversationAttachmentFiles.d.ts +14 -0
- package/api/types/ConversationAttachmentFiles.js +5 -0
- package/api/types/ConversationContacts.d.ts +12 -0
- package/api/types/ConversationContacts.js +5 -0
- package/api/types/ConversationFirstContactReply.d.ts +14 -0
- package/api/types/ConversationFirstContactReply.js +5 -0
- package/api/types/ConversationPart.d.ts +32 -0
- package/api/types/ConversationPart.js +5 -0
- package/api/types/ConversationPartAuthor.d.ts +16 -0
- package/api/types/ConversationPartAuthor.js +5 -0
- package/api/types/ConversationParts.d.ts +15 -0
- package/api/types/ConversationParts.js +5 -0
- package/api/types/ConversationRating.d.ts +17 -0
- package/api/types/ConversationRating.js +5 -0
- package/api/types/ConversationSource.d.ts +26 -0
- package/api/types/ConversationSource.js +5 -0
- package/api/types/ConversationStatistics.d.ts +46 -0
- package/api/types/ConversationStatistics.js +5 -0
- package/api/types/ConversationTeammates.d.ts +13 -0
- package/api/types/ConversationTeammates.js +5 -0
- package/api/types/CreateContactRequest.d.ts +37 -0
- package/api/types/CreateContactRequest.js +5 -0
- package/api/types/CreateDataEventRequest.d.ts +22 -0
- package/api/types/CreateDataEventRequest.js +5 -0
- package/api/types/CreateMessageRequest.d.ts +104 -0
- package/api/types/CreateMessageRequest.js +29 -0
- package/api/types/CreateOrUpdateTagRequest.d.ts +12 -0
- package/api/types/CreateOrUpdateTagRequest.js +5 -0
- package/api/types/CreateTicketReplyWithCommentRequest.d.ts +5 -0
- package/api/types/CreateTicketReplyWithCommentRequest.js +5 -0
- package/api/types/CursorPages.d.ts +19 -0
- package/api/types/CursorPages.js +5 -0
- package/api/types/CustomAttributes.d.ts +11 -0
- package/api/types/CustomAttributes.js +5 -0
- package/api/types/CustomerRequest.d.ts +10 -0
- package/api/types/CustomerRequest.js +5 -0
- package/api/types/DataAttributeList.d.ts +13 -0
- package/api/types/DataAttributeList.js +5 -0
- package/api/types/DataEventList.d.ts +24 -0
- package/api/types/DataEventList.js +5 -0
- package/api/types/DataEventSummary.d.ts +19 -0
- package/api/types/DataEventSummary.js +5 -0
- package/api/types/DataEventSummaryItem.d.ts +18 -0
- package/api/types/DataEventSummaryItem.js +5 -0
- package/api/types/DataExportCsv.d.ts +60 -0
- package/api/types/DataExportCsv.js +5 -0
- package/api/types/DeletedArticleObject.d.ts +14 -0
- package/api/types/DeletedArticleObject.js +5 -0
- package/api/types/DeletedCollectionObject.d.ts +14 -0
- package/api/types/DeletedCollectionObject.js +5 -0
- package/api/types/DeletedCompanyObject.d.ts +14 -0
- package/api/types/DeletedCompanyObject.js +5 -0
- package/api/types/DeletedObject.d.ts +14 -0
- package/api/types/DeletedObject.js +5 -0
- package/api/types/Error_.d.ts +27 -0
- package/api/types/Error_.js +5 -0
- package/api/types/FileAttribute.d.ts +21 -0
- package/api/types/FileAttribute.js +5 -0
- package/api/types/GroupContent.d.ts +14 -0
- package/api/types/GroupContent.js +5 -0
- package/api/types/GroupTranslatedContent.d.ts +85 -0
- package/api/types/GroupTranslatedContent.js +5 -0
- package/api/types/LinkedObject.d.ts +24 -0
- package/api/types/LinkedObject.js +13 -0
- package/api/types/LinkedObjectList.d.ts +17 -0
- package/api/types/LinkedObjectList.js +5 -0
- package/api/types/MultipleFilterSearchRequest.d.ts +29 -0
- package/api/types/MultipleFilterSearchRequest.js +13 -0
- package/api/types/NewsItemRequest.d.ts +35 -0
- package/api/types/NewsItemRequest.js +13 -0
- package/api/types/NoteList.d.ts +16 -0
- package/api/types/NoteList.js +5 -0
- package/api/types/OpenConversationRequest.d.ts +10 -0
- package/api/types/OpenConversationRequest.js +5 -0
- package/api/types/PagesLink.d.ts +16 -0
- package/api/types/PagesLink.js +5 -0
- package/api/types/PaginatedConversationResponse.d.ts +16 -0
- package/api/types/PaginatedConversationResponse.js +5 -0
- package/api/types/PaginatedNewsItemResponse.d.ts +16 -0
- package/api/types/PaginatedNewsItemResponse.js +5 -0
- package/api/types/PaginatedNewsfeedResponse.d.ts +16 -0
- package/api/types/PaginatedNewsfeedResponse.js +5 -0
- package/api/types/PartAttachment.d.ts +22 -0
- package/api/types/PartAttachment.js +5 -0
- package/api/types/PhoneSwitch.d.ts +12 -0
- package/api/types/PhoneSwitch.js +5 -0
- package/api/types/RedactConversationRequest.d.ts +27 -0
- package/api/types/RedactConversationRequest.js +5 -0
- package/api/types/Reference.d.ts +12 -0
- package/api/types/Reference.js +5 -0
- package/api/types/ReplyConversationRequest.d.ts +5 -0
- package/api/types/ReplyConversationRequest.js +5 -0
- package/api/types/SearchRequest.d.ts +14 -0
- package/api/types/SearchRequest.js +5 -0
- package/api/types/SegmentList.d.ts +15 -0
- package/api/types/SegmentList.js +5 -0
- package/api/types/SingleFilterSearchRequest.d.ts +32 -0
- package/api/types/SingleFilterSearchRequest.js +21 -0
- package/api/types/SlaApplied.d.ts +35 -0
- package/api/types/SlaApplied.js +15 -0
- package/api/types/SnoozeConversationRequest.d.ts +12 -0
- package/api/types/SnoozeConversationRequest.js +5 -0
- package/api/types/SocialProfile.d.ts +14 -0
- package/api/types/SocialProfile.js +5 -0
- package/api/types/StartingAfterPaging.d.ts +9 -0
- package/api/types/StartingAfterPaging.js +5 -0
- package/api/types/SubscriptionTypeList.d.ts +13 -0
- package/api/types/SubscriptionTypeList.js +5 -0
- package/api/types/TagCompanyRequest.d.ts +23 -0
- package/api/types/TagCompanyRequest.js +5 -0
- package/api/types/TagList.d.ts +13 -0
- package/api/types/TagList.js +5 -0
- package/api/types/TagMultipleUsersRequest.d.ts +20 -0
- package/api/types/TagMultipleUsersRequest.js +5 -0
- package/api/types/Tags.d.ts +13 -0
- package/api/types/Tags.js +5 -0
- package/api/types/TeamList.d.ts +13 -0
- package/api/types/TeamList.js +5 -0
- package/api/types/TeamPriorityLevel.d.ts +12 -0
- package/api/types/TeamPriorityLevel.js +5 -0
- package/api/types/TicketCustomAttributes.d.ts +11 -0
- package/api/types/TicketCustomAttributes.js +5 -0
- package/api/types/TicketList.d.ts +16 -0
- package/api/types/TicketList.js +5 -0
- package/api/types/TicketPartAuthor.d.ts +28 -0
- package/api/types/TicketPartAuthor.js +15 -0
- package/api/types/TicketParts.d.ts +15 -0
- package/api/types/TicketParts.js +5 -0
- package/api/types/TicketReply.d.ts +37 -0
- package/api/types/TicketReply.js +14 -0
- package/api/types/TicketRequestCustomAttributes.d.ts +10 -0
- package/api/types/TicketRequestCustomAttributes.js +5 -0
- package/api/types/TicketTypeAttribute.d.ts +42 -0
- package/api/types/TicketTypeAttribute.js +5 -0
- package/api/types/TicketTypeAttributeList.d.ts +13 -0
- package/api/types/TicketTypeAttributeList.js +5 -0
- package/api/types/TicketTypeList.d.ts +13 -0
- package/api/types/TicketTypeList.js +5 -0
- package/api/types/Translation.d.ts +14 -0
- package/api/types/Translation.js +5 -0
- package/api/types/UntagCompanyRequest.d.ts +25 -0
- package/api/types/UntagCompanyRequest.js +5 -0
- package/api/types/UpdateVisitorRequest.d.ts +15 -0
- package/api/types/UpdateVisitorRequest.js +5 -0
- package/api/types/Visitor.d.ts +128 -0
- package/api/types/Visitor.js +5 -0
- package/api/types/VisitorDeletedObject.d.ts +14 -0
- package/api/types/VisitorDeletedObject.js +5 -0
- package/api/types/index.d.ts +118 -0
- package/api/types/index.js +134 -0
- package/api/version.d.ts +5 -0
- package/api/version.js +5 -0
- package/core/auth/BasicAuth.d.ts +8 -0
- package/core/auth/BasicAuth.js +26 -0
- package/core/auth/BearerToken.d.ts +5 -0
- package/core/auth/BearerToken.js +15 -0
- package/core/auth/index.d.ts +2 -0
- package/core/auth/index.js +7 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +39 -0
- package/core/fetcher/Fetcher.js +99 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +55 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +9 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +41 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/index.d.ts +5 -0
- package/core/index.js +21 -0
- package/core/pagination/Page.d.ts +29 -0
- package/core/pagination/Page.js +94 -0
- package/core/pagination/Pageable.d.ts +12 -0
- package/core/pagination/Pageable.js +10 -0
- package/core/pagination/index.d.ts +2 -0
- package/core/pagination/index.js +7 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +9 -0
- package/core/runtime/runtime.js +93 -0
- package/core/utils/index.d.ts +1 -0
- package/core/utils/index.js +5 -0
- package/core/utils/setObjectProperty.d.ts +11 -0
- package/core/utils/setObjectProperty.js +43 -0
- package/dist/Client.d.ts +90 -0
- package/dist/Client.js +112 -0
- package/dist/api/errors/BadRequestError.d.ts +7 -0
- package/dist/api/errors/BadRequestError.js +41 -0
- package/dist/api/errors/ForbiddenError.d.ts +8 -0
- package/dist/api/errors/ForbiddenError.js +41 -0
- package/dist/api/errors/NotFoundError.d.ts +7 -0
- package/dist/api/errors/NotFoundError.js +41 -0
- package/dist/api/errors/UnauthorizedError.d.ts +8 -0
- package/dist/api/errors/UnauthorizedError.js +41 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +7 -0
- package/dist/api/errors/UnprocessableEntityError.js +41 -0
- package/dist/api/errors/index.d.ts +5 -0
- package/dist/api/errors/index.js +21 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/admins/client/Client.d.ts +107 -0
- package/dist/api/resources/admins/client/Client.js +364 -0
- package/dist/api/resources/admins/client/index.d.ts +1 -0
- package/dist/api/resources/admins/client/index.js +17 -0
- package/dist/api/resources/admins/client/requests/ConfigureAwayAdminRequest.d.ts +35 -0
- package/dist/api/resources/admins/client/requests/ConfigureAwayAdminRequest.js +5 -0
- package/dist/api/resources/admins/client/requests/FindAdminRequest.d.ts +15 -0
- package/dist/api/resources/admins/client/requests/FindAdminRequest.js +5 -0
- package/dist/api/resources/admins/client/requests/ListAllActivityLogsRequest.d.ts +20 -0
- package/dist/api/resources/admins/client/requests/ListAllActivityLogsRequest.js +5 -0
- package/dist/api/resources/admins/client/requests/index.d.ts +3 -0
- package/dist/api/resources/admins/client/requests/index.js +2 -0
- package/dist/api/resources/admins/index.d.ts +2 -0
- package/dist/api/resources/admins/index.js +18 -0
- package/dist/api/resources/admins/types/Admin.d.ts +30 -0
- package/dist/api/resources/admins/types/Admin.js +5 -0
- package/dist/api/resources/admins/types/index.d.ts +1 -0
- package/dist/api/resources/admins/types/index.js +17 -0
- package/dist/api/resources/aiAgent/index.d.ts +1 -0
- package/dist/api/resources/aiAgent/index.js +17 -0
- package/dist/api/resources/aiAgent/types/AiAgent.d.ts +35 -0
- package/dist/api/resources/aiAgent/types/AiAgent.js +16 -0
- package/dist/api/resources/aiAgent/types/index.d.ts +1 -0
- package/dist/api/resources/aiAgent/types/index.js +17 -0
- package/dist/api/resources/aiContentSource/index.d.ts +1 -0
- package/dist/api/resources/aiContentSource/index.js +17 -0
- package/dist/api/resources/aiContentSource/types/ContentSource.d.ts +29 -0
- package/dist/api/resources/aiContentSource/types/ContentSource.js +16 -0
- package/dist/api/resources/aiContentSource/types/index.d.ts +1 -0
- package/dist/api/resources/aiContentSource/types/index.js +17 -0
- package/dist/api/resources/articles/client/Client.d.ts +153 -0
- package/dist/api/resources/articles/client/Client.js +491 -0
- package/dist/api/resources/articles/client/index.d.ts +1 -0
- package/dist/api/resources/articles/client/index.js +17 -0
- package/dist/api/resources/articles/client/requests/CreateArticleRequest.d.ts +62 -0
- package/dist/api/resources/articles/client/requests/CreateArticleRequest.js +13 -0
- package/dist/api/resources/articles/client/requests/DeleteArticleRequest.d.ts +15 -0
- package/dist/api/resources/articles/client/requests/DeleteArticleRequest.js +5 -0
- package/dist/api/resources/articles/client/requests/FindArticleRequest.d.ts +15 -0
- package/dist/api/resources/articles/client/requests/FindArticleRequest.js +5 -0
- package/dist/api/resources/articles/client/requests/ListArticlesRequest.d.ts +17 -0
- package/dist/api/resources/articles/client/requests/ListArticlesRequest.js +5 -0
- package/dist/api/resources/articles/client/requests/SearchArticlesRequest.d.ts +28 -0
- package/dist/api/resources/articles/client/requests/SearchArticlesRequest.js +5 -0
- package/dist/api/resources/articles/client/requests/UpdateArticleRequest.d.ts +50 -0
- package/dist/api/resources/articles/client/requests/UpdateArticleRequest.js +13 -0
- package/dist/api/resources/articles/client/requests/index.d.ts +6 -0
- package/dist/api/resources/articles/client/requests/index.js +2 -0
- package/dist/api/resources/articles/index.d.ts +2 -0
- package/dist/api/resources/articles/index.js +18 -0
- package/dist/api/resources/articles/types/Article.d.ts +10 -0
- package/dist/api/resources/articles/types/Article.js +5 -0
- package/dist/api/resources/articles/types/ArticleListItem.d.ts +50 -0
- package/dist/api/resources/articles/types/ArticleListItem.js +13 -0
- package/dist/api/resources/articles/types/ArticleSearchHighlights.d.ts +60 -0
- package/dist/api/resources/articles/types/ArticleSearchHighlights.js +29 -0
- package/dist/api/resources/articles/types/SearchArticlesResponse.d.ts +27 -0
- package/dist/api/resources/articles/types/SearchArticlesResponse.js +5 -0
- package/dist/api/resources/articles/types/index.d.ts +4 -0
- package/dist/api/resources/articles/types/index.js +20 -0
- package/dist/api/resources/companies/client/Client.d.ts +263 -0
- package/dist/api/resources/companies/client/Client.js +855 -0
- package/dist/api/resources/companies/client/index.d.ts +1 -0
- package/dist/api/resources/companies/client/index.js +17 -0
- package/dist/api/resources/companies/client/requests/AttachContactToCompanyRequest.d.ts +30 -0
- package/dist/api/resources/companies/client/requests/AttachContactToCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/CreateOrUpdateCompanyRequest.d.ts +34 -0
- package/dist/api/resources/companies/client/requests/CreateOrUpdateCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/DeleteCompanyRequest.d.ts +15 -0
- package/dist/api/resources/companies/client/requests/DeleteCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/DetachContactFromCompanyRequest.d.ts +20 -0
- package/dist/api/resources/companies/client/requests/DetachContactFromCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/FindCompanyRequest.d.ts +15 -0
- package/dist/api/resources/companies/client/requests/FindCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/ListAttachedContactsRequest.d.ts +23 -0
- package/dist/api/resources/companies/client/requests/ListAttachedContactsRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +23 -0
- package/dist/api/resources/companies/client/requests/ListCompaniesRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/ListSegmentsAttachedToCompanyRequest.d.ts +15 -0
- package/dist/api/resources/companies/client/requests/ListSegmentsAttachedToCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/RetrieveCompanyRequest.d.ts +38 -0
- package/dist/api/resources/companies/client/requests/RetrieveCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/ScrollCompaniesRequest.d.ts +13 -0
- package/dist/api/resources/companies/client/requests/ScrollCompaniesRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/UpdateCompanyRequest.d.ts +15 -0
- package/dist/api/resources/companies/client/requests/UpdateCompanyRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/index.d.ts +11 -0
- package/dist/api/resources/companies/client/requests/index.js +2 -0
- package/dist/api/resources/companies/index.d.ts +2 -0
- package/dist/api/resources/companies/index.js +18 -0
- package/dist/api/resources/companies/types/Company.d.ts +72 -0
- package/dist/api/resources/companies/types/Company.js +5 -0
- package/dist/api/resources/companies/types/index.d.ts +1 -0
- package/dist/api/resources/companies/types/index.js +17 -0
- package/dist/api/resources/contacts/client/Client.d.ts +383 -0
- package/dist/api/resources/contacts/client/Client.js +1113 -0
- package/dist/api/resources/contacts/client/index.d.ts +1 -0
- package/dist/api/resources/contacts/client/index.js +17 -0
- package/dist/api/resources/contacts/client/requests/ArchiveContactRequest.d.ts +15 -0
- package/dist/api/resources/contacts/client/requests/ArchiveContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/AttachSubscriptionToContactRequest.d.ts +35 -0
- package/dist/api/resources/contacts/client/requests/AttachSubscriptionToContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/DeleteContactRequest.d.ts +15 -0
- package/dist/api/resources/contacts/client/requests/DeleteContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/DetachSubscriptionFromContactRequest.d.ts +20 -0
- package/dist/api/resources/contacts/client/requests/DetachSubscriptionFromContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/FindContactRequest.d.ts +15 -0
- package/dist/api/resources/contacts/client/requests/FindContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/ListAttachedCompaniesRequest.d.ts +23 -0
- package/dist/api/resources/contacts/client/requests/ListAttachedCompaniesRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/ListAttachedSubscriptionsRequest.d.ts +15 -0
- package/dist/api/resources/contacts/client/requests/ListAttachedSubscriptionsRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/ListContactsRequest.d.ts +21 -0
- package/dist/api/resources/contacts/client/requests/ListContactsRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/ListSegmentsAttachedToContactRequest.d.ts +15 -0
- package/dist/api/resources/contacts/client/requests/ListSegmentsAttachedToContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/ListTagsAttachedToContactRequest.d.ts +15 -0
- package/dist/api/resources/contacts/client/requests/ListTagsAttachedToContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/MergeContactsRequest.d.ts +16 -0
- package/dist/api/resources/contacts/client/requests/MergeContactsRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/UnarchiveContactRequest.d.ts +15 -0
- package/dist/api/resources/contacts/client/requests/UnarchiveContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +39 -0
- package/dist/api/resources/contacts/client/requests/UpdateContactRequest.js +5 -0
- package/dist/api/resources/contacts/client/requests/index.d.ts +13 -0
- package/dist/api/resources/contacts/client/requests/index.js +2 -0
- package/dist/api/resources/contacts/index.d.ts +2 -0
- package/dist/api/resources/contacts/index.js +18 -0
- package/dist/api/resources/contacts/types/Contact.d.ts +103 -0
- package/dist/api/resources/contacts/types/Contact.js +5 -0
- package/dist/api/resources/contacts/types/index.d.ts +1 -0
- package/dist/api/resources/contacts/types/index.js +17 -0
- package/dist/api/resources/conversations/client/Client.d.ts +487 -0
- package/dist/api/resources/conversations/client/Client.js +1113 -0
- package/dist/api/resources/conversations/client/index.d.ts +1 -0
- package/dist/api/resources/conversations/client/index.js +17 -0
- package/dist/api/resources/conversations/client/requests/AttachContactToConversationRequest.d.ts +44 -0
- package/dist/api/resources/conversations/client/requests/AttachContactToConversationRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/AutoAssignConversationRequest.d.ts +15 -0
- package/dist/api/resources/conversations/client/requests/AutoAssignConversationRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/ConvertConversationToTicketRequest.d.ts +26 -0
- package/dist/api/resources/conversations/client/requests/ConvertConversationToTicketRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/CreateConversationRequest.d.ts +46 -0
- package/dist/api/resources/conversations/client/requests/CreateConversationRequest.js +17 -0
- package/dist/api/resources/conversations/client/requests/DetachContactFromConversationRequest.d.ts +44 -0
- package/dist/api/resources/conversations/client/requests/DetachContactFromConversationRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/FindConversationRequest.d.ts +20 -0
- package/dist/api/resources/conversations/client/requests/FindConversationRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/ListConversationsRequest.d.ts +17 -0
- package/dist/api/resources/conversations/client/requests/ListConversationsRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/ManageConversationPartsRequest.d.ts +72 -0
- package/dist/api/resources/conversations/client/requests/ManageConversationPartsRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/ReplyToConversationRequest.d.ts +89 -0
- package/dist/api/resources/conversations/client/requests/ReplyToConversationRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/UpdateConversationRequest.d.ts +40 -0
- package/dist/api/resources/conversations/client/requests/UpdateConversationRequest.js +5 -0
- package/dist/api/resources/conversations/client/requests/index.d.ts +10 -0
- package/dist/api/resources/conversations/client/requests/index.js +2 -0
- package/dist/api/resources/conversations/index.d.ts +2 -0
- package/dist/api/resources/conversations/index.js +18 -0
- package/dist/api/resources/conversations/types/Conversation.d.ts +68 -0
- package/dist/api/resources/conversations/types/Conversation.js +18 -0
- package/dist/api/resources/conversations/types/ConversationsManageRequestBody.d.ts +19 -0
- package/dist/api/resources/conversations/types/ConversationsManageRequestBody.js +5 -0
- package/dist/api/resources/conversations/types/index.d.ts +2 -0
- package/dist/api/resources/conversations/types/index.js +18 -0
- package/dist/api/resources/customObjectInstances/index.d.ts +1 -0
- package/dist/api/resources/customObjectInstances/index.js +17 -0
- package/dist/api/resources/customObjectInstances/types/CustomObjectInstance.d.ts +16 -0
- package/dist/api/resources/customObjectInstances/types/CustomObjectInstance.js +5 -0
- package/dist/api/resources/customObjectInstances/types/index.d.ts +1 -0
- package/dist/api/resources/customObjectInstances/types/index.js +17 -0
- package/dist/api/resources/dataAttributes/client/Client.d.ts +149 -0
- package/dist/api/resources/dataAttributes/client/Client.js +335 -0
- package/dist/api/resources/dataAttributes/client/index.d.ts +1 -0
- package/dist/api/resources/dataAttributes/client/index.js +17 -0
- package/dist/api/resources/dataAttributes/client/requests/CreateDataAttributeRequest.d.ts +84 -0
- package/dist/api/resources/dataAttributes/client/requests/CreateDataAttributeRequest.js +21 -0
- package/dist/api/resources/dataAttributes/client/requests/ListDataAttributesRequest.d.ts +18 -0
- package/dist/api/resources/dataAttributes/client/requests/ListDataAttributesRequest.js +5 -0
- package/dist/api/resources/dataAttributes/client/requests/UpdateDataAttributeRequest.d.ts +69 -0
- package/dist/api/resources/dataAttributes/client/requests/UpdateDataAttributeRequest.js +5 -0
- package/dist/api/resources/dataAttributes/client/requests/index.d.ts +3 -0
- package/dist/api/resources/dataAttributes/client/requests/index.js +2 -0
- package/dist/api/resources/dataAttributes/index.d.ts +2 -0
- package/dist/api/resources/dataAttributes/index.js +18 -0
- package/dist/api/resources/dataAttributes/types/DataAttribute.d.ts +63 -0
- package/dist/api/resources/dataAttributes/types/DataAttribute.js +20 -0
- package/dist/api/resources/dataAttributes/types/DataAttributesListRequestModel.d.ts +9 -0
- package/dist/api/resources/dataAttributes/types/DataAttributesListRequestModel.js +11 -0
- package/dist/api/resources/dataAttributes/types/index.d.ts +2 -0
- package/dist/api/resources/dataAttributes/types/index.js +18 -0
- package/dist/api/resources/dataEvents/index.d.ts +1 -0
- package/dist/api/resources/dataEvents/index.js +17 -0
- package/dist/api/resources/dataEvents/types/DataEvent.d.ts +24 -0
- package/dist/api/resources/dataEvents/types/DataEvent.js +5 -0
- package/dist/api/resources/dataEvents/types/index.d.ts +1 -0
- package/dist/api/resources/dataEvents/types/index.js +17 -0
- package/dist/api/resources/dataExport/client/Client.d.ts +108 -0
- package/dist/api/resources/dataExport/client/Client.js +287 -0
- package/dist/api/resources/dataExport/client/index.d.ts +1 -0
- package/dist/api/resources/dataExport/client/index.js +17 -0
- package/dist/api/resources/dataExport/client/requests/CancelDataExportRequest.d.ts +15 -0
- package/dist/api/resources/dataExport/client/requests/CancelDataExportRequest.js +5 -0
- package/dist/api/resources/dataExport/client/requests/CreateDataExportRequest.d.ts +16 -0
- package/dist/api/resources/dataExport/client/requests/CreateDataExportRequest.js +5 -0
- package/dist/api/resources/dataExport/client/requests/DownloadDataExportRequest.d.ts +15 -0
- package/dist/api/resources/dataExport/client/requests/DownloadDataExportRequest.js +5 -0
- package/dist/api/resources/dataExport/client/requests/FindDataExportRequest.d.ts +15 -0
- package/dist/api/resources/dataExport/client/requests/FindDataExportRequest.js +5 -0
- package/dist/api/resources/dataExport/client/requests/index.d.ts +4 -0
- package/dist/api/resources/dataExport/client/requests/index.js +2 -0
- package/dist/api/resources/dataExport/index.d.ts +2 -0
- package/dist/api/resources/dataExport/index.js +18 -0
- package/dist/api/resources/dataExport/types/DataExport.d.ts +30 -0
- package/dist/api/resources/dataExport/types/DataExport.js +17 -0
- package/dist/api/resources/dataExport/types/index.d.ts +1 -0
- package/dist/api/resources/dataExport/types/index.js +17 -0
- package/dist/api/resources/events/client/Client.d.ts +129 -0
- package/dist/api/resources/events/client/Client.js +305 -0
- package/dist/api/resources/events/client/index.d.ts +1 -0
- package/dist/api/resources/events/client/index.js +17 -0
- package/dist/api/resources/events/client/requests/ListEventSummariesRequest.d.ts +28 -0
- package/dist/api/resources/events/client/requests/ListEventSummariesRequest.js +5 -0
- package/dist/api/resources/events/client/requests/ListEventsRequest.d.ts +35 -0
- package/dist/api/resources/events/client/requests/ListEventsRequest.js +5 -0
- package/dist/api/resources/events/client/requests/index.d.ts +2 -0
- package/dist/api/resources/events/client/requests/index.js +2 -0
- package/dist/api/resources/events/index.d.ts +1 -0
- package/dist/api/resources/events/index.js +17 -0
- package/dist/api/resources/helpCenter/index.d.ts +1 -0
- package/dist/api/resources/helpCenter/index.js +17 -0
- package/dist/api/resources/helpCenter/types/Collection.d.ts +34 -0
- package/dist/api/resources/helpCenter/types/Collection.js +5 -0
- package/dist/api/resources/helpCenter/types/HelpCenter.d.ts +22 -0
- package/dist/api/resources/helpCenter/types/HelpCenter.js +5 -0
- package/dist/api/resources/helpCenter/types/HelpCenterList.d.ts +13 -0
- package/dist/api/resources/helpCenter/types/HelpCenterList.js +5 -0
- package/dist/api/resources/helpCenter/types/index.d.ts +3 -0
- package/dist/api/resources/helpCenter/types/index.js +19 -0
- package/dist/api/resources/helpCenters/client/Client.d.ts +62 -0
- package/dist/api/resources/helpCenters/client/Client.js +202 -0
- package/dist/api/resources/helpCenters/client/index.d.ts +1 -0
- package/dist/api/resources/helpCenters/client/index.js +17 -0
- package/dist/api/resources/helpCenters/client/requests/FindHelpCenterRequest.d.ts +15 -0
- package/dist/api/resources/helpCenters/client/requests/FindHelpCenterRequest.js +5 -0
- package/dist/api/resources/helpCenters/client/requests/ListHelpCentersRequest.d.ts +17 -0
- package/dist/api/resources/helpCenters/client/requests/ListHelpCentersRequest.js +5 -0
- package/dist/api/resources/helpCenters/client/requests/index.d.ts +2 -0
- package/dist/api/resources/helpCenters/client/requests/index.js +2 -0
- package/dist/api/resources/helpCenters/index.d.ts +2 -0
- package/dist/api/resources/helpCenters/index.js +18 -0
- package/dist/api/resources/helpCenters/resources/collections/client/Client.d.ts +113 -0
- package/dist/api/resources/helpCenters/resources/collections/client/Client.js +395 -0
- package/dist/api/resources/helpCenters/resources/collections/client/index.d.ts +1 -0
- package/dist/api/resources/helpCenters/resources/collections/client/index.js +17 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/CreateCollectionRequest.d.ts +27 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/CreateCollectionRequest.js +5 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/DeleteCollectionRequest.d.ts +15 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/DeleteCollectionRequest.js +5 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/FindCollectionRequest.d.ts +15 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/FindCollectionRequest.js +5 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/ListCollectionsRequest.d.ts +17 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/ListCollectionsRequest.js +5 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/UpdateCollectionRequest.d.ts +30 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/UpdateCollectionRequest.js +5 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/index.d.ts +5 -0
- package/dist/api/resources/helpCenters/resources/collections/client/requests/index.js +2 -0
- package/dist/api/resources/helpCenters/resources/collections/index.d.ts +1 -0
- package/dist/api/resources/helpCenters/resources/collections/index.js +17 -0
- package/dist/api/resources/helpCenters/resources/index.d.ts +2 -0
- package/dist/api/resources/helpCenters/resources/index.js +31 -0
- package/dist/api/resources/index.d.ts +62 -0
- package/dist/api/resources/index.js +91 -0
- package/dist/api/resources/messages/client/Client.d.ts +147 -0
- package/dist/api/resources/messages/client/Client.js +227 -0
- package/dist/api/resources/messages/client/index.d.ts +1 -0
- package/dist/api/resources/messages/client/index.js +2 -0
- package/dist/api/resources/messages/index.d.ts +2 -0
- package/dist/api/resources/messages/index.js +18 -0
- package/dist/api/resources/messages/types/Message.d.ts +34 -0
- package/dist/api/resources/messages/types/Message.js +15 -0
- package/dist/api/resources/messages/types/index.d.ts +1 -0
- package/dist/api/resources/messages/types/index.js +17 -0
- package/dist/api/resources/news/client/Client.d.ts +36 -0
- package/dist/api/resources/news/client/Client.js +22 -0
- package/dist/api/resources/news/client/index.d.ts +1 -0
- package/dist/api/resources/news/client/index.js +2 -0
- package/dist/api/resources/news/index.d.ts +3 -0
- package/dist/api/resources/news/index.js +19 -0
- package/dist/api/resources/news/resources/feeds/client/Client.d.ts +71 -0
- package/dist/api/resources/news/resources/feeds/client/Client.js +228 -0
- package/dist/api/resources/news/resources/feeds/client/index.d.ts +1 -0
- package/dist/api/resources/news/resources/feeds/client/index.js +17 -0
- package/dist/api/resources/news/resources/feeds/client/requests/FindNewsFeedRequest.d.ts +15 -0
- package/dist/api/resources/news/resources/feeds/client/requests/FindNewsFeedRequest.js +5 -0
- package/dist/api/resources/news/resources/feeds/client/requests/ListNewsFeedItemsRequest.d.ts +15 -0
- package/dist/api/resources/news/resources/feeds/client/requests/ListNewsFeedItemsRequest.js +5 -0
- package/dist/api/resources/news/resources/feeds/client/requests/index.d.ts +2 -0
- package/dist/api/resources/news/resources/feeds/client/requests/index.js +2 -0
- package/dist/api/resources/news/resources/feeds/index.d.ts +1 -0
- package/dist/api/resources/news/resources/feeds/index.js +17 -0
- package/dist/api/resources/news/resources/index.d.ts +4 -0
- package/dist/api/resources/news/resources/index.js +33 -0
- package/dist/api/resources/news/resources/items/client/Client.d.ts +127 -0
- package/dist/api/resources/news/resources/items/client/Client.js +375 -0
- package/dist/api/resources/news/resources/items/client/index.d.ts +1 -0
- package/dist/api/resources/news/resources/items/client/index.js +17 -0
- package/dist/api/resources/news/resources/items/client/requests/DeleteNewsItemRequest.d.ts +15 -0
- package/dist/api/resources/news/resources/items/client/requests/DeleteNewsItemRequest.js +5 -0
- package/dist/api/resources/news/resources/items/client/requests/FindNewsItemRequest.d.ts +15 -0
- package/dist/api/resources/news/resources/items/client/requests/FindNewsItemRequest.js +5 -0
- package/dist/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.d.ts +34 -0
- package/dist/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.js +5 -0
- package/dist/api/resources/news/resources/items/client/requests/index.d.ts +3 -0
- package/dist/api/resources/news/resources/items/client/requests/index.js +2 -0
- package/dist/api/resources/news/resources/items/index.d.ts +1 -0
- package/dist/api/resources/news/resources/items/index.js +17 -0
- package/dist/api/resources/news/types/NewsItem.d.ts +47 -0
- package/dist/api/resources/news/types/NewsItem.js +13 -0
- package/dist/api/resources/news/types/Newsfeed.d.ts +20 -0
- package/dist/api/resources/news/types/Newsfeed.js +5 -0
- package/dist/api/resources/news/types/NewsfeedAssignment.d.ts +12 -0
- package/dist/api/resources/news/types/NewsfeedAssignment.js +5 -0
- package/dist/api/resources/news/types/index.d.ts +3 -0
- package/dist/api/resources/news/types/index.js +19 -0
- package/dist/api/resources/notes/client/Client.d.ts +80 -0
- package/dist/api/resources/notes/client/Client.js +272 -0
- package/dist/api/resources/notes/client/index.d.ts +1 -0
- package/dist/api/resources/notes/client/index.js +17 -0
- package/dist/api/resources/notes/client/requests/CreateContactNoteRequest.d.ts +35 -0
- package/dist/api/resources/notes/client/requests/CreateContactNoteRequest.js +5 -0
- package/dist/api/resources/notes/client/requests/FindNoteRequest.d.ts +15 -0
- package/dist/api/resources/notes/client/requests/FindNoteRequest.js +5 -0
- package/dist/api/resources/notes/client/requests/ListContactNotesRequest.d.ts +23 -0
- package/dist/api/resources/notes/client/requests/ListContactNotesRequest.js +5 -0
- package/dist/api/resources/notes/client/requests/index.d.ts +3 -0
- package/dist/api/resources/notes/client/requests/index.js +2 -0
- package/dist/api/resources/notes/index.d.ts +2 -0
- package/dist/api/resources/notes/index.js +18 -0
- package/dist/api/resources/notes/types/Note.d.ts +32 -0
- package/dist/api/resources/notes/types/Note.js +5 -0
- package/dist/api/resources/notes/types/index.d.ts +1 -0
- package/dist/api/resources/notes/types/index.js +17 -0
- package/dist/api/resources/phoneCallRedirects/client/Client.d.ts +64 -0
- package/dist/api/resources/phoneCallRedirects/client/Client.js +142 -0
- package/dist/api/resources/phoneCallRedirects/client/index.d.ts +1 -0
- package/dist/api/resources/phoneCallRedirects/client/index.js +17 -0
- package/dist/api/resources/phoneCallRedirects/client/requests/CreatePhoneCallRedirectRequest.d.ts +46 -0
- package/dist/api/resources/phoneCallRedirects/client/requests/CreatePhoneCallRedirectRequest.js +5 -0
- package/dist/api/resources/phoneCallRedirects/client/requests/index.d.ts +1 -0
- package/dist/api/resources/phoneCallRedirects/client/requests/index.js +2 -0
- package/dist/api/resources/phoneCallRedirects/index.d.ts +1 -0
- package/dist/api/resources/phoneCallRedirects/index.js +17 -0
- package/dist/api/resources/segments/client/Client.d.ts +62 -0
- package/dist/api/resources/segments/client/Client.js +185 -0
- package/dist/api/resources/segments/client/index.d.ts +1 -0
- package/dist/api/resources/segments/client/index.js +17 -0
- package/dist/api/resources/segments/client/requests/FindSegmentRequest.d.ts +15 -0
- package/dist/api/resources/segments/client/requests/FindSegmentRequest.js +5 -0
- package/dist/api/resources/segments/client/requests/ListSegmentsRequest.d.ts +13 -0
- package/dist/api/resources/segments/client/requests/ListSegmentsRequest.js +5 -0
- package/dist/api/resources/segments/client/requests/index.d.ts +2 -0
- package/dist/api/resources/segments/client/requests/index.js +2 -0
- package/dist/api/resources/segments/index.d.ts +2 -0
- package/dist/api/resources/segments/index.js +18 -0
- package/dist/api/resources/segments/types/Segment.d.ts +32 -0
- package/dist/api/resources/segments/types/Segment.js +13 -0
- package/dist/api/resources/segments/types/index.d.ts +1 -0
- package/dist/api/resources/segments/types/index.js +17 -0
- package/dist/api/resources/subscriptionTypes/client/Client.d.ts +46 -0
- package/dist/api/resources/subscriptionTypes/client/Client.js +119 -0
- package/dist/api/resources/subscriptionTypes/client/index.d.ts +1 -0
- package/dist/api/resources/subscriptionTypes/client/index.js +2 -0
- package/dist/api/resources/subscriptionTypes/index.d.ts +2 -0
- package/dist/api/resources/subscriptionTypes/index.js +18 -0
- package/dist/api/resources/subscriptionTypes/types/SubscriptionType.d.ts +49 -0
- package/dist/api/resources/subscriptionTypes/types/SubscriptionType.js +25 -0
- package/dist/api/resources/subscriptionTypes/types/index.d.ts +1 -0
- package/dist/api/resources/subscriptionTypes/types/index.js +17 -0
- package/dist/api/resources/tags/client/Client.d.ts +234 -0
- package/dist/api/resources/tags/client/Client.js +723 -0
- package/dist/api/resources/tags/client/index.d.ts +1 -0
- package/dist/api/resources/tags/client/index.js +17 -0
- package/dist/api/resources/tags/client/requests/DeleteTagRequest.d.ts +15 -0
- package/dist/api/resources/tags/client/requests/DeleteTagRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/FindTagRequest.d.ts +15 -0
- package/dist/api/resources/tags/client/requests/FindTagRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/TagContactRequest.d.ts +30 -0
- package/dist/api/resources/tags/client/requests/TagContactRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/TagConversationRequest.d.ts +28 -0
- package/dist/api/resources/tags/client/requests/TagConversationRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/TagTicketRequest.d.ts +28 -0
- package/dist/api/resources/tags/client/requests/TagTicketRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/UntagContactRequest.d.ts +20 -0
- package/dist/api/resources/tags/client/requests/UntagContactRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/UntagConversationRequest.d.ts +37 -0
- package/dist/api/resources/tags/client/requests/UntagConversationRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/UntagTicketRequest.d.ts +37 -0
- package/dist/api/resources/tags/client/requests/UntagTicketRequest.js +5 -0
- package/dist/api/resources/tags/client/requests/index.d.ts +8 -0
- package/dist/api/resources/tags/client/requests/index.js +2 -0
- package/dist/api/resources/tags/index.d.ts +2 -0
- package/dist/api/resources/tags/index.js +18 -0
- package/dist/api/resources/tags/types/Tag.d.ts +18 -0
- package/dist/api/resources/tags/types/Tag.js +5 -0
- package/dist/api/resources/tags/types/TagsCreateRequestBody.d.ts +5 -0
- package/dist/api/resources/tags/types/TagsCreateRequestBody.js +5 -0
- package/dist/api/resources/tags/types/index.d.ts +2 -0
- package/dist/api/resources/tags/types/index.js +18 -0
- package/dist/api/resources/teams/client/Client.d.ts +61 -0
- package/dist/api/resources/teams/client/Client.js +178 -0
- package/dist/api/resources/teams/client/index.d.ts +1 -0
- package/dist/api/resources/teams/client/index.js +17 -0
- package/dist/api/resources/teams/client/requests/FindTeamRequest.d.ts +15 -0
- package/dist/api/resources/teams/client/requests/FindTeamRequest.js +5 -0
- package/dist/api/resources/teams/client/requests/index.d.ts +1 -0
- package/dist/api/resources/teams/client/requests/index.js +2 -0
- package/dist/api/resources/teams/index.d.ts +2 -0
- package/dist/api/resources/teams/index.js +18 -0
- package/dist/api/resources/teams/types/Team.d.ts +18 -0
- package/dist/api/resources/teams/types/Team.js +5 -0
- package/dist/api/resources/teams/types/index.d.ts +1 -0
- package/dist/api/resources/teams/types/index.js +17 -0
- package/dist/api/resources/ticketTypes/client/Client.d.ts +104 -0
- package/dist/api/resources/ticketTypes/client/Client.js +317 -0
- package/dist/api/resources/ticketTypes/client/index.d.ts +1 -0
- package/dist/api/resources/ticketTypes/client/index.js +17 -0
- package/dist/api/resources/ticketTypes/client/requests/CreateTicketTypeRequest.d.ts +35 -0
- package/dist/api/resources/ticketTypes/client/requests/CreateTicketTypeRequest.js +14 -0
- package/dist/api/resources/ticketTypes/client/requests/FindTicketTypeRequest.d.ts +15 -0
- package/dist/api/resources/ticketTypes/client/requests/FindTicketTypeRequest.js +5 -0
- package/dist/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.ts +39 -0
- package/dist/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.js +14 -0
- package/dist/api/resources/ticketTypes/client/requests/index.d.ts +3 -0
- package/dist/api/resources/ticketTypes/client/requests/index.js +2 -0
- package/dist/api/resources/ticketTypes/index.d.ts +2 -0
- package/dist/api/resources/ticketTypes/index.js +18 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/Client.d.ts +66 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/Client.js +195 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/index.d.ts +1 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/index.js +17 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/requests/CreateTicketTypeAttributeRequest.d.ts +54 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/requests/CreateTicketTypeAttributeRequest.js +18 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/requests/UpdateTicketTypeAttributeRequest.d.ts +41 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/requests/UpdateTicketTypeAttributeRequest.js +5 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/requests/index.d.ts +2 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/requests/index.js +2 -0
- package/dist/api/resources/ticketTypes/resources/attributes/index.d.ts +1 -0
- package/dist/api/resources/ticketTypes/resources/attributes/index.js +17 -0
- package/dist/api/resources/ticketTypes/resources/index.d.ts +2 -0
- package/dist/api/resources/ticketTypes/resources/index.js +31 -0
- package/dist/api/resources/tickets/client/Client.d.ts +267 -0
- package/dist/api/resources/tickets/client/Client.js +534 -0
- package/dist/api/resources/tickets/client/index.d.ts +1 -0
- package/dist/api/resources/tickets/client/index.js +17 -0
- package/dist/api/resources/tickets/client/requests/CreateTicketRequest.d.ts +40 -0
- package/dist/api/resources/tickets/client/requests/CreateTicketRequest.js +5 -0
- package/dist/api/resources/tickets/client/requests/FindTicketRequest.d.ts +15 -0
- package/dist/api/resources/tickets/client/requests/FindTicketRequest.js +5 -0
- package/dist/api/resources/tickets/client/requests/ReplyToTicketRequest.d.ts +81 -0
- package/dist/api/resources/tickets/client/requests/ReplyToTicketRequest.js +5 -0
- package/dist/api/resources/tickets/client/requests/UpdateTicketRequest.d.ts +82 -0
- package/dist/api/resources/tickets/client/requests/UpdateTicketRequest.js +14 -0
- package/dist/api/resources/tickets/client/requests/index.d.ts +4 -0
- package/dist/api/resources/tickets/client/requests/index.js +2 -0
- package/dist/api/resources/tickets/index.d.ts +2 -0
- package/dist/api/resources/tickets/index.js +18 -0
- package/dist/api/resources/tickets/types/Ticket.d.ts +63 -0
- package/dist/api/resources/tickets/types/Ticket.js +20 -0
- package/dist/api/resources/tickets/types/TicketContacts.d.ts +13 -0
- package/dist/api/resources/tickets/types/TicketContacts.js +5 -0
- package/dist/api/resources/tickets/types/TicketPart.d.ts +56 -0
- package/dist/api/resources/tickets/types/TicketPart.js +21 -0
- package/dist/api/resources/tickets/types/TicketType.d.ts +41 -0
- package/dist/api/resources/tickets/types/TicketType.js +14 -0
- package/dist/api/resources/tickets/types/TicketsReplyRequestBody.d.ts +5 -0
- package/dist/api/resources/tickets/types/TicketsReplyRequestBody.js +5 -0
- package/dist/api/resources/tickets/types/index.d.ts +5 -0
- package/dist/api/resources/tickets/types/index.js +21 -0
- package/dist/api/resources/visitors/client/Client.d.ts +101 -0
- package/dist/api/resources/visitors/client/Client.js +266 -0
- package/dist/api/resources/visitors/client/index.d.ts +1 -0
- package/dist/api/resources/visitors/client/index.js +17 -0
- package/dist/api/resources/visitors/client/requests/FindVisitorRequest.d.ts +15 -0
- package/dist/api/resources/visitors/client/requests/FindVisitorRequest.js +5 -0
- package/dist/api/resources/visitors/client/requests/MergeVisitorToContactRequest.d.ts +46 -0
- package/dist/api/resources/visitors/client/requests/MergeVisitorToContactRequest.js +5 -0
- package/dist/api/resources/visitors/client/requests/index.d.ts +2 -0
- package/dist/api/resources/visitors/client/requests/index.js +2 -0
- package/dist/api/resources/visitors/index.d.ts +1 -0
- package/dist/api/resources/visitors/index.js +17 -0
- package/dist/api/types/ActivityLog.d.ts +104 -0
- package/dist/api/types/ActivityLog.js +78 -0
- package/dist/api/types/ActivityLogList.d.ts +14 -0
- package/dist/api/types/ActivityLogList.js +5 -0
- package/dist/api/types/ActivityLogMetadata.d.ts +26 -0
- package/dist/api/types/ActivityLogMetadata.js +5 -0
- package/dist/api/types/AddressableList.d.ts +14 -0
- package/dist/api/types/AddressableList.js +5 -0
- package/dist/api/types/AdminList.d.ts +13 -0
- package/dist/api/types/AdminList.js +5 -0
- package/dist/api/types/AdminPriorityLevel.d.ts +12 -0
- package/dist/api/types/AdminPriorityLevel.js +5 -0
- package/dist/api/types/AdminReplyConversationRequest.d.ts +28 -0
- package/dist/api/types/AdminReplyConversationRequest.js +13 -0
- package/dist/api/types/AdminReplyTicketRequest.d.ts +37 -0
- package/dist/api/types/AdminReplyTicketRequest.js +14 -0
- package/dist/api/types/AdminWithApp.d.ts +44 -0
- package/dist/api/types/AdminWithApp.js +5 -0
- package/dist/api/types/App.d.ts +22 -0
- package/dist/api/types/App.js +5 -0
- package/dist/api/types/ArticleContent.d.ts +36 -0
- package/dist/api/types/ArticleContent.js +13 -0
- package/dist/api/types/ArticleList.d.ts +16 -0
- package/dist/api/types/ArticleList.js +5 -0
- package/dist/api/types/ArticleStatistics.d.ts +22 -0
- package/dist/api/types/ArticleStatistics.js +5 -0
- package/dist/api/types/ArticleTranslatedContent.d.ts +85 -0
- package/dist/api/types/ArticleTranslatedContent.js +5 -0
- package/dist/api/types/AssignConversationRequest.d.ts +22 -0
- package/dist/api/types/AssignConversationRequest.js +13 -0
- package/dist/api/types/CloseConversationRequest.d.ts +13 -0
- package/dist/api/types/CloseConversationRequest.js +5 -0
- package/dist/api/types/CollectionList.d.ts +16 -0
- package/dist/api/types/CollectionList.js +5 -0
- package/dist/api/types/CompanyAttachedContacts.d.ts +16 -0
- package/dist/api/types/CompanyAttachedContacts.js +5 -0
- package/dist/api/types/CompanyAttachedSegments.d.ts +13 -0
- package/dist/api/types/CompanyAttachedSegments.js +5 -0
- package/dist/api/types/CompanyList.d.ts +16 -0
- package/dist/api/types/CompanyList.js +5 -0
- package/dist/api/types/CompanyScroll.d.ts +17 -0
- package/dist/api/types/CompanyScroll.js +5 -0
- package/dist/api/types/ContactArchived.d.ts +16 -0
- package/dist/api/types/ContactArchived.js +5 -0
- package/dist/api/types/ContactAttachedCompanies.d.ts +16 -0
- package/dist/api/types/ContactAttachedCompanies.js +5 -0
- package/dist/api/types/ContactCompanies.d.ts +14 -0
- package/dist/api/types/ContactCompanies.js +5 -0
- package/dist/api/types/ContactDeleted.d.ts +16 -0
- package/dist/api/types/ContactDeleted.js +5 -0
- package/dist/api/types/ContactList.d.ts +16 -0
- package/dist/api/types/ContactList.js +5 -0
- package/dist/api/types/ContactLocation.d.ts +16 -0
- package/dist/api/types/ContactLocation.js +5 -0
- package/dist/api/types/ContactNotes.d.ts +17 -0
- package/dist/api/types/ContactNotes.js +5 -0
- package/dist/api/types/ContactReference.d.ts +14 -0
- package/dist/api/types/ContactReference.js +5 -0
- package/dist/api/types/ContactReplyBaseRequest.d.ts +13 -0
- package/dist/api/types/ContactReplyBaseRequest.js +5 -0
- package/dist/api/types/ContactReplyConversationRequest.d.ts +5 -0
- package/dist/api/types/ContactReplyConversationRequest.js +5 -0
- package/dist/api/types/ContactReplyEmailRequest.d.ts +13 -0
- package/dist/api/types/ContactReplyEmailRequest.js +5 -0
- package/dist/api/types/ContactReplyIntercomUserIdRequest.d.ts +13 -0
- package/dist/api/types/ContactReplyIntercomUserIdRequest.js +5 -0
- package/dist/api/types/ContactReplyTicketEmailRequest.d.ts +11 -0
- package/dist/api/types/ContactReplyTicketEmailRequest.js +5 -0
- package/dist/api/types/ContactReplyTicketIntercomUserIdRequest.d.ts +11 -0
- package/dist/api/types/ContactReplyTicketIntercomUserIdRequest.js +5 -0
- package/dist/api/types/ContactReplyTicketRequest.d.ts +5 -0
- package/dist/api/types/ContactReplyTicketRequest.js +5 -0
- package/dist/api/types/ContactReplyTicketUserIdRequest.d.ts +11 -0
- package/dist/api/types/ContactReplyTicketUserIdRequest.js +5 -0
- package/dist/api/types/ContactReplyUserIdRequest.d.ts +13 -0
- package/dist/api/types/ContactReplyUserIdRequest.js +5 -0
- package/dist/api/types/ContactSegments.d.ts +13 -0
- package/dist/api/types/ContactSegments.js +5 -0
- package/dist/api/types/ContactSocialProfiles.d.ts +11 -0
- package/dist/api/types/ContactSocialProfiles.js +5 -0
- package/dist/api/types/ContactSubscriptionTypes.d.ts +17 -0
- package/dist/api/types/ContactSubscriptionTypes.js +5 -0
- package/dist/api/types/ContactTags.d.ts +17 -0
- package/dist/api/types/ContactTags.js +5 -0
- package/dist/api/types/ContactUnarchived.d.ts +16 -0
- package/dist/api/types/ContactUnarchived.js +5 -0
- package/dist/api/types/ContentSourcesList.d.ts +11 -0
- package/dist/api/types/ContentSourcesList.js +5 -0
- package/dist/api/types/ConversationAttachmentFiles.d.ts +14 -0
- package/dist/api/types/ConversationAttachmentFiles.js +5 -0
- package/dist/api/types/ConversationContacts.d.ts +12 -0
- package/dist/api/types/ConversationContacts.js +5 -0
- package/dist/api/types/ConversationFirstContactReply.d.ts +14 -0
- package/dist/api/types/ConversationFirstContactReply.js +5 -0
- package/dist/api/types/ConversationPart.d.ts +32 -0
- package/dist/api/types/ConversationPart.js +5 -0
- package/dist/api/types/ConversationPartAuthor.d.ts +16 -0
- package/dist/api/types/ConversationPartAuthor.js +5 -0
- package/dist/api/types/ConversationParts.d.ts +15 -0
- package/dist/api/types/ConversationParts.js +5 -0
- package/dist/api/types/ConversationRating.d.ts +17 -0
- package/dist/api/types/ConversationRating.js +5 -0
- package/dist/api/types/ConversationSource.d.ts +26 -0
- package/dist/api/types/ConversationSource.js +5 -0
- package/dist/api/types/ConversationStatistics.d.ts +46 -0
- package/dist/api/types/ConversationStatistics.js +5 -0
- package/dist/api/types/ConversationTeammates.d.ts +13 -0
- package/dist/api/types/ConversationTeammates.js +5 -0
- package/dist/api/types/CreateContactRequest.d.ts +37 -0
- package/dist/api/types/CreateContactRequest.js +5 -0
- package/dist/api/types/CreateDataEventRequest.d.ts +22 -0
- package/dist/api/types/CreateDataEventRequest.js +5 -0
- package/dist/api/types/CreateMessageRequest.d.ts +104 -0
- package/dist/api/types/CreateMessageRequest.js +29 -0
- package/dist/api/types/CreateOrUpdateTagRequest.d.ts +12 -0
- package/dist/api/types/CreateOrUpdateTagRequest.js +5 -0
- package/dist/api/types/CreateTicketReplyWithCommentRequest.d.ts +5 -0
- package/dist/api/types/CreateTicketReplyWithCommentRequest.js +5 -0
- package/dist/api/types/CursorPages.d.ts +19 -0
- package/dist/api/types/CursorPages.js +5 -0
- package/dist/api/types/CustomAttributes.d.ts +11 -0
- package/dist/api/types/CustomAttributes.js +5 -0
- package/dist/api/types/CustomerRequest.d.ts +10 -0
- package/dist/api/types/CustomerRequest.js +5 -0
- package/dist/api/types/DataAttributeList.d.ts +13 -0
- package/dist/api/types/DataAttributeList.js +5 -0
- package/dist/api/types/DataEventList.d.ts +24 -0
- package/dist/api/types/DataEventList.js +5 -0
- package/dist/api/types/DataEventSummary.d.ts +19 -0
- package/dist/api/types/DataEventSummary.js +5 -0
- package/dist/api/types/DataEventSummaryItem.d.ts +18 -0
- package/dist/api/types/DataEventSummaryItem.js +5 -0
- package/dist/api/types/DataExportCsv.d.ts +60 -0
- package/dist/api/types/DataExportCsv.js +5 -0
- package/dist/api/types/DeletedArticleObject.d.ts +14 -0
- package/dist/api/types/DeletedArticleObject.js +5 -0
- package/dist/api/types/DeletedCollectionObject.d.ts +14 -0
- package/dist/api/types/DeletedCollectionObject.js +5 -0
- package/dist/api/types/DeletedCompanyObject.d.ts +14 -0
- package/dist/api/types/DeletedCompanyObject.js +5 -0
- package/dist/api/types/DeletedObject.d.ts +14 -0
- package/dist/api/types/DeletedObject.js +5 -0
- package/dist/api/types/Error_.d.ts +27 -0
- package/dist/api/types/Error_.js +5 -0
- package/dist/api/types/FileAttribute.d.ts +21 -0
- package/dist/api/types/FileAttribute.js +5 -0
- package/dist/api/types/GroupContent.d.ts +14 -0
- package/dist/api/types/GroupContent.js +5 -0
- package/dist/api/types/GroupTranslatedContent.d.ts +85 -0
- package/dist/api/types/GroupTranslatedContent.js +5 -0
- package/dist/api/types/LinkedObject.d.ts +24 -0
- package/dist/api/types/LinkedObject.js +13 -0
- package/dist/api/types/LinkedObjectList.d.ts +17 -0
- package/dist/api/types/LinkedObjectList.js +5 -0
- package/dist/api/types/MultipleFilterSearchRequest.d.ts +29 -0
- package/dist/api/types/MultipleFilterSearchRequest.js +13 -0
- package/dist/api/types/NewsItemRequest.d.ts +35 -0
- package/dist/api/types/NewsItemRequest.js +13 -0
- package/dist/api/types/NoteList.d.ts +16 -0
- package/dist/api/types/NoteList.js +5 -0
- package/dist/api/types/OpenConversationRequest.d.ts +10 -0
- package/dist/api/types/OpenConversationRequest.js +5 -0
- package/dist/api/types/PagesLink.d.ts +16 -0
- package/dist/api/types/PagesLink.js +5 -0
- package/dist/api/types/PaginatedConversationResponse.d.ts +16 -0
- package/dist/api/types/PaginatedConversationResponse.js +5 -0
- package/dist/api/types/PaginatedNewsItemResponse.d.ts +16 -0
- package/dist/api/types/PaginatedNewsItemResponse.js +5 -0
- package/dist/api/types/PaginatedNewsfeedResponse.d.ts +16 -0
- package/dist/api/types/PaginatedNewsfeedResponse.js +5 -0
- package/dist/api/types/PartAttachment.d.ts +22 -0
- package/dist/api/types/PartAttachment.js +5 -0
- package/dist/api/types/PhoneSwitch.d.ts +12 -0
- package/dist/api/types/PhoneSwitch.js +5 -0
- package/dist/api/types/RedactConversationRequest.d.ts +27 -0
- package/dist/api/types/RedactConversationRequest.js +5 -0
- package/dist/api/types/Reference.d.ts +12 -0
- package/dist/api/types/Reference.js +5 -0
- package/dist/api/types/ReplyConversationRequest.d.ts +5 -0
- package/dist/api/types/ReplyConversationRequest.js +5 -0
- package/dist/api/types/SearchRequest.d.ts +14 -0
- package/dist/api/types/SearchRequest.js +5 -0
- package/dist/api/types/SegmentList.d.ts +15 -0
- package/dist/api/types/SegmentList.js +5 -0
- package/dist/api/types/SingleFilterSearchRequest.d.ts +32 -0
- package/dist/api/types/SingleFilterSearchRequest.js +21 -0
- package/dist/api/types/SlaApplied.d.ts +35 -0
- package/dist/api/types/SlaApplied.js +15 -0
- package/dist/api/types/SnoozeConversationRequest.d.ts +12 -0
- package/dist/api/types/SnoozeConversationRequest.js +5 -0
- package/dist/api/types/SocialProfile.d.ts +14 -0
- package/dist/api/types/SocialProfile.js +5 -0
- package/dist/api/types/StartingAfterPaging.d.ts +9 -0
- package/dist/api/types/StartingAfterPaging.js +5 -0
- package/dist/api/types/SubscriptionTypeList.d.ts +13 -0
- package/dist/api/types/SubscriptionTypeList.js +5 -0
- package/dist/api/types/TagCompanyRequest.d.ts +23 -0
- package/dist/api/types/TagCompanyRequest.js +5 -0
- package/dist/api/types/TagList.d.ts +13 -0
- package/dist/api/types/TagList.js +5 -0
- package/dist/api/types/TagMultipleUsersRequest.d.ts +20 -0
- package/dist/api/types/TagMultipleUsersRequest.js +5 -0
- package/dist/api/types/Tags.d.ts +13 -0
- package/dist/api/types/Tags.js +5 -0
- package/dist/api/types/TeamList.d.ts +13 -0
- package/dist/api/types/TeamList.js +5 -0
- package/dist/api/types/TeamPriorityLevel.d.ts +12 -0
- package/dist/api/types/TeamPriorityLevel.js +5 -0
- package/dist/api/types/TicketCustomAttributes.d.ts +11 -0
- package/dist/api/types/TicketCustomAttributes.js +5 -0
- package/dist/api/types/TicketList.d.ts +16 -0
- package/dist/api/types/TicketList.js +5 -0
- package/dist/api/types/TicketPartAuthor.d.ts +28 -0
- package/dist/api/types/TicketPartAuthor.js +15 -0
- package/dist/api/types/TicketParts.d.ts +15 -0
- package/dist/api/types/TicketParts.js +5 -0
- package/dist/api/types/TicketReply.d.ts +37 -0
- package/dist/api/types/TicketReply.js +14 -0
- package/dist/api/types/TicketRequestCustomAttributes.d.ts +10 -0
- package/dist/api/types/TicketRequestCustomAttributes.js +5 -0
- package/dist/api/types/TicketTypeAttribute.d.ts +42 -0
- package/dist/api/types/TicketTypeAttribute.js +5 -0
- package/dist/api/types/TicketTypeAttributeList.d.ts +13 -0
- package/dist/api/types/TicketTypeAttributeList.js +5 -0
- package/dist/api/types/TicketTypeList.d.ts +13 -0
- package/dist/api/types/TicketTypeList.js +5 -0
- package/dist/api/types/Translation.d.ts +14 -0
- package/dist/api/types/Translation.js +5 -0
- package/dist/api/types/UntagCompanyRequest.d.ts +25 -0
- package/dist/api/types/UntagCompanyRequest.js +5 -0
- package/dist/api/types/UpdateVisitorRequest.d.ts +15 -0
- package/dist/api/types/UpdateVisitorRequest.js +5 -0
- package/dist/api/types/Visitor.d.ts +128 -0
- package/dist/api/types/Visitor.js +5 -0
- package/dist/api/types/VisitorDeletedObject.d.ts +14 -0
- package/dist/api/types/VisitorDeletedObject.js +5 -0
- package/dist/api/types/index.d.ts +118 -0
- package/dist/api/types/index.js +134 -0
- package/dist/api/version.d.ts +5 -0
- package/dist/api/version.js +5 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +26 -0
- package/dist/core/auth/BearerToken.d.ts +5 -0
- package/dist/core/auth/BearerToken.js +15 -0
- package/dist/core/auth/index.d.ts +2 -0
- package/dist/core/auth/index.js +7 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +39 -0
- package/dist/core/fetcher/Fetcher.js +99 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +55 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +9 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +41 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +21 -0
- package/dist/core/pagination/Page.d.ts +29 -0
- package/dist/core/pagination/Page.js +94 -0
- package/dist/core/pagination/Pageable.d.ts +12 -0
- package/dist/core/pagination/Pageable.js +10 -0
- package/dist/core/pagination/index.d.ts +2 -0
- package/dist/core/pagination/index.js +7 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +93 -0
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/core/utils/index.js +5 -0
- package/dist/core/utils/setObjectProperty.d.ts +11 -0
- package/dist/core/utils/setObjectProperty.js +43 -0
- package/dist/environments.d.ts +9 -0
- package/dist/environments.js +11 -0
- package/dist/errors/IntercomError.d.ts +12 -0
- package/dist/errors/IntercomError.js +32 -0
- package/dist/errors/IntercomTimeoutError.d.ts +6 -0
- package/dist/errors/IntercomTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +34 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +9 -0
- package/environments.js +11 -0
- package/errors/IntercomError.d.ts +12 -0
- package/errors/IntercomError.js +32 -0
- package/errors/IntercomTimeoutError.d.ts +6 -0
- package/errors/IntercomTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +4 -296
- package/index.js +9 -145
- package/jest.config.js +5 -0
- package/package.json +37 -99
- package/reference.md +7819 -0
- package/version.d.ts +1 -2
- package/version.js +2 -3
- package/CHANGELOG.md +0 -85
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -81
- package/_shims/index.js +0 -13
- package/_shims/index.mjs +0 -7
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -239
- package/core.d.ts.map +0 -1
- package/core.js +0 -881
- package/core.js.map +0 -1
- package/core.mjs +0 -850
- package/core.mjs.map +0 -1
- package/error.d.ts +0 -53
- package/error.d.ts.map +0 -1
- package/error.js +0 -143
- package/error.js.map +0 -1
- package/error.mjs +0 -127
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -296
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/index.mjs +0 -142
- package/index.mjs.map +0 -1
- package/pagination.d.ts +0 -40
- package/pagination.d.ts.map +0 -1
- package/pagination.js +0 -41
- package/pagination.js.map +0 -1
- package/pagination.mjs +0 -37
- package/pagination.mjs.map +0 -1
- package/resource.d.ts +0 -6
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -11
- package/resource.js.map +0 -1
- package/resource.mjs +0 -7
- package/resource.mjs.map +0 -1
- package/resources/admins/activity-logs.d.ts +0 -144
- package/resources/admins/activity-logs.d.ts.map +0 -1
- package/resources/admins/activity-logs.js +0 -27
- package/resources/admins/activity-logs.js.map +0 -1
- package/resources/admins/activity-logs.mjs +0 -23
- package/resources/admins/activity-logs.mjs.map +0 -1
- package/resources/admins/admins.d.ts +0 -75
- package/resources/admins/admins.d.ts.map +0 -1
- package/resources/admins/admins.js +0 -87
- package/resources/admins/admins.js.map +0 -1
- package/resources/admins/admins.mjs +0 -60
- package/resources/admins/admins.mjs.map +0 -1
- package/resources/admins/index.d.ts +0 -3
- package/resources/admins/index.d.ts.map +0 -1
- package/resources/admins/index.js +0 -9
- package/resources/admins/index.js.map +0 -1
- package/resources/admins/index.mjs +0 -4
- package/resources/admins/index.mjs.map +0 -1
- package/resources/articles.d.ts +0 -496
- package/resources/articles.d.ts.map +0 -1
- package/resources/articles.js +0 -106
- package/resources/articles.js.map +0 -1
- package/resources/articles.mjs +0 -102
- package/resources/articles.mjs.map +0 -1
- package/resources/companies/companies.d.ts +0 -322
- package/resources/companies/companies.d.ts.map +0 -1
- package/resources/companies/companies.js +0 -153
- package/resources/companies/companies.js.map +0 -1
- package/resources/companies/companies.mjs +0 -126
- package/resources/companies/companies.mjs.map +0 -1
- package/resources/companies/contacts.d.ts +0 -47
- package/resources/companies/contacts.d.ts.map +0 -1
- package/resources/companies/contacts.js +0 -27
- package/resources/companies/contacts.js.map +0 -1
- package/resources/companies/contacts.mjs +0 -23
- package/resources/companies/contacts.mjs.map +0 -1
- package/resources/companies/index.d.ts +0 -4
- package/resources/companies/index.d.ts.map +0 -1
- package/resources/companies/index.js +0 -11
- package/resources/companies/index.js.map +0 -1
- package/resources/companies/index.mjs +0 -5
- package/resources/companies/index.mjs.map +0 -1
- package/resources/companies/segments.d.ts +0 -36
- package/resources/companies/segments.d.ts.map +0 -1
- package/resources/companies/segments.js +0 -27
- package/resources/companies/segments.js.map +0 -1
- package/resources/companies/segments.mjs +0 -23
- package/resources/companies/segments.mjs.map +0 -1
- package/resources/contacts/companies.d.ts +0 -99
- package/resources/contacts/companies.d.ts.map +0 -1
- package/resources/contacts/companies.js +0 -58
- package/resources/contacts/companies.js.map +0 -1
- package/resources/contacts/companies.mjs +0 -54
- package/resources/contacts/companies.mjs.map +0 -1
- package/resources/contacts/contacts.d.ts +0 -467
- package/resources/contacts/contacts.d.ts.map +0 -1
- package/resources/contacts/contacts.js +0 -315
- package/resources/contacts/contacts.js.map +0 -1
- package/resources/contacts/contacts.mjs +0 -288
- package/resources/contacts/contacts.mjs.map +0 -1
- package/resources/contacts/index.d.ts +0 -7
- package/resources/contacts/index.d.ts.map +0 -1
- package/resources/contacts/index.js +0 -17
- package/resources/contacts/index.js.map +0 -1
- package/resources/contacts/index.mjs +0 -8
- package/resources/contacts/index.mjs.map +0 -1
- package/resources/contacts/notes.d.ts +0 -71
- package/resources/contacts/notes.d.ts.map +0 -1
- package/resources/contacts/notes.js +0 -43
- package/resources/contacts/notes.js.map +0 -1
- package/resources/contacts/notes.mjs +0 -39
- package/resources/contacts/notes.mjs.map +0 -1
- package/resources/contacts/segments.d.ts +0 -36
- package/resources/contacts/segments.d.ts.map +0 -1
- package/resources/contacts/segments.js +0 -27
- package/resources/contacts/segments.js.map +0 -1
- package/resources/contacts/segments.mjs +0 -23
- package/resources/contacts/segments.mjs.map +0 -1
- package/resources/contacts/subscriptions.d.ts +0 -149
- package/resources/contacts/subscriptions.d.ts.map +0 -1
- package/resources/contacts/subscriptions.js +0 -68
- package/resources/contacts/subscriptions.js.map +0 -1
- package/resources/contacts/subscriptions.mjs +0 -64
- package/resources/contacts/subscriptions.mjs.map +0 -1
- package/resources/contacts/tags.d.ts +0 -53
- package/resources/contacts/tags.d.ts.map +0 -1
- package/resources/contacts/tags.js +0 -59
- package/resources/contacts/tags.js.map +0 -1
- package/resources/contacts/tags.mjs +0 -55
- package/resources/contacts/tags.mjs.map +0 -1
- package/resources/conversations/conversations.d.ts +0 -428
- package/resources/conversations/conversations.d.ts.map +0 -1
- package/resources/conversations/conversations.js +0 -298
- package/resources/conversations/conversations.js.map +0 -1
- package/resources/conversations/conversations.mjs +0 -270
- package/resources/conversations/conversations.mjs.map +0 -1
- package/resources/conversations/customers.d.ts +0 -145
- package/resources/conversations/customers.d.ts.map +0 -1
- package/resources/conversations/customers.js +0 -50
- package/resources/conversations/customers.js.map +0 -1
- package/resources/conversations/customers.mjs +0 -46
- package/resources/conversations/customers.mjs.map +0 -1
- package/resources/conversations/index.d.ts +0 -7
- package/resources/conversations/index.d.ts.map +0 -1
- package/resources/conversations/index.js +0 -18
- package/resources/conversations/index.js.map +0 -1
- package/resources/conversations/index.mjs +0 -8
- package/resources/conversations/index.mjs.map +0 -1
- package/resources/conversations/parts.d.ts +0 -110
- package/resources/conversations/parts.d.ts.map +0 -1
- package/resources/conversations/parts.js +0 -32
- package/resources/conversations/parts.js.map +0 -1
- package/resources/conversations/parts.mjs +0 -28
- package/resources/conversations/parts.mjs.map +0 -1
- package/resources/conversations/reply.d.ts +0 -163
- package/resources/conversations/reply.d.ts.map +0 -1
- package/resources/conversations/reply.js +0 -28
- package/resources/conversations/reply.js.map +0 -1
- package/resources/conversations/reply.mjs +0 -24
- package/resources/conversations/reply.mjs.map +0 -1
- package/resources/conversations/run-assignment-rules.d.ts +0 -24
- package/resources/conversations/run-assignment-rules.d.ts.map +0 -1
- package/resources/conversations/run-assignment-rules.js +0 -27
- package/resources/conversations/run-assignment-rules.js.map +0 -1
- package/resources/conversations/run-assignment-rules.mjs +0 -23
- package/resources/conversations/run-assignment-rules.mjs.map +0 -1
- package/resources/conversations/tags.d.ts +0 -47
- package/resources/conversations/tags.d.ts.map +0 -1
- package/resources/conversations/tags.js +0 -45
- package/resources/conversations/tags.js.map +0 -1
- package/resources/conversations/tags.mjs +0 -41
- package/resources/conversations/tags.mjs.map +0 -1
- package/resources/data-attributes.d.ts +0 -198
- package/resources/data-attributes.d.ts.map +0 -1
- package/resources/data-attributes.js +0 -60
- package/resources/data-attributes.js.map +0 -1
- package/resources/data-attributes.mjs +0 -56
- package/resources/data-attributes.mjs.map +0 -1
- package/resources/data-events.d.ts +0 -276
- package/resources/data-events.d.ts.map +0 -1
- package/resources/data-events.js +0 -148
- package/resources/data-events.js.map +0 -1
- package/resources/data-events.mjs +0 -144
- package/resources/data-events.mjs.map +0 -1
- package/resources/data-exports.d.ts +0 -77
- package/resources/data-exports.d.ts.map +0 -1
- package/resources/data-exports.js +0 -51
- package/resources/data-exports.js.map +0 -1
- package/resources/data-exports.mjs +0 -47
- package/resources/data-exports.mjs.map +0 -1
- package/resources/download/content/content.d.ts +0 -10
- package/resources/download/content/content.d.ts.map +0 -1
- package/resources/download/content/content.js +0 -40
- package/resources/download/content/content.js.map +0 -1
- package/resources/download/content/content.mjs +0 -13
- package/resources/download/content/content.mjs.map +0 -1
- package/resources/download/content/data.d.ts +0 -31
- package/resources/download/content/data.d.ts.map +0 -1
- package/resources/download/content/data.js +0 -28
- package/resources/download/content/data.js.map +0 -1
- package/resources/download/content/data.mjs +0 -24
- package/resources/download/content/data.mjs.map +0 -1
- package/resources/download/content/index.d.ts +0 -3
- package/resources/download/content/index.d.ts.map +0 -1
- package/resources/download/content/index.js +0 -9
- package/resources/download/content/index.js.map +0 -1
- package/resources/download/content/index.mjs +0 -4
- package/resources/download/content/index.mjs.map +0 -1
- package/resources/download/download.d.ts +0 -9
- package/resources/download/download.d.ts.map +0 -1
- package/resources/download/download.js +0 -40
- package/resources/download/download.js.map +0 -1
- package/resources/download/download.mjs +0 -13
- package/resources/download/download.mjs.map +0 -1
- package/resources/download/index.d.ts +0 -3
- package/resources/download/index.d.ts.map +0 -1
- package/resources/download/index.js +0 -9
- package/resources/download/index.js.map +0 -1
- package/resources/download/index.mjs +0 -4
- package/resources/download/index.mjs.map +0 -1
- package/resources/export/content/content.d.ts +0 -10
- package/resources/export/content/content.d.ts.map +0 -1
- package/resources/export/content/content.js +0 -40
- package/resources/export/content/content.js.map +0 -1
- package/resources/export/content/content.mjs +0 -13
- package/resources/export/content/content.mjs.map +0 -1
- package/resources/export/content/data.d.ts +0 -30
- package/resources/export/content/data.d.ts.map +0 -1
- package/resources/export/content/data.js +0 -27
- package/resources/export/content/data.js.map +0 -1
- package/resources/export/content/data.mjs +0 -23
- package/resources/export/content/data.mjs.map +0 -1
- package/resources/export/content/index.d.ts +0 -3
- package/resources/export/content/index.d.ts.map +0 -1
- package/resources/export/content/index.js +0 -9
- package/resources/export/content/index.js.map +0 -1
- package/resources/export/content/index.mjs +0 -4
- package/resources/export/content/index.mjs.map +0 -1
- package/resources/export/export.d.ts +0 -25
- package/resources/export/export.d.ts.map +0 -1
- package/resources/export/export.js +0 -56
- package/resources/export/export.js.map +0 -1
- package/resources/export/export.mjs +0 -29
- package/resources/export/export.mjs.map +0 -1
- package/resources/export/index.d.ts +0 -3
- package/resources/export/index.d.ts.map +0 -1
- package/resources/export/index.js +0 -9
- package/resources/export/index.js.map +0 -1
- package/resources/export/index.mjs +0 -4
- package/resources/export/index.mjs.map +0 -1
- package/resources/help-center/collections.d.ts +0 -237
- package/resources/help-center/collections.d.ts.map +0 -1
- package/resources/help-center/collections.js +0 -90
- package/resources/help-center/collections.js.map +0 -1
- package/resources/help-center/collections.mjs +0 -86
- package/resources/help-center/collections.mjs.map +0 -1
- package/resources/help-center/help-center.d.ts +0 -72
- package/resources/help-center/help-center.d.ts.map +0 -1
- package/resources/help-center/help-center.js +0 -43
- package/resources/help-center/help-center.js.map +0 -1
- package/resources/help-center/help-center.mjs +0 -16
- package/resources/help-center/help-center.mjs.map +0 -1
- package/resources/help-center/help-centers.d.ts +0 -37
- package/resources/help-center/help-centers.d.ts.map +0 -1
- package/resources/help-center/help-centers.js +0 -42
- package/resources/help-center/help-centers.js.map +0 -1
- package/resources/help-center/help-centers.mjs +0 -38
- package/resources/help-center/help-centers.mjs.map +0 -1
- package/resources/help-center/index.d.ts +0 -4
- package/resources/help-center/index.d.ts.map +0 -1
- package/resources/help-center/index.js +0 -11
- package/resources/help-center/index.js.map +0 -1
- package/resources/help-center/index.mjs +0 -5
- package/resources/help-center/index.mjs.map +0 -1
- package/resources/index.d.ts +0 -25
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -67
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -26
- package/resources/index.mjs.map +0 -1
- package/resources/me.d.ts +0 -131
- package/resources/me.d.ts.map +0 -1
- package/resources/me.js +0 -27
- package/resources/me.js.map +0 -1
- package/resources/me.mjs +0 -23
- package/resources/me.mjs.map +0 -1
- package/resources/messages.d.ts +0 -54
- package/resources/messages.d.ts.map +0 -1
- package/resources/messages.js +0 -42
- package/resources/messages.js.map +0 -1
- package/resources/messages.mjs +0 -38
- package/resources/messages.mjs.map +0 -1
- package/resources/news/index.d.ts +0 -4
- package/resources/news/index.d.ts.map +0 -1
- package/resources/news/index.js +0 -11
- package/resources/news/index.js.map +0 -1
- package/resources/news/index.mjs +0 -5
- package/resources/news/index.mjs.map +0 -1
- package/resources/news/news-items.d.ts +0 -311
- package/resources/news/news-items.d.ts.map +0 -1
- package/resources/news/news-items.js +0 -89
- package/resources/news/news-items.js.map +0 -1
- package/resources/news/news-items.mjs +0 -85
- package/resources/news/news-items.mjs.map +0 -1
- package/resources/news/news.d.ts +0 -24
- package/resources/news/news.d.ts.map +0 -1
- package/resources/news/news.js +0 -43
- package/resources/news/news.js.map +0 -1
- package/resources/news/news.mjs +0 -16
- package/resources/news/news.mjs.map +0 -1
- package/resources/news/newsfeeds/index.d.ts +0 -3
- package/resources/news/newsfeeds/index.d.ts.map +0 -1
- package/resources/news/newsfeeds/index.js +0 -9
- package/resources/news/newsfeeds/index.js.map +0 -1
- package/resources/news/newsfeeds/index.mjs +0 -4
- package/resources/news/newsfeeds/index.mjs.map +0 -1
- package/resources/news/newsfeeds/items.d.ts +0 -49
- package/resources/news/newsfeeds/items.d.ts.map +0 -1
- package/resources/news/newsfeeds/items.js +0 -27
- package/resources/news/newsfeeds/items.js.map +0 -1
- package/resources/news/newsfeeds/items.mjs +0 -23
- package/resources/news/newsfeeds/items.mjs.map +0 -1
- package/resources/news/newsfeeds/newsfeeds.d.ts +0 -96
- package/resources/news/newsfeeds/newsfeeds.d.ts.map +0 -1
- package/resources/news/newsfeeds/newsfeeds.js +0 -71
- package/resources/news/newsfeeds/newsfeeds.js.map +0 -1
- package/resources/news/newsfeeds/newsfeeds.mjs +0 -44
- package/resources/news/newsfeeds/newsfeeds.mjs.map +0 -1
- package/resources/notes.d.ts +0 -22
- package/resources/notes.d.ts.map +0 -1
- package/resources/notes.js +0 -27
- package/resources/notes.js.map +0 -1
- package/resources/notes.mjs +0 -23
- package/resources/notes.mjs.map +0 -1
- package/resources/phone-call-redirects.d.ts +0 -75
- package/resources/phone-call-redirects.d.ts.map +0 -1
- package/resources/phone-call-redirects.js +0 -32
- package/resources/phone-call-redirects.js.map +0 -1
- package/resources/phone-call-redirects.mjs +0 -28
- package/resources/phone-call-redirects.mjs.map +0 -1
- package/resources/segments.d.ts +0 -92
- package/resources/segments.d.ts.map +0 -1
- package/resources/segments.js +0 -43
- package/resources/segments.js.map +0 -1
- package/resources/segments.mjs +0 -39
- package/resources/segments.mjs.map +0 -1
- package/resources/shared.d.ts +0 -2159
- package/resources/shared.d.ts.map +0 -1
- package/resources/shared.js +0 -4
- package/resources/shared.js.map +0 -1
- package/resources/shared.mjs +0 -3
- package/resources/shared.mjs.map +0 -1
- package/resources/subscription-types.d.ts +0 -23
- package/resources/subscription-types.d.ts.map +0 -1
- package/resources/subscription-types.js +0 -27
- package/resources/subscription-types.js.map +0 -1
- package/resources/subscription-types.mjs +0 -23
- package/resources/subscription-types.mjs.map +0 -1
- package/resources/tags.d.ts +0 -179
- package/resources/tags.d.ts.map +0 -1
- package/resources/tags.js +0 -96
- package/resources/tags.js.map +0 -1
- package/resources/tags.mjs +0 -92
- package/resources/tags.mjs.map +0 -1
- package/resources/teams.d.ts +0 -90
- package/resources/teams.d.ts.map +0 -1
- package/resources/teams.js +0 -42
- package/resources/teams.js.map +0 -1
- package/resources/teams.mjs +0 -38
- package/resources/teams.mjs.map +0 -1
- package/resources/ticket-types/attributes.d.ts +0 -131
- package/resources/ticket-types/attributes.d.ts.map +0 -1
- package/resources/ticket-types/attributes.js +0 -44
- package/resources/ticket-types/attributes.js.map +0 -1
- package/resources/ticket-types/attributes.mjs +0 -40
- package/resources/ticket-types/attributes.mjs.map +0 -1
- package/resources/ticket-types/index.d.ts +0 -3
- package/resources/ticket-types/index.d.ts.map +0 -1
- package/resources/ticket-types/index.js +0 -9
- package/resources/ticket-types/index.js.map +0 -1
- package/resources/ticket-types/index.mjs +0 -4
- package/resources/ticket-types/index.mjs.map +0 -1
- package/resources/ticket-types/ticket-types.d.ts +0 -204
- package/resources/ticket-types/ticket-types.d.ts.map +0 -1
- package/resources/ticket-types/ticket-types.js +0 -109
- package/resources/ticket-types/ticket-types.js.map +0 -1
- package/resources/ticket-types/ticket-types.mjs +0 -82
- package/resources/ticket-types/ticket-types.mjs.map +0 -1
- package/resources/tickets/index.d.ts +0 -3
- package/resources/tickets/index.d.ts.map +0 -1
- package/resources/tickets/index.js +0 -9
- package/resources/tickets/index.js.map +0 -1
- package/resources/tickets/index.mjs +0 -4
- package/resources/tickets/index.mjs.map +0 -1
- package/resources/tickets/tags.d.ts +0 -47
- package/resources/tickets/tags.d.ts.map +0 -1
- package/resources/tickets/tags.js +0 -45
- package/resources/tickets/tags.js.map +0 -1
- package/resources/tickets/tags.mjs +0 -41
- package/resources/tickets/tags.mjs.map +0 -1
- package/resources/tickets/tickets.d.ts +0 -472
- package/resources/tickets/tickets.d.ts.map +0 -1
- package/resources/tickets/tickets.js +0 -191
- package/resources/tickets/tickets.js.map +0 -1
- package/resources/tickets/tickets.mjs +0 -164
- package/resources/tickets/tickets.mjs.map +0 -1
- package/resources/visitors.d.ts +0 -355
- package/resources/visitors.d.ts.map +0 -1
- package/resources/visitors.js +0 -73
- package/resources/visitors.js.map +0 -1
- package/resources/visitors.mjs +0 -69
- package/resources/visitors.mjs.map +0 -1
- package/shims/node.d.ts +0 -29
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -81
- package/src/_shims/index.js +0 -13
- package/src/_shims/index.mjs +0 -7
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1165
- package/src/error.ts +0 -146
- package/src/index.ts +0 -408
- package/src/lib/.keep +0 -4
- package/src/pagination.ts +0 -91
- package/src/resource.ts +0 -11
- package/src/resources/admins/activity-logs.ts +0 -269
- package/src/resources/admins/admins.ts +0 -200
- package/src/resources/admins/index.ts +0 -4
- package/src/resources/articles.ts +0 -806
- package/src/resources/companies/companies.ts +0 -645
- package/src/resources/companies/contacts.ts +0 -97
- package/src/resources/companies/index.ts +0 -17
- package/src/resources/companies/segments.ts +0 -84
- package/src/resources/contacts/companies.ts +0 -236
- package/src/resources/contacts/contacts.ts +0 -904
- package/src/resources/contacts/index.ts +0 -35
- package/src/resources/contacts/notes.ts +0 -152
- package/src/resources/contacts/segments.ts +0 -84
- package/src/resources/contacts/subscriptions.ts +0 -291
- package/src/resources/contacts/tags.ts +0 -181
- package/src/resources/conversations/conversations.ts +0 -754
- package/src/resources/conversations/customers.ts +0 -247
- package/src/resources/conversations/index.ts +0 -20
- package/src/resources/conversations/parts.ts +0 -224
- package/src/resources/conversations/reply.ts +0 -288
- package/src/resources/conversations/run-assignment-rules.ts +0 -70
- package/src/resources/conversations/tags.ts +0 -125
- package/src/resources/data-attributes.ts +0 -347
- package/src/resources/data-events.ts +0 -454
- package/src/resources/data-exports.ts +0 -120
- package/src/resources/download/content/content.ts +0 -13
- package/src/resources/download/content/data.ts +0 -78
- package/src/resources/download/content/index.ts +0 -4
- package/src/resources/download/download.ts +0 -12
- package/src/resources/download/index.ts +0 -4
- package/src/resources/export/content/content.ts +0 -13
- package/src/resources/export/content/data.ts +0 -76
- package/src/resources/export/content/index.ts +0 -4
- package/src/resources/export/export.ts +0 -72
- package/src/resources/export/index.ts +0 -4
- package/src/resources/help-center/collections.ts +0 -469
- package/src/resources/help-center/help-center.ts +0 -84
- package/src/resources/help-center/help-centers.ts +0 -124
- package/src/resources/help-center/index.ts +0 -15
- package/src/resources/index.ts +0 -114
- package/src/resources/me.ts +0 -193
- package/src/resources/messages.ts +0 -110
- package/src/resources/news/index.ts +0 -21
- package/src/resources/news/news-items.ts +0 -545
- package/src/resources/news/news.ts +0 -27
- package/src/resources/news/newsfeeds/index.ts +0 -10
- package/src/resources/news/newsfeeds/items.ts +0 -95
- package/src/resources/news/newsfeeds/newsfeeds.ts +0 -190
- package/src/resources/notes.ts +0 -68
- package/src/resources/phone-call-redirects.ts +0 -120
- package/src/resources/segments.ts +0 -188
- package/src/resources/shared.ts +0 -2609
- package/src/resources/subscription-types.ts +0 -67
- package/src/resources/tags.ts +0 -414
- package/src/resources/teams.ts +0 -179
- package/src/resources/ticket-types/attributes.ts +0 -240
- package/src/resources/ticket-types/index.ts +0 -12
- package/src/resources/ticket-types/ticket-types.ts +0 -391
- package/src/resources/tickets/index.ts +0 -13
- package/src/resources/tickets/tags.ts +0 -125
- package/src/resources/tickets/tickets.ts +0 -780
- package/src/resources/visitors.ts +0 -542
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -248
- package/src/version.ts +0 -1
- package/uploads.d.ts +0 -75
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -165
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -152
- package/uploads.mjs.map +0 -1
- package/version.d.ts.map +0 -1
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
package/src/core.ts
DELETED
|
@@ -1,1165 +0,0 @@
|
|
|
1
|
-
import { VERSION } from './version';
|
|
2
|
-
import {
|
|
3
|
-
IntercomError,
|
|
4
|
-
APIError,
|
|
5
|
-
APIConnectionError,
|
|
6
|
-
APIConnectionTimeoutError,
|
|
7
|
-
APIUserAbortError,
|
|
8
|
-
} from './error';
|
|
9
|
-
import {
|
|
10
|
-
kind as shimsKind,
|
|
11
|
-
type Readable,
|
|
12
|
-
getDefaultAgent,
|
|
13
|
-
type Agent,
|
|
14
|
-
fetch,
|
|
15
|
-
type RequestInfo,
|
|
16
|
-
type RequestInit,
|
|
17
|
-
type Response,
|
|
18
|
-
type HeadersInit,
|
|
19
|
-
} from './_shims/index';
|
|
20
|
-
export { type Response };
|
|
21
|
-
import { BlobLike, isBlobLike, isMultipartBody } from './uploads';
|
|
22
|
-
export {
|
|
23
|
-
maybeMultipartFormRequestOptions,
|
|
24
|
-
multipartFormRequestOptions,
|
|
25
|
-
createForm,
|
|
26
|
-
type Uploadable,
|
|
27
|
-
} from './uploads';
|
|
28
|
-
|
|
29
|
-
export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
30
|
-
|
|
31
|
-
type PromiseOrValue<T> = T | Promise<T>;
|
|
32
|
-
|
|
33
|
-
type APIResponseProps = {
|
|
34
|
-
response: Response;
|
|
35
|
-
options: FinalRequestOptions;
|
|
36
|
-
controller: AbortController;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
|
|
40
|
-
const { response } = props;
|
|
41
|
-
// fetch refuses to read the body when the status code is 204.
|
|
42
|
-
if (response.status === 204) {
|
|
43
|
-
return null as T;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (props.options.__binaryResponse) {
|
|
47
|
-
return response as unknown as T;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const contentType = response.headers.get('content-type');
|
|
51
|
-
const isJSON =
|
|
52
|
-
contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
|
|
53
|
-
if (isJSON) {
|
|
54
|
-
const json = await response.json();
|
|
55
|
-
|
|
56
|
-
debug('response', response.status, response.url, response.headers, json);
|
|
57
|
-
|
|
58
|
-
return json as T;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const text = await response.text();
|
|
62
|
-
debug('response', response.status, response.url, response.headers, text);
|
|
63
|
-
|
|
64
|
-
// TODO handle blob, arraybuffer, other content types, etc.
|
|
65
|
-
return text as unknown as T;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* A subclass of `Promise` providing additional helper methods
|
|
70
|
-
* for interacting with the SDK.
|
|
71
|
-
*/
|
|
72
|
-
export class APIPromise<T> extends Promise<T> {
|
|
73
|
-
private parsedPromise: Promise<T> | undefined;
|
|
74
|
-
|
|
75
|
-
constructor(
|
|
76
|
-
private responsePromise: Promise<APIResponseProps>,
|
|
77
|
-
private parseResponse: (props: APIResponseProps) => PromiseOrValue<T> = defaultParseResponse,
|
|
78
|
-
) {
|
|
79
|
-
super((resolve) => {
|
|
80
|
-
// this is maybe a bit weird but this has to be a no-op to not implicitly
|
|
81
|
-
// parse the response body; instead .then, .catch, .finally are overridden
|
|
82
|
-
// to parse the response
|
|
83
|
-
resolve(null as any);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
_thenUnwrap<U>(transform: (data: T) => U): APIPromise<U> {
|
|
88
|
-
return new APIPromise(this.responsePromise, async (props) => transform(await this.parseResponse(props)));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Gets the raw `Response` instance instead of parsing the response
|
|
93
|
-
* data.
|
|
94
|
-
*
|
|
95
|
-
* If you want to parse the response body but still get the `Response`
|
|
96
|
-
* instance, you can use {@link withResponse()}.
|
|
97
|
-
*
|
|
98
|
-
* 👋 Getting the wrong TypeScript type for `Response`?
|
|
99
|
-
* Try setting `"moduleResolution": "NodeNext"` if you can,
|
|
100
|
-
* or add one of these imports before your first `import … from 'intercom-client'`:
|
|
101
|
-
* - `import 'intercom-client/shims/node'` (if you're running on Node)
|
|
102
|
-
* - `import 'intercom-client/shims/web'` (otherwise)
|
|
103
|
-
*/
|
|
104
|
-
asResponse(): Promise<Response> {
|
|
105
|
-
return this.responsePromise.then((p) => p.response);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Gets the parsed response data and the raw `Response` instance.
|
|
109
|
-
*
|
|
110
|
-
* If you just want to get the raw `Response` instance without parsing it,
|
|
111
|
-
* you can use {@link asResponse()}.
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* 👋 Getting the wrong TypeScript type for `Response`?
|
|
115
|
-
* Try setting `"moduleResolution": "NodeNext"` if you can,
|
|
116
|
-
* or add one of these imports before your first `import … from 'intercom-client'`:
|
|
117
|
-
* - `import 'intercom-client/shims/node'` (if you're running on Node)
|
|
118
|
-
* - `import 'intercom-client/shims/web'` (otherwise)
|
|
119
|
-
*/
|
|
120
|
-
async withResponse(): Promise<{ data: T; response: Response }> {
|
|
121
|
-
const [data, response] = await Promise.all([this.parse(), this.asResponse()]);
|
|
122
|
-
return { data, response };
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
private parse(): Promise<T> {
|
|
126
|
-
if (!this.parsedPromise) {
|
|
127
|
-
this.parsedPromise = this.responsePromise.then(this.parseResponse);
|
|
128
|
-
}
|
|
129
|
-
return this.parsedPromise;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
override then<TResult1 = T, TResult2 = never>(
|
|
133
|
-
onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,
|
|
134
|
-
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,
|
|
135
|
-
): Promise<TResult1 | TResult2> {
|
|
136
|
-
return this.parse().then(onfulfilled, onrejected);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
override catch<TResult = never>(
|
|
140
|
-
onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null,
|
|
141
|
-
): Promise<T | TResult> {
|
|
142
|
-
return this.parse().catch(onrejected);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
override finally(onfinally?: (() => void) | undefined | null): Promise<T> {
|
|
146
|
-
return this.parse().finally(onfinally);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export abstract class APIClient {
|
|
151
|
-
baseURL: string;
|
|
152
|
-
maxRetries: number;
|
|
153
|
-
timeout: number;
|
|
154
|
-
httpAgent: Agent | undefined;
|
|
155
|
-
|
|
156
|
-
private fetch: Fetch;
|
|
157
|
-
protected idempotencyHeader?: string;
|
|
158
|
-
|
|
159
|
-
constructor({
|
|
160
|
-
baseURL,
|
|
161
|
-
maxRetries = 2,
|
|
162
|
-
timeout = 60000, // 1 minute
|
|
163
|
-
httpAgent,
|
|
164
|
-
fetch: overridenFetch,
|
|
165
|
-
}: {
|
|
166
|
-
baseURL: string;
|
|
167
|
-
maxRetries?: number | undefined;
|
|
168
|
-
timeout: number | undefined;
|
|
169
|
-
httpAgent: Agent | undefined;
|
|
170
|
-
fetch: Fetch | undefined;
|
|
171
|
-
}) {
|
|
172
|
-
this.baseURL = baseURL;
|
|
173
|
-
this.maxRetries = validatePositiveInteger('maxRetries', maxRetries);
|
|
174
|
-
this.timeout = validatePositiveInteger('timeout', timeout);
|
|
175
|
-
this.httpAgent = httpAgent;
|
|
176
|
-
|
|
177
|
-
this.fetch = overridenFetch ?? fetch;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
protected authHeaders(opts: FinalRequestOptions): Headers {
|
|
181
|
-
return {};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Override this to add your own default headers, for example:
|
|
186
|
-
*
|
|
187
|
-
* {
|
|
188
|
-
* ...super.defaultHeaders(),
|
|
189
|
-
* Authorization: 'Bearer 123',
|
|
190
|
-
* }
|
|
191
|
-
*/
|
|
192
|
-
protected defaultHeaders(opts: FinalRequestOptions): Headers {
|
|
193
|
-
return {
|
|
194
|
-
Accept: 'application/json',
|
|
195
|
-
'Content-Type': 'application/json',
|
|
196
|
-
'User-Agent': this.getUserAgent(),
|
|
197
|
-
...getPlatformHeaders(),
|
|
198
|
-
...this.authHeaders(opts),
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
protected abstract defaultQuery(): DefaultQuery | undefined;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Override this to add your own headers validation:
|
|
206
|
-
*/
|
|
207
|
-
protected validateHeaders(headers: Headers, customHeaders: Headers) {}
|
|
208
|
-
|
|
209
|
-
protected defaultIdempotencyKey(): string {
|
|
210
|
-
return `stainless-node-retry-${uuid4()}`;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
get<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
214
|
-
return this.methodRequest('get', path, opts);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
post<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
218
|
-
return this.methodRequest('post', path, opts);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
patch<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
222
|
-
return this.methodRequest('patch', path, opts);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
put<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
226
|
-
return this.methodRequest('put', path, opts);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
delete<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
230
|
-
return this.methodRequest('delete', path, opts);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
private methodRequest<Req, Rsp>(
|
|
234
|
-
method: HTTPMethod,
|
|
235
|
-
path: string,
|
|
236
|
-
opts?: PromiseOrValue<RequestOptions<Req>>,
|
|
237
|
-
): APIPromise<Rsp> {
|
|
238
|
-
return this.request(
|
|
239
|
-
Promise.resolve(opts).then(async (opts) => {
|
|
240
|
-
const body =
|
|
241
|
-
opts && isBlobLike(opts?.body) ? new DataView(await opts.body.arrayBuffer())
|
|
242
|
-
: opts?.body instanceof DataView ? opts.body
|
|
243
|
-
: opts?.body instanceof ArrayBuffer ? new DataView(opts.body)
|
|
244
|
-
: opts && ArrayBuffer.isView(opts?.body) ? new DataView(opts.body.buffer)
|
|
245
|
-
: opts?.body;
|
|
246
|
-
return { method, path, ...opts, body };
|
|
247
|
-
}),
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
getAPIList<Item, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
252
|
-
path: string,
|
|
253
|
-
Page: new (...args: any[]) => PageClass,
|
|
254
|
-
opts?: RequestOptions<any>,
|
|
255
|
-
): PagePromise<PageClass, Item> {
|
|
256
|
-
return this.requestAPIList(Page, { method: 'get', path, ...opts });
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
private calculateContentLength(body: unknown): string | null {
|
|
260
|
-
if (typeof body === 'string') {
|
|
261
|
-
if (typeof Buffer !== 'undefined') {
|
|
262
|
-
return Buffer.byteLength(body, 'utf8').toString();
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (typeof TextEncoder !== 'undefined') {
|
|
266
|
-
const encoder = new TextEncoder();
|
|
267
|
-
const encoded = encoder.encode(body);
|
|
268
|
-
return encoded.length.toString();
|
|
269
|
-
}
|
|
270
|
-
} else if (ArrayBuffer.isView(body)) {
|
|
271
|
-
return body.byteLength.toString();
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return null;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
buildRequest<Req>(options: FinalRequestOptions<Req>): { req: RequestInit; url: string; timeout: number } {
|
|
278
|
-
const { method, path, query, headers: headers = {} } = options;
|
|
279
|
-
|
|
280
|
-
const body =
|
|
281
|
-
ArrayBuffer.isView(options.body) || (options.__binaryRequest && typeof options.body === 'string') ?
|
|
282
|
-
options.body
|
|
283
|
-
: isMultipartBody(options.body) ? options.body.body
|
|
284
|
-
: options.body ? JSON.stringify(options.body, null, 2)
|
|
285
|
-
: null;
|
|
286
|
-
const contentLength = this.calculateContentLength(body);
|
|
287
|
-
|
|
288
|
-
const url = this.buildURL(path!, query);
|
|
289
|
-
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
290
|
-
const timeout = options.timeout ?? this.timeout;
|
|
291
|
-
const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
|
|
292
|
-
const minAgentTimeout = timeout + 1000;
|
|
293
|
-
if (
|
|
294
|
-
typeof (httpAgent as any)?.options?.timeout === 'number' &&
|
|
295
|
-
minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)
|
|
296
|
-
) {
|
|
297
|
-
// Allow any given request to bump our agent active socket timeout.
|
|
298
|
-
// This may seem strange, but leaking active sockets should be rare and not particularly problematic,
|
|
299
|
-
// and without mutating agent we would need to create more of them.
|
|
300
|
-
// This tradeoff optimizes for performance.
|
|
301
|
-
(httpAgent as any).options.timeout = minAgentTimeout;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (this.idempotencyHeader && method !== 'get') {
|
|
305
|
-
if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
|
|
306
|
-
headers[this.idempotencyHeader] = options.idempotencyKey;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
const reqHeaders = this.buildHeaders({ options, headers, contentLength });
|
|
310
|
-
|
|
311
|
-
const req: RequestInit = {
|
|
312
|
-
method,
|
|
313
|
-
...(body && { body: body as any }),
|
|
314
|
-
headers: reqHeaders,
|
|
315
|
-
...(httpAgent && { agent: httpAgent }),
|
|
316
|
-
// @ts-ignore node-fetch uses a custom AbortSignal type that is
|
|
317
|
-
// not compatible with standard web types
|
|
318
|
-
signal: options.signal ?? null,
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
return { req, url, timeout };
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
private buildHeaders({
|
|
325
|
-
options,
|
|
326
|
-
headers,
|
|
327
|
-
contentLength,
|
|
328
|
-
}: {
|
|
329
|
-
options: FinalRequestOptions;
|
|
330
|
-
headers: Record<string, string | null | undefined>;
|
|
331
|
-
contentLength: string | null | undefined;
|
|
332
|
-
}): Record<string, string> {
|
|
333
|
-
const reqHeaders: Record<string, string> = {};
|
|
334
|
-
if (contentLength) {
|
|
335
|
-
reqHeaders['content-length'] = contentLength;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
const defaultHeaders = this.defaultHeaders(options);
|
|
339
|
-
applyHeadersMut(reqHeaders, defaultHeaders);
|
|
340
|
-
applyHeadersMut(reqHeaders, headers);
|
|
341
|
-
|
|
342
|
-
// let builtin fetch set the Content-Type for multipart bodies
|
|
343
|
-
if (isMultipartBody(options.body) && shimsKind !== 'node') {
|
|
344
|
-
delete reqHeaders['content-type'];
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
this.validateHeaders(reqHeaders, headers);
|
|
348
|
-
|
|
349
|
-
return reqHeaders;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
354
|
-
*/
|
|
355
|
-
protected async prepareOptions(options: FinalRequestOptions): Promise<void> {}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Used as a callback for mutating the given `RequestInit` object.
|
|
359
|
-
*
|
|
360
|
-
* This is useful for cases where you want to add certain headers based off of
|
|
361
|
-
* the request properties, e.g. `method` or `url`.
|
|
362
|
-
*/
|
|
363
|
-
protected async prepareRequest(
|
|
364
|
-
request: RequestInit,
|
|
365
|
-
{ url, options }: { url: string; options: FinalRequestOptions },
|
|
366
|
-
): Promise<void> {}
|
|
367
|
-
|
|
368
|
-
protected parseHeaders(headers: HeadersInit | null | undefined): Record<string, string> {
|
|
369
|
-
return (
|
|
370
|
-
!headers ? {}
|
|
371
|
-
: Symbol.iterator in headers ?
|
|
372
|
-
Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
|
|
373
|
-
: { ...headers }
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
protected makeStatusError(
|
|
378
|
-
status: number | undefined,
|
|
379
|
-
error: Object | undefined,
|
|
380
|
-
message: string | undefined,
|
|
381
|
-
headers: Headers | undefined,
|
|
382
|
-
) {
|
|
383
|
-
return APIError.generate(status, error, message, headers);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
request<Req, Rsp>(
|
|
387
|
-
options: PromiseOrValue<FinalRequestOptions<Req>>,
|
|
388
|
-
remainingRetries: number | null = null,
|
|
389
|
-
): APIPromise<Rsp> {
|
|
390
|
-
return new APIPromise(this.makeRequest(options, remainingRetries));
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
private async makeRequest<Req>(
|
|
394
|
-
optionsInput: PromiseOrValue<FinalRequestOptions<Req>>,
|
|
395
|
-
retriesRemaining: number | null,
|
|
396
|
-
): Promise<APIResponseProps> {
|
|
397
|
-
const options = await optionsInput;
|
|
398
|
-
if (retriesRemaining == null) {
|
|
399
|
-
retriesRemaining = options.maxRetries ?? this.maxRetries;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
await this.prepareOptions(options);
|
|
403
|
-
|
|
404
|
-
const { req, url, timeout } = this.buildRequest(options);
|
|
405
|
-
|
|
406
|
-
await this.prepareRequest(req, { url, options });
|
|
407
|
-
|
|
408
|
-
debug('request', url, options, req.headers);
|
|
409
|
-
|
|
410
|
-
if (options.signal?.aborted) {
|
|
411
|
-
throw new APIUserAbortError();
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
const controller = new AbortController();
|
|
415
|
-
const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
|
|
416
|
-
|
|
417
|
-
if (response instanceof Error) {
|
|
418
|
-
if (options.signal?.aborted) {
|
|
419
|
-
throw new APIUserAbortError();
|
|
420
|
-
}
|
|
421
|
-
if (retriesRemaining) {
|
|
422
|
-
return this.retryRequest(options, retriesRemaining);
|
|
423
|
-
}
|
|
424
|
-
if (response.name === 'AbortError') {
|
|
425
|
-
throw new APIConnectionTimeoutError();
|
|
426
|
-
}
|
|
427
|
-
throw new APIConnectionError({ cause: response });
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
const responseHeaders = createResponseHeaders(response.headers);
|
|
431
|
-
|
|
432
|
-
if (!response.ok) {
|
|
433
|
-
if (retriesRemaining && this.shouldRetry(response)) {
|
|
434
|
-
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
|
|
435
|
-
debug(`response (error; ${retryMessage})`, response.status, url, responseHeaders);
|
|
436
|
-
return this.retryRequest(options, retriesRemaining, responseHeaders);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
const errText = await response.text().catch((e) => castToError(e).message);
|
|
440
|
-
const errJSON = safeJSON(errText);
|
|
441
|
-
const errMessage = errJSON ? undefined : errText;
|
|
442
|
-
const retryMessage = retriesRemaining ? `(error; no more retries left)` : `(error; not retryable)`;
|
|
443
|
-
|
|
444
|
-
debug(`response (error; ${retryMessage})`, response.status, url, responseHeaders, errMessage);
|
|
445
|
-
|
|
446
|
-
const err = this.makeStatusError(response.status, errJSON, errMessage, responseHeaders);
|
|
447
|
-
throw err;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
return { response, options, controller };
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
requestAPIList<Item = unknown, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
454
|
-
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
455
|
-
options: FinalRequestOptions,
|
|
456
|
-
): PagePromise<PageClass, Item> {
|
|
457
|
-
const request = this.makeRequest(options, null);
|
|
458
|
-
return new PagePromise<PageClass, Item>(this, request, Page);
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
buildURL<Req>(path: string, query: Req | null | undefined): string {
|
|
462
|
-
const url =
|
|
463
|
-
isAbsoluteURL(path) ?
|
|
464
|
-
new URL(path)
|
|
465
|
-
: new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
466
|
-
|
|
467
|
-
const defaultQuery = this.defaultQuery();
|
|
468
|
-
if (!isEmptyObj(defaultQuery)) {
|
|
469
|
-
query = { ...defaultQuery, ...query } as Req;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
473
|
-
url.search = this.stringifyQuery(query as Record<string, unknown>);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
return url.toString();
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
480
|
-
return Object.entries(query)
|
|
481
|
-
.filter(([_, value]) => typeof value !== 'undefined')
|
|
482
|
-
.map(([key, value]) => {
|
|
483
|
-
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
484
|
-
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
485
|
-
}
|
|
486
|
-
if (value === null) {
|
|
487
|
-
return `${encodeURIComponent(key)}=`;
|
|
488
|
-
}
|
|
489
|
-
throw new IntercomError(
|
|
490
|
-
`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
|
|
491
|
-
);
|
|
492
|
-
})
|
|
493
|
-
.join('&');
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
async fetchWithTimeout(
|
|
497
|
-
url: RequestInfo,
|
|
498
|
-
init: RequestInit | undefined,
|
|
499
|
-
ms: number,
|
|
500
|
-
controller: AbortController,
|
|
501
|
-
): Promise<Response> {
|
|
502
|
-
const { signal, ...options } = init || {};
|
|
503
|
-
if (signal) signal.addEventListener('abort', () => controller.abort());
|
|
504
|
-
|
|
505
|
-
const timeout = setTimeout(() => controller.abort(), ms);
|
|
506
|
-
|
|
507
|
-
return (
|
|
508
|
-
this.getRequestClient()
|
|
509
|
-
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
|
|
510
|
-
.fetch.call(undefined, url, { signal: controller.signal as any, ...options })
|
|
511
|
-
.finally(() => {
|
|
512
|
-
clearTimeout(timeout);
|
|
513
|
-
})
|
|
514
|
-
);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
protected getRequestClient(): RequestClient {
|
|
518
|
-
return { fetch: this.fetch };
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
private shouldRetry(response: Response): boolean {
|
|
522
|
-
// Note this is not a standard header.
|
|
523
|
-
const shouldRetryHeader = response.headers.get('x-should-retry');
|
|
524
|
-
|
|
525
|
-
// If the server explicitly says whether or not to retry, obey.
|
|
526
|
-
if (shouldRetryHeader === 'true') return true;
|
|
527
|
-
if (shouldRetryHeader === 'false') return false;
|
|
528
|
-
|
|
529
|
-
// Retry on request timeouts.
|
|
530
|
-
if (response.status === 408) return true;
|
|
531
|
-
|
|
532
|
-
// Retry on lock timeouts.
|
|
533
|
-
if (response.status === 409) return true;
|
|
534
|
-
|
|
535
|
-
// Retry on rate limits.
|
|
536
|
-
if (response.status === 429) return true;
|
|
537
|
-
|
|
538
|
-
// Retry internal errors.
|
|
539
|
-
if (response.status >= 500) return true;
|
|
540
|
-
|
|
541
|
-
return false;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
private async retryRequest(
|
|
545
|
-
options: FinalRequestOptions,
|
|
546
|
-
retriesRemaining: number,
|
|
547
|
-
responseHeaders?: Headers | undefined,
|
|
548
|
-
): Promise<APIResponseProps> {
|
|
549
|
-
let timeoutMillis: number | undefined;
|
|
550
|
-
|
|
551
|
-
// Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it.
|
|
552
|
-
const retryAfterMillisHeader = responseHeaders?.['retry-after-ms'];
|
|
553
|
-
if (retryAfterMillisHeader) {
|
|
554
|
-
const timeoutMs = parseFloat(retryAfterMillisHeader);
|
|
555
|
-
if (!Number.isNaN(timeoutMs)) {
|
|
556
|
-
timeoutMillis = timeoutMs;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
// About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
|
|
561
|
-
const retryAfterHeader = responseHeaders?.['retry-after'];
|
|
562
|
-
if (retryAfterHeader && !timeoutMillis) {
|
|
563
|
-
const timeoutSeconds = parseFloat(retryAfterHeader);
|
|
564
|
-
if (!Number.isNaN(timeoutSeconds)) {
|
|
565
|
-
timeoutMillis = timeoutSeconds * 1000;
|
|
566
|
-
} else {
|
|
567
|
-
timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
// If the API asks us to wait a certain amount of time (and it's a reasonable amount),
|
|
572
|
-
// just do what it says, but otherwise calculate a default
|
|
573
|
-
if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
|
|
574
|
-
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
575
|
-
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
576
|
-
}
|
|
577
|
-
await sleep(timeoutMillis);
|
|
578
|
-
|
|
579
|
-
return this.makeRequest(options, retriesRemaining - 1);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
private calculateDefaultRetryTimeoutMillis(retriesRemaining: number, maxRetries: number): number {
|
|
583
|
-
const initialRetryDelay = 0.5;
|
|
584
|
-
const maxRetryDelay = 8.0;
|
|
585
|
-
|
|
586
|
-
const numRetries = maxRetries - retriesRemaining;
|
|
587
|
-
|
|
588
|
-
// Apply exponential backoff, but not more than the max.
|
|
589
|
-
const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay);
|
|
590
|
-
|
|
591
|
-
// Apply some jitter, take up to at most 25 percent of the retry time.
|
|
592
|
-
const jitter = 1 - Math.random() * 0.25;
|
|
593
|
-
|
|
594
|
-
return sleepSeconds * jitter * 1000;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
private getUserAgent(): string {
|
|
598
|
-
return `${this.constructor.name}/JS ${VERSION}`;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
export type PageInfo = { url: URL } | { params: Record<string, unknown> | null };
|
|
603
|
-
|
|
604
|
-
export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
|
|
605
|
-
#client: APIClient;
|
|
606
|
-
protected options: FinalRequestOptions;
|
|
607
|
-
|
|
608
|
-
protected response: Response;
|
|
609
|
-
protected body: unknown;
|
|
610
|
-
|
|
611
|
-
constructor(client: APIClient, response: Response, body: unknown, options: FinalRequestOptions) {
|
|
612
|
-
this.#client = client;
|
|
613
|
-
this.options = options;
|
|
614
|
-
this.response = response;
|
|
615
|
-
this.body = body;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* @deprecated Use nextPageInfo instead
|
|
620
|
-
*/
|
|
621
|
-
abstract nextPageParams(): Partial<Record<string, unknown>> | null;
|
|
622
|
-
abstract nextPageInfo(): PageInfo | null;
|
|
623
|
-
|
|
624
|
-
abstract getPaginatedItems(): Item[];
|
|
625
|
-
|
|
626
|
-
hasNextPage(): boolean {
|
|
627
|
-
const items = this.getPaginatedItems();
|
|
628
|
-
if (!items.length) return false;
|
|
629
|
-
return this.nextPageInfo() != null;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
async getNextPage(): Promise<this> {
|
|
633
|
-
const nextInfo = this.nextPageInfo();
|
|
634
|
-
if (!nextInfo) {
|
|
635
|
-
throw new IntercomError(
|
|
636
|
-
'No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.',
|
|
637
|
-
);
|
|
638
|
-
}
|
|
639
|
-
const nextOptions = { ...this.options };
|
|
640
|
-
if ('params' in nextInfo && typeof nextOptions.query === 'object') {
|
|
641
|
-
nextOptions.query = { ...nextOptions.query, ...nextInfo.params };
|
|
642
|
-
} else if ('url' in nextInfo) {
|
|
643
|
-
const params = [...Object.entries(nextOptions.query || {}), ...nextInfo.url.searchParams.entries()];
|
|
644
|
-
for (const [key, value] of params) {
|
|
645
|
-
nextInfo.url.searchParams.set(key, value as any);
|
|
646
|
-
}
|
|
647
|
-
nextOptions.query = undefined;
|
|
648
|
-
nextOptions.path = nextInfo.url.toString();
|
|
649
|
-
}
|
|
650
|
-
return await this.#client.requestAPIList(this.constructor as any, nextOptions);
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
async *iterPages() {
|
|
654
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
655
|
-
let page: AbstractPage<Item> = this;
|
|
656
|
-
yield page;
|
|
657
|
-
while (page.hasNextPage()) {
|
|
658
|
-
page = await page.getNextPage();
|
|
659
|
-
yield page;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
async *[Symbol.asyncIterator]() {
|
|
664
|
-
for await (const page of this.iterPages()) {
|
|
665
|
-
for (const item of page.getPaginatedItems()) {
|
|
666
|
-
yield item;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* This subclass of Promise will resolve to an instantiated Page once the request completes.
|
|
674
|
-
*
|
|
675
|
-
* It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg:
|
|
676
|
-
*
|
|
677
|
-
* for await (const item of client.items.list()) {
|
|
678
|
-
* console.log(item)
|
|
679
|
-
* }
|
|
680
|
-
*/
|
|
681
|
-
export class PagePromise<
|
|
682
|
-
PageClass extends AbstractPage<Item>,
|
|
683
|
-
Item = ReturnType<PageClass['getPaginatedItems']>[number],
|
|
684
|
-
>
|
|
685
|
-
extends APIPromise<PageClass>
|
|
686
|
-
implements AsyncIterable<Item>
|
|
687
|
-
{
|
|
688
|
-
constructor(
|
|
689
|
-
client: APIClient,
|
|
690
|
-
request: Promise<APIResponseProps>,
|
|
691
|
-
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
692
|
-
) {
|
|
693
|
-
super(
|
|
694
|
-
request,
|
|
695
|
-
async (props) => new Page(client, props.response, await defaultParseResponse(props), props.options),
|
|
696
|
-
);
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* Allow auto-paginating iteration on an unawaited list call, eg:
|
|
701
|
-
*
|
|
702
|
-
* for await (const item of client.items.list()) {
|
|
703
|
-
* console.log(item)
|
|
704
|
-
* }
|
|
705
|
-
*/
|
|
706
|
-
async *[Symbol.asyncIterator]() {
|
|
707
|
-
const page = await this;
|
|
708
|
-
for await (const item of page) {
|
|
709
|
-
yield item;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
export const createResponseHeaders = (
|
|
715
|
-
headers: Awaited<ReturnType<Fetch>>['headers'],
|
|
716
|
-
): Record<string, string> => {
|
|
717
|
-
return new Proxy(
|
|
718
|
-
Object.fromEntries(
|
|
719
|
-
// @ts-ignore
|
|
720
|
-
headers.entries(),
|
|
721
|
-
),
|
|
722
|
-
{
|
|
723
|
-
get(target, name) {
|
|
724
|
-
const key = name.toString();
|
|
725
|
-
return target[key.toLowerCase()] || target[key];
|
|
726
|
-
},
|
|
727
|
-
},
|
|
728
|
-
);
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
732
|
-
|
|
733
|
-
export type RequestClient = { fetch: Fetch };
|
|
734
|
-
export type Headers = Record<string, string | null | undefined>;
|
|
735
|
-
export type DefaultQuery = Record<string, string | undefined>;
|
|
736
|
-
export type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
|
737
|
-
|
|
738
|
-
export type RequestOptions<
|
|
739
|
-
Req = unknown | Record<string, unknown> | Readable | BlobLike | ArrayBufferView | ArrayBuffer,
|
|
740
|
-
> = {
|
|
741
|
-
method?: HTTPMethod;
|
|
742
|
-
path?: string;
|
|
743
|
-
query?: Req | undefined;
|
|
744
|
-
body?: Req | null | undefined;
|
|
745
|
-
headers?: Headers | undefined;
|
|
746
|
-
|
|
747
|
-
maxRetries?: number;
|
|
748
|
-
stream?: boolean | undefined;
|
|
749
|
-
timeout?: number;
|
|
750
|
-
httpAgent?: Agent;
|
|
751
|
-
signal?: AbortSignal | undefined | null;
|
|
752
|
-
idempotencyKey?: string;
|
|
753
|
-
|
|
754
|
-
__binaryRequest?: boolean | undefined;
|
|
755
|
-
__binaryResponse?: boolean | undefined;
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
// This is required so that we can determine if a given object matches the RequestOptions
|
|
759
|
-
// type at runtime. While this requires duplication, it is enforced by the TypeScript
|
|
760
|
-
// compiler such that any missing / extraneous keys will cause an error.
|
|
761
|
-
const requestOptionsKeys: KeysEnum<RequestOptions> = {
|
|
762
|
-
method: true,
|
|
763
|
-
path: true,
|
|
764
|
-
query: true,
|
|
765
|
-
body: true,
|
|
766
|
-
headers: true,
|
|
767
|
-
|
|
768
|
-
maxRetries: true,
|
|
769
|
-
stream: true,
|
|
770
|
-
timeout: true,
|
|
771
|
-
httpAgent: true,
|
|
772
|
-
signal: true,
|
|
773
|
-
idempotencyKey: true,
|
|
774
|
-
|
|
775
|
-
__binaryRequest: true,
|
|
776
|
-
__binaryResponse: true,
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
export const isRequestOptions = (obj: unknown): obj is RequestOptions => {
|
|
780
|
-
return (
|
|
781
|
-
typeof obj === 'object' &&
|
|
782
|
-
obj !== null &&
|
|
783
|
-
!isEmptyObj(obj) &&
|
|
784
|
-
Object.keys(obj).every((k) => hasOwn(requestOptionsKeys, k))
|
|
785
|
-
);
|
|
786
|
-
};
|
|
787
|
-
|
|
788
|
-
export type FinalRequestOptions<Req = unknown | Record<string, unknown> | Readable | DataView> =
|
|
789
|
-
RequestOptions<Req> & {
|
|
790
|
-
method: HTTPMethod;
|
|
791
|
-
path: string;
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
declare const Deno: any;
|
|
795
|
-
declare const EdgeRuntime: any;
|
|
796
|
-
type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
|
|
797
|
-
type PlatformName =
|
|
798
|
-
| 'MacOS'
|
|
799
|
-
| 'Linux'
|
|
800
|
-
| 'Windows'
|
|
801
|
-
| 'FreeBSD'
|
|
802
|
-
| 'OpenBSD'
|
|
803
|
-
| 'iOS'
|
|
804
|
-
| 'Android'
|
|
805
|
-
| `Other:${string}`
|
|
806
|
-
| 'Unknown';
|
|
807
|
-
type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
|
|
808
|
-
type PlatformProperties = {
|
|
809
|
-
'X-Stainless-Lang': 'js';
|
|
810
|
-
'X-Stainless-Package-Version': string;
|
|
811
|
-
'X-Stainless-OS': PlatformName;
|
|
812
|
-
'X-Stainless-Arch': Arch;
|
|
813
|
-
'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
|
|
814
|
-
'X-Stainless-Runtime-Version': string;
|
|
815
|
-
};
|
|
816
|
-
const getPlatformProperties = (): PlatformProperties => {
|
|
817
|
-
if (typeof Deno !== 'undefined' && Deno.build != null) {
|
|
818
|
-
return {
|
|
819
|
-
'X-Stainless-Lang': 'js',
|
|
820
|
-
'X-Stainless-Package-Version': VERSION,
|
|
821
|
-
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
822
|
-
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
823
|
-
'X-Stainless-Runtime': 'deno',
|
|
824
|
-
'X-Stainless-Runtime-Version':
|
|
825
|
-
typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
829
|
-
return {
|
|
830
|
-
'X-Stainless-Lang': 'js',
|
|
831
|
-
'X-Stainless-Package-Version': VERSION,
|
|
832
|
-
'X-Stainless-OS': 'Unknown',
|
|
833
|
-
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
834
|
-
'X-Stainless-Runtime': 'edge',
|
|
835
|
-
'X-Stainless-Runtime-Version': process.version,
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
// Check if Node.js
|
|
839
|
-
if (Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]') {
|
|
840
|
-
return {
|
|
841
|
-
'X-Stainless-Lang': 'js',
|
|
842
|
-
'X-Stainless-Package-Version': VERSION,
|
|
843
|
-
'X-Stainless-OS': normalizePlatform(process.platform),
|
|
844
|
-
'X-Stainless-Arch': normalizeArch(process.arch),
|
|
845
|
-
'X-Stainless-Runtime': 'node',
|
|
846
|
-
'X-Stainless-Runtime-Version': process.version,
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
const browserInfo = getBrowserInfo();
|
|
851
|
-
if (browserInfo) {
|
|
852
|
-
return {
|
|
853
|
-
'X-Stainless-Lang': 'js',
|
|
854
|
-
'X-Stainless-Package-Version': VERSION,
|
|
855
|
-
'X-Stainless-OS': 'Unknown',
|
|
856
|
-
'X-Stainless-Arch': 'unknown',
|
|
857
|
-
'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
|
|
858
|
-
'X-Stainless-Runtime-Version': browserInfo.version,
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
// TODO add support for Cloudflare workers, etc.
|
|
863
|
-
return {
|
|
864
|
-
'X-Stainless-Lang': 'js',
|
|
865
|
-
'X-Stainless-Package-Version': VERSION,
|
|
866
|
-
'X-Stainless-OS': 'Unknown',
|
|
867
|
-
'X-Stainless-Arch': 'unknown',
|
|
868
|
-
'X-Stainless-Runtime': 'unknown',
|
|
869
|
-
'X-Stainless-Runtime-Version': 'unknown',
|
|
870
|
-
};
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
type BrowserInfo = {
|
|
874
|
-
browser: Browser;
|
|
875
|
-
version: string;
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
declare const navigator: { userAgent: string } | undefined;
|
|
879
|
-
|
|
880
|
-
// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
|
|
881
|
-
function getBrowserInfo(): BrowserInfo | null {
|
|
882
|
-
if (typeof navigator === 'undefined' || !navigator) {
|
|
883
|
-
return null;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
// NOTE: The order matters here!
|
|
887
|
-
const browserPatterns = [
|
|
888
|
-
{ key: 'edge' as const, pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
889
|
-
{ key: 'ie' as const, pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
890
|
-
{ key: 'ie' as const, pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
891
|
-
{ key: 'chrome' as const, pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
892
|
-
{ key: 'firefox' as const, pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
893
|
-
{ key: 'safari' as const, pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
|
|
894
|
-
];
|
|
895
|
-
|
|
896
|
-
// Find the FIRST matching browser
|
|
897
|
-
for (const { key, pattern } of browserPatterns) {
|
|
898
|
-
const match = pattern.exec(navigator.userAgent);
|
|
899
|
-
if (match) {
|
|
900
|
-
const major = match[1] || 0;
|
|
901
|
-
const minor = match[2] || 0;
|
|
902
|
-
const patch = match[3] || 0;
|
|
903
|
-
|
|
904
|
-
return { browser: key, version: `${major}.${minor}.${patch}` };
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
return null;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
const normalizeArch = (arch: string): Arch => {
|
|
912
|
-
// Node docs:
|
|
913
|
-
// - https://nodejs.org/api/process.html#processarch
|
|
914
|
-
// Deno docs:
|
|
915
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
916
|
-
if (arch === 'x32') return 'x32';
|
|
917
|
-
if (arch === 'x86_64' || arch === 'x64') return 'x64';
|
|
918
|
-
if (arch === 'arm') return 'arm';
|
|
919
|
-
if (arch === 'aarch64' || arch === 'arm64') return 'arm64';
|
|
920
|
-
if (arch) return `other:${arch}`;
|
|
921
|
-
return 'unknown';
|
|
922
|
-
};
|
|
923
|
-
|
|
924
|
-
const normalizePlatform = (platform: string): PlatformName => {
|
|
925
|
-
// Node platforms:
|
|
926
|
-
// - https://nodejs.org/api/process.html#processplatform
|
|
927
|
-
// Deno platforms:
|
|
928
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
929
|
-
// - https://github.com/denoland/deno/issues/14799
|
|
930
|
-
|
|
931
|
-
platform = platform.toLowerCase();
|
|
932
|
-
|
|
933
|
-
// NOTE: this iOS check is untested and may not work
|
|
934
|
-
// Node does not work natively on IOS, there is a fork at
|
|
935
|
-
// https://github.com/nodejs-mobile/nodejs-mobile
|
|
936
|
-
// however it is unknown at the time of writing how to detect if it is running
|
|
937
|
-
if (platform.includes('ios')) return 'iOS';
|
|
938
|
-
if (platform === 'android') return 'Android';
|
|
939
|
-
if (platform === 'darwin') return 'MacOS';
|
|
940
|
-
if (platform === 'win32') return 'Windows';
|
|
941
|
-
if (platform === 'freebsd') return 'FreeBSD';
|
|
942
|
-
if (platform === 'openbsd') return 'OpenBSD';
|
|
943
|
-
if (platform === 'linux') return 'Linux';
|
|
944
|
-
if (platform) return `Other:${platform}`;
|
|
945
|
-
return 'Unknown';
|
|
946
|
-
};
|
|
947
|
-
|
|
948
|
-
let _platformHeaders: PlatformProperties;
|
|
949
|
-
const getPlatformHeaders = () => {
|
|
950
|
-
return (_platformHeaders ??= getPlatformProperties());
|
|
951
|
-
};
|
|
952
|
-
|
|
953
|
-
export const safeJSON = (text: string) => {
|
|
954
|
-
try {
|
|
955
|
-
return JSON.parse(text);
|
|
956
|
-
} catch (err) {
|
|
957
|
-
return undefined;
|
|
958
|
-
}
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
// https://stackoverflow.com/a/19709846
|
|
962
|
-
const startsWithSchemeRegexp = new RegExp('^(?:[a-z]+:)?//', 'i');
|
|
963
|
-
const isAbsoluteURL = (url: string): boolean => {
|
|
964
|
-
return startsWithSchemeRegexp.test(url);
|
|
965
|
-
};
|
|
966
|
-
|
|
967
|
-
export const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
968
|
-
|
|
969
|
-
const validatePositiveInteger = (name: string, n: unknown): number => {
|
|
970
|
-
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
971
|
-
throw new IntercomError(`${name} must be an integer`);
|
|
972
|
-
}
|
|
973
|
-
if (n < 0) {
|
|
974
|
-
throw new IntercomError(`${name} must be a positive integer`);
|
|
975
|
-
}
|
|
976
|
-
return n;
|
|
977
|
-
};
|
|
978
|
-
|
|
979
|
-
export const castToError = (err: any): Error => {
|
|
980
|
-
if (err instanceof Error) return err;
|
|
981
|
-
return new Error(err);
|
|
982
|
-
};
|
|
983
|
-
|
|
984
|
-
export const ensurePresent = <T>(value: T | null | undefined): T => {
|
|
985
|
-
if (value == null) throw new IntercomError(`Expected a value to be given but received ${value} instead.`);
|
|
986
|
-
return value;
|
|
987
|
-
};
|
|
988
|
-
|
|
989
|
-
/**
|
|
990
|
-
* Read an environment variable.
|
|
991
|
-
*
|
|
992
|
-
* Trims beginning and trailing whitespace.
|
|
993
|
-
*
|
|
994
|
-
* Will return undefined if the environment variable doesn't exist or cannot be accessed.
|
|
995
|
-
*/
|
|
996
|
-
export const readEnv = (env: string): string | undefined => {
|
|
997
|
-
if (typeof process !== 'undefined') {
|
|
998
|
-
return process.env?.[env]?.trim() ?? undefined;
|
|
999
|
-
}
|
|
1000
|
-
if (typeof Deno !== 'undefined') {
|
|
1001
|
-
return Deno.env?.get?.(env)?.trim();
|
|
1002
|
-
}
|
|
1003
|
-
return undefined;
|
|
1004
|
-
};
|
|
1005
|
-
|
|
1006
|
-
export const coerceInteger = (value: unknown): number => {
|
|
1007
|
-
if (typeof value === 'number') return Math.round(value);
|
|
1008
|
-
if (typeof value === 'string') return parseInt(value, 10);
|
|
1009
|
-
|
|
1010
|
-
throw new IntercomError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
export const coerceFloat = (value: unknown): number => {
|
|
1014
|
-
if (typeof value === 'number') return value;
|
|
1015
|
-
if (typeof value === 'string') return parseFloat(value);
|
|
1016
|
-
|
|
1017
|
-
throw new IntercomError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
1018
|
-
};
|
|
1019
|
-
|
|
1020
|
-
export const coerceBoolean = (value: unknown): boolean => {
|
|
1021
|
-
if (typeof value === 'boolean') return value;
|
|
1022
|
-
if (typeof value === 'string') return value === 'true';
|
|
1023
|
-
return Boolean(value);
|
|
1024
|
-
};
|
|
1025
|
-
|
|
1026
|
-
export const maybeCoerceInteger = (value: unknown): number | undefined => {
|
|
1027
|
-
if (value === undefined) {
|
|
1028
|
-
return undefined;
|
|
1029
|
-
}
|
|
1030
|
-
return coerceInteger(value);
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
export const maybeCoerceFloat = (value: unknown): number | undefined => {
|
|
1034
|
-
if (value === undefined) {
|
|
1035
|
-
return undefined;
|
|
1036
|
-
}
|
|
1037
|
-
return coerceFloat(value);
|
|
1038
|
-
};
|
|
1039
|
-
|
|
1040
|
-
export const maybeCoerceBoolean = (value: unknown): boolean | undefined => {
|
|
1041
|
-
if (value === undefined) {
|
|
1042
|
-
return undefined;
|
|
1043
|
-
}
|
|
1044
|
-
return coerceBoolean(value);
|
|
1045
|
-
};
|
|
1046
|
-
|
|
1047
|
-
// https://stackoverflow.com/a/34491287
|
|
1048
|
-
export function isEmptyObj(obj: Object | null | undefined): boolean {
|
|
1049
|
-
if (!obj) return true;
|
|
1050
|
-
for (const _k in obj) return false;
|
|
1051
|
-
return true;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
1055
|
-
export function hasOwn(obj: Object, key: string): boolean {
|
|
1056
|
-
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* Copies headers from "newHeaders" onto "targetHeaders",
|
|
1061
|
-
* using lower-case for all properties,
|
|
1062
|
-
* ignoring any keys with undefined values,
|
|
1063
|
-
* and deleting any keys with null values.
|
|
1064
|
-
*/
|
|
1065
|
-
function applyHeadersMut(targetHeaders: Headers, newHeaders: Headers): void {
|
|
1066
|
-
for (const k in newHeaders) {
|
|
1067
|
-
if (!hasOwn(newHeaders, k)) continue;
|
|
1068
|
-
const lowerKey = k.toLowerCase();
|
|
1069
|
-
if (!lowerKey) continue;
|
|
1070
|
-
|
|
1071
|
-
const val = newHeaders[k];
|
|
1072
|
-
|
|
1073
|
-
if (val === null) {
|
|
1074
|
-
delete targetHeaders[lowerKey];
|
|
1075
|
-
} else if (val !== undefined) {
|
|
1076
|
-
targetHeaders[lowerKey] = val;
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
export function debug(action: string, ...args: any[]) {
|
|
1082
|
-
if (typeof process !== 'undefined' && process?.env?.['DEBUG'] === 'true') {
|
|
1083
|
-
console.log(`Intercom:DEBUG:${action}`, ...args);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
/**
|
|
1088
|
-
* https://stackoverflow.com/a/2117523
|
|
1089
|
-
*/
|
|
1090
|
-
const uuid4 = () => {
|
|
1091
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
1092
|
-
const r = (Math.random() * 16) | 0;
|
|
1093
|
-
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
1094
|
-
return v.toString(16);
|
|
1095
|
-
});
|
|
1096
|
-
};
|
|
1097
|
-
|
|
1098
|
-
export const isRunningInBrowser = () => {
|
|
1099
|
-
return (
|
|
1100
|
-
// @ts-ignore
|
|
1101
|
-
typeof window !== 'undefined' &&
|
|
1102
|
-
// @ts-ignore
|
|
1103
|
-
typeof window.document !== 'undefined' &&
|
|
1104
|
-
// @ts-ignore
|
|
1105
|
-
typeof navigator !== 'undefined'
|
|
1106
|
-
);
|
|
1107
|
-
};
|
|
1108
|
-
|
|
1109
|
-
export interface HeadersProtocol {
|
|
1110
|
-
get: (header: string) => string | null | undefined;
|
|
1111
|
-
}
|
|
1112
|
-
export type HeadersLike = Record<string, string | string[] | undefined> | HeadersProtocol;
|
|
1113
|
-
|
|
1114
|
-
export const isHeadersProtocol = (headers: any): headers is HeadersProtocol => {
|
|
1115
|
-
return typeof headers?.get === 'function';
|
|
1116
|
-
};
|
|
1117
|
-
|
|
1118
|
-
export const getRequiredHeader = (headers: HeadersLike, header: string): string => {
|
|
1119
|
-
const lowerCasedHeader = header.toLowerCase();
|
|
1120
|
-
if (isHeadersProtocol(headers)) {
|
|
1121
|
-
// to deal with the case where the header looks like Stainless-Event-Id
|
|
1122
|
-
const intercapsHeader =
|
|
1123
|
-
header[0]?.toUpperCase() +
|
|
1124
|
-
header.substring(1).replace(/([^\w])(\w)/g, (_m, g1, g2) => g1 + g2.toUpperCase());
|
|
1125
|
-
for (const key of [header, lowerCasedHeader, header.toUpperCase(), intercapsHeader]) {
|
|
1126
|
-
const value = headers.get(key);
|
|
1127
|
-
if (value) {
|
|
1128
|
-
return value;
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
for (const [key, value] of Object.entries(headers)) {
|
|
1134
|
-
if (key.toLowerCase() === lowerCasedHeader) {
|
|
1135
|
-
if (Array.isArray(value)) {
|
|
1136
|
-
if (value.length <= 1) return value[0];
|
|
1137
|
-
console.warn(`Received ${value.length} entries for the ${header} header, using the first entry.`);
|
|
1138
|
-
return value[0];
|
|
1139
|
-
}
|
|
1140
|
-
return value;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
throw new Error(`Could not find ${header} header`);
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
/**
|
|
1148
|
-
* Encodes a string to Base64 format.
|
|
1149
|
-
*/
|
|
1150
|
-
export const toBase64 = (str: string | null | undefined): string => {
|
|
1151
|
-
if (!str) return '';
|
|
1152
|
-
if (typeof Buffer !== 'undefined') {
|
|
1153
|
-
return Buffer.from(str).toString('base64');
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
if (typeof btoa !== 'undefined') {
|
|
1157
|
-
return btoa(str);
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
throw new IntercomError('Cannot generate b64 string; Expected `Buffer` or `btoa` to be defined');
|
|
1161
|
-
};
|
|
1162
|
-
|
|
1163
|
-
export function isObj(obj: unknown): obj is Record<string, unknown> {
|
|
1164
|
-
return obj != null && typeof obj === 'object' && !Array.isArray(obj);
|
|
1165
|
-
}
|