@teemill/projects 1.3.0 → 1.5.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 (74) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +2 -2
  4. package/dist/apis/ProjectsApi.d.ts +126 -2
  5. package/dist/apis/ProjectsApi.js +596 -10
  6. package/dist/models/ApiError.d.ts +1 -1
  7. package/dist/models/ApiError.js +1 -1
  8. package/dist/models/CreateInviteRequest.d.ts +31 -0
  9. package/dist/models/CreateInviteRequest.js +50 -0
  10. package/dist/models/CreateProjectRequest.d.ts +7 -1
  11. package/dist/models/CreateProjectRequest.js +4 -1
  12. package/dist/models/CreateUserRequest.d.ts +56 -0
  13. package/dist/models/CreateUserRequest.js +62 -0
  14. package/dist/models/CreateUserRequestAvatar.d.ts +31 -0
  15. package/dist/models/CreateUserRequestAvatar.js +50 -0
  16. package/dist/models/Integration.d.ts +1 -1
  17. package/dist/models/Integration.js +1 -1
  18. package/dist/models/IntegrationInfo.d.ts +1 -1
  19. package/dist/models/IntegrationInfo.js +1 -1
  20. package/dist/models/IntegrationsResponse.d.ts +1 -1
  21. package/dist/models/IntegrationsResponse.js +1 -1
  22. package/dist/models/Project.d.ts +1 -1
  23. package/dist/models/Project.js +1 -1
  24. package/dist/models/ProjectInvite.d.ts +69 -0
  25. package/dist/models/ProjectInvite.js +70 -0
  26. package/dist/models/ProjectInvites.d.ts +32 -0
  27. package/dist/models/ProjectInvites.js +51 -0
  28. package/dist/models/ProjectLogo.d.ts +1 -1
  29. package/dist/models/ProjectLogo.js +1 -1
  30. package/dist/models/ProjectUser.d.ts +62 -0
  31. package/dist/models/ProjectUser.js +65 -0
  32. package/dist/models/ProjectUsers.d.ts +32 -0
  33. package/dist/models/ProjectUsers.js +51 -0
  34. package/dist/models/ProjectsResponse.d.ts +1 -1
  35. package/dist/models/ProjectsResponse.js +1 -1
  36. package/dist/models/UpdateProjectRequest.d.ts +1 -1
  37. package/dist/models/UpdateProjectRequest.js +1 -1
  38. package/dist/models/UpdateUserRequest.d.ts +56 -0
  39. package/dist/models/UpdateUserRequest.js +59 -0
  40. package/dist/models/UpdateUserRequestAvatar.d.ts +31 -0
  41. package/dist/models/UpdateUserRequestAvatar.js +50 -0
  42. package/dist/models/index.d.ts +9 -0
  43. package/dist/models/index.js +9 -0
  44. package/dist/runtime.d.ts +6 -1
  45. package/dist/runtime.js +6 -3
  46. package/package.json +1 -1
  47. package/src/apis/ProjectsApi.ts +648 -21
  48. package/src/models/ApiError.ts +1 -1
  49. package/src/models/{Project1.ts → CreateInviteRequest.ts} +14 -14
  50. package/src/models/CreateProjectRequest.ts +9 -1
  51. package/src/models/CreateUserRequest.ts +107 -0
  52. package/src/models/CreateUserRequestAvatar.ts +65 -0
  53. package/src/models/Integration.ts +1 -1
  54. package/src/models/IntegrationInfo.ts +1 -1
  55. package/src/models/IntegrationsResponse.ts +1 -1
  56. package/src/models/Project.ts +1 -1
  57. package/src/models/ProjectInvite.ts +133 -0
  58. package/src/models/ProjectInvites.ts +73 -0
  59. package/src/models/ProjectLogo.ts +1 -1
  60. package/src/models/ProjectUser.ts +116 -0
  61. package/src/models/ProjectUsers.ts +73 -0
  62. package/src/models/ProjectsResponse.ts +1 -1
  63. package/src/models/UpdateProjectRequest.ts +1 -1
  64. package/src/models/UpdateUserRequest.ts +104 -0
  65. package/src/models/{Project2.ts → UpdateUserRequestAvatar.ts} +13 -13
  66. package/src/models/index.ts +9 -0
  67. package/src/runtime.ts +13 -3
  68. package/dist/apis/IntegrationsApi.d.ts +0 -72
  69. package/dist/apis/IntegrationsApi.js +0 -320
  70. package/dist/models/Project1.d.ts +0 -31
  71. package/dist/models/Project1.js +0 -50
  72. package/dist/models/Project2.d.ts +0 -31
  73. package/dist/models/Project2.js +0 -50
  74. package/src/apis/IntegrationsApi.ts +0 -225
