/**
 * iCure Data Stack API Documentation
 * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { XHR } from './XHR';
import { DocIdentifier } from '../model/DocIdentifier';
import { Form } from '../model/Form';
import { FormTemplate } from '../model/FormTemplate';
import { IcureStub } from '../model/IcureStub';
import { ListOfIds } from '../model/ListOfIds';
import { IdWithRev } from '../model/IdWithRev';
import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult';
import { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult';
import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams';
export declare class IccFormApi {
    host: string;
    _headers: Array<XHR.Header>;
    authenticationProvider: AuthenticationProvider;
    fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
    get headers(): Promise<Array<XHR.Header>>;
    constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
    setHeaders(h: Array<XHR.Header>): void;
    handleError(e: XHR.XHRError): never;
    /**
     * Returns an instance of created form.
     * @summary Create a form with the current user
     * @param body
     */
    createForm(body?: Form): Promise<Form>;
    /**
     * Returns an instance of created form template.
     * @summary Create a form template with the current user
     * @param body
     */
    createFormTemplate(body?: FormTemplate): Promise<FormTemplate>;
    /**
     * Returns the created forms.
     * @summary Create a batch of forms
     * @param body
     */
    createForms(body?: Array<Form>): Promise<Array<Form>>;
    /**
     *
     * @summary Delete a form template
     * @param formTemplateId
     */
    deleteFormTemplate(formTemplateId: string): Promise<DocIdentifier>;
    /**
     * @summary Delete forms by batch.
     *
     * @param formIds a ListOfIds containing the ids of the Forms to delete.
     * @return a Promise that will resolve in an array of DocIdentifiers related to the successfully deleted Forms.
     */
    deleteForms(formIds: ListOfIds): Promise<Array<DocIdentifier>>;
    /**
     * @summary Deletes a single form by id.
     *
     * @param formId the id of the document to delete.
     * @return a Promise that will resolve in the DocIdentifier of the form.
     */
    deleteForm(formId: string): Promise<DocIdentifier>;
    /**
     *
     * @summary Gets all form templates for current user
     * @param loadLayout
     * @param raw
     */
    findFormTemplates(loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>>;
    /**
     *
     * @summary Gets all form templates
     * @param specialityCode
     * @param loadLayout
     */
    findFormTemplatesBySpeciality(specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>>;
    /**
     * Keys must be delimited by coma
     * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead.
     * @summary List forms found By Healthcare Party and secret foreign keys.
     * @param hcPartyId
     * @param healthElementId
     * @param planOfActionId
     * @param formTemplateId
     * @param body
     */
    findFormsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, healthElementId?: string, planOfActionId?: string, formTemplateId?: string, body?: Array<string>): Promise<Array<Form>>;
    /**
     * Keys must be delimited by commas.
     * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead.
     * @summary List forms found By Healthcare Party and secret foreign keys.
     * @param hcPartyId
     * @param secretFKeys
     * @param healthElementId
     * @param planOfActionId
     * @param formTemplateId
     */
    findFormsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string, healthElementId?: string, planOfActionId?: string, formTemplateId?: string): Promise<Array<Form>>;
    /**
     * @summary List Form ids by data owner and a set of secret foreign key. The ids will be sorted by Form openingDate, in ascending or descending
     * order according to the specified parameter value.
     *
     * @param dataOwnerId the data owner id.
     * @param secretFKeys an array of secret foreign keys.
     * @param startDate a timestamp in epoch milliseconds. If undefined, all the form ids since the beginning of time will be returned.
     * @param endDate a timestamp in epoch milliseconds. If undefined, all the form ids until the end of time will be returned.
     * @param descending whether to return the ids ordered in ascending or descending order by Form openingDate
     * @return a promise that will resolve in an Array of Form ids.
     */
    findFormIdsByDataOwnerPatientOpeningDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise<string[]>;
    /**
     * Keys must be delimited by coma
     * @deprecated use {@link findFormsDelegationsStubsByIds} instead.
     * @summary List form stubs found By Healthcare Party and secret foreign keys.
     * @param body
     * @param hcPartyId
     */
    findFormsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<IcureStub>>;
    /**
     * @deprecated use {@link findFormsDelegationsStubsByIds} instead.
     * @summary List form stubs found By Healthcare Party and secret foreign keys.
     * @param hcPartyId
     * @param secretFKeys
     */
    findFormsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<IcureStub>>;
    /**
     * @summary List form stubs by form ids.
     */
    findFormsDelegationsStubsByIds(formIds: string[]): Promise<Array<IcureStub>>;
    /**
     * Keys must be delimited by coma
     * @summary Get a list of forms by ids
     * @param formId
     * @param hcPartyId
     */
    getChildrenForms(formId: string, hcPartyId: string): Promise<Array<Form>>;
    /**
     *
     * @summary Gets a form
     * @param formId
     */
    getForm(formId: string): Promise<Form>;
    /**
     *
     * @summary Gets the most recent form with the given logicalUuid
     * @param logicalUuid
     */
    getFormByLogicalUuid(logicalUuid: string): Promise<Form>;
    /**
     *
     * @summary Gets the most recent form with the given uniqueId
     * @param uniqueId
     */
    getFormByUniqueId(uniqueId: string): Promise<Form>;
    /**
     *
     * @summary Gets a form template by guid
     * @param formTemplateId
     * @param raw
     */
    getFormTemplate(formTemplateId: string, raw?: boolean): Promise<FormTemplate>;
    /**
     * @deprecated This method behavior is not intuitive.
     * If there is any form template with author=currentUser and guid={@link formTemplateGuid} returns them, regardless of
     * {@link specialityCode}.
     * Else returns all form templates with specialty.code={@link specialityCode} and guid={@link formTemplateGuid}
     * regardless of the currentUser.
     */
    getFormTemplatesByGuid(formTemplateGuid: string, specialityCode: string, raw?: boolean): Promise<Array<FormTemplate>>;
    /**
     * Keys must be delimited by coma
     * @summary Get a list of forms by ids
     * @param body
     */
    getForms(body?: ListOfIds): Promise<Array<Form>>;
    /**
     *
     * @summary Gets all forms with given logicalUuid
     * @param logicalUuid
     */
    getFormsByLogicalUuid(logicalUuid: string): Promise<Array<Form>>;
    /**
     *
     * @summary Gets all forms by uniqueId
     * @param uniqueId
     */
    getFormsByUniqueId(uniqueId: string): Promise<Array<Form>>;
    /**
     * Returns the modified form.
     * @summary Modify a form
     * @param body
     */
    modifyForm(body?: Form): Promise<Form>;
    /**
     * Returns the modified forms.
     * @summary Modify a batch of forms
     * @param body
     */
    modifyForms(body?: Array<Form>): Promise<Array<Form>>;
    /**
     *
     * @summary Update a form template's layout
     * @param attachment
     * @param formTemplateId
     */
    setTemplateAttachmentMulti(attachment: ArrayBuffer, formTemplateId: string): Promise<string>;
    /**
     * Returns an instance of created form template.
     * @summary Modify a form template with the current user
     * @param body
     * @param formTemplateId
     */
    updateFormTemplate(formTemplateId: string, body?: FormTemplate): Promise<FormTemplate>;
    /**
     * Returns a list of form templates for the specified user in a group.
     * @summary Get form templates by user in a group
     * @param groupId the id of the group
     * @param userId the id of the user
     * @param loadLayout whether to load the layout of the form templates
     * @param raw whether to use raw mapping for the form templates
     */
    getFormTemplatesByUserInGroup(groupId: string, userId: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>>;
    /**
     * Returns a list of form templates for the specified specialty in a group.
     * @summary Get form templates by specialty in a group
     * @param groupId the id of the group
     * @param specialityCode the specialty code to filter templates by
     * @param loadLayout whether to load the layout of the form templates
     * @param raw whether to use raw mapping for the form templates
     */
    getFormTemplatesBySpecialtyInGroup(groupId: string, specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>>;
    /**
     * Returns an instance of created form template.
     * @summary Create a form template in a group
     * @param groupId the id of the group
     * @param body the form template to create
     */
    createFormTemplateInGroup(groupId: string, body?: FormTemplate): Promise<FormTemplate>;
    /**
     * @summary Delete a form template in a group
     * @param groupId the id of the group
     * @param formTemplateId the id of the form template to delete
     * @param rev the revision of the form template to delete
     */
    deleteFormTemplateInGroup(groupId: string, formTemplateId: string, rev: string): Promise<DocIdentifier>;
    /**
     * Returns an instance of modified form template.
     * @summary Modify a form template in a group
     * @param groupId the id of the group
     * @param formTemplateId the id of the form template to modify
     * @param body the form template with updated data
     */
    updateFormTemplateInGroup(groupId: string, formTemplateId: string, body?: FormTemplate): Promise<FormTemplate>;
    /**
     * @summary Update a form template's layout in a group using multipart upload
     * @param groupId the id of the group
     * @param attachment the layout data
     * @param formTemplateId the id of the form template
     */
    setTemplateAttachmentMultiInGroup(groupId: string, attachment: ArrayBuffer, formTemplateId: string): Promise<string>;
    /**
     * @summary Update a form template's layout in a group
     * @param groupId the id of the group
     * @param formTemplateId the id of the form template
     * @param payload the layout data as binary
     */
    setTemplateAttachmentInGroup(groupId: string, formTemplateId: string, payload: ArrayBuffer): Promise<string>;
    /**
     * @summary Create a batch of form templates in a group
     * @param groupId the id of the group
     * @param formTemplates the form templates to create
     */
    createFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise<FormTemplate[]>;
    /**
     * @summary Modify a batch of form templates in a group
     * @param groupId the id of the group
     * @param formTemplates the form templates to modify
     */
    modifyFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise<FormTemplate[]>;
    /**
     * @summary Get form templates in a group by their ids
     * @param groupId the id of the group
     * @param formTemplateIds the list of form template ids
     * @param raw whether to use raw mapping for the form templates
     */
    getFormTemplatesInGroup(groupId: string, formTemplateIds: string[], raw?: boolean): Promise<FormTemplate[]>;
    /**
     * @summary Get a form template in a group
     * @param groupId the id of the group
     * @param formTemplateId the id of the form template
     * @param raw whether to use raw mapping for the form template
     */
    getFormTemplateInGroup(groupId: string, formTemplateId: string, raw?: boolean): Promise<FormTemplate>;
    /**
     * @summary Delete a batch of form templates in a group
     * @param groupId the id of the group
     * @param formTemplateIdsAndRevs the list of form template ids and revisions
     */
    deleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<DocIdentifier[]>;
    /**
     * @summary Undelete a batch of form templates in a group
     * @param groupId the id of the group
     * @param formTemplateIdsAndRevs the list of form template ids and revisions
     */
    undeleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<FormTemplate[]>;
    /**
     * @summary Purge a batch of form templates in a group
     * @param groupId the id of the group
     * @param formTemplateIdsAndRevs the list of form template ids and revisions
     */
    purgeFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<DocIdentifier[]>;
    /**
     * @internal this method is for internal use only and may be changed without notice
     */
    bulkShareForms(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Form>[]>;
    /**
     * @internal this method is for internal use only and may be changed without notice
     */
    bulkShareFormsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]>;
}
