plivo
Version:
A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML
123 lines (114 loc) • 3.35 kB
TypeScript
/**
* Represents a Profile
* @constructor
* @param {function} client - make api call
* @param {object} [data] - data of call
*/
export class Profile extends PlivoResource {
constructor(client: Function, data?: {});
id: string;
[clientKey]: symbol;
}
export class ProfileResponse {
constructor(params: object);
apiId: string;
profileUuid: string;
message: string;
}
/**
* Represents a Profile Interface
* @constructor
* @param {function} client - make api call
* @param {object} [data] - data of call
*/
export class ProfileInterface extends PlivoResource {
constructor(client: Function, data?: {});
/**
* get Profile by given profileuuid
* @method
* @param {string} profileUUID - id of profileUUID
* @promise {object} return {@link Profile} object
* @fail {Error} return Error
*/
get(profileUUID: string): Promise<any>;
/**
* Get All Profile Detail
* @method
* @param {object} params - params limit and offset
* @promise {object[]} returns list of Profile Object
* @fail {Error} returns Error
*/
list(params?: {}): Promise<any>;
/**
* delete Profile by given profileuuid
* @method
* @param {string} profileUUID - id of profileUUID
* @fail {Error} return Error
*/
delete(profileUUID: string): Promise<any>;
/**
* Create a new Profile
*
* @param {string} profile_alias
* @param {string} plivo_subaccount
* @param {string} customer_type
* @param {string} entity_type
* @param {string} company_name
* @param {string} ein
* @param {string} vertical
* @param {string} ein_issuing_country
* @param {string} stock_symbol
* @param {string} stock_exchange
* @param {string} alt_business_id_type
* @param {string} website
* @param {object} address
* @param {object} authorized_contact
* @param {string} business_contact_email
* @return profileResponse response output
*/
create(
profile_alias: string,
plivo_subaccount: string,
customer_type: string,
entity_type: string,
company_name: string,
ein: string,
vertical: string,
ein_issuing_country: string,
stock_symbol: string,
stock_exchange: string,
alt_business_id_type: string,
website: string,
address: object,
authorized_contact: object,
business_contact_email?: string
): Promise<ProfileResponse>;
/**
* update a new Profile
*
* @param {string} profile_uuid
* @param {object } address
* @param {object } authorized_contact
* @param {string} entity_type
* @param {string} vertical
* @param {string} company_name
* @param {string} website
* @return profileResponse response output
*/
update(
profile_uuid: string,
params: {
address?: object;
authorized_contact?: object;
entity_type?: string;
vertical?: string;
company_name?: string;
website?: string;
business_contact_email?: string;
}
): Promise<ProfileResponse>;
[clientKey]: symbol;
}
import { PlivoResource } from "../base";
declare const clientKey: unique symbol;
export {};