@teemill/projects 1.0.4 → 1.1.1

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.
@@ -2,7 +2,6 @@
2
2
  .npmignore
3
3
  README.md
4
4
  package.json
5
- src/apis/IntegrationsApi.ts
6
5
  src/apis/ProjectsApi.ts
7
6
  src/apis/index.ts
8
7
  src/index.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/projects@1.0.4
1
+ ## @teemill/projects@1.1.1
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @teemill/projects@1.0.4 --save
39
+ npm install @teemill/projects@1.1.1 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -2,7 +2,7 @@
2
2
  * Projects API
3
3
  * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.4
5
+ * The version of the OpenAPI document: 1.1.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -11,16 +11,20 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { Integration, IntegrationsResponse } from '../models/index';
14
- export interface GetProjectIntegrationRequest {
14
+ export interface GetIntegrationRequest {
15
15
  projectId: string;
16
16
  integrationId: string;
17
17
  }
18
- export interface GetProjectIntegrationsRequest {
18
+ export interface GetIntegrationsRequest {
19
19
  projectId: string;
20
20
  }
21
- export interface InstallProjectIntegrationRequest {
21
+ export interface InstallIntegrationRequest {
22
22
  projectId: string;
23
23
  }
24
+ export interface UninstallIntegrationRequest {
25
+ projectId: string;
26
+ integrationId: string;
27
+ }
24
28
  /**
25
29
  *
26
30
  */
@@ -29,30 +33,40 @@ export declare class IntegrationsApi extends runtime.BaseAPI {
29
33
  * Get an integration
30
34
  * Get integration
31
35
  */
32
- getProjectIntegrationRaw(requestParameters: GetProjectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
36
+ getIntegrationRaw(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
33
37
  /**
34
38
  * Get an integration
35
39
  * Get integration
36
40
  */
37
- getProjectIntegration(requestParameters: GetProjectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration>;
41
+ getIntegration(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration>;
38
42
  /**
39
43
  * List all integrations installed on a project
40
44
  * List integrations
41
45
  */
42
- getProjectIntegrationsRaw(requestParameters: GetProjectIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntegrationsResponse>>;
46
+ getIntegrationsRaw(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntegrationsResponse>>;
43
47
  /**
44
48
  * List all integrations installed on a project
45
49
  * List integrations
46
50
  */
47
- getProjectIntegrations(requestParameters: GetProjectIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationsResponse>;
51
+ getIntegrations(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationsResponse>;
48
52
  /**
49
53
  * Install an integration on the project
50
54
  * Install integration
51
55
  */
52
- installProjectIntegrationRaw(requestParameters: InstallProjectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
56
+ installIntegrationRaw(requestParameters: InstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
53
57
  /**
54
58
  * Install an integration on the project
55
59
  * Install integration
56
60
  */
57
- installProjectIntegration(requestParameters: InstallProjectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration>;
61
+ installIntegration(requestParameters: InstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration>;
62
+ /**
63
+ * Uninstall a projects integration
64
+ * Uninstall integration
65
+ */
66
+ uninstallIntegrationRaw(requestParameters: UninstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
67
+ /**
68
+ * Uninstall a projects integration
69
+ * Uninstall integration
70
+ */
71
+ uninstallIntegration(requestParameters: UninstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
58
72
  }
@@ -5,7 +5,7 @@
5
5
  * Projects API
6
6
  * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.4
8
+ * The version of the OpenAPI document: 1.1.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -79,17 +79,17 @@ var IntegrationsApi = /** @class */ (function (_super) {
79
79
  * Get an integration
80
80
  * Get integration
81
81
  */
82
- IntegrationsApi.prototype.getProjectIntegrationRaw = function (requestParameters, initOverrides) {
82
+ IntegrationsApi.prototype.getIntegrationRaw = function (requestParameters, initOverrides) {
83
83
  return __awaiter(this, void 0, void 0, function () {
84
84
  var queryParameters, headerParameters, _a, _b, response;
85
85
  return __generator(this, function (_c) {
86
86
  switch (_c.label) {
87
87
  case 0:
88
88
  if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
89
- throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getProjectIntegration.');
89
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getIntegration.');
90
90
  }
91
91
  if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
92
- throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling getProjectIntegration.');
92
+ throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling getIntegration.');
93
93
  }
94
94
  queryParameters = {};
95
95
  headerParameters = {};
@@ -107,7 +107,7 @@ var IntegrationsApi = /** @class */ (function (_super) {
107
107
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
108
108
  }
109
109
  return [4 /*yield*/, this.request({
110
- path: "/dashboard/projects/{projectId}/integrations/{integrationId}".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))).replace("{".concat("integrationId", "}"), encodeURIComponent(String(requestParameters.integrationId))),
110
+ path: "/v1/projects/{projectId}/integrations/{integrationId}".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))).replace("{".concat("integrationId", "}"), encodeURIComponent(String(requestParameters.integrationId))),
111
111
  method: 'GET',
112
112
  headers: headerParameters,
113
113
  query: queryParameters,
@@ -123,12 +123,12 @@ var IntegrationsApi = /** @class */ (function (_super) {
123
123
  * Get an integration
124
124
  * Get integration
125
125
  */
126
- IntegrationsApi.prototype.getProjectIntegration = function (requestParameters, initOverrides) {
126
+ IntegrationsApi.prototype.getIntegration = function (requestParameters, initOverrides) {
127
127
  return __awaiter(this, void 0, void 0, function () {
128
128
  var response;
129
129
  return __generator(this, function (_a) {
130
130
  switch (_a.label) {
131
- case 0: return [4 /*yield*/, this.getProjectIntegrationRaw(requestParameters, initOverrides)];
131
+ case 0: return [4 /*yield*/, this.getIntegrationRaw(requestParameters, initOverrides)];
132
132
  case 1:
133
133
  response = _a.sent();
134
134
  return [4 /*yield*/, response.value()];
@@ -141,14 +141,14 @@ var IntegrationsApi = /** @class */ (function (_super) {
141
141
  * List all integrations installed on a project
142
142
  * List integrations
143
143
  */
144
- IntegrationsApi.prototype.getProjectIntegrationsRaw = function (requestParameters, initOverrides) {
144
+ IntegrationsApi.prototype.getIntegrationsRaw = function (requestParameters, initOverrides) {
145
145
  return __awaiter(this, void 0, void 0, function () {
146
146
  var queryParameters, headerParameters, _a, _b, response;
147
147
  return __generator(this, function (_c) {
148
148
  switch (_c.label) {
149
149
  case 0:
150
150
  if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
151
- throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getProjectIntegrations.');
151
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getIntegrations.');
152
152
  }
153
153
  queryParameters = {};
154
154
  headerParameters = {};
@@ -166,7 +166,7 @@ var IntegrationsApi = /** @class */ (function (_super) {
166
166
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
167
167
  }
168
168
  return [4 /*yield*/, this.request({
169
- path: "/dashboard/projects/{projectId}/integrations".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
169
+ path: "/v1/projects/{projectId}/integrations".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
170
170
  method: 'GET',
171
171
  headers: headerParameters,
172
172
  query: queryParameters,
@@ -182,12 +182,12 @@ var IntegrationsApi = /** @class */ (function (_super) {
182
182
  * List all integrations installed on a project
183
183
  * List integrations
184
184
  */
185
- IntegrationsApi.prototype.getProjectIntegrations = function (requestParameters, initOverrides) {
185
+ IntegrationsApi.prototype.getIntegrations = function (requestParameters, initOverrides) {
186
186
  return __awaiter(this, void 0, void 0, function () {
187
187
  var response;
188
188
  return __generator(this, function (_a) {
189
189
  switch (_a.label) {
190
- case 0: return [4 /*yield*/, this.getProjectIntegrationsRaw(requestParameters, initOverrides)];
190
+ case 0: return [4 /*yield*/, this.getIntegrationsRaw(requestParameters, initOverrides)];
191
191
  case 1:
192
192
  response = _a.sent();
193
193
  return [4 /*yield*/, response.value()];
@@ -200,14 +200,14 @@ var IntegrationsApi = /** @class */ (function (_super) {
200
200
  * Install an integration on the project
201
201
  * Install integration
202
202
  */
203
- IntegrationsApi.prototype.installProjectIntegrationRaw = function (requestParameters, initOverrides) {
203
+ IntegrationsApi.prototype.installIntegrationRaw = function (requestParameters, initOverrides) {
204
204
  return __awaiter(this, void 0, void 0, function () {
205
205
  var queryParameters, headerParameters, _a, _b, response;
206
206
  return __generator(this, function (_c) {
207
207
  switch (_c.label) {
208
208
  case 0:
209
209
  if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
210
- throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling installProjectIntegration.');
210
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling installIntegration.');
211
211
  }
212
212
  queryParameters = {};
213
213
  headerParameters = {};
@@ -225,7 +225,7 @@ var IntegrationsApi = /** @class */ (function (_super) {
225
225
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
226
226
  }
227
227
  return [4 /*yield*/, this.request({
228
- path: "/dashboard/projects/{projectId}/integrations".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
228
+ path: "/v1/projects/{projectId}/integrations".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
229
229
  method: 'POST',
230
230
  headers: headerParameters,
231
231
  query: queryParameters,
@@ -241,12 +241,12 @@ var IntegrationsApi = /** @class */ (function (_super) {
241
241
  * Install an integration on the project
242
242
  * Install integration
243
243
  */
244
- IntegrationsApi.prototype.installProjectIntegration = function (requestParameters, initOverrides) {
244
+ IntegrationsApi.prototype.installIntegration = function (requestParameters, initOverrides) {
245
245
  return __awaiter(this, void 0, void 0, function () {
246
246
  var response;
247
247
  return __generator(this, function (_a) {
248
248
  switch (_a.label) {
249
- case 0: return [4 /*yield*/, this.installProjectIntegrationRaw(requestParameters, initOverrides)];
249
+ case 0: return [4 /*yield*/, this.installIntegrationRaw(requestParameters, initOverrides)];
250
250
  case 1:
251
251
  response = _a.sent();
252
252
  return [4 /*yield*/, response.value()];
@@ -255,6 +255,66 @@ var IntegrationsApi = /** @class */ (function (_super) {
255
255
  });
256
256
  });
257
257
  };
258
+ /**
259
+ * Uninstall a projects integration
260
+ * Uninstall integration
261
+ */
262
+ IntegrationsApi.prototype.uninstallIntegrationRaw = function (requestParameters, initOverrides) {
263
+ return __awaiter(this, void 0, void 0, function () {
264
+ var queryParameters, headerParameters, _a, _b, response;
265
+ return __generator(this, function (_c) {
266
+ switch (_c.label) {
267
+ case 0:
268
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
269
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling uninstallIntegration.');
270
+ }
271
+ if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
272
+ throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling uninstallIntegration.');
273
+ }
274
+ queryParameters = {};
275
+ headerParameters = {};
276
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
277
+ // oauth required
278
+ _a = headerParameters;
279
+ _b = "Authorization";
280
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
281
+ case 1:
282
+ // oauth required
283
+ _a[_b] = _c.sent();
284
+ _c.label = 2;
285
+ case 2:
286
+ if (this.configuration && this.configuration.apiKey) {
287
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
288
+ }
289
+ return [4 /*yield*/, this.request({
290
+ path: "/v1/projects/{projectId}/integrations/{integrationId}".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))).replace("{".concat("integrationId", "}"), encodeURIComponent(String(requestParameters.integrationId))),
291
+ method: 'DELETE',
292
+ headers: headerParameters,
293
+ query: queryParameters,
294
+ }, initOverrides)];
295
+ case 3:
296
+ response = _c.sent();
297
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
298
+ }
299
+ });
300
+ });
301
+ };
302
+ /**
303
+ * Uninstall a projects integration
304
+ * Uninstall integration
305
+ */
306
+ IntegrationsApi.prototype.uninstallIntegration = function (requestParameters, initOverrides) {
307
+ return __awaiter(this, void 0, void 0, function () {
308
+ return __generator(this, function (_a) {
309
+ switch (_a.label) {
310
+ case 0: return [4 /*yield*/, this.uninstallIntegrationRaw(requestParameters, initOverrides)];
311
+ case 1:
312
+ _a.sent();
313
+ return [2 /*return*/];
314
+ }
315
+ });
316
+ });
317
+ };
258
318
  return IntegrationsApi;
259
319
  }(runtime.BaseAPI));
260
320
  exports.IntegrationsApi = IntegrationsApi;
@@ -2,7 +2,7 @@
2
2
  * Projects API
3
3
  * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.4
5
+ * The version of the OpenAPI document: 1.1.1
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,13 +10,27 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { Project, ProjectsResponse } from '../models/index';
13
+ import type { Integration, IntegrationsResponse, Project, ProjectsResponse } from '../models/index';
14
14
  export interface DeleteProjectRequest {
15
15
  projectId: string;
16
16
  }
17
+ export interface GetIntegrationRequest {
18
+ projectId: string;
19
+ integrationId: string;
20
+ }
21
+ export interface GetIntegrationsRequest {
22
+ projectId: string;
23
+ }
17
24
  export interface GetProjectRequest {
18
25
  projectId: string;
19
26
  }
27
+ export interface InstallIntegrationRequest {
28
+ projectId: string;
29
+ }
30
+ export interface UninstallIntegrationRequest {
31
+ projectId: string;
32
+ integrationId: string;
33
+ }
20
34
  export interface UpdateProjectRequest {
21
35
  projectId: string;
22
36
  }
@@ -44,6 +58,26 @@ export declare class ProjectsApi extends runtime.BaseAPI {
44
58
  * Delete project
45
59
  */
46
60
  deleteProject(requestParameters: DeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Project>;
61
+ /**
62
+ * Get an integration
63
+ * Get integration
64
+ */
65
+ getIntegrationRaw(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
66
+ /**
67
+ * Get an integration
68
+ * Get integration
69
+ */
70
+ getIntegration(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration>;
71
+ /**
72
+ * List all integrations installed on a project
73
+ * List integrations
74
+ */
75
+ getIntegrationsRaw(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntegrationsResponse>>;
76
+ /**
77
+ * List all integrations installed on a project
78
+ * List integrations
79
+ */
80
+ getIntegrations(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationsResponse>;
47
81
  /**
48
82
  * Get a project
49
83
  * Get project
@@ -64,6 +98,26 @@ export declare class ProjectsApi extends runtime.BaseAPI {
64
98
  * List projects
65
99
  */
66
100
  getProjects(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectsResponse>;
101
+ /**
102
+ * Install an integration on the project
103
+ * Install integration
104
+ */
105
+ installIntegrationRaw(requestParameters: InstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
106
+ /**
107
+ * Install an integration on the project
108
+ * Install integration
109
+ */
110
+ installIntegration(requestParameters: InstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration>;
111
+ /**
112
+ * Uninstall a projects integration
113
+ * Uninstall integration
114
+ */
115
+ uninstallIntegrationRaw(requestParameters: UninstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
116
+ /**
117
+ * Uninstall a projects integration
118
+ * Uninstall integration
119
+ */
120
+ uninstallIntegration(requestParameters: UninstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
67
121
  /**
68
122
  * Update a project
69
123
  * Update project