Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Park committed Aug 20, 2021
1 parent 1771588 commit 851250a
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions src/types/zenvia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,41 +268,32 @@ export interface IMessageReport {
total: number;
}

export interface ITemplate {
interface IAbstractTemplate {
id?: string;
name: string;
locale: string;
channel: string;
category: string;
textReference?: string;
components: IComponents;
senderId: string;
status?: TemplateStatus;
notificationEmail?: string;
comments?: IComment[];
suggestions?: ISuggestions[];
createdAt?: string;
updatedAt?: string;
}

export interface IResponseTemplate {
id?: string;
name: string;
locale: string;
channel: string;
category: string;
export interface ITemplate extends IAbstractTemplate {
textReference?: string;
suggestions?: ISuggestions[];
}

export interface IResponseTemplate extends IAbstractTemplate {
text: string;
components: IComponents;
examples?: {
[fieldName: string]: string;
};
senderId: string;
fields: string[];
status?: TemplateStatus;
notificationEmail?: string;
comments?: IComment[];
createdAt?: string;
updatedAt?: string;
}

export interface IPartialTemplate {
Expand Down

0 comments on commit 851250a

Please sign in to comment.