@@ -0,0 +1,73 @@
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.5.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
+ import type { ProjectUser } from './ProjectUser';
17
+ import {
18
+ ProjectUserFromJSON,
19
+ ProjectUserFromJSONTyped,
20
+ ProjectUserToJSON,
21
+ } from './ProjectUser';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ProjectUsers
27
+ */
28
+ export interface ProjectUsers {
29
+ /**
30
+ *
31
+ * @type {Array<ProjectUser>}
32
+ * @memberof ProjectUsers
33
+ */
34
+ users: Array<ProjectUser>;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the ProjectUsers interface.
39
+ */
40
+ export function instanceOfProjectUsers(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "users" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function ProjectUsersFromJSON(json: any): ProjectUsers {
48
+ return ProjectUsersFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function ProjectUsersFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectUsers {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'users': ((json['users'] as Array<any>).map(ProjectUserFromJSON)),
58
+ };
59
+ }
60
+
61
+ export function ProjectUsersToJSON(value?: ProjectUsers | null): any {
62
+ if (value === undefined) {
63
+ return undefined;
64
+ }
65
+ if (value === null) {
66
+ return null;
67
+ }
68
+ return {
69
+
70
+ 'users': ((value.users as Array<any>).map(ProjectUserToJSON)),
71
+ };
72
+ }
73
+
@@ -4,7 +4,7 @@
4
4
  * Projects API
5
5
  * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.3.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Projects API
5
5
  * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.3.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,104 @@
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.5.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
+ import type { UpdateUserRequestAvatar } from './UpdateUserRequestAvatar';
17
+ import {
18
+ UpdateUserRequestAvatarFromJSON,
19
+ UpdateUserRequestAvatarFromJSONTyped,
20
+ UpdateUserRequestAvatarToJSON,
21
+ } from './UpdateUserRequestAvatar';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface UpdateUserRequest
27
+ */
28
+ export interface UpdateUserRequest {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof UpdateUserRequest
33
+ */
34
+ firstName?: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof UpdateUserRequest
39
+ */
40
+ lastName?: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof UpdateUserRequest
45
+ */
46
+ username?: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof UpdateUserRequest
51
+ */
52
+ email?: string;
53
+ /**
54
+ *
55
+ * @type {UpdateUserRequestAvatar}
56
+ * @memberof UpdateUserRequest
57
+ */
58
+ avatar?: UpdateUserRequestAvatar;
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the UpdateUserRequest interface.
63
+ */
64
+ export function instanceOfUpdateUserRequest(value: object): boolean {
65
+ let isInstance = true;
66
+
67
+ return isInstance;
68
+ }
69
+
70
+ export function UpdateUserRequestFromJSON(json: any): UpdateUserRequest {
71
+ return UpdateUserRequestFromJSONTyped(json, false);
72
+ }
73
+
74
+ export function UpdateUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserRequest {
75
+ if ((json === undefined) || (json === null)) {
76
+ return json;
77
+ }
78
+ return {
79
+
80
+ 'firstName': !exists(json, 'firstName') ? undefined : json['firstName'],
81
+ 'lastName': !exists(json, 'lastName') ? undefined : json['lastName'],
82
+ 'username': !exists(json, 'username') ? undefined : json['username'],
83
+ 'email': !exists(json, 'email') ? undefined : json['email'],
84
+ 'avatar': !exists(json, 'avatar') ? undefined : UpdateUserRequestAvatarFromJSON(json['avatar']),
85
+ };
86
+ }
87
+
88
+ export function UpdateUserRequestToJSON(value?: UpdateUserRequest | null): any {
89
+ if (value === undefined) {
90
+ return undefined;
91
+ }
92
+ if (value === null) {
93
+ return null;
94
+ }
95
+ return {
96
+
97
+ 'firstName': value.firstName,
98
+ 'lastName': value.lastName,
99
+ 'username': value.username,
100
+ 'email': value.email,
101
+ 'avatar': UpdateUserRequestAvatarToJSON(value.avatar),
102
+ };
103
+ }
104
+
@@ -4,7 +4,7 @@
4
4
  * Projects API
5
5
  * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,41 +16,41 @@ import { exists, mapValues } from '../runtime';
16
16
  /**
17
17
  *
18
18
  * @export
19
- * @interface Project2
19
+ * @interface UpdateUserRequestAvatar
20
20
  */
21
- export interface Project2 {
21
+ export interface UpdateUserRequestAvatar {
22
22
  /**
23
23
  *
24
24
  * @type {string}
25
- * @memberof Project2
25
+ * @memberof UpdateUserRequestAvatar
26
26
  */
27
- name?: string;
27
+ original?: string;
28
28
  }
29
29
 
30
30
  /**
31
- * Check if a given object implements the Project2 interface.
31
+ * Check if a given object implements the UpdateUserRequestAvatar interface.
32
32
  */
33
- export function instanceOfProject2(value: object): boolean {
33
+ export function instanceOfUpdateUserRequestAvatar(value: object): boolean {
34
34
  let isInstance = true;
35
35
 
36
36
  return isInstance;
37
37
  }
38
38
 
39
- export function Project2FromJSON(json: any): Project2 {
40
- return Project2FromJSONTyped(json, false);
39
+ export function UpdateUserRequestAvatarFromJSON(json: any): UpdateUserRequestAvatar {
40
+ return UpdateUserRequestAvatarFromJSONTyped(json, false);
41
41
  }
42
42
 
43
- export function Project2FromJSONTyped(json: any, ignoreDiscriminator: boolean): Project2 {
43
+ export function UpdateUserRequestAvatarFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserRequestAvatar {
44
44
  if ((json === undefined) || (json === null)) {
45
45
  return json;
46
46
  }
47
47
  return {
48
48
 
49
- 'name': !exists(json, 'name') ? undefined : json['name'],
49
+ 'original': !exists(json, 'original') ? undefined : json['original'],
50
50
  };
51
51
  }
52
52
 
53
- export function Project2ToJSON(value?: Project2 | null): any {
53
+ export function UpdateUserRequestAvatarToJSON(value?: UpdateUserRequestAvatar | null): any {
54
54
  if (value === undefined) {
55
55
  return undefined;
56
56
  }
@@ -59,7 +59,7 @@ export function Project2ToJSON(value?: Project2 | null): any {
59
59
  }
60
60
  return {
61
61
 
62
- 'name': value.name,
62
+ 'original': value.original,
63
63
  };
64
64
  }
65
65
 
@@ -1,11 +1,20 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './ApiError';
4
+ export * from './CreateInviteRequest';
4
5
  export * from './CreateProjectRequest';
6
+ export * from './CreateUserRequest';
7
+ export * from './CreateUserRequestAvatar';
5
8
  export * from './Integration';
6
9
  export * from './IntegrationInfo';
7
10
  export * from './IntegrationsResponse';
8
11
  export * from './Project';
12
+ export * from './ProjectInvite';
13
+ export * from './ProjectInvites';
9
14
  export * from './ProjectLogo';
15
+ export * from './ProjectUser';
16
+ export * from './ProjectUsers';
10
17
  export * from './ProjectsResponse';
11
18
  export * from './UpdateProjectRequest';
19
+ export * from './UpdateUserRequest';
20
+ export * from './UpdateUserRequestAvatar';
package/src/runtime.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Projects API
5
5
  * Manage Teemill Projects For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.3.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,6 +13,12 @@
13
13
  */
14
14
 
15
15
 
16
+ export type OptionalProperties<T> = {
17
+ [K in keyof T]-?: undefined extends T[K] ? K : never
18
+ }[keyof T];
19
+
20
+ export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
21
+
16
22
  export const BASE_PATH = "https://localhost:8080".replace(/\/+$/, "");
17
23
 
18
24
  export interface ConfigurationParameters {
@@ -98,6 +104,10 @@ export class BaseAPI {
98
104
  this.middleware = configuration.middleware;
99
105
  }
100
106
 
107
+ isResponseError(error: any): error is ResponseError {
108
+ return error instanceof Error && error.name === 'ResponseError';
109
+ }
110
+
101
111
  withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
102
112
  const next = this.clone<T>();
103
113
  next.middleware = next.middleware.concat(...middlewares);
@@ -326,8 +336,8 @@ function querystringSingleKey(key: string, value: string | number | null | undef
326
336
  const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
327
337
  if (value instanceof Array) {
328
338
  const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
329
- .join(`&${encodeURIComponent(fullKey)}=`);
330
- return `${encodeURIComponent(fullKey)}=${multiValue}`;
339
+ .join(`&${encodeURIComponent(fullKey)}[]=`);
340
+ return `${encodeURIComponent(fullKey)}[]=${multiValue}`;
331
341
  }
332
342
  if (value instanceof Set) {
333
343
  const valueAsArray = Array.from(value);
@@ -1,72 +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.1.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
- import * as runtime from '../runtime';
13
- import type { Integration, IntegrationsResponse } from '../models/index';
14
- export interface GetIntegrationRequest {
15
- projectId: string;
16
- integrationId: string;
17
- }
18
- export interface GetIntegrationsRequest {
19
- projectId: string;
20
- }
21
- export interface InstallIntegrationRequest {
22
- projectId: string;
23
- }
24
- export interface UninstallIntegrationRequest {
25
- projectId: string;
26
- integrationId: string;
27
- }
28
- /**
29
- *
30
- */
31
- export declare class IntegrationsApi extends runtime.BaseAPI {
32
- /**
33
- * Get an integration
34
- * Get integration
35
- */
36
- getIntegrationRaw(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
37
- /**
38
- * Get an integration
39
- * Get integration
40
- */
41
- getIntegration(requestParameters: GetIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Integration>;
42
- /**
43
- * List all integrations installed on a project
44
- * List integrations
45
- */
46
- getIntegrationsRaw(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntegrationsResponse>>;
47
- /**
48
- * List all integrations installed on a project
49
- * List integrations
50
- */
51
- getIntegrations(requestParameters: GetIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationsResponse>;
52
- /**
53
- * Install an integration on the project
54
- * Install integration
55
- */
56
- installIntegrationRaw(requestParameters: InstallIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Integration>>;
57
- /**
58
- * Install an integration on the project
59
- * Install integration
60
- */
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>;
72
- }