theauthapi 1.0.12 → 1.0.15

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 (33) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +366 -334
  3. package/dist/endpoints/Accounts/Accounts.d.ts +10 -10
  4. package/dist/endpoints/Accounts/Accounts.js +22 -24
  5. package/dist/endpoints/Accounts/AccountsInterface.d.ts +4 -4
  6. package/dist/endpoints/Accounts/AccountsInterface.js +1 -2
  7. package/dist/endpoints/ApiKeys/ApiKeys.d.ts +19 -19
  8. package/dist/endpoints/ApiKeys/ApiKeys.js +80 -85
  9. package/dist/endpoints/ApiKeys/ApiKeysInterface.d.ts +12 -12
  10. package/dist/endpoints/ApiKeys/ApiKeysInterface.js +1 -2
  11. package/dist/endpoints/Projects/Projects.d.ts +14 -14
  12. package/dist/endpoints/Projects/Projects.js +42 -44
  13. package/dist/endpoints/Projects/ProjectsInterface.d.ts +8 -8
  14. package/dist/endpoints/Projects/ProjectsInterface.js +1 -2
  15. package/dist/index.cjs +336 -0
  16. package/dist/index.d.ts +200 -26
  17. package/dist/index.js +69 -74
  18. package/dist/index.mjs +334 -0
  19. package/dist/libraryMeta.d.ts +1 -1
  20. package/dist/libraryMeta.js +1 -4
  21. package/dist/services/ApiRequest/ApiCall.d.ts +5 -5
  22. package/dist/services/ApiRequest/ApiCall.js +1 -2
  23. package/dist/services/ApiRequest/ApiRequest.d.ts +24 -24
  24. package/dist/services/ApiRequest/ApiRequest.js +110 -115
  25. package/dist/services/ApiRequest/ApiRequestError.d.ts +10 -10
  26. package/dist/services/ApiRequest/ApiRequestError.js +13 -15
  27. package/dist/services/ApiRequest/ApiResponseError.d.ts +12 -12
  28. package/dist/services/ApiRequest/ApiResponseError.js +15 -17
  29. package/dist/services/ApiRequest/HttpMethod.d.ts +7 -7
  30. package/dist/services/ApiRequest/HttpMethod.js +8 -11
  31. package/dist/types/index.d.ts +85 -85
  32. package/dist/types/index.js +10 -13
  33. package/package.json +17 -6
