intercom-client 6.1.1 → 6.3.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/Client.d.ts +5 -0
- package/Client.js +7 -2
- package/README.md +18 -30
- package/api/errors/BadRequestError.js +17 -7
- package/api/errors/ForbiddenError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnauthorizedError.js +17 -7
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/resources/admins/client/Client.d.ts +2 -0
- package/api/resources/admins/client/Client.js +34 -24
- package/api/resources/aiAgent/types/AiAgent.js +1 -1
- package/api/resources/aiContentSource/types/ContentSource.d.ts +1 -14
- package/api/resources/aiContentSource/types/ContentSource.js +0 -11
- package/api/resources/articles/client/Client.d.ts +2 -0
- package/api/resources/articles/client/Client.js +41 -31
- package/api/resources/articles/client/requests/CreateArticleRequest.js +1 -1
- package/api/resources/articles/client/requests/UpdateArticleRequest.js +1 -1
- package/api/resources/articles/types/ArticleListItem.js +1 -1
- package/api/resources/articles/types/ArticleSearchHighlights.js +1 -1
- package/api/resources/companies/client/Client.d.ts +3 -1
- package/api/resources/companies/client/Client.js +60 -50
- package/api/resources/companies/types/CompaniesRetrieveResponse.d.ts +13 -0
- package/api/resources/companies/types/CompaniesRetrieveResponse.js +5 -0
- package/api/resources/companies/types/Company.d.ts +0 -2
- package/api/resources/companies/types/index.d.ts +1 -0
- package/api/resources/companies/types/index.js +1 -0
- package/api/resources/contacts/client/Client.d.ts +2 -0
- package/api/resources/contacts/client/Client.js +66 -56
- package/api/resources/conversations/client/Client.d.ts +2 -0
- package/api/resources/conversations/client/Client.js +57 -47
- package/api/resources/conversations/client/requests/CreateConversationRequest.js +1 -1
- package/api/resources/conversations/types/Conversation.js +1 -1
- package/api/resources/conversations/types/ConversationsManageRequestBody.d.ts +1 -1
- package/api/resources/customChannelEvents/client/Client.d.ts +61 -0
- package/api/resources/customChannelEvents/client/Client.js +245 -0
- package/api/resources/customChannelEvents/client/index.d.ts +1 -0
- package/api/resources/customChannelEvents/client/index.js +2 -0
- package/api/resources/customChannelEvents/index.d.ts +1 -0
- package/api/resources/customChannelEvents/index.js +17 -0
- package/api/resources/dataAttributes/client/Client.d.ts +2 -0
- package/api/resources/dataAttributes/client/Client.js +30 -20
- package/api/resources/dataAttributes/client/requests/CreateDataAttributeRequest.js +1 -1
- package/api/resources/dataAttributes/types/DataAttribute.js +1 -1
- package/api/resources/dataAttributes/types/DataAttributesListRequestModel.d.ts +1 -1
- package/api/resources/dataExport/client/Client.d.ts +2 -0
- package/api/resources/dataExport/client/Client.js +31 -21
- package/api/resources/dataExport/types/DataExport.js +1 -1
- package/api/resources/events/client/Client.d.ts +2 -0
- package/api/resources/events/client/Client.js +30 -20
- package/api/resources/helpCenters/client/Client.d.ts +2 -0
- package/api/resources/helpCenters/client/Client.js +27 -17
- package/api/resources/helpCenters/resources/collections/client/Client.d.ts +2 -0
- package/api/resources/helpCenters/resources/collections/client/Client.js +36 -26
- package/api/resources/helpCenters/resources/index.js +17 -7
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +19 -8
- package/api/resources/messages/client/Client.d.ts +2 -0
- package/api/resources/messages/client/Client.js +22 -12
- package/api/resources/messages/types/Message.js +1 -1
- package/api/resources/news/client/Client.d.ts +2 -12
- package/api/resources/news/resources/feeds/client/Client.d.ts +2 -0
- package/api/resources/news/resources/feeds/client/Client.js +28 -18
- package/api/resources/news/resources/index.js +17 -7
- package/api/resources/news/resources/items/client/Client.d.ts +2 -0
- package/api/resources/news/resources/items/client/Client.js +34 -24
- package/api/resources/news/types/NewsItem.js +1 -1
- package/api/resources/notes/client/Client.d.ts +2 -0
- package/api/resources/notes/client/Client.js +28 -18
- package/api/resources/phoneCallRedirects/client/Client.d.ts +2 -0
- package/api/resources/phoneCallRedirects/client/Client.js +22 -12
- package/api/resources/segments/client/Client.d.ts +2 -0
- package/api/resources/segments/client/Client.js +27 -17
- package/api/resources/segments/types/Segment.js +1 -1
- package/api/resources/subscriptionTypes/client/Client.d.ts +2 -0
- package/api/resources/subscriptionTypes/client/Client.js +22 -12
- package/api/resources/subscriptionTypes/types/SubscriptionType.js +1 -1
- package/api/resources/tags/client/Client.d.ts +2 -0
- package/api/resources/tags/client/Client.js +49 -39
- package/api/resources/tags/types/TagsCreateRequestBody.d.ts +1 -1
- package/api/resources/teams/client/Client.d.ts +2 -0
- package/api/resources/teams/client/Client.js +25 -15
- package/api/resources/ticketTypes/client/Client.d.ts +2 -0
- package/api/resources/ticketTypes/client/Client.js +31 -21
- package/api/resources/ticketTypes/client/requests/CreateTicketTypeRequest.js +1 -1
- package/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.js +1 -1
- package/api/resources/ticketTypes/resources/attributes/client/Client.d.ts +2 -0
- package/api/resources/ticketTypes/resources/attributes/client/Client.js +25 -15
- package/api/resources/ticketTypes/resources/attributes/client/requests/CreateTicketTypeAttributeRequest.js +1 -1
- package/api/resources/ticketTypes/resources/index.js +17 -7
- package/api/resources/tickets/client/Client.d.ts +2 -0
- package/api/resources/tickets/client/Client.js +34 -24
- package/api/resources/tickets/client/requests/UpdateTicketRequest.js +1 -1
- package/api/resources/tickets/types/Ticket.js +1 -1
- package/api/resources/tickets/types/TicketPart.js +1 -1
- package/api/resources/tickets/types/TicketType.js +1 -1
- package/api/resources/tickets/types/TicketsReplyRequestBody.d.ts +1 -1
- package/api/resources/visitors/client/Client.d.ts +2 -0
- package/api/resources/visitors/client/Client.js +28 -18
- package/api/types/ActionComponent.d.ts +1 -1
- package/api/types/ActivityLog.js +1 -1
- package/api/types/AdminReplyConversationRequest.js +1 -1
- package/api/types/AdminReplyTicketRequest.js +1 -1
- package/api/types/ArticleContent.js +1 -1
- package/api/types/AssignConversationRequest.js +1 -1
- package/api/types/ButtonComponent.js +1 -1
- package/api/types/CheckboxComponent.js +1 -1
- package/api/types/CompanyList.d.ts +0 -2
- package/api/types/Component.d.ts +1 -1
- package/api/types/ConfigureRequest.d.ts +1 -1
- package/api/types/ConfigureResponse.d.ts +1 -1
- package/api/types/ContactReplyConversationRequest.d.ts +1 -1
- package/api/types/ContactReplyTicketRequest.d.ts +1 -1
- package/api/types/Context.js +1 -1
- package/api/types/ConversationSource.js +1 -1
- package/api/types/CreateContactRequest.d.ts +1 -1
- package/api/types/CreateDataEventRequest.d.ts +1 -1
- package/api/types/CreateMessageRequest.d.ts +1 -1
- package/api/types/CreateMessageRequest.js +1 -1
- package/api/types/CreateTicketReplyWithCommentRequest.d.ts +1 -1
- package/api/types/CustomAttributes.d.ts +1 -1
- package/api/types/CustomerRequest.d.ts +1 -1
- package/api/types/DropdownComponent.js +1 -1
- package/api/types/ImageComponent.js +1 -1
- package/api/types/InputComponent.js +1 -1
- package/api/types/LinkedObject.js +1 -1
- package/api/types/MultipleFilterSearchRequest.js +1 -1
- package/api/types/MultipleOrSingleFilterSearchRequest.d.ts +1 -1
- package/api/types/NewsItemRequest.js +1 -1
- package/api/types/RedactConversationRequest.d.ts +1 -1
- package/api/types/ReplyConversationRequest.d.ts +1 -1
- package/api/types/SingleFilterSearchRequest.js +1 -1
- package/api/types/SingleSelectComponent.js +1 -1
- package/api/types/SlaApplied.js +1 -1
- package/api/types/SpacerComponent.js +1 -1
- package/api/types/TextComponent.js +1 -1
- package/api/types/TicketCustomAttributes.d.ts +1 -5
- package/api/types/TicketPartAuthor.js +1 -1
- package/api/types/TicketReply.js +1 -1
- package/api/types/TicketRequestCustomAttributes.d.ts +1 -4
- package/api/types/TicketTypeAttribute.js +1 -1
- package/api/types/UpdateVisitorRequest.d.ts +1 -1
- package/api/version.d.ts +1 -1
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +6 -5
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +4 -5
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/pagination/Page.js +9 -6
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/utils/setObjectProperty.js +1 -2
- package/dist/Client.d.ts +5 -0
- package/dist/Client.js +7 -2
- package/dist/api/errors/BadRequestError.js +17 -7
- package/dist/api/errors/ForbiddenError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnauthorizedError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/resources/admins/client/Client.d.ts +2 -0
- package/dist/api/resources/admins/client/Client.js +34 -24
- package/dist/api/resources/aiAgent/types/AiAgent.js +1 -1
- package/dist/api/resources/aiContentSource/types/ContentSource.d.ts +1 -14
- package/dist/api/resources/aiContentSource/types/ContentSource.js +0 -11
- package/dist/api/resources/articles/client/Client.d.ts +2 -0
- package/dist/api/resources/articles/client/Client.js +41 -31
- package/dist/api/resources/articles/client/requests/CreateArticleRequest.js +1 -1
- package/dist/api/resources/articles/client/requests/UpdateArticleRequest.js +1 -1
- package/dist/api/resources/articles/types/ArticleListItem.js +1 -1
- package/dist/api/resources/articles/types/ArticleSearchHighlights.js +1 -1
- package/dist/api/resources/companies/client/Client.d.ts +3 -1
- package/dist/api/resources/companies/client/Client.js +60 -50
- package/dist/api/resources/companies/types/CompaniesRetrieveResponse.d.ts +13 -0
- package/dist/api/resources/companies/types/CompaniesRetrieveResponse.js +5 -0
- package/dist/api/resources/companies/types/Company.d.ts +0 -2
- package/dist/api/resources/companies/types/index.d.ts +1 -0
- package/dist/api/resources/companies/types/index.js +1 -0
- package/dist/api/resources/contacts/client/Client.d.ts +2 -0
- package/dist/api/resources/contacts/client/Client.js +66 -56
- package/dist/api/resources/conversations/client/Client.d.ts +2 -0
- package/dist/api/resources/conversations/client/Client.js +57 -47
- package/dist/api/resources/conversations/client/requests/CreateConversationRequest.js +1 -1
- package/dist/api/resources/conversations/types/Conversation.js +1 -1
- package/dist/api/resources/conversations/types/ConversationsManageRequestBody.d.ts +1 -1
- package/dist/api/resources/customChannelEvents/client/Client.d.ts +61 -0
- package/dist/api/resources/customChannelEvents/client/Client.js +245 -0
- package/dist/api/resources/customChannelEvents/client/index.d.ts +1 -0
- package/dist/api/resources/customChannelEvents/client/index.js +2 -0
- package/dist/api/resources/customChannelEvents/index.d.ts +1 -0
- package/dist/api/resources/customChannelEvents/index.js +17 -0
- package/dist/api/resources/dataAttributes/client/Client.d.ts +2 -0
- package/dist/api/resources/dataAttributes/client/Client.js +30 -20
- package/dist/api/resources/dataAttributes/client/requests/CreateDataAttributeRequest.js +1 -1
- package/dist/api/resources/dataAttributes/types/DataAttribute.js +1 -1
- package/dist/api/resources/dataAttributes/types/DataAttributesListRequestModel.d.ts +1 -1
- package/dist/api/resources/dataExport/client/Client.d.ts +2 -0
- package/dist/api/resources/dataExport/client/Client.js +31 -21
- package/dist/api/resources/dataExport/types/DataExport.js +1 -1
- package/dist/api/resources/events/client/Client.d.ts +2 -0
- package/dist/api/resources/events/client/Client.js +30 -20
- package/dist/api/resources/helpCenters/client/Client.d.ts +2 -0
- package/dist/api/resources/helpCenters/client/Client.js +27 -17
- package/dist/api/resources/helpCenters/resources/collections/client/Client.d.ts +2 -0
- package/dist/api/resources/helpCenters/resources/collections/client/Client.js +36 -26
- package/dist/api/resources/helpCenters/resources/index.js +17 -7
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +19 -8
- package/dist/api/resources/messages/client/Client.d.ts +2 -0
- package/dist/api/resources/messages/client/Client.js +22 -12
- package/dist/api/resources/messages/types/Message.js +1 -1
- package/dist/api/resources/news/client/Client.d.ts +2 -12
- package/dist/api/resources/news/resources/feeds/client/Client.d.ts +2 -0
- package/dist/api/resources/news/resources/feeds/client/Client.js +28 -18
- package/dist/api/resources/news/resources/index.js +17 -7
- package/dist/api/resources/news/resources/items/client/Client.d.ts +2 -0
- package/dist/api/resources/news/resources/items/client/Client.js +34 -24
- package/dist/api/resources/news/types/NewsItem.js +1 -1
- package/dist/api/resources/notes/client/Client.d.ts +2 -0
- package/dist/api/resources/notes/client/Client.js +28 -18
- package/dist/api/resources/phoneCallRedirects/client/Client.d.ts +2 -0
- package/dist/api/resources/phoneCallRedirects/client/Client.js +22 -12
- package/dist/api/resources/segments/client/Client.d.ts +2 -0
- package/dist/api/resources/segments/client/Client.js +27 -17
- package/dist/api/resources/segments/types/Segment.js +1 -1
- package/dist/api/resources/subscriptionTypes/client/Client.d.ts +2 -0
- package/dist/api/resources/subscriptionTypes/client/Client.js +22 -12
- package/dist/api/resources/subscriptionTypes/types/SubscriptionType.js +1 -1
- package/dist/api/resources/tags/client/Client.d.ts +2 -0
- package/dist/api/resources/tags/client/Client.js +49 -39
- package/dist/api/resources/tags/types/TagsCreateRequestBody.d.ts +1 -1
- package/dist/api/resources/teams/client/Client.d.ts +2 -0
- package/dist/api/resources/teams/client/Client.js +25 -15
- package/dist/api/resources/ticketTypes/client/Client.d.ts +2 -0
- package/dist/api/resources/ticketTypes/client/Client.js +31 -21
- package/dist/api/resources/ticketTypes/client/requests/CreateTicketTypeRequest.js +1 -1
- package/dist/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.js +1 -1
- package/dist/api/resources/ticketTypes/resources/attributes/client/Client.d.ts +2 -0
- package/dist/api/resources/ticketTypes/resources/attributes/client/Client.js +25 -15
- package/dist/api/resources/ticketTypes/resources/attributes/client/requests/CreateTicketTypeAttributeRequest.js +1 -1
- package/dist/api/resources/ticketTypes/resources/index.js +17 -7
- package/dist/api/resources/tickets/client/Client.d.ts +2 -0
- package/dist/api/resources/tickets/client/Client.js +34 -24
- package/dist/api/resources/tickets/client/requests/UpdateTicketRequest.js +1 -1
- package/dist/api/resources/tickets/types/Ticket.js +1 -1
- package/dist/api/resources/tickets/types/TicketPart.js +1 -1
- package/dist/api/resources/tickets/types/TicketType.js +1 -1
- package/dist/api/resources/tickets/types/TicketsReplyRequestBody.d.ts +1 -1
- package/dist/api/resources/visitors/client/Client.d.ts +2 -0
- package/dist/api/resources/visitors/client/Client.js +28 -18
- package/dist/api/types/ActionComponent.d.ts +1 -1
- package/dist/api/types/ActivityLog.js +1 -1
- package/dist/api/types/AdminReplyConversationRequest.js +1 -1
- package/dist/api/types/AdminReplyTicketRequest.js +1 -1
- package/dist/api/types/ArticleContent.js +1 -1
- package/dist/api/types/AssignConversationRequest.js +1 -1
- package/dist/api/types/ButtonComponent.js +1 -1
- package/dist/api/types/CheckboxComponent.js +1 -1
- package/dist/api/types/CompanyList.d.ts +0 -2
- package/dist/api/types/Component.d.ts +1 -1
- package/dist/api/types/ConfigureRequest.d.ts +1 -1
- package/dist/api/types/ConfigureResponse.d.ts +1 -1
- package/dist/api/types/ContactReplyConversationRequest.d.ts +1 -1
- package/dist/api/types/ContactReplyTicketRequest.d.ts +1 -1
- package/dist/api/types/Context.js +1 -1
- package/dist/api/types/ConversationSource.js +1 -1
- package/dist/api/types/CreateContactRequest.d.ts +1 -1
- package/dist/api/types/CreateDataEventRequest.d.ts +1 -1
- package/dist/api/types/CreateMessageRequest.d.ts +1 -1
- package/dist/api/types/CreateMessageRequest.js +1 -1
- package/dist/api/types/CreateTicketReplyWithCommentRequest.d.ts +1 -1
- package/dist/api/types/CustomAttributes.d.ts +1 -1
- package/dist/api/types/CustomerRequest.d.ts +1 -1
- package/dist/api/types/DropdownComponent.js +1 -1
- package/dist/api/types/ImageComponent.js +1 -1
- package/dist/api/types/InputComponent.js +1 -1
- package/dist/api/types/LinkedObject.js +1 -1
- package/dist/api/types/MultipleFilterSearchRequest.js +1 -1
- package/dist/api/types/MultipleOrSingleFilterSearchRequest.d.ts +1 -1
- package/dist/api/types/NewsItemRequest.js +1 -1
- package/dist/api/types/RedactConversationRequest.d.ts +1 -1
- package/dist/api/types/ReplyConversationRequest.d.ts +1 -1
- package/dist/api/types/SingleFilterSearchRequest.js +1 -1
- package/dist/api/types/SingleSelectComponent.js +1 -1
- package/dist/api/types/SlaApplied.js +1 -1
- package/dist/api/types/SpacerComponent.js +1 -1
- package/dist/api/types/TextComponent.js +1 -1
- package/dist/api/types/TicketCustomAttributes.d.ts +1 -5
- package/dist/api/types/TicketPartAuthor.js +1 -1
- package/dist/api/types/TicketReply.js +1 -1
- package/dist/api/types/TicketRequestCustomAttributes.d.ts +1 -4
- package/dist/api/types/TicketTypeAttribute.js +1 -1
- package/dist/api/types/UpdateVisitorRequest.d.ts +1 -1
- package/dist/api/version.d.ts +1 -1
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +6 -5
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +4 -5
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/pagination/Page.js +9 -6
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/utils/setObjectProperty.js +1 -2
- package/dist/environments.d.ts +1 -1
- package/dist/errors/IntercomError.js +2 -1
- package/dist/index.js +17 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +1 -1
- package/errors/IntercomError.js +2 -1
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +16 -16
- package/reference.md +195 -33
- package/scripts/rename-to-esm-files.js +115 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -77,10 +87,10 @@ class Articles {
|
|
|
77
87
|
* @example
|
|
78
88
|
* await client.articles.list()
|
|
79
89
|
*/
|
|
80
|
-
list(
|
|
81
|
-
return __awaiter(this,
|
|
90
|
+
list() {
|
|
91
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
82
92
|
const list = (request) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
var _a, _b, _c, _d, _e;
|
|
93
|
+
var _a, _b, _c, _d, _e, _f;
|
|
84
94
|
const { page, per_page: perPage } = request;
|
|
85
95
|
const _queryParams = {};
|
|
86
96
|
if (page != null) {
|
|
@@ -90,9 +100,9 @@ class Articles {
|
|
|
90
100
|
_queryParams["per_page"] = perPage.toString();
|
|
91
101
|
}
|
|
92
102
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
93
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
103
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, "articles"),
|
|
94
104
|
method: "GET",
|
|
95
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
105
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
96
106
|
contentType: "application/json",
|
|
97
107
|
queryParameters: _queryParams,
|
|
98
108
|
requestType: "json",
|
|
@@ -180,12 +190,12 @@ class Articles {
|
|
|
180
190
|
* })
|
|
181
191
|
*/
|
|
182
192
|
create(request, requestOptions) {
|
|
183
|
-
var _a, _b, _c, _d, _e;
|
|
184
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
+
var _a, _b, _c, _d, _e, _f;
|
|
185
195
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
186
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
196
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, "articles"),
|
|
187
197
|
method: "POST",
|
|
188
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
198
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
189
199
|
contentType: "application/json",
|
|
190
200
|
requestType: "json",
|
|
191
201
|
body: request,
|
|
@@ -239,13 +249,13 @@ class Articles {
|
|
|
239
249
|
* })
|
|
240
250
|
*/
|
|
241
251
|
find(request, requestOptions) {
|
|
242
|
-
var _a, _b, _c, _d, _e;
|
|
243
252
|
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
+
var _a, _b, _c, _d, _e, _f;
|
|
244
254
|
const { article_id: articleId } = request;
|
|
245
255
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
246
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
256
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `articles/${encodeURIComponent(articleId)}`),
|
|
247
257
|
method: "GET",
|
|
248
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
258
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
249
259
|
contentType: "application/json",
|
|
250
260
|
requestType: "json",
|
|
251
261
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 20000,
|
|
@@ -300,13 +310,13 @@ class Articles {
|
|
|
300
310
|
* })
|
|
301
311
|
*/
|
|
302
312
|
update(request, requestOptions) {
|
|
303
|
-
var _a, _b, _c, _d, _e;
|
|
304
313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
314
|
+
var _a, _b, _c, _d, _e, _f;
|
|
305
315
|
const { article_id: articleId } = request, _body = __rest(request, ["article_id"]);
|
|
306
316
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
317
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `articles/${encodeURIComponent(articleId)}`),
|
|
308
318
|
method: "PUT",
|
|
309
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
319
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
310
320
|
contentType: "application/json",
|
|
311
321
|
requestType: "json",
|
|
312
322
|
body: _body,
|
|
@@ -360,13 +370,13 @@ class Articles {
|
|
|
360
370
|
* })
|
|
361
371
|
*/
|
|
362
372
|
delete(request, requestOptions) {
|
|
363
|
-
var _a, _b, _c, _d, _e;
|
|
364
373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
374
|
+
var _a, _b, _c, _d, _e, _f;
|
|
365
375
|
const { article_id: articleId } = request;
|
|
366
376
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
367
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
377
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `articles/${encodeURIComponent(articleId)}`),
|
|
368
378
|
method: "DELETE",
|
|
369
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
379
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
370
380
|
contentType: "application/json",
|
|
371
381
|
requestType: "json",
|
|
372
382
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 20000,
|
|
@@ -418,9 +428,9 @@ class Articles {
|
|
|
418
428
|
* state: "published"
|
|
419
429
|
* })
|
|
420
430
|
*/
|
|
421
|
-
search(
|
|
422
|
-
|
|
423
|
-
|
|
431
|
+
search() {
|
|
432
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
433
|
+
var _a, _b, _c, _d, _e, _f;
|
|
424
434
|
const { phrase, state, help_center_id: helpCenterId, highlight } = request;
|
|
425
435
|
const _queryParams = {};
|
|
426
436
|
if (phrase != null) {
|
|
@@ -436,9 +446,9 @@ class Articles {
|
|
|
436
446
|
_queryParams["highlight"] = highlight.toString();
|
|
437
447
|
}
|
|
438
448
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
439
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
449
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, "articles/search"),
|
|
440
450
|
method: "GET",
|
|
441
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
451
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
442
452
|
contentType: "application/json",
|
|
443
453
|
queryParameters: _queryParams,
|
|
444
454
|
requestType: "json",
|
|
@@ -476,12 +486,12 @@ class Articles {
|
|
|
476
486
|
});
|
|
477
487
|
}
|
|
478
488
|
_getAuthorizationHeader() {
|
|
479
|
-
var _a;
|
|
480
489
|
return __awaiter(this, void 0, void 0, function* () {
|
|
490
|
+
var _a;
|
|
481
491
|
const bearer = (_a = (yield core.Supplier.get(this._options.token))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["INTERCOM_API_KEY"];
|
|
482
492
|
if (bearer == null) {
|
|
483
493
|
throw new errors.IntercomError({
|
|
484
|
-
message: "Please specify
|
|
494
|
+
message: "Please specify a bearer by either passing it in to the constructor or initializing a INTERCOM_API_KEY environment variable",
|
|
485
495
|
});
|
|
486
496
|
}
|
|
487
497
|
return `Bearer ${bearer}`;
|
|
@@ -14,4 +14,4 @@ var CreateArticleRequest;
|
|
|
14
14
|
Collection: "collection",
|
|
15
15
|
Section: "section",
|
|
16
16
|
};
|
|
17
|
-
})(CreateArticleRequest
|
|
17
|
+
})(CreateArticleRequest || (exports.CreateArticleRequest = CreateArticleRequest = {}));
|
|
@@ -14,4 +14,4 @@ var UpdateArticleRequest;
|
|
|
14
14
|
Collection: "collection",
|
|
15
15
|
Section: "section",
|
|
16
16
|
};
|
|
17
|
-
})(UpdateArticleRequest
|
|
17
|
+
})(UpdateArticleRequest || (exports.UpdateArticleRequest = UpdateArticleRequest = {}));
|
|
@@ -26,4 +26,4 @@ var ArticleSearchHighlights;
|
|
|
26
26
|
};
|
|
27
27
|
})(Item = HighlightedSummary.Item || (HighlightedSummary.Item = {}));
|
|
28
28
|
})(HighlightedSummary = ArticleSearchHighlights.HighlightedSummary || (ArticleSearchHighlights.HighlightedSummary = {}));
|
|
29
|
-
})(ArticleSearchHighlights
|
|
29
|
+
})(ArticleSearchHighlights || (exports.ArticleSearchHighlights = ArticleSearchHighlights = {}));
|
|
@@ -7,6 +7,8 @@ import * as Intercom from "../../../index";
|
|
|
7
7
|
export declare namespace Companies {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.IntercomEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
13
|
/** Override the Intercom-Version header */
|
|
12
14
|
version?: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "2.0" | "2.1" | "2.2" | "2.3" | "2.4" | "2.5" | "2.6" | "2.7" | "2.8" | "2.9" | "2.10" | "2.11" | "Unstable";
|
|
@@ -58,7 +60,7 @@ export declare class Companies {
|
|
|
58
60
|
* segment_id: "98765"
|
|
59
61
|
* })
|
|
60
62
|
*/
|
|
61
|
-
retrieve(request?: Intercom.RetrieveCompanyRequest, requestOptions?: Companies.RequestOptions): Promise<Intercom.
|
|
63
|
+
retrieve(request?: Intercom.RetrieveCompanyRequest, requestOptions?: Companies.RequestOptions): Promise<Intercom.CompaniesRetrieveResponse>;
|
|
62
64
|
/**
|
|
63
65
|
* You can create or update a company.
|
|
64
66
|
*
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -89,9 +99,9 @@ class Companies {
|
|
|
89
99
|
* segment_id: "98765"
|
|
90
100
|
* })
|
|
91
101
|
*/
|
|
92
|
-
retrieve(
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
retrieve() {
|
|
103
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
104
|
+
var _a, _b, _c, _d, _e, _f;
|
|
95
105
|
const { name, company_id: companyId, tag_id: tagId, segment_id: segmentId, page, per_page: perPage } = request;
|
|
96
106
|
const _queryParams = {};
|
|
97
107
|
if (name != null) {
|
|
@@ -113,9 +123,9 @@ class Companies {
|
|
|
113
123
|
_queryParams["per_page"] = perPage.toString();
|
|
114
124
|
}
|
|
115
125
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
116
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
126
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, "companies"),
|
|
117
127
|
method: "GET",
|
|
118
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
128
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
119
129
|
contentType: "application/json",
|
|
120
130
|
queryParameters: _queryParams,
|
|
121
131
|
requestType: "json",
|
|
@@ -181,13 +191,13 @@ class Companies {
|
|
|
181
191
|
* @example
|
|
182
192
|
* await client.companies.createOrUpdate()
|
|
183
193
|
*/
|
|
184
|
-
createOrUpdate(
|
|
185
|
-
|
|
186
|
-
|
|
194
|
+
createOrUpdate() {
|
|
195
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
196
|
+
var _a, _b, _c, _d, _e, _f;
|
|
187
197
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
188
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
198
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, "companies"),
|
|
189
199
|
method: "POST",
|
|
190
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
200
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
191
201
|
contentType: "application/json",
|
|
192
202
|
requestType: "json",
|
|
193
203
|
body: request,
|
|
@@ -241,13 +251,13 @@ class Companies {
|
|
|
241
251
|
* })
|
|
242
252
|
*/
|
|
243
253
|
find(request, requestOptions) {
|
|
244
|
-
var _a, _b, _c, _d, _e;
|
|
245
254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
var _a, _b, _c, _d, _e, _f;
|
|
246
256
|
const { company_id: companyId } = request;
|
|
247
257
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
248
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
258
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `companies/${encodeURIComponent(companyId)}`),
|
|
249
259
|
method: "GET",
|
|
250
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
260
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
251
261
|
contentType: "application/json",
|
|
252
262
|
requestType: "json",
|
|
253
263
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 20000,
|
|
@@ -304,13 +314,13 @@ class Companies {
|
|
|
304
314
|
* })
|
|
305
315
|
*/
|
|
306
316
|
update(request, requestOptions) {
|
|
307
|
-
var _a, _b, _c, _d, _e;
|
|
308
317
|
return __awaiter(this, void 0, void 0, function* () {
|
|
318
|
+
var _a, _b, _c, _d, _e, _f;
|
|
309
319
|
const { company_id: companyId } = request;
|
|
310
320
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
311
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
321
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `companies/${encodeURIComponent(companyId)}`),
|
|
312
322
|
method: "PUT",
|
|
313
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
323
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
314
324
|
contentType: "application/json",
|
|
315
325
|
requestType: "json",
|
|
316
326
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 20000,
|
|
@@ -363,13 +373,13 @@ class Companies {
|
|
|
363
373
|
* })
|
|
364
374
|
*/
|
|
365
375
|
delete(request, requestOptions) {
|
|
366
|
-
var _a, _b, _c, _d, _e;
|
|
367
376
|
return __awaiter(this, void 0, void 0, function* () {
|
|
377
|
+
var _a, _b, _c, _d, _e, _f;
|
|
368
378
|
const { company_id: companyId } = request;
|
|
369
379
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
370
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
380
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `companies/${encodeURIComponent(companyId)}`),
|
|
371
381
|
method: "DELETE",
|
|
372
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
382
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
373
383
|
contentType: "application/json",
|
|
374
384
|
requestType: "json",
|
|
375
385
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 20000,
|
|
@@ -422,8 +432,8 @@ class Companies {
|
|
|
422
432
|
* })
|
|
423
433
|
*/
|
|
424
434
|
listAttachedContacts(request, requestOptions) {
|
|
425
|
-
var _a, _b, _c, _d, _e;
|
|
426
435
|
return __awaiter(this, void 0, void 0, function* () {
|
|
436
|
+
var _a, _b, _c, _d, _e, _f;
|
|
427
437
|
const { company_id: companyId, page, per_page: perPage } = request;
|
|
428
438
|
const _queryParams = {};
|
|
429
439
|
if (page != null) {
|
|
@@ -433,9 +443,9 @@ class Companies {
|
|
|
433
443
|
_queryParams["per_page"] = perPage.toString();
|
|
434
444
|
}
|
|
435
445
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
436
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
446
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `companies/${encodeURIComponent(companyId)}/contacts`),
|
|
437
447
|
method: "GET",
|
|
438
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
448
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
439
449
|
contentType: "application/json",
|
|
440
450
|
queryParameters: _queryParams,
|
|
441
451
|
requestType: "json",
|
|
@@ -489,13 +499,13 @@ class Companies {
|
|
|
489
499
|
* })
|
|
490
500
|
*/
|
|
491
501
|
listAttachedSegments(request, requestOptions) {
|
|
492
|
-
var _a, _b, _c, _d, _e;
|
|
493
502
|
return __awaiter(this, void 0, void 0, function* () {
|
|
503
|
+
var _a, _b, _c, _d, _e, _f;
|
|
494
504
|
const { company_id: companyId } = request;
|
|
495
505
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
496
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
506
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `companies/${encodeURIComponent(companyId)}/segments`),
|
|
497
507
|
method: "GET",
|
|
498
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
508
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
499
509
|
contentType: "application/json",
|
|
500
510
|
requestType: "json",
|
|
501
511
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 20000,
|
|
@@ -554,10 +564,10 @@ class Companies {
|
|
|
554
564
|
* order: "desc"
|
|
555
565
|
* })
|
|
556
566
|
*/
|
|
557
|
-
list(
|
|
558
|
-
return __awaiter(this,
|
|
567
|
+
list() {
|
|
568
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
559
569
|
const list = (request) => __awaiter(this, void 0, void 0, function* () {
|
|
560
|
-
var _a, _b, _c, _d, _e;
|
|
570
|
+
var _a, _b, _c, _d, _e, _f;
|
|
561
571
|
const { page, per_page: perPage, order } = request;
|
|
562
572
|
const _queryParams = {};
|
|
563
573
|
if (page != null) {
|
|
@@ -570,9 +580,9 @@ class Companies {
|
|
|
570
580
|
_queryParams["order"] = order;
|
|
571
581
|
}
|
|
572
582
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
573
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
583
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, "companies/list"),
|
|
574
584
|
method: "POST",
|
|
575
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
585
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
576
586
|
contentType: "application/json",
|
|
577
587
|
queryParameters: _queryParams,
|
|
578
588
|
requestType: "json",
|
|
@@ -645,19 +655,19 @@ class Companies {
|
|
|
645
655
|
* @example
|
|
646
656
|
* await client.companies.scroll()
|
|
647
657
|
*/
|
|
648
|
-
scroll(
|
|
649
|
-
return __awaiter(this,
|
|
658
|
+
scroll() {
|
|
659
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
650
660
|
const list = (request) => __awaiter(this, void 0, void 0, function* () {
|
|
651
|
-
var _a, _b, _c, _d, _e;
|
|
661
|
+
var _a, _b, _c, _d, _e, _f;
|
|
652
662
|
const { scroll_param: scrollParam } = request;
|
|
653
663
|
const _queryParams = {};
|
|
654
664
|
if (scrollParam != null) {
|
|
655
665
|
_queryParams["scroll_param"] = scrollParam;
|
|
656
666
|
}
|
|
657
667
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
658
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
668
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, "companies/scroll"),
|
|
659
669
|
method: "GET",
|
|
660
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
670
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
661
671
|
contentType: "application/json",
|
|
662
672
|
queryParameters: _queryParams,
|
|
663
673
|
requestType: "json",
|
|
@@ -732,13 +742,13 @@ class Companies {
|
|
|
732
742
|
* })
|
|
733
743
|
*/
|
|
734
744
|
attachContact(request, requestOptions) {
|
|
735
|
-
var _a, _b, _c, _d, _e;
|
|
736
745
|
return __awaiter(this, void 0, void 0, function* () {
|
|
746
|
+
var _a, _b, _c, _d, _e, _f;
|
|
737
747
|
const { contact_id: contactId } = request, _body = __rest(request, ["contact_id"]);
|
|
738
748
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
739
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
749
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `contacts/${encodeURIComponent(contactId)}/companies`),
|
|
740
750
|
method: "POST",
|
|
741
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
751
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
742
752
|
contentType: "application/json",
|
|
743
753
|
requestType: "json",
|
|
744
754
|
body: _body,
|
|
@@ -795,13 +805,13 @@ class Companies {
|
|
|
795
805
|
* })
|
|
796
806
|
*/
|
|
797
807
|
detachContact(request, requestOptions) {
|
|
798
|
-
var _a, _b, _c, _d, _e;
|
|
799
808
|
return __awaiter(this, void 0, void 0, function* () {
|
|
809
|
+
var _a, _b, _c, _d, _e, _f;
|
|
800
810
|
const { contact_id: contactId, company_id: companyId } = request;
|
|
801
811
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
802
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
812
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IntercomEnvironment.UsProduction, `contacts/${encodeURIComponent(contactId)}/companies/${encodeURIComponent(companyId)}`),
|
|
803
813
|
method: "DELETE",
|
|
804
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "
|
|
814
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "intercom-client", "X-Fern-SDK-Version": "6.3.0", "User-Agent": "intercom-client/6.3.0", "Intercom-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.version) !== null && _f !== void 0 ? _f : "2.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
805
815
|
contentType: "application/json",
|
|
806
816
|
requestType: "json",
|
|
807
817
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 20000,
|
|
@@ -840,12 +850,12 @@ class Companies {
|
|
|
840
850
|
});
|
|
841
851
|
}
|
|
842
852
|
_getAuthorizationHeader() {
|
|
843
|
-
var _a;
|
|
844
853
|
return __awaiter(this, void 0, void 0, function* () {
|
|
854
|
+
var _a;
|
|
845
855
|
const bearer = (_a = (yield core.Supplier.get(this._options.token))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["INTERCOM_API_KEY"];
|
|
846
856
|
if (bearer == null) {
|
|
847
857
|
throw new errors.IntercomError({
|
|
848
|
-
message: "Please specify
|
|
858
|
+
message: "Please specify a bearer by either passing it in to the constructor or initializing a INTERCOM_API_KEY environment variable",
|
|
849
859
|
});
|
|
850
860
|
}
|
|
851
861
|
return `Bearer ${bearer}`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Intercom from "../../../index";
|
|
5
|
+
export type CompaniesRetrieveResponse = Intercom.CompaniesRetrieveResponse.Company | Intercom.CompaniesRetrieveResponse.List;
|
|
6
|
+
export declare namespace CompaniesRetrieveResponse {
|
|
7
|
+
interface Company extends Intercom.Company {
|
|
8
|
+
type: "company";
|
|
9
|
+
}
|
|
10
|
+
interface List extends Intercom.CompanyList {
|
|
11
|
+
type: "list";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -6,8 +6,6 @@ import * as Intercom from "../../../index";
|
|
|
6
6
|
* Companies allow you to represent organizations using your product. Each company will have its own description and be associated with contacts. You can fetch, create, update and list companies.
|
|
7
7
|
*/
|
|
8
8
|
export interface Company {
|
|
9
|
-
/** Value is `company` */
|
|
10
|
-
type?: "company";
|
|
11
9
|
/** The Intercom defined id representing the company. */
|
|
12
10
|
id: string;
|
|
13
11
|
/** The name of the company. */
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CompaniesRetrieveResponse"), exports);
|
|
17
18
|
__exportStar(require("./Company"), exports);
|
|
@@ -7,6 +7,8 @@ import * as Intercom from "../../../index";
|
|
|
7
7
|
export declare namespace Contacts {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.IntercomEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
13
|
/** Override the Intercom-Version header */
|
|
12
14
|
version?: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "2.0" | "2.1" | "2.2" | "2.3" | "2.4" | "2.5" | "2.6" | "2.7" | "2.8" | "2.9" | "2.10" | "2.11" | "Unstable";
|