theauthapi 1.0.11 → 1.0.13

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.
Files changed (36) hide show
  1. package/README.md +366 -334
  2. package/dist/endpoints/Accounts/Accounts.d.ts +10 -10
  3. package/dist/endpoints/Accounts/AccountsInterface.d.ts +4 -4
  4. package/dist/endpoints/ApiKeys/ApiKeys.d.ts +19 -18
  5. package/dist/endpoints/ApiKeys/ApiKeysInterface.d.ts +12 -11
  6. package/dist/endpoints/Projects/Projects.d.ts +14 -14
  7. package/dist/endpoints/Projects/ProjectsInterface.d.ts +8 -8
  8. package/dist/index.cjs +336 -0
  9. package/dist/index.d.ts +200 -26
  10. package/dist/index.mjs +334 -0
  11. package/dist/libraryMeta.d.ts +1 -1
  12. package/dist/services/ApiRequest/ApiCall.d.ts +5 -5
  13. package/dist/services/ApiRequest/ApiRequest.d.ts +24 -24
  14. package/dist/services/ApiRequest/ApiRequestError.d.ts +10 -10
  15. package/dist/services/ApiRequest/ApiResponseError.d.ts +12 -12
  16. package/dist/services/ApiRequest/HttpMethod.d.ts +7 -7
  17. package/dist/types/index.d.ts +85 -85
  18. package/package.json +14 -7
  19. package/History.md +0 -5
  20. package/dist/endpoints/Accounts/Accounts.js +0 -24
  21. package/dist/endpoints/Accounts/AccountsInterface.js +0 -2
  22. package/dist/endpoints/ApiKeys/ApiKeys.js +0 -80
  23. package/dist/endpoints/ApiKeys/ApiKeysInterface.js +0 -2
  24. package/dist/endpoints/Projects/Projects.js +0 -44
  25. package/dist/endpoints/Projects/ProjectsInterface.js +0 -2
  26. package/dist/index.js +0 -74
  27. package/dist/libraryMeta.js +0 -4
  28. package/dist/services/ApiRequest/ApiCall.js +0 -2
  29. package/dist/services/ApiRequest/ApiRequest.js +0 -115
  30. package/dist/services/ApiRequest/ApiRequestError.js +0 -15
  31. package/dist/services/ApiRequest/ApiResponseError.js +0 -17
  32. package/dist/services/ApiRequest/HttpMethod.js +0 -11
  33. package/dist/types/index.js +0 -13
  34. package/dist/usage.js +0 -20
  35. package/dist/util/index.d.ts +0 -1
  36. package/dist/util/index.js +0 -13
package/dist/usage.js DELETED
@@ -1,20 +0,0 @@
1
- const TheAuthAPI = require("./index").default;
2
-
3
- const accessKey = "live_access_tXhV0mDbN81n7dGRuBPAVvfwsv5N4pmlaGLCELXOtFoWU2EGV6cN5UA3LhjrUg9B";
4
- const theAuthAPI = new TheAuthAPI(accessKey, {
5
- host: "http://localhost:8080",
6
- });
7
-
8
- async function getKeys() {
9
- const keys = await theAuthAPI.apiKeys.getKeys();
10
- return keys.map((k) => k.key);
11
- }
12
-
13
- const apikey =
14
- "test_DdRU9zW8LSHGjzuDDHYqPcDm4ocacFJl6I6wtzBGKevgnAzy8GvqFEuZIj3ykqzS";
15
- (async () => {
16
- console.log(await theAuthAPI.apiKeys.createKey({
17
- name: "Sheesh",
18
- expiry: new Date("Sheesh"),
19
- }));
20
- })();
@@ -1 +0,0 @@
1
- export declare function validateString(variableName: string, value: string): void;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateString = void 0;
7
- const lodash_isstring_1 = __importDefault(require("lodash.isstring"));
8
- function validateString(variableName, value) {
9
- if (!value || !(0, lodash_isstring_1.default)(value)) {
10
- throw new TypeError(`${variableName} must be a string, got: ${value}`);
11
- }
12
- }
13
- exports.validateString = validateString;