@@ -1,10 +1,10 @@
1
- import { AccountsInterface } from "./AccountsInterface";
2
- import ApiRequest from "../../services/ApiRequest/ApiRequest";
3
- import { Account } from "../../types";
4
- declare class Accounts implements AccountsInterface {
5
- api: ApiRequest;
6
- endpoint: string;
7
- constructor(apiService: ApiRequest);
8
- getAccount(accountId: string): Promise<Account>;
9
- }
10
- export default Accounts;
1
+ import { AccountsInterface } from "./AccountsInterface";
2
+ import ApiRequest from "../../services/ApiRequest/ApiRequest";
3
+ import { Account } from "../../types";
4
+ declare class Accounts implements AccountsInterface {
5
+ api: ApiRequest;
6
+ endpoint: string;
7
+ constructor(apiService: ApiRequest);
8
+ getAccount(accountId: string): Promise<Account>;
9
+ }
10
+ export default Accounts;
@@ -1,24 +1,22 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const HttpMethod_1 = require("../../services/ApiRequest/HttpMethod");
13
- class Accounts {
14
- constructor(apiService) {
15
- this.api = apiService;
16
- this.endpoint = "/accounts";
17
- }
18
- getAccount(accountId) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- return yield this.api.request(HttpMethod_1.HttpMethod.GET, `${this.endpoint}/${accountId}`);
21
- });
22
- }
23
- }
24
- exports.default = Accounts;
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { HttpMethod } from "../../services/ApiRequest/HttpMethod";
11
+ class Accounts {
12
+ constructor(apiService) {
13
+ this.api = apiService;
14
+ this.endpoint = "/accounts";
15
+ }
16
+ getAccount(accountId) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ return yield this.api.request(HttpMethod.GET, `${this.endpoint}/${accountId}`);
19
+ });
20
+ }
21
+ }
22
+ export default Accounts;
@@ -1,4 +1,4 @@
1
- import { Account } from "../../types";
2
- export interface AccountsInterface {
3
- getAccount(accountId: string): Promise<Account>;
4
- }
1
+ import { Account } from "../../types";
2
+ export interface AccountsInterface {
3
+ getAccount(accountId: string): Promise<Account>;
4
+ }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,19 +1,19 @@
1
- import ApiRequest from "../../services/ApiRequest/ApiRequest";
2
- import { ApiKey, ApiKeyFilter, ApiKeyInput, UpdateApiKeyInput } from "../../types";
3
- import { ApiKeysInterface } from "./ApiKeysInterface";
4
- declare class ApiKeys implements ApiKeysInterface {
5
- api: ApiRequest;
6
- private readonly endpoint;
7
- constructor(apiService: ApiRequest);
8
- isValidKey(apikey: string): Promise<boolean>;
9
- authenticateKey(apikey: string): Promise<ApiKey>;
10
- getKeys(filter?: ApiKeyFilter): Promise<ApiKey[]>;
11
- getKey(apikey: string): Promise<ApiKey>;
12
- createKey(apiKey: ApiKeyInput): Promise<ApiKey>;
13
- updateKey(apiKey: string, updatedKey: UpdateApiKeyInput): Promise<ApiKey>;
14
- deleteKey(apiKey: string): Promise<boolean>;
15
- reactivateKey(apiKey: string): Promise<ApiKey>;
16
- rotateKey(apiKey: string): Promise<ApiKey>;
17
- private getKeysFilterEndpoint;
18
- }
19
- export default ApiKeys;
1
+ import ApiRequest from "../../services/ApiRequest/ApiRequest";
2
+ import { ApiKey, ApiKeyFilter, ApiKeyInput, UpdateApiKeyInput } from "../../types";
3
+ import { ApiKeysInterface } from "./ApiKeysInterface";
4
+ declare class ApiKeys implements ApiKeysInterface {
5
+ api: ApiRequest;
6
+ private readonly endpoint;
7
+ constructor(apiService: ApiRequest);
8
+ isValidKey(apikey: string): Promise<boolean>;
9
+ authenticateKey(apikey: string): Promise<ApiKey>;
10
+ getKeys(filter?: ApiKeyFilter): Promise<ApiKey[]>;
11
+ getKey(apikey: string): Promise<ApiKey>;
12
+ createKey(apiKey: ApiKeyInput): Promise<ApiKey>;
13
+ updateKey(apiKey: string, updatedKey: UpdateApiKeyInput): Promise<ApiKey>;
14
+ deleteKey(apiKey: string): Promise<boolean>;
15
+ reactivateKey(apiKey: string): Promise<ApiKey>;
16
+ rotateKey(apiKey: string): Promise<ApiKey>;
17
+ private getKeysFilterEndpoint;
18
+ }
19
+ export default ApiKeys;
@@ -1,85 +1,80 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const HttpMethod_1 = require("../../services/ApiRequest/HttpMethod");
16
- const ApiResponseError_1 = __importDefault(require("../../services/ApiRequest/ApiResponseError"));
17
- class ApiKeys {
18
- constructor(apiService) {
19
- this.api = apiService;
20
- this.endpoint = "/api-keys/";
21
- }
22
- isValidKey(apikey) {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- try {
25
- const key = yield this.authenticateKey(apikey);
26
- return key.key !== undefined;
27
- }
28
- catch (error) {
29
- if (error instanceof ApiResponseError_1.default && error.statusCode === 404) {
30
- return false;
31
- }
32
- throw error;
33
- }
34
- });
35
- }
36
- authenticateKey(apikey) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- return yield this.api.request(HttpMethod_1.HttpMethod.POST, `/api-keys/auth/${apikey}`);
39
- });
40
- }
41
- getKeys(filter) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- const endpoint = this.getKeysFilterEndpoint(filter);
44
- return yield this.api.request(HttpMethod_1.HttpMethod.GET, endpoint);
45
- });
46
- }
47
- getKey(apikey) {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- return yield this.api.request(HttpMethod_1.HttpMethod.GET, `/api-keys/${apikey}`);
50
- });
51
- }
52
- createKey(apiKey) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- return yield this.api.request(HttpMethod_1.HttpMethod.POST, "/api-keys", apiKey);
55
- });
56
- }
57
- updateKey(apiKey, updatedKey) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- return yield this.api.request(HttpMethod_1.HttpMethod.PATCH, `/api-keys/${apiKey}`, updatedKey);
60
- });
61
- }
62
- deleteKey(apiKey) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- return yield this.api.request(HttpMethod_1.HttpMethod.DELETE, `/api-keys/${apiKey}`);
65
- });
66
- }
67
- reactivateKey(apiKey) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- return yield this.api.request(HttpMethod_1.HttpMethod.PATCH, `/api-keys/${apiKey}/reactivate`);
70
- });
71
- }
72
- rotateKey(apiKey) {
73
- return __awaiter(this, void 0, void 0, function* () {
74
- return yield this.api.request(HttpMethod_1.HttpMethod.POST, `/api-keys/${apiKey}/rotate`);
75
- });
76
- }
77
- getKeysFilterEndpoint(filter) {
78
- let filters = [];
79
- if (filter !== undefined) {
80
- filters = Object.entries(filter).map(([key, value]) => `${key}=${value}`);
81
- }
82
- return `${this.endpoint}${filter !== undefined ? "?" : ""}${filters.join("&")}`;
83
- }
84
- }
85
- exports.default = ApiKeys;
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { HttpMethod } from "../../services/ApiRequest/HttpMethod";
11
+ import ApiResponseError from "../../services/ApiRequest/ApiResponseError";
12
+ class ApiKeys {
13
+ constructor(apiService) {
14
+ this.api = apiService;
15
+ this.endpoint = "/api-keys/";
16
+ }
17
+ isValidKey(apikey) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ try {
20
+ const key = yield this.authenticateKey(apikey);
21
+ return key.key !== undefined;
22
+ }
23
+ catch (error) {
24
+ if (error instanceof ApiResponseError && error.statusCode === 404) {
25
+ return false;
26
+ }
27
+ throw error;
28
+ }
29
+ });
30
+ }
31
+ authenticateKey(apikey) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ return yield this.api.request(HttpMethod.POST, `/api-keys/auth/${apikey}`);
34
+ });
35
+ }
36
+ getKeys(filter) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const endpoint = this.getKeysFilterEndpoint(filter);
39
+ return yield this.api.request(HttpMethod.GET, endpoint);
40
+ });
41
+ }
42
+ getKey(apikey) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ return yield this.api.request(HttpMethod.GET, `/api-keys/${apikey}`);
45
+ });
46
+ }
47
+ createKey(apiKey) {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ return yield this.api.request(HttpMethod.POST, "/api-keys", apiKey);
50
+ });
51
+ }
52
+ updateKey(apiKey, updatedKey) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ return yield this.api.request(HttpMethod.PATCH, `/api-keys/${apiKey}`, updatedKey);
55
+ });
56
+ }
57
+ deleteKey(apiKey) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ return yield this.api.request(HttpMethod.DELETE, `/api-keys/${apiKey}`);
60
+ });
61
+ }
62
+ reactivateKey(apiKey) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ return yield this.api.request(HttpMethod.PATCH, `/api-keys/${apiKey}/reactivate`);
65
+ });
66
+ }
67
+ rotateKey(apiKey) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ return yield this.api.request(HttpMethod.POST, `/api-keys/${apiKey}/rotate`);
70
+ });
71
+ }
72
+ getKeysFilterEndpoint(filter) {
73
+ let filters = [];
74
+ if (filter !== undefined) {
75
+ filters = Object.entries(filter).map(([key, value]) => `${key}=${value}`);
76
+ }
77
+ return `${this.endpoint}${filter !== undefined ? "?" : ""}${filters.join("&")}`;
78
+ }
79
+ }
80
+ export default ApiKeys;
@@ -1,12 +1,12 @@
1
- import { ApiKey, ApiKeyFilter, ApiKeyInput, UpdateApiKeyInput } from "../../types";
2
- export interface ApiKeysInterface {
3
- isValidKey(apiKey: string): Promise<boolean>;
4
- getKey(apiKey: string): Promise<ApiKey>;
5
- authenticateKey(apiKey: string): Promise<ApiKey>;
6
- getKeys(filter?: ApiKeyFilter): Promise<ApiKey[]>;
7
- createKey(apiKey: ApiKeyInput): Promise<ApiKey>;
8
- updateKey(apiKey: string, updateTo: UpdateApiKeyInput): Promise<ApiKey>;
9
- deleteKey(apiKey: string): Promise<boolean>;
10
- reactivateKey(apiKey: string): Promise<ApiKey>;
11
- rotateKey(apiKey: string): Promise<ApiKey>;
12
- }
1
+ import { ApiKey, ApiKeyFilter, ApiKeyInput, UpdateApiKeyInput } from "../../types";
2
+ export interface ApiKeysInterface {
3
+ isValidKey(apiKey: string): Promise<boolean>;
4
+ getKey(apiKey: string): Promise<ApiKey>;
5
+ authenticateKey(apiKey: string): Promise<ApiKey>;
6
+ getKeys(filter?: ApiKeyFilter): Promise<ApiKey[]>;
7
+ createKey(apiKey: ApiKeyInput): Promise<ApiKey>;
8
+ updateKey(apiKey: string, updateTo: UpdateApiKeyInput): Promise<ApiKey>;
9
+ deleteKey(apiKey: string): Promise<boolean>;
10
+ reactivateKey(apiKey: string): Promise<ApiKey>;
11
+ rotateKey(apiKey: string): Promise<ApiKey>;
12
+ }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,14 +1,14 @@
1
- import ApiRequest from "../../services/ApiRequest/ApiRequest";
2
- import { CreateProjectInput, Project, UpdateProjectInput } from "../../types";
3
- import { ProjectsInterface } from "./ProjectsInterface";
4
- declare class Projects implements ProjectsInterface {
5
- api: ApiRequest;
6
- endpoint: string;
7
- constructor(apiService: ApiRequest);
8
- getProjects(accountId: string): Promise<Project[]>;
9
- getProject(projectId: string): Promise<Project>;
10
- deleteProject(projectId: string): Promise<boolean>;
11
- createProject(project: CreateProjectInput): Promise<Project>;
12
- updateProject(projectId: string, project: UpdateProjectInput): Promise<Project>;
13
- }
14
- export default Projects;
1
+ import ApiRequest from "../../services/ApiRequest/ApiRequest";
2
+ import { CreateProjectInput, Project, UpdateProjectInput } from "../../types";
3
+ import { ProjectsInterface } from "./ProjectsInterface";
4
+ declare class Projects implements ProjectsInterface {
5
+ api: ApiRequest;
6
+ endpoint: string;
7
+ constructor(apiService: ApiRequest);
8
+ getProjects(accountId: string): Promise<Project[]>;
9
+ getProject(projectId: string): Promise<Project>;
10
+ deleteProject(projectId: string): Promise<boolean>;
11
+ createProject(project: CreateProjectInput): Promise<Project>;
12
+ updateProject(projectId: string, project: UpdateProjectInput): Promise<Project>;
13
+ }
14
+ export default Projects;
@@ -1,44 +1,42 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const HttpMethod_1 = require("../../services/ApiRequest/HttpMethod");
13
- class Projects {
14
- constructor(apiService) {
15
- this.api = apiService;
16
- this.endpoint = "/projects";
17
- }
18
- getProjects(accountId) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- return yield this.api.request(HttpMethod_1.HttpMethod.GET, `${this.endpoint}?accountId=${accountId}`);
21
- });
22
- }
23
- getProject(projectId) {
24
- return __awaiter(this, void 0, void 0, function* () {
25
- return yield this.api.request(HttpMethod_1.HttpMethod.GET, `${this.endpoint}/${projectId}`);
26
- });
27
- }
28
- deleteProject(projectId) {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- return yield this.api.request(HttpMethod_1.HttpMethod.DELETE, `${this.endpoint}/${projectId}`);
31
- });
32
- }
33
- createProject(project) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- return yield this.api.request(HttpMethod_1.HttpMethod.POST, this.endpoint, project);
36
- });
37
- }
38
- updateProject(projectId, project) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- return this.api.request(HttpMethod_1.HttpMethod.PATCH, `${this.endpoint}/${projectId}`, project);
41
- });
42
- }
43
- }
44
- exports.default = Projects;
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { HttpMethod } from "../../services/ApiRequest/HttpMethod";
11
+ class Projects {
12
+ constructor(apiService) {
13
+ this.api = apiService;
14
+ this.endpoint = "/projects";
15
+ }
16
+ getProjects(accountId) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ return yield this.api.request(HttpMethod.GET, `${this.endpoint}?accountId=${accountId}`);
19
+ });
20
+ }
21
+ getProject(projectId) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ return yield this.api.request(HttpMethod.GET, `${this.endpoint}/${projectId}`);
24
+ });
25
+ }
26
+ deleteProject(projectId) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ return yield this.api.request(HttpMethod.DELETE, `${this.endpoint}/${projectId}`);
29
+ });
30
+ }
31
+ createProject(project) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ return yield this.api.request(HttpMethod.POST, this.endpoint, project);
34
+ });
35
+ }
36
+ updateProject(projectId, project) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ return this.api.request(HttpMethod.PATCH, `${this.endpoint}/${projectId}`, project);
39
+ });
40
+ }
41
+ }
42
+ export default Projects;
@@ -1,8 +1,8 @@
1
- import { CreateProjectInput, Project, UpdateProjectInput } from "../../types";
2
- export interface ProjectsInterface {
3
- getProjects(accountId: string): Promise<Project[]>;
4
- getProject(projectId: string): Promise<Project>;
5
- deleteProject(projectId: string): Promise<boolean>;
6
- createProject(project: CreateProjectInput): Promise<Project>;
7
- updateProject(name: string, updateTo: UpdateProjectInput): Promise<Project>;
8
- }
1
+ import { CreateProjectInput, Project, UpdateProjectInput } from "../../types";
2
+ export interface ProjectsInterface {
3
+ getProjects(accountId: string): Promise<Project[]>;
4
+ getProject(projectId: string): Promise<Project>;
5
+ deleteProject(projectId: string): Promise<boolean>;
6
+ createProject(project: CreateProjectInput): Promise<Project>;
7
+ updateProject(name: string, updateTo: UpdateProjectInput): Promise<Project>;
8
+ }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};