text: /*
   * Outline API
   * # Introduction  The Outline API is structured in an RPC style. It enables you to programatically interact with all aspects of Outline’s data – in fact, the main application is built on exactly the same API.  The API structure is available as an  [openapi specification](https://github.com/outline/openapi) if that’s your  jam – it can be used to generate clients for most programming languages.  # Making requests  Outline’s API follows simple RPC style conventions where each API endpoint is a method on `https://app.getoutline.com/api/method`. Both `GET` and `POST`  methods are supported but it’s recommended that you make all call using POST. Only HTTPS is supported and all response payloads are JSON.  When making `POST` requests, request parameters are parsed depending on Content-Type header. To make a call using JSON payload, you must pass Content-Type: application/json header, here’s an example using CURL:  ``` curl https://app.getoutline.com/api/documents.info -X POST -H 'authorization: Bearer MY_API_KEY' -H 'content-type: application/json' -H 'accept: application/json' -d '{\"id\": \"outline-api-NTpezNwhUP\"}' ```  Or, with JavaScript:  ```javascript const response = await fetch(\"https://app.getoutline.com/api/documents.info\", {   method: \"POST\",   headers: {     Accept: \"application/json\",     \"Content-Type\": \"application/json\",     Authorization: 'Bearer MY_API_KEY'   } })  const body = await response.json(); const document = body.data; ```  # Authentication  To access API endpoints, you must provide a valid API key. You can create new API keys in your [account settings](https://app.getoutline.com/settings). Be careful when handling your keys as they give access to all of your documents, you should treat them like passwords and they should never be committed to source control.  To authenticate with API, you can supply the API key as a header (`Authorization: Bearer YOUR_API_KEY`) or as part of the payload using `token`  parameter. Header based authentication is highly recommended so that your keys don’t accidentally leak into logs.  Some API endpoints allow unauthenticated requests for public resources and they can be called without an API key.  # Errors  All successful API requests will be returned with a 200 or 201 status code and `ok: true` in the response payload. If there’s an error while making the request, the appropriate status code is returned with the error message:  ``` {   \"ok\": false,   \"error: \"Not Found\" } ```  # Pagination  Most top-level API resources have support for \"list\" API methods. For instance, you can list users, documents, and collections. These list methods share common parameters, taking both `limit` and `offset`.  Responses will echo these parameters in the root `pagination` key, and also include a `nextPath` key which can be used as a handy shortcut to fetch the next page of results. For example:  ``` {   ok: true,   status: 200,   data: […],   pagination: {     limit: 25,     offset: 0,     nextPath: \"/api/documents.list?limit=25&offset=25\"   } } ```  # Policies  Many API resources have associated \"policies\", these objects describe the current API keys authorized actions related to an individual resource. It should be noted that the policy \"id\" is identical to the resource it is related to, policies themselves do not have unique identifiers.  For most usecases of the API, policies can be safely ignored. Calling unauthorized methods will result in the appropriate response code – these are used in the main Outline UI to adjust which elements are visible. 
   *
   * OpenAPI spec version: 0.1.0
   * Contact: hello@getoutline.com
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: 3.0.27
   *
   * Do not edit the class manually.
   *
   */
  import {ApiClient} from "../ApiClient";
  import {AttachmentsCreateBody} from '../model/AttachmentsCreateBody';
  import {AttachmentsDeleteBody} from '../model/AttachmentsDeleteBody';
  import {AttachmentsRedirectBody} from '../model/AttachmentsRedirectBody';
  import {Error} from '../model/Error';
  import {InlineResponse200} from '../model/InlineResponse200';
  import {InlineResponse2001} from '../model/InlineResponse2001';
  
  /**
  * Attachments service.
  * @module api/AttachmentsApi
  * @version 0.1.0
  */
  export class AttachmentsApi {
  
      /**
      * Constructs a new AttachmentsApi. 
      * @alias module:api/AttachmentsApi
      * @class
      * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
      * default to {@link module:ApiClient#instanc
      e} if unspecified.
      */
      constructor(apiClient) {
          this.apiClient = apiClient || ApiClient.instance;
      }
  
      /**
       * Callback function to receive the result of the attachmentsCreatePost operation.
       * @callback moduleapi/AttachmentsApi~attachmentsCreatePostCallback
       * @param {String} error Error message, if any.
       * @param {module:model/InlineResponse200{ data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Create an attachment
       * Creating an attachment object creates a database record and returns the inputs needed to generate a signed url and upload the file from the client to cloud storage.
       * @param {Object} opts Optional parameters
       * @param {module:model/AttachmentsCreateBody} opts.body 
       * @param {module:api/AttachmentsApi~attachmentsCreatePostCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
       */
      attachmentsCreatePost(opts, callback) {
        opts = opts || {};
        let postBody = opts['body'];
  
        let pathParams = {
          
        };
        let queryParams = {
          
        };
        let headerParams = {
          
        };
        let formParams = {
          
        };
  
        let authNames = ['http'];
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        let returnType = InlineResponse200;
  
        return this.apiClient.callApi(
          '/attachments.create', 'POST',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
      /**
       * Callback function to receive the result of the attachmentsDeletePost operation.
       * @callback moduleapi/AttachmentsApi~attachmentsDeletePostCallback
       * @param {String} error Error message, if any.
       * @param {module:model/InlineResponse2001{ data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Delete an attachment
       * Deleting an attachment is permanant. It will not delete references or links to the attachment that may exist in your documents.
       * @param {Object} opts Optional parameters
       * @param {module:model/AttachmentsDeleteBody} opts.body 
       * @param {module:api/AttachmentsApi~attachmentsDeletePostCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
       */
      attachmentsDeletePost(opts, callback) {
        opts = opts || {};
        let postBody = opts['body'];
  
        let pathParams = {
          
        };
        let queryParams = {
          
        };
        let headerParams = {
          
        };
        let formParams = {
          
        };
  
        let authNames = ['http'];
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        let returnType = InlineResponse2001;
  
        return this.apiClient.callApi(
          '/attachments.delete', 'POST',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
      /**
       * Callback function to receive the result of the attachmentsRedirectPost operation.
       * @callback moduleapi/AttachmentsApi~attachmentsRedirectPostCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Retrieve an attachment
       * Load an attachment from where it is stored based on the id. If the attachment is private then a temporary, signed url with embedded credentials is generated on demand.
       * @param {Object} opts Optional parameters
       * @param {module:model/AttachmentsRedirectBody} opts.body 
       * @param {module:api/AttachmentsApi~attachmentsRedirectPostCallback} callback The callback function, accepting three arguments: error, data, response
       */
      attachmentsRedirectPost(opts, callback) {
        opts = opts || {};
        let postBody = opts['body'];
  
        let pathParams = {
          
        };
        let queryParams = {
          
        };
        let headerParams = {
          
        };
        let formParams = {
          
        };
  
        let authNames = ['http'];
        let contentTypes = ['application/json'];
        let accepts = [];
        let returnType = null;
  
        return this.apiClient.callApi(
          '/attachments.redirect', 'POST',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
  }