theauthapi 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import ApiRequest from "../../services/ApiRequest/ApiRequest";
2
2
  import { ApiKey, ApiKeyInput, UpdateApiKeyInput } from "../../types";
3
- import ApiKeysInterface from "./ApiKeysInterface";
3
+ import { ApiKeysInterface } from "./ApiKeysInterface";
4
4
  declare class ApiKeys implements ApiKeysInterface {
5
5
  api: ApiRequest;
6
6
  constructor(apiService: ApiRequest);
@@ -10,4 +10,4 @@ declare class ApiKeys implements ApiKeysInterface {
10
10
  updateKey(apiKey: string, updateTo: UpdateApiKeyInput): Promise<ApiKey>;
11
11
  deleteKey(apiKey: string): Promise<boolean>;
12
12
  }
13
- export = ApiKeys;
13
+ export default ApiKeys;
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
14
15
  const HttpMethod_1 = require("../../services/ApiRequest/HttpMethod");
15
16
  const lodash_omit_1 = __importDefault(require("lodash.omit"));
16
17
  const util_1 = require("../../util");
@@ -55,4 +56,4 @@ class ApiKeys {
55
56
  });
56
57
  }
57
58
  }
58
- module.exports = ApiKeys;
59
+ exports.default = ApiKeys;
@@ -1,9 +1,8 @@
1
1
  import { ApiKey, ApiKeyInput, UpdateApiKeyInput } from "../../types";
2
- interface ApiKeysInterface {
2
+ export interface ApiKeysInterface {
3
3
  authenticateKey(apiKey: string): Promise<ApiKey>;
4
4
  getKeys(projectId: string): Promise<ApiKey[]>;
5
5
  createKey(apiKey: ApiKeyInput): Promise<ApiKey>;
6
6
  updateKey(apiKey: string, updateTo: UpdateApiKeyInput): Promise<ApiKey>;
7
7
  deleteKey(apiKey: string): Promise<boolean>;
8
8
  }
9
- export = ApiKeysInterface;
@@ -1 +1 @@
1
- export declare const version = "1.0.1";
1
+ export declare const version = "1.0.6";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = "1.0.1";
4
+ exports.version = "1.0.6";
@@ -2,4 +2,4 @@ import { HttpMethod } from "./HttpMethod";
2
2
  interface ApiCall {
3
3
  request<T>(method: HttpMethod, endpoint: string, payload?: any): Promise<T>;
4
4
  }
5
- export = ApiCall;
5
+ export default ApiCall;
@@ -1,4 +1,4 @@
1
1
  declare class ApiRequestError extends Error {
2
2
  constructor(statusCode: number, message: string);
3
3
  }
4
- export = ApiRequestError;
4
+ export default ApiRequestError;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  class ApiRequestError extends Error {
3
4
  constructor(statusCode, message) {
4
5
  super(`(${statusCode}): ${message}`);
5
6
  }
6
7
  }
7
- module.exports = ApiRequestError;
8
+ exports.default = ApiRequestError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theauthapi",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Client library for TheAuthAPI.com",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/dist/usage.ts.js DELETED
@@ -1,8 +0,0 @@
1
- const TheAuthAPI = require('./index').default;
2
-
3
- const api = new TheAuthAPI("live_access_j5OLGJz9SkRUSEiiGdQRFMyRLpnpjtbXidEQVmL8D0Ly3xaPs1FcTnl2z4MGARlD", {
4
- host: 'http://localhost:8080'
5
- });
6
- const keyData = api.projects.getProjects('0527d593-2e86-48ef-b2a7-043afb46ff68')
7
- .then(data => console.log(data))
8
- .catch(error => console.log(error))