import { IBuilderInit } from '../types/index.types'; import { ImportDocsTypes } from './imports.types'; export interface IImportService { importPostmanV21(file: Buffer, type: ImportDocsTypes, version: string, updateIfExists?: boolean, app_id?: string): Promise; importApp(file: Buffer, type: ImportDocsTypes, version: string, updateIfExists: boolean, app_id: string): Promise; } export default class ImportService implements IImportService { private workspace_id; private public_key; private user_id; private token; private appService; private appApi; private workspaceApi; private postmanV21Repo; private openAPIV3Repo; constructor({ workspace_id, public_key, user_id, token, env_type, access_key }: IBuilderInit); importApp(file: Buffer, type: ImportDocsTypes, version?: string, updateIfExists?: boolean, app_id?: string, isAdminImport?: boolean): Promise; importPostmanV21(file: Buffer, type: ImportDocsTypes, version: string, updateIfExists?: boolean, app_id?: string, isAdminImport?: boolean): Promise; importOpenAPIV3(file: Buffer, type: ImportDocsTypes, version: string, updateIfExists?: boolean, app_id?: string, isAdminImport?: boolean): Promise; private splitAndWriteBulkInChunks; private getUserAccess; }