intercom-client
Advanced tools
Comparing version 3.2.1 to 4.0.0
@@ -47,2 +47,4 @@ import { JavascriptObject, Role, Timestamp } from '../common/common.types'; | ||
companies: AddressableList; | ||
opted_in_subscription_types: AddressableList; | ||
opted_out_subscription_tyes: AddressableList; | ||
referrer: string; | ||
@@ -49,0 +51,0 @@ utm_campaign: string | null; |
import Client from './client'; | ||
import { StringifiedTimestamp, GenericSearchFilters, Order, PaginatedBase } from './common/common.types'; | ||
import { StringifiedTimestamp, GenericSearchFilters, PaginatedBase } from './common/common.types'; | ||
import { ContactType, ConversationObject, ConversationObjectWithoutParts } from './conversation/conversation.types'; | ||
@@ -24,3 +24,3 @@ import { MessageObject } from './message/message.types'; | ||
search({ data }: SearchConversationRequest): Promise<SearchConversationResponse>; | ||
list({ order, sort, page, perPage: per_page }: ListConversationData): Promise<ListConversationResponse>; | ||
list({ startingAfter: starting_after, perPage: per_page, }: ListConversationData): Promise<ListConversationResponse>; | ||
redactConversationPart({ conversationId, conversationPartId, sourceId, type, }: RedactConversationPartData): Promise<Conversation>; | ||
@@ -160,5 +160,3 @@ } | ||
interface ListConversationData { | ||
order?: Order; | ||
sort?: SortBy; | ||
page?: number; | ||
startingAfter?: string; | ||
perPage?: number; | ||
@@ -165,0 +163,0 @@ } |
@@ -207,4 +207,4 @@ "use strict"; | ||
Conversation.prototype.list = function (_a) { | ||
var order = _a.order, sort = _a.sort, page = _a.page, per_page = _a.perPage; | ||
var params = { order: order, sort: sort, page: page, per_page: per_page }; | ||
var starting_after = _a.startingAfter, per_page = _a.perPage; | ||
var params = { starting_after: starting_after, per_page: per_page }; | ||
return this.client.get({ | ||
@@ -211,0 +211,0 @@ url: "/".concat(this.baseUrl), |
@@ -110,3 +110,3 @@ import { AdminObject } from '../admin/admin.types'; | ||
declare enum ConversationSourceType { | ||
CONVERASTION = "conversation", | ||
CONVERSATION = "conversation", | ||
PUSH = "push", | ||
@@ -113,0 +113,0 @@ FACEBOOK = "facebook", |
@@ -17,3 +17,3 @@ "use strict"; | ||
(function (ConversationSourceType) { | ||
ConversationSourceType["CONVERASTION"] = "conversation"; | ||
ConversationSourceType["CONVERSATION"] = "conversation"; | ||
ConversationSourceType["PUSH"] = "push"; | ||
@@ -20,0 +20,0 @@ ConversationSourceType["FACEBOOK"] = "facebook"; |
{ | ||
"name": "intercom-client", | ||
"version": "3.2.0", | ||
"version": "4.0.0", | ||
"description": "Official Node bindings to the Intercom API", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/intercom/intercom-node", |
{ | ||
"name": "intercom-client", | ||
"version": "3.2.1", | ||
"version": "4.0.0", | ||
"description": "Official Node bindings to the Intercom API", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/intercom/intercom-node", |
@@ -5,3 +5,3 @@ # intercom-node | ||
[![npm](https://img.shields.io/npm/v/intercom-client)](https://www.npmjs.com/package/intercom-client) | ||
![Intercom API Version](https://img.shields.io/badge/Intercom%20API%20Version-2.5-blue) | ||
![Intercom API Version](https://img.shields.io/badge/Intercom%20API%20Version-2.6-blue) | ||
![Typescript Supported](https://img.shields.io/badge/Typescript-Supported-lightgrey) | ||
@@ -25,16 +25,2 @@ | ||
## Testing | ||
```bash | ||
yarn test | ||
``` | ||
## Running the code locally | ||
Compile using babel: | ||
```bash | ||
yarn prepublish | ||
``` | ||
## Usage | ||
@@ -75,3 +61,3 @@ | ||
headers: { | ||
'Intercom-Version': 2.4, | ||
'Intercom-Version': 2.6, | ||
}, | ||
@@ -744,5 +730,3 @@ }); | ||
const response = await client.conversations.list({ | ||
order: Order.DESC, | ||
sort: SortBy.UpdatedAt, | ||
page: 1, | ||
startingAfter: 'WzE2NzA0MjI1MjkwMDAsMjQzMTY3NzA2ODcsMl0=', | ||
perPage: 10, | ||
@@ -1108,3 +1092,2 @@ }); | ||
### Subscriptions | ||
@@ -1117,2 +1100,3 @@ | ||
``` | ||
### PhoneCallRedirects | ||
@@ -1293,2 +1277,16 @@ | ||
## Testing | ||
```bash | ||
yarn test | ||
``` | ||
## Running the code locally | ||
Compile using babel: | ||
```bash | ||
yarn prepublish | ||
``` | ||
## Pull Requests | ||
@@ -1295,0 +1293,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
277904
1300