diff --git a/types/resources/profile.d.ts b/types/resources/profile.d.ts new file mode 100644 index 00000000..c3806de5 --- /dev/null +++ b/types/resources/profile.d.ts @@ -0,0 +1,102 @@ +export class Profile extends PlivoResource { + constructor(client: Function, data?: {}); + id: string; +} + +export class ProfileResponse { + constructor(params: object); + apiId: string; + profileUuid: string; + message: string; +} + +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; + + /** + * 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: object): Promise; + + /** + * delete Profile by given profileuuid + * @method + * @param {string} profileUUID - id of profileUUID + * @fail {Error} return Error + */ + delete(profileUUID: string): Promise; + + /** + * 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 + * @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 + ): Promise; + + /** + * 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; + } + ): Promise; +} + +import { PlivoResource } from "../base";