-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(channels): remove legacy channels from code (#321)
* delete old * use legacy * remove deps * use channels 0.1.0 * bring changes * gif * bring changes * fix * fix * bring changes * rewire comment * fix * bring changes * bump
- Loading branch information
1 parent
2b05192
commit b4dbc00
Showing
120 changed files
with
220 additions
and
3,040 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ChannelRenderer } from '../../base/renderer' | ||
import { AudioContent } from '../../content/types' | ||
import { ChannelContext } from '../context' | ||
|
||
export abstract class AudioRenderer implements ChannelRenderer<any> { | ||
get priority(): number { | ||
return 0 | ||
} | ||
|
||
handles(context: ChannelContext<any>): boolean { | ||
const payload = context.payload as AudioContent | ||
return !!payload.audio | ||
} | ||
|
||
render(context: ChannelContext<any>) { | ||
const payload = context.payload as AudioContent | ||
this.renderAudio(context, payload) | ||
} | ||
|
||
abstract renderAudio(context: ChannelContext<any>, payload: AudioContent): void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ChannelRenderer } from '../../base/renderer' | ||
import { FileContent } from '../../content/types' | ||
import { ChannelContext } from '../context' | ||
|
||
export abstract class FileRenderer implements ChannelRenderer<any> { | ||
get priority(): number { | ||
return 0 | ||
} | ||
|
||
handles(context: ChannelContext<any>): boolean { | ||
const payload = context.payload as FileContent | ||
return !!payload.file | ||
} | ||
|
||
render(context: ChannelContext<any>) { | ||
const payload = context.payload as FileContent | ||
this.renderFile(context, payload) | ||
} | ||
|
||
abstract renderFile(context: ChannelContext<any>, payload: FileContent): void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ChannelRenderer } from '../../base/renderer' | ||
import { LocationContent } from '../../content/types' | ||
import { ChannelContext } from '../context' | ||
|
||
export abstract class LocationRenderer implements ChannelRenderer<any> { | ||
get priority(): number { | ||
return 0 | ||
} | ||
|
||
handles(context: ChannelContext<any>): boolean { | ||
const payload = context.payload as LocationContent | ||
return !!payload.latitude && !!payload.longitude | ||
} | ||
|
||
render(context: ChannelContext<any>) { | ||
const payload = context.payload as LocationContent | ||
this.renderLocation(context, payload) | ||
} | ||
|
||
abstract renderLocation(context: ChannelContext<any>, payload: LocationContent): void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { VideoContent } from '../../content/types' | ||
import { ChannelContext } from '../context' | ||
import { ChannelRenderer } from '../renderer' | ||
|
||
export abstract class VideoRenderer implements ChannelRenderer<any> { | ||
get priority(): number { | ||
return 0 | ||
} | ||
|
||
handles(context: ChannelContext<any>): boolean { | ||
const payload = context.payload as VideoContent | ||
return !!payload.video | ||
} | ||
|
||
render(context: ChannelContext<any>) { | ||
const payload = context.payload as VideoContent | ||
this.renderVideo(context, payload) | ||
} | ||
|
||
abstract renderVideo(context: ChannelContext<any>, payload: VideoContent): void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
export * from './base/channel' | ||
export * from './base/endpoint' | ||
export * from './messenger/channel' | ||
export * from './slack/channel' | ||
export * from './smooch/channel' | ||
export * from './teams/channel' | ||
export * from './telegram/channel' | ||
export * from './twilio/channel' | ||
export * from './vonage/channel' |
Oops, something went wrong.