From bb0dc9924f59cc93b98ba540333ead372e66c2f9 Mon Sep 17 00:00:00 2001 From: huzaif Date: Wed, 6 Jan 2021 16:06:47 +0530 Subject: [PATCH] updated types --- lib/resources/messages.js | 3 --- types/base.d.ts | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/resources/messages.js b/lib/resources/messages.js index b7eaaa1..5788d21 100644 --- a/lib/resources/messages.js +++ b/lib/resources/messages.js @@ -1,7 +1,6 @@ import * as _ from "lodash"; import { - PlivoGenericResponse, PlivoResource, PlivoResourceInterface } from '../base'; @@ -10,8 +9,6 @@ import { validate } from '../utils/common.js'; -import { type } from "os"; - const action = 'Message/'; const idField = 'messageUuid'; let actionKey = Symbol('api action'); diff --git a/types/base.d.ts b/types/base.d.ts index 6609e79..ab17e9b 100644 --- a/types/base.d.ts +++ b/types/base.d.ts @@ -3,7 +3,7 @@ export class PlivoGenericResponse { id: string; } export class PlivoResource { - constructor(action: string, klass: any, idField: string, request: any); + constructor(action: string, Klass: Symbol, idField: string, request: any); update(params: object, id: string): Promise; delete(params: object): Promise; executeAction(task: string, method: string, params: {}, action: string): Promise; @@ -12,7 +12,7 @@ export class PlivoResource { getMetaResponse(url: any, method?: string, params?: {}): Promise; } export class PlivoResourceInterface { - constructor(action: string, klass: any, idField: string, request: any); + constructor(action: string, Klass: Symbol, idField: string, request: any); get(id: string, params?: {}): Promise; list(params: object): Promise; create(params: object): Promise;