async delete() {
    if (!this.saved) {
      throw new Error('This API is not yet saved');
    }
    const info = this.apiInfo;
    if (!info) {
      throw new Error('API data not restored');
    }
    const e = new CustomEvent('api-deleted', {
      detail: {
        id: info._id
      },
      bubbles: true,
      cancelable: true,
      composed: true
    });
    this.dispatchEvent(e);
    if (!e.defaultPrevented) {
      throw new Error('APIs model is not in the DOM');
    }
    return await e.detail.result;
  }
/**
   * Requests to delete current API from the data store.
   * It removes all versions of the API data and then the API index.
   * @return {Promise}
   */
Requests to delete current API from the data store.
It removes all versions of the API data and then the API index.
@return {Promise}
Requests to delete current API from the data store . It removes all versions of the API data and then the API index . @return { Promise }
async delete() {
    if (!this.saved) {
      throw new Error('This API is not yet saved');
    }
    const info = this.apiInfo;
    if (!info) {
      throw new Error('API data not restored');
    }
    const e = new CustomEvent('api-deleted', {
      detail: {
        id: info._id
      },
      bubbles: true,
      cancelable: true,
      composed: true
    });
    this.dispatchEvent(e);
    if (!e.defaultPrevented) {
      throw new Error('APIs model is not in the DOM');
    }
    return await e.detail.result;
  }
async delete ( ) { if ( ! this . saved ) { throw new Error ( 'This API is not yet saved' ) ; } const info = this . apiInfo ; if ( ! info ) { throw new Error ( 'API data not restored' ) ; } const e = new CustomEvent ( 'api-deleted' , { detail : { id : info . _id } , bubbles : true , cancelable : true , composed : true } ) ; this . dispatchEvent ( e ) ; if ( ! e . defaultPrevented ) { throw new Error ( 'APIs model is not in the DOM' ) ; } return await e . detail . result ; }
Requests to delete current API from the data store.
Requests to delete current API from the data store .