@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,320 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Projects API
6
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
- *
8
- * The version of the OpenAPI document: 1.1.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
- return new (P || (P = Promise))(function (resolve, reject) {
33
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
- step((generator = generator.apply(thisArg, _arguments || [])).next());
37
- });
38
- };
39
- var __generator = (this && this.__generator) || function (thisArg, body) {
40
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
41
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
- function verb(n) { return function (v) { return step([n, v]); }; }
43
- function step(op) {
44
- if (f) throw new TypeError("Generator is already executing.");
45
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
46
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
47
- if (y = 0, t) op = [op[0] & 2, t.value];
48
- switch (op[0]) {
49
- case 0: case 1: t = op; break;
50
- case 4: _.label++; return { value: op[1], done: false };
51
- case 5: _.label++; y = op[1]; op = [0]; continue;
52
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
- default:
54
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
- if (t[2]) _.ops.pop();
59
- _.trys.pop(); continue;
60
- }
61
- op = body.call(thisArg, _);
62
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
- }
65
- };
66
- Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.IntegrationsApi = void 0;
68
- var runtime = require("../runtime");
69
- var index_1 = require("../models/index");
70
- /**
71
- *
72
- */
73
- var IntegrationsApi = /** @class */ (function (_super) {
74
- __extends(IntegrationsApi, _super);
75
- function IntegrationsApi() {
76
- return _super !== null && _super.apply(this, arguments) || this;
77
- }
78
- /**
79
- * Get an integration
80
- * Get integration
81
- */
82
- IntegrationsApi.prototype.getIntegrationRaw = function (requestParameters, initOverrides) {
83
- return __awaiter(this, void 0, void 0, function () {
84
- var queryParameters, headerParameters, _a, _b, response;
85
- return __generator(this, function (_c) {
86
- switch (_c.label) {
87
- case 0:
88
- if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
89
- throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getIntegration.');
90
- }
91
- if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
92
- throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling getIntegration.');
93
- }
94
- queryParameters = {};
95
- headerParameters = {};
96
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
97
- // oauth required
98
- _a = headerParameters;
99
- _b = "Authorization";
100
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
101
- case 1:
102
- // oauth required
103
- _a[_b] = _c.sent();
104
- _c.label = 2;
105
- case 2:
106
- if (this.configuration && this.configuration.apiKey) {
107
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
108
- }
109
- return [4 /*yield*/, this.request({
110
- path: "/v1/projects/{projectId}/integrations/{integrationId}".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))).replace("{".concat("integrationId", "}"), encodeURIComponent(String(requestParameters.integrationId))),
111
- method: 'GET',
112
- headers: headerParameters,
113
- query: queryParameters,
114
- }, initOverrides)];
115
- case 3:
116
- response = _c.sent();
117
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationFromJSON)(jsonValue); })];
118
- }
119
- });
120
- });
121
- };
122
- /**
123
- * Get an integration
124
- * Get integration
125
- */
126
- IntegrationsApi.prototype.getIntegration = function (requestParameters, initOverrides) {
127
- return __awaiter(this, void 0, void 0, function () {
128
- var response;
129
- return __generator(this, function (_a) {
130
- switch (_a.label) {
131
- case 0: return [4 /*yield*/, this.getIntegrationRaw(requestParameters, initOverrides)];
132
- case 1:
133
- response = _a.sent();
134
- return [4 /*yield*/, response.value()];
135
- case 2: return [2 /*return*/, _a.sent()];
136
- }
137
- });
138
- });
139
- };
140
- /**
141
- * List all integrations installed on a project
142
- * List integrations
143
- */
144
- IntegrationsApi.prototype.getIntegrationsRaw = function (requestParameters, initOverrides) {
145
- return __awaiter(this, void 0, void 0, function () {
146
- var queryParameters, headerParameters, _a, _b, response;
147
- return __generator(this, function (_c) {
148
- switch (_c.label) {
149
- case 0:
150
- if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
151
- throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getIntegrations.');
152
- }
153
- queryParameters = {};
154
- headerParameters = {};
155
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
156
- // oauth required
157
- _a = headerParameters;
158
- _b = "Authorization";
159
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
160
- case 1:
161
- // oauth required
162
- _a[_b] = _c.sent();
163
- _c.label = 2;
164
- case 2:
165
- if (this.configuration && this.configuration.apiKey) {
166
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
167
- }
168
- return [4 /*yield*/, this.request({
169
- path: "/v1/projects/{projectId}/integrations".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
170
- method: 'GET',
171
- headers: headerParameters,
172
- query: queryParameters,
173
- }, initOverrides)];
174
- case 3:
175
- response = _c.sent();
176
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationsResponseFromJSON)(jsonValue); })];
177
- }
178
- });
179
- });
180
- };
181
- /**
182
- * List all integrations installed on a project
183
- * List integrations
184
- */
185
- IntegrationsApi.prototype.getIntegrations = function (requestParameters, initOverrides) {
186
- return __awaiter(this, void 0, void 0, function () {
187
- var response;
188
- return __generator(this, function (_a) {
189
- switch (_a.label) {
190
- case 0: return [4 /*yield*/, this.getIntegrationsRaw(requestParameters, initOverrides)];
191
- case 1:
192
- response = _a.sent();
193
- return [4 /*yield*/, response.value()];
194
- case 2: return [2 /*return*/, _a.sent()];
195
- }
196
- });
197
- });
198
- };
199
- /**
200
- * Install an integration on the project
201
- * Install integration
202
- */
203
- IntegrationsApi.prototype.installIntegrationRaw = function (requestParameters, initOverrides) {
204
- return __awaiter(this, void 0, void 0, function () {
205
- var queryParameters, headerParameters, _a, _b, response;
206
- return __generator(this, function (_c) {
207
- switch (_c.label) {
208
- case 0:
209
- if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
210
- throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling installIntegration.');
211
- }
212
- queryParameters = {};
213
- headerParameters = {};
214
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
215
- // oauth required
216
- _a = headerParameters;
217
- _b = "Authorization";
218
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
219
- case 1:
220
- // oauth required
221
- _a[_b] = _c.sent();
222
- _c.label = 2;
223
- case 2:
224
- if (this.configuration && this.configuration.apiKey) {
225
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
226
- }
227
- return [4 /*yield*/, this.request({
228
- path: "/v1/projects/{projectId}/integrations".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
229
- method: 'POST',
230
- headers: headerParameters,
231
- query: queryParameters,
232
- }, initOverrides)];
233
- case 3:
234
- response = _c.sent();
235
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationFromJSON)(jsonValue); })];
236
- }
237
- });
238
- });
239
- };
240
- /**
241
- * Install an integration on the project
242
- * Install integration
243
- */
244
- IntegrationsApi.prototype.installIntegration = function (requestParameters, initOverrides) {
245
- return __awaiter(this, void 0, void 0, function () {
246
- var response;
247
- return __generator(this, function (_a) {
248
- switch (_a.label) {
249
- case 0: return [4 /*yield*/, this.installIntegrationRaw(requestParameters, initOverrides)];
250
- case 1:
251
- response = _a.sent();
252
- return [4 /*yield*/, response.value()];
253
- case 2: return [2 /*return*/, _a.sent()];
254
- }
255
- });
256
- });
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
- };
318
- return IntegrationsApi;
319
- }(runtime.BaseAPI));
320
- exports.IntegrationsApi = IntegrationsApi;
@@ -1,31 +0,0 @@
1
- /**
2
- * Projects API
3
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
- *
5
- * The version of the OpenAPI document: 1.2.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface Project1
16
- */
17
- export interface Project1 {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof Project1
22
- */
23
- name: string;
24
- }
25
- /**
26
- * Check if a given object implements the Project1 interface.
27
- */
28
- export declare function instanceOfProject1(value: object): boolean;
29
- export declare function Project1FromJSON(json: any): Project1;
30
- export declare function Project1FromJSONTyped(json: any, ignoreDiscriminator: boolean): Project1;
31
- export declare function Project1ToJSON(value?: Project1 | null): any;
@@ -1,50 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Projects API
6
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
- *
8
- * The version of the OpenAPI document: 1.2.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.Project1ToJSON = exports.Project1FromJSONTyped = exports.Project1FromJSON = exports.instanceOfProject1 = void 0;
17
- /**
18
- * Check if a given object implements the Project1 interface.
19
- */
20
- function instanceOfProject1(value) {
21
- var isInstance = true;
22
- isInstance = isInstance && "name" in value;
23
- return isInstance;
24
- }
25
- exports.instanceOfProject1 = instanceOfProject1;
26
- function Project1FromJSON(json) {
27
- return Project1FromJSONTyped(json, false);
28
- }
29
- exports.Project1FromJSON = Project1FromJSON;
30
- function Project1FromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
32
- return json;
33
- }
34
- return {
35
- 'name': json['name'],
36
- };
37
- }
38
- exports.Project1FromJSONTyped = Project1FromJSONTyped;
39
- function Project1ToJSON(value) {
40
- if (value === undefined) {
41
- return undefined;
42
- }
43
- if (value === null) {
44
- return null;
45
- }
46
- return {
47
- 'name': value.name,
48
- };
49
- }
50
- exports.Project1ToJSON = Project1ToJSON;
@@ -1,31 +0,0 @@
1
- /**
2
- * Projects API
3
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
- *
5
- * The version of the OpenAPI document: 1.2.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface Project2
16
- */
17
- export interface Project2 {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof Project2
22
- */
23
- name?: string;
24
- }
25
- /**
26
- * Check if a given object implements the Project2 interface.
27
- */
28
- export declare function instanceOfProject2(value: object): boolean;
29
- export declare function Project2FromJSON(json: any): Project2;
30
- export declare function Project2FromJSONTyped(json: any, ignoreDiscriminator: boolean): Project2;
31
- export declare function Project2ToJSON(value?: Project2 | null): any;
@@ -1,50 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Projects API
6
- * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
- *
8
- * The version of the OpenAPI document: 1.2.0
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.Project2ToJSON = exports.Project2FromJSONTyped = exports.Project2FromJSON = exports.instanceOfProject2 = void 0;
17
- var runtime_1 = require("../runtime");
18
- /**
19
- * Check if a given object implements the Project2 interface.
20
- */
21
- function instanceOfProject2(value) {
22
- var isInstance = true;
23
- return isInstance;
24
- }
25
- exports.instanceOfProject2 = instanceOfProject2;
26
- function Project2FromJSON(json) {
27
- return Project2FromJSONTyped(json, false);
28
- }
29
- exports.Project2FromJSON = Project2FromJSON;
30
- function Project2FromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
32
- return json;
33
- }
34
- return {
35
- 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
36
- };
37
- }
38
- exports.Project2FromJSONTyped = Project2FromJSONTyped;
39
- function Project2ToJSON(value) {
40
- if (value === undefined) {
41
- return undefined;
42
- }
43
- if (value === null) {
44
- return null;
45
- }
46
- return {
47
- 'name': value.name,
48
- };
49
- }
50
- exports.Project2ToJSON = Project2ToJSON;