@teemill/projects 1.2.0 → 1.4.0

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 (45) hide show
  1. package/.openapi-generator/VERSION +1 -1
  2. package/README.md +2 -2
  3. package/dist/apis/ProjectsApi.d.ts +15 -1
  4. package/dist/apis/ProjectsApi.js +90 -8
  5. package/dist/models/ApiError.d.ts +1 -1
  6. package/dist/models/ApiError.js +1 -1
  7. package/dist/models/CreateProjectRequest.d.ts +7 -1
  8. package/dist/models/CreateProjectRequest.js +4 -1
  9. package/dist/models/Integration.d.ts +1 -1
  10. package/dist/models/Integration.js +1 -1
  11. package/dist/models/IntegrationInfo.d.ts +1 -1
  12. package/dist/models/IntegrationInfo.js +1 -1
  13. package/dist/models/IntegrationsResponse.d.ts +1 -1
  14. package/dist/models/IntegrationsResponse.js +1 -1
  15. package/dist/models/Project.d.ts +1 -1
  16. package/dist/models/Project.js +1 -1
  17. package/dist/models/ProjectLogo.d.ts +1 -1
  18. package/dist/models/ProjectLogo.js +1 -1
  19. package/dist/models/ProjectsResponse.d.ts +1 -1
  20. package/dist/models/ProjectsResponse.js +1 -1
  21. package/dist/models/UpdateProjectRequest.d.ts +1 -1
  22. package/dist/models/UpdateProjectRequest.js +1 -1
  23. package/dist/runtime.d.ts +6 -1
  24. package/dist/runtime.js +6 -3
  25. package/package.json +1 -1
  26. package/src/apis/ProjectsApi.ts +154 -18
  27. package/src/models/ApiError.ts +1 -1
  28. package/src/models/CreateProjectRequest.ts +9 -1
  29. package/src/models/Integration.ts +1 -1
  30. package/src/models/IntegrationInfo.ts +1 -1
  31. package/src/models/IntegrationsResponse.ts +1 -1
  32. package/src/models/Project.ts +1 -1
  33. package/src/models/ProjectLogo.ts +1 -1
  34. package/src/models/ProjectsResponse.ts +1 -1
  35. package/src/models/UpdateProjectRequest.ts +1 -1
  36. package/src/runtime.ts +13 -3
  37. package/dist/apis/IntegrationsApi.d.ts +0 -72
  38. package/dist/apis/IntegrationsApi.js +0 -320
  39. package/dist/models/Project1.d.ts +0 -31
  40. package/dist/models/Project1.js +0 -50
  41. package/dist/models/Project2.d.ts +0 -31
  42. package/dist/models/Project2.js +0 -50
  43. package/src/apis/IntegrationsApi.ts +0 -225
  44. package/src/models/Project1.ts +0 -66
  45. package/src/models/Project2.ts +0 -65
@@ -1,225 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Projects API
5
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
- *
7
- * The version of the OpenAPI document: 1.1.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import * as runtime from '../runtime';
17
- import type {
18
- ApiError,
19
- Integration,
20
- IntegrationsResponse,
21
- } from '../models/index';
22
- import {
23
- ApiErrorFromJSON,
24
- ApiErrorToJSON,
25
- IntegrationFromJSON,
26
- IntegrationToJSON,
27
- IntegrationsResponseFromJSON,
28
- IntegrationsResponseToJSON,
29
- } from '../models/index';
30
-
31
- export interface GetIntegrationRequest {
32
- projectId: string;
33
- integrationId: string;
34
- }
35
-
36
- export interface GetIntegrationsRequest {
37
- projectId: string;
38
- }
39
-
40
- export interface InstallIntegrationRequest {
41
- projectId: string;
42
- }
43
-
44
- export interface UninstallIntegrationRequest {
45
- projectId: string;
46
- integrationId: string;
47
- }
48
-
49
- /**
50
- *
51
- */
52
- export class IntegrationsApi extends runtime.BaseAPI {
53
-
54
- /**
55
- * Get an integration
56
- * Get integration
57
- */
58
- async getIntegrationRaw(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>> {
59
- if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
60
- throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getIntegration.');
61
- }
62
-
63
- if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
64
- throw new runtime.RequiredError('integrationId','Required parameter requestParameters.integrationId was null or undefined when calling getIntegration.');
65
- }
66
-
67
- const queryParameters: any = {};
68
-
69
- const headerParameters: runtime.HTTPHeaders = {};
70
-
71
- if (this.configuration && this.configuration.accessToken) {
72
- // oauth required
73
- headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
74
- }
75
-
76
- if (this.configuration && this.configuration.apiKey) {
77
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
78
- }
79
-
80
- const response = await this.request({
81
- path: `/v1/projects/{projectId}/integrations/{integrationId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))),
82
- method: 'GET',
83
- headers: headerParameters,
84
- query: queryParameters,
85
- }, initOverrides);
86
-
87
- return new runtime.JSONApiResponse(response, (jsonValue) => IntegrationFromJSON(jsonValue));
88
- }
89
-
90
- /**
91
- * Get an integration
92
- * Get integration
93
- */
94
- async getIntegration(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration> {
95
- const response = await this.getIntegrationRaw(requestParameters, initOverrides);
96
- return await response.value();
97
- }
98
-
99
- /**
100
- * List all integrations installed on a project
101
- * List integrations
102
- */
103
- async getIntegrationsRaw(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntegrationsResponse>> {
104
- if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
105
- throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getIntegrations.');
106
- }
107
-
108
- const queryParameters: any = {};
109
-
110
- const headerParameters: runtime.HTTPHeaders = {};
111
-
112
- if (this.configuration && this.configuration.accessToken) {
113
- // oauth required
114
- headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
115
- }
116
-
117
- if (this.configuration && this.configuration.apiKey) {
118
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
119
- }
120
-
121
- const response = await this.request({
122
- path: `/v1/projects/{projectId}/integrations`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
123
- method: 'GET',
124
- headers: headerParameters,
125
- query: queryParameters,
126
- }, initOverrides);
127
-
128
- return new runtime.JSONApiResponse(response, (jsonValue) => IntegrationsResponseFromJSON(jsonValue));
129
- }
130
-
131
- /**
132
- * List all integrations installed on a project
133
- * List integrations
134
- */
135
- async getIntegrations(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationsResponse> {
136
- const response = await this.getIntegrationsRaw(requestParameters, initOverrides);
137
- return await response.value();
138
- }
139
-
140
- /**
141
- * Install an integration on the project
142
- * Install integration
143
- */
144
- async installIntegrationRaw(requestParameters: InstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>> {
145
- if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
146
- throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling installIntegration.');
147
- }
148
-
149
- const queryParameters: any = {};
150
-
151
- const headerParameters: runtime.HTTPHeaders = {};
152
-
153
- if (this.configuration && this.configuration.accessToken) {
154
- // oauth required
155
- headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
156
- }
157
-
158
- if (this.configuration && this.configuration.apiKey) {
159
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
160
- }
161
-
162
- const response = await this.request({
163
- path: `/v1/projects/{projectId}/integrations`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
164
- method: 'POST',
165
- headers: headerParameters,
166
- query: queryParameters,
167
- }, initOverrides);
168
-
169
- return new runtime.JSONApiResponse(response, (jsonValue) => IntegrationFromJSON(jsonValue));
170
- }
171
-
172
- /**
173
- * Install an integration on the project
174
- * Install integration
175
- */
176
- async installIntegration(requestParameters: InstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration> {
177
- const response = await this.installIntegrationRaw(requestParameters, initOverrides);
178
- return await response.value();
179
- }
180
-
181
- /**
182
- * Uninstall a projects integration
183
- * Uninstall integration
184
- */
185
- async uninstallIntegrationRaw(requestParameters: UninstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
186
- if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
187
- throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling uninstallIntegration.');
188
- }
189
-
190
- if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
191
- throw new runtime.RequiredError('integrationId','Required parameter requestParameters.integrationId was null or undefined when calling uninstallIntegration.');
192
- }
193
-
194
- const queryParameters: any = {};
195
-
196
- const headerParameters: runtime.HTTPHeaders = {};
197
-
198
- if (this.configuration && this.configuration.accessToken) {
199
- // oauth required
200
- headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
201
- }
202
-
203
- if (this.configuration && this.configuration.apiKey) {
204
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
205
- }
206
-
207
- const response = await this.request({
208
- path: `/v1/projects/{projectId}/integrations/{integrationId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))),
209
- method: 'DELETE',
210
- headers: headerParameters,
211
- query: queryParameters,
212
- }, initOverrides);
213
-
214
- return new runtime.VoidApiResponse(response);
215
- }
216
-
217
- /**
218
- * Uninstall a projects integration
219
- * Uninstall integration
220
- */
221
- async uninstallIntegration(requestParameters: UninstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
222
- await this.uninstallIntegrationRaw(requestParameters, initOverrides);
223
- }
224
-
225
- }
@@ -1,66 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Projects API
5
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
- *
7
- * The version of the OpenAPI document: 1.2.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { exists, mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface Project1
20
- */
21
- export interface Project1 {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof Project1
26
- */
27
- name: string;
28
- }
29
-
30
- /**
31
- * Check if a given object implements the Project1 interface.
32
- */
33
- export function instanceOfProject1(value: object): boolean {
34
- let isInstance = true;
35
- isInstance = isInstance && "name" in value;
36
-
37
- return isInstance;
38
- }
39
-
40
- export function Project1FromJSON(json: any): Project1 {
41
- return Project1FromJSONTyped(json, false);
42
- }
43
-
44
- export function Project1FromJSONTyped(json: any, ignoreDiscriminator: boolean): Project1 {
45
- if ((json === undefined) || (json === null)) {
46
- return json;
47
- }
48
- return {
49
-
50
- 'name': json['name'],
51
- };
52
- }
53
-
54
- export function Project1ToJSON(value?: Project1 | null): any {
55
- if (value === undefined) {
56
- return undefined;
57
- }
58
- if (value === null) {
59
- return null;
60
- }
61
- return {
62
-
63
- 'name': value.name,
64
- };
65
- }
66
-
@@ -1,65 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Projects API
5
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
- *
7
- * The version of the OpenAPI document: 1.2.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { exists, mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface Project2
20
- */
21
- export interface Project2 {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof Project2
26
- */
27
- name?: string;
28
- }
29
-
30
- /**
31
- * Check if a given object implements the Project2 interface.
32
- */
33
- export function instanceOfProject2(value: object): boolean {
34
- let isInstance = true;
35
-
36
- return isInstance;
37
- }
38
-
39
- export function Project2FromJSON(json: any): Project2 {
40
- return Project2FromJSONTyped(json, false);
41
- }
42
-
43
- export function Project2FromJSONTyped(json: any, ignoreDiscriminator: boolean): Project2 {
44
- if ((json === undefined) || (json === null)) {
45
- return json;
46
- }
47
- return {
48
-
49
- 'name': !exists(json, 'name') ? undefined : json['name'],
50
- };
51
- }
52
-
53
- export function Project2ToJSON(value?: Project2 | null): any {
54
- if (value === undefined) {
55
- return undefined;
56
- }
57
- if (value === null) {
58
- return null;
59
- }
60
- return {
61
-
62
- 'name': value.name,
63
- };
64
- }
65
-