Skip to content

Commit

Permalink
resolve new path, fix compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wbhob committed Sep 4, 2017
1 parent 996aa07 commit 5f55d31
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.0-beta.3] - 2017-08-23
### Added
- **semver-major**: Create an interface to interact with Leads API (https://developers.intercom.com/v2.0/reference)


## [1.0.0-beta.1] - 2017-08-23
### Added
- **semver-major**:Add option to watch router events and fire Intercom update, as is standard practice in SPAs (#17)
Expand Down
2 changes: 1 addition & 1 deletion src/directives/hide.directive.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Directive, HostListener, Input } from '@angular/core';

import { Intercom } from '../providers/intercom';
import { Intercom } from '../intercom/intercom';

@Directive({
selector: '[intercomHide]'
Expand Down
3 changes: 2 additions & 1 deletion src/directives/show-messages.directive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Directive, HostListener, Input } from '@angular/core';
import { Intercom } from '../providers/intercom';

import { Intercom } from '../intercom/intercom';

@Directive({
selector: '[intercomShowMessages]'
Expand Down
3 changes: 2 additions & 1 deletion src/directives/show-new-message.directive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Directive, HostListener, Input } from '@angular/core';
import { Intercom } from '../providers/intercom';

import { Intercom } from '../intercom/intercom';

@Directive({
selector: '[intercomShowNewMessage]'
Expand Down
3 changes: 2 additions & 1 deletion src/directives/show.directive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Directive, HostListener, Input } from '@angular/core';
import { Intercom } from '../providers/intercom';

import { Intercom } from '../intercom/intercom';

@Directive({
selector: '[intercomShow]'
Expand Down
3 changes: 2 additions & 1 deletion src/directives/shutdown.directive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Directive, HostListener, Input } from '@angular/core';
import { Intercom } from '../providers/intercom';

import { Intercom } from '../intercom/intercom';

@Directive({
selector: '[intercomShutdown]'
Expand Down
3 changes: 2 additions & 1 deletion src/directives/track-event.directive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Directive, HostListener, Input } from '@angular/core';
import { Intercom } from '../providers/intercom';

import { Intercom } from '../intercom/intercom';

@Directive({
selector: '[intercomTrackEvent]'
Expand Down
12 changes: 8 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
export { Intercom } from './intercom/intercom';
export { IntercomConfig } from './types/intercom-config';
export { IntercomHideDirective } from './directives/hide.directive';
export { IntercomModule } from './intercom.module';
export { IntercomShowDirective } from './directives/show.directive';
export { IntercomShowMessagesDirective } from './directives/show-messages.directive';
export { IntercomShowNewMessageDirective } from './directives/show-new-message.directive';
export { IntercomShowDirective } from './directives/show.directive';
export { IntercomShutdownDirective } from './directives/shutdown.directive';
export { IntercomTrackEventDirective } from './directives/track-event.directive';
export { IntercomModule } from './intercom.module';
export { Intercom } from './providers/intercom';
export { IntercomConfig } from './types/intercom-config';
export { Leads } from './leads/leads';

import { LeadInput } from './leads/lead-input';
import { LeadsListResponse } from './leads/leads-list-reponse';
4 changes: 3 additions & 1 deletion src/intercom.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ModuleWithProviders, NgModule } from '@angular/core';

import { CONFIG } from './config-token';
import { CONFIG } from './shared/config-token';
import { CommonModule } from '@angular/common';
import { Intercom } from './intercom/intercom';
import { IntercomConfig } from './types/intercom-config';
Expand All @@ -10,6 +10,7 @@ import { IntercomShowMessagesDirective } from './directives/show-messages.direct
import { IntercomShowNewMessageDirective } from './directives/show-new-message.directive';
import { IntercomShutdownDirective } from './directives/shutdown.directive';
import { IntercomTrackEventDirective } from './directives/track-event.directive';
import { Leads } from './leads/leads';
import { RouterModule } from '@angular/router';
import { loadIntercom } from './util/load-intercom';

Expand Down Expand Up @@ -39,6 +40,7 @@ export class IntercomModule {
providers: [
{ provide: CONFIG, useValue: config },
Intercom,
Leads
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/leads/leads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class Leads {
.map((res: HttpResponse<object>) => res.body);
}

convert(leadId: string, user): Observable<object> {
convert(leadId: string, user: object): Observable<object> {
return this.http.post(`https://api.intercom.io/contacts/convert`,
{ contact: { user_id: leadId }, user },
this.options.getOptions())
Expand Down

0 comments on commit 5f55d31

Please sign in to comment.