Skip to content

Commit

Permalink
fix(call-history): added CH badge counter type
Browse files Browse the repository at this point in the history
  • Loading branch information
sokn-sys committed May 3, 2024
1 parent 4417414 commit b571b48
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 95 deletions.
55 changes: 54 additions & 1 deletion src/webexcalling/src/ICallHistoryAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ export enum DirectionTypes {

export type SessionTypes = 'SPARK' | 'BROADWORKS';

export enum CH_STORAGE_KEYS {
CH_ERROR_LIST_MSG = 'chListErrorMsg',
}

export enum SESSION_TYPES {
CMR = 'CMR',
SPARK = 'SPARK',
SPACEMEETING = 'SPACEMEETING',
EVENTCENTERMEETING = 'EVENTCENTERMEETING'
}

export enum CALLING_SPECIFIC_REASON {
CALLQUEUE = 'CALLQUEUE',
HUNTGROUP = 'HUNTGROUP',
BUSY = 'BUSY',
NOANSWER = 'NOANSWER',
UNAVAILABLE = 'UNAVAILABLE',
UNCONDITIONAL = 'UNCONDITIONAL',
TIMEOFDAY = 'TIMEOFDAY'
}
export interface ISDKCallHistoryRecord {
id: string;
url?: string;
Expand Down Expand Up @@ -47,6 +67,7 @@ export interface ISDKCallHistoryRecord {
isSelected?: boolean;
isDeleted?: boolean;
isPMR?: boolean;
isRead?: boolean;
correlationIds?: unknown[];
}

Expand All @@ -66,13 +87,19 @@ export interface ICallHistoryRecord {
phoneNumber?: string;
callbackAddress?: string;
isSelected?: boolean;
durationSeconds?: number;
callingSpecific?: string;
isRead?: boolean;
sessionId?: string;
}
export interface ICallHistoryAdapter {
refresh(ID?: string): void;

getAll(ID?: string): Observable<ICallHistoryRecord[]>;

getOne?(ID?: string): Observable<ICallHistoryRecord>;

updateMissedCalls(endTimeSessionIds: EndTimeSessionId[]): Observable<UpdateMissedCallsResponse>
}

export enum SORT {
Expand All @@ -94,7 +121,7 @@ export enum DATE {
}

export enum LIMIT {
DEFAULT = 20,
DEFAULT = 100,
}

export interface ICallbackInfo {
Expand All @@ -121,6 +148,16 @@ export interface ILinks {
locusUrl: string;
callbackAddress: string;
}
export interface ICallingSpecifics {
redirectionDetails?: {
phoneNumber?: string;
name?: string;
reason: string;
userId?: string;
isPrivate: boolean;
sipUrl?:string;
};
}

export interface IUserSession {
id: string;
Expand All @@ -141,6 +178,8 @@ export interface IUserSession {
isDeleted: boolean;
isPMR: boolean;
correlationIds: string[];
callingSpecifics?: ICallingSpecifics;
isRead?: boolean;
}

export interface IUserSessionData {
Expand All @@ -151,3 +190,17 @@ export interface IWebexCallHistoryResponse {
data: IUserSessionData;
message: string;
}

export interface EndTimeSessionId {
endTime: string;
sessionId: string;
}

export interface UpdateMissedCallsResponse {
statusCode: number;
data: {
data?: string;
error?: string;
}
message: string;
}
88 changes: 0 additions & 88 deletions src/webexcalling/src/Logger.ts

This file was deleted.

12 changes: 6 additions & 6 deletions src/webexcalling/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export * from './shared';
export * from './ICallHistoryAdapter';
export * from './ISearchContactsAdapter';
export * from './IAdapterAggregator';
export * from './ICallForwardAdapter';
export * from './ICallHistoryAdapter';
export * from './IMakeCallAdapter';
export * from './IMetricsAdapter';
export * from './ISearchContactsAdapter';
export * from './ISpeedDialsAdapter';
export * from './IVoicemailAdapter';
export * from './IMetricsAdapter';
export * from './ICallForwardAdapter';
export * from './Logger';
export * from './shared';

0 comments on commit b571b48

Please sign in to comment.