text: "use strict";
  /**
   * quantimodo
   * We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do).
   *
   * OpenAPI spec version: 5.8.112511
   *
   *
   * 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.
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  /* tslint:disable:no-unused-variable member-ordering */
  var SharesApi = /** @class */ (function () {
      function SharesApi($http, $httpParamSerializer, basePath) {
          this.$http = $http;
          this.$httpParamSerializer = $httpParamSerializer;
          this.basePath = 'https://app.quantimo.do/api';
          this.defaultHeaders = {};
          if (basePath !== undefined) {
              this.basePath = basePath;
          }
      }
      /**
       * Remove access to user data for a given client_id associated with a given individual, app, or study
       * @summary Delete share
       * @param clientIdToRevoke Client id of the individual, study, or app that the user wishes to no longer have access to their data
       * @param reason Ex: I hate you!
       */
      SharesApi.prototype.deleteShare = function (clientIdToRevoke, reason, extraHttpRequestParams) {
          var localVarPath = this.basePath + '/v3/shares/delete';
          var queryParameters = {};
          var headerParams = Object.assign({}, this.defaultHeaders);
          // verify required parameter 'clientIdToRevoke' is not null or undefined
          if (clientIdToRevoke === null || clientIdToRevoke === undefined) {
              throw new Error('Required parameter clientIdToRevoke was null or undefined when calling deleteShare.');
          }
          if (clientIdToRevoke !== undefined) {
              queryParameters['clientIdToRevoke'] = clientIdToRevoke;
          }
          if (reason !== undefined) {
              queryParameters['reason'] = reason;
          }
          var httpRequestParams = {
              method: 'POST',
              url: localVarPath,
              params: queryParameters,
              headers: headerParams
          };
          if (extraHttpRequestParams) {
              httpRequestParams = Object.assign(httpRequestParams, extraHttpRequestParams);
          }
          return this.$http(httpRequestParams);
      };
      /**
       * This is a list of individuals, apps, or studies with access to your measurements.
       * @summary Get Authorized Apps, Studies, and Individuals
       * @param userId User&#39;s id
       * @param createdAt When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local.
       * @param updatedAt When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local.
       * @param clientId Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do
       * @param appVersion Ex: 2.1.1.0
       * @param log Username or email
       * @param pwd User password
       */
      SharesApi.prototype.getShares = function (userId, createdAt, updatedAt, clientId, appVersion, log, pwd, extraHttpRequestParams) {
          var localVarPath = this.basePath + '/v3/shares';
          var queryParameters = {};
          var headerParams = Object.assign({}, this.defaultHeaders);
          if (userId !== undefined) {
              queryParameters['userId'] = userId;
          }
          if (createdAt !== undefined) {
              queryParameters['createdAt'] = createdAt;
          }
          if (updatedAt !== undefined) {
              queryParameters['updatedAt'] = updatedAt;
          }
          if (clientId !== undefined) {
              queryParameters['clientId'] = clientId;
          }
          if (appVersion !== undefined) {
              queryParameters['appVersion'] = appVersion;
          }
          if (log !== undefined) {
              queryParameters['log'] = log;
          }
          if (pwd !== undefined) {
              queryParameters['pwd'] = pwd;
          }
          var httpRequestParams = {
              method: 'GET',
              url: localVarPath,
              params: queryParameters,
              headers: headerParams
          };
          if (extraHttpRequestParams) {
              httpRequestParams = Object.assign(httpRequestParams, extraHttpRequestParams);
          }
          return this.$http(httpRequestParams);
      };
      /**
       * Invite someone to view your measurements
       * @summary Delete share
       * @param body Details about person to share with
       * @param clientId Your QuantiModo client id can be obtained by creating an app at https://builder.quantimo.do
       */
      SharesApi.prototype.inviteShare = function (body, clientId, extraHttpRequestParams) {
          var localVarPath = this.basePath + '/v3/shares/invite';
          var queryParameters = {};
          var headerParams = Object.assign({}, this.defaultHeaders);
          // verify required parameter 'body' is not null or undefined
          if (body === null || body === undefined) {
              throw new Error('Required parameter body was null or undefined when calling inviteShare.');
          }
          if (clientId !== undefined) {
              queryParameters['clientId'] = clientId;
          }
          var httpRequestParams = {
              method: 'POST',
              url: localVarPath,
              data: body,
              params: queryParameters,
              headers: headerParams
          };
          if (extraHttpRequestParams) {
              httpRequestParams = Object.assign(httpRequestParams, extraHttpRequestParams);
          }
          return this.$http(httpRequestParams);
      };
      SharesApi.$inject = ['$http', '$httpParamSerializer', 'basePath'];
      return SharesApi;
  }());
  exports.SharesApi = SharesApi;
  //# sourceMappingURL=SharesApi.js.map