@teemill/integrations 0.8.2 → 0.8.4

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 (77) hide show
  1. package/.openapi-generator/FILES +2 -1
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +5 -4
  4. package/dist/apis/IntegrationsApi.d.ts +4 -4
  5. package/dist/apis/IntegrationsApi.js +172 -351
  6. package/dist/esm/apis/IntegrationsApi.d.ts +91 -0
  7. package/dist/esm/apis/IntegrationsApi.js +256 -0
  8. package/dist/esm/apis/index.d.ts +1 -0
  9. package/dist/esm/apis/index.js +3 -0
  10. package/dist/esm/index.d.ts +3 -0
  11. package/dist/esm/index.js +5 -0
  12. package/dist/esm/models/ApiError.d.ts +37 -0
  13. package/dist/esm/models/ApiError.js +42 -0
  14. package/dist/esm/models/CategoriesResponse.d.ts +32 -0
  15. package/dist/esm/models/CategoriesResponse.js +44 -0
  16. package/dist/esm/models/Integration.d.ts +62 -0
  17. package/dist/esm/models/Integration.js +57 -0
  18. package/dist/esm/models/IntegrationCategoriesResponse.d.ts +32 -0
  19. package/dist/esm/models/IntegrationCategoriesResponse.js +41 -0
  20. package/dist/esm/models/IntegrationCategory.d.ts +52 -0
  21. package/dist/esm/models/IntegrationCategory.js +56 -0
  22. package/dist/esm/models/IntegrationInfo.d.ts +49 -0
  23. package/dist/esm/models/IntegrationInfo.js +52 -0
  24. package/dist/esm/models/IntegrationListing.d.ts +93 -0
  25. package/dist/esm/models/IntegrationListing.js +79 -0
  26. package/dist/esm/models/IntegrationListingGradient.d.ts +37 -0
  27. package/dist/esm/models/IntegrationListingGradient.js +40 -0
  28. package/dist/esm/models/IntegrationListingsResponse.d.ts +32 -0
  29. package/dist/esm/models/IntegrationListingsResponse.js +41 -0
  30. package/dist/esm/models/IntegrationProduct.d.ts +61 -0
  31. package/dist/esm/models/IntegrationProduct.js +57 -0
  32. package/dist/esm/models/IntegrationProductsResponse.d.ts +32 -0
  33. package/dist/esm/models/IntegrationProductsResponse.js +41 -0
  34. package/dist/esm/models/IntegrationsResponse.d.ts +32 -0
  35. package/dist/esm/models/IntegrationsResponse.js +44 -0
  36. package/dist/esm/models/index.d.ts +8 -0
  37. package/dist/esm/models/index.js +10 -0
  38. package/dist/esm/runtime.d.ts +187 -0
  39. package/dist/esm/runtime.js +333 -0
  40. package/dist/models/ApiError.d.ts +1 -1
  41. package/dist/models/ApiError.js +10 -14
  42. package/dist/models/CategoriesResponse.js +2 -2
  43. package/dist/models/Integration.js +3 -3
  44. package/dist/models/IntegrationCategoriesResponse.d.ts +32 -0
  45. package/dist/models/IntegrationCategoriesResponse.js +48 -0
  46. package/dist/models/IntegrationCategory.d.ts +1 -1
  47. package/dist/models/IntegrationCategory.js +14 -15
  48. package/dist/models/IntegrationInfo.js +1 -1
  49. package/dist/models/IntegrationListing.d.ts +3 -3
  50. package/dist/models/IntegrationListing.js +39 -33
  51. package/dist/models/IntegrationListingGradient.d.ts +1 -1
  52. package/dist/models/IntegrationListingGradient.js +9 -14
  53. package/dist/models/IntegrationListingsResponse.d.ts +2 -2
  54. package/dist/models/IntegrationListingsResponse.js +10 -13
  55. package/dist/models/IntegrationProduct.d.ts +2 -2
  56. package/dist/models/IntegrationProduct.js +21 -21
  57. package/dist/models/IntegrationProductsResponse.d.ts +1 -1
  58. package/dist/models/IntegrationProductsResponse.js +9 -12
  59. package/dist/models/IntegrationsResponse.js +2 -2
  60. package/dist/models/index.d.ts +1 -1
  61. package/dist/models/index.js +1 -1
  62. package/dist/runtime.d.ts +1 -1
  63. package/dist/runtime.js +223 -439
  64. package/package.json +4 -2
  65. package/src/apis/IntegrationsApi.ts +7 -7
  66. package/src/models/ApiError.ts +10 -15
  67. package/src/models/IntegrationCategoriesResponse.ts +68 -0
  68. package/src/models/IntegrationCategory.ts +12 -17
  69. package/src/models/IntegrationListing.ts +30 -34
  70. package/src/models/IntegrationListingGradient.ts +10 -15
  71. package/src/models/IntegrationListingsResponse.ts +10 -14
  72. package/src/models/IntegrationProduct.ts +18 -23
  73. package/src/models/IntegrationProductsResponse.ts +8 -13
  74. package/src/models/index.ts +1 -1
  75. package/src/runtime.ts +1 -1
  76. package/tsconfig.esm.json +7 -0
  77. package/tsconfig.json +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/integrations",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "OpenAPI client for @teemill/integrations",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -9,8 +9,10 @@
9
9
  },
10
10
  "main": "./dist/index.js",
11
11
  "typings": "./dist/index.d.ts",
12
+ "module": "./dist/esm/index.js",
13
+ "sideEffects": false,
12
14
  "scripts": {
13
- "build": "tsc",
15
+ "build": "tsc && tsc -p tsconfig.esm.json",
14
16
  "prepare": "npm run build"
15
17
  },
16
18
  "devDependencies": {
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,7 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiError,
19
- CategoriesResponse,
19
+ IntegrationCategoriesResponse,
20
20
  IntegrationListing,
21
21
  IntegrationListingsResponse,
22
22
  IntegrationProduct,
@@ -25,8 +25,8 @@ import type {
25
25
  import {
26
26
  ApiErrorFromJSON,
27
27
  ApiErrorToJSON,
28
- CategoriesResponseFromJSON,
29
- CategoriesResponseToJSON,
28
+ IntegrationCategoriesResponseFromJSON,
29
+ IntegrationCategoriesResponseToJSON,
30
30
  IntegrationListingFromJSON,
31
31
  IntegrationListingToJSON,
32
32
  IntegrationListingsResponseFromJSON,
@@ -63,7 +63,7 @@ export class IntegrationsApi extends runtime.BaseAPI {
63
63
  * List all integration categories
64
64
  * List integration categories
65
65
  */
66
- async getIntegrationCategoriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CategoriesResponse>> {
66
+ async getIntegrationCategoriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntegrationCategoriesResponse>> {
67
67
  const queryParameters: any = {};
68
68
 
69
69
  const headerParameters: runtime.HTTPHeaders = {};
@@ -84,7 +84,7 @@ export class IntegrationsApi extends runtime.BaseAPI {
84
84
  query: queryParameters,
85
85
  }, initOverrides);
86
86
 
87
- return new runtime.JSONApiResponse(response, (jsonValue) => CategoriesResponseFromJSON(jsonValue));
87
+ return new runtime.JSONApiResponse(response, (jsonValue) => IntegrationCategoriesResponseFromJSON(jsonValue));
88
88
  }
89
89
 
90
90
  /**
@@ -94,7 +94,7 @@ export class IntegrationsApi extends runtime.BaseAPI {
94
94
  async getIntegrationCategories(
95
95
 
96
96
  initOverrides?: RequestInit | runtime.InitOverrideFunction
97
- ): Promise<CategoriesResponse> {
97
+ ): Promise<IntegrationCategoriesResponse> {
98
98
  const response = await this.getIntegrationCategoriesRaw(
99
99
 
100
100
  initOverrides
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
16
  /**
17
17
  *
18
18
  * @export
@@ -37,10 +37,8 @@ export interface ApiError {
37
37
  * Check if a given object implements the ApiError interface.
38
38
  */
39
39
  export function instanceOfApiError(value: object): boolean {
40
- let isInstance = true;
41
- isInstance = isInstance && "message" in value;
42
-
43
- return isInstance;
40
+ if (!('message' in value)) return false;
41
+ return true;
44
42
  }
45
43
 
46
44
  export function ApiErrorFromJSON(json: any): ApiError {
@@ -48,27 +46,24 @@ export function ApiErrorFromJSON(json: any): ApiError {
48
46
  }
49
47
 
50
48
  export function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError {
51
- if ((json === undefined) || (json === null)) {
49
+ if (json == null) {
52
50
  return json;
53
51
  }
54
52
  return {
55
53
 
56
- 'code': !exists(json, 'code') ? undefined : json['code'],
54
+ 'code': json['code'] == null ? undefined : json['code'],
57
55
  'message': json['message'],
58
56
  };
59
57
  }
60
58
 
61
59
  export function ApiErrorToJSON(value?: ApiError | null): any {
62
- if (value === undefined) {
63
- return undefined;
64
- }
65
- if (value === null) {
66
- return null;
60
+ if (value == null) {
61
+ return value;
67
62
  }
68
63
  return {
69
64
 
70
- 'code': value.code,
71
- 'message': value.message,
65
+ 'code': value['code'],
66
+ 'message': value['message'],
72
67
  };
73
68
  }
74
69
 
@@ -0,0 +1,68 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Integrations API
5
+ * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 0.8.4
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 { mapValues } from '../runtime';
16
+ import type { IntegrationCategory } from './IntegrationCategory';
17
+ import {
18
+ IntegrationCategoryFromJSON,
19
+ IntegrationCategoryFromJSONTyped,
20
+ IntegrationCategoryToJSON,
21
+ } from './IntegrationCategory';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface IntegrationCategoriesResponse
27
+ */
28
+ export interface IntegrationCategoriesResponse {
29
+ /**
30
+ *
31
+ * @type {Array<IntegrationCategory>}
32
+ * @memberof IntegrationCategoriesResponse
33
+ */
34
+ categories: Array<IntegrationCategory>;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the IntegrationCategoriesResponse interface.
39
+ */
40
+ export function instanceOfIntegrationCategoriesResponse(value: object): boolean {
41
+ if (!('categories' in value)) return false;
42
+ return true;
43
+ }
44
+
45
+ export function IntegrationCategoriesResponseFromJSON(json: any): IntegrationCategoriesResponse {
46
+ return IntegrationCategoriesResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function IntegrationCategoriesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationCategoriesResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'categories': ((json['categories'] as Array<any>).map(IntegrationCategoryFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function IntegrationCategoriesResponseToJSON(value?: IntegrationCategoriesResponse | null): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+
65
+ 'categories': ((value['categories'] as Array<any>).map(IntegrationCategoryToJSON)),
66
+ };
67
+ }
68
+
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
16
  /**
17
17
  *
18
18
  * @export
@@ -55,12 +55,10 @@ export type IntegrationCategoryTypeEnum = typeof IntegrationCategoryTypeEnum[key
55
55
  * Check if a given object implements the IntegrationCategory interface.
56
56
  */
57
57
  export function instanceOfIntegrationCategory(value: object): boolean {
58
- let isInstance = true;
59
- isInstance = isInstance && "name" in value;
60
- isInstance = isInstance && "slug" in value;
61
- isInstance = isInstance && "type" in value;
62
-
63
- return isInstance;
58
+ if (!('name' in value)) return false;
59
+ if (!('slug' in value)) return false;
60
+ if (!('type' in value)) return false;
61
+ return true;
64
62
  }
65
63
 
66
64
  export function IntegrationCategoryFromJSON(json: any): IntegrationCategory {
@@ -68,7 +66,7 @@ export function IntegrationCategoryFromJSON(json: any): IntegrationCategory {
68
66
  }
69
67
 
70
68
  export function IntegrationCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationCategory {
71
- if ((json === undefined) || (json === null)) {
69
+ if (json == null) {
72
70
  return json;
73
71
  }
74
72
  return {
@@ -80,17 +78,14 @@ export function IntegrationCategoryFromJSONTyped(json: any, ignoreDiscriminator:
80
78
  }
81
79
 
82
80
  export function IntegrationCategoryToJSON(value?: IntegrationCategory | null): any {
83
- if (value === undefined) {
84
- return undefined;
85
- }
86
- if (value === null) {
87
- return null;
81
+ if (value == null) {
82
+ return value;
88
83
  }
89
84
  return {
90
85
 
91
- 'name': value.name,
92
- 'slug': value.slug,
93
- 'type': value.type,
86
+ 'name': value['name'],
87
+ 'slug': value['slug'],
88
+ 'type': value['type'],
94
89
  };
95
90
  }
96
91
 
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
16
  import type { IntegrationCategory } from './IntegrationCategory';
17
17
  import {
18
18
  IntegrationCategoryFromJSON,
@@ -43,7 +43,7 @@ export interface IntegrationListing {
43
43
  * @type {string}
44
44
  * @memberof IntegrationListing
45
45
  */
46
- slug?: string;
46
+ slug: string;
47
47
  /**
48
48
  * The code of the integration
49
49
  * @type {string}
@@ -104,18 +104,17 @@ export interface IntegrationListing {
104
104
  * Check if a given object implements the IntegrationListing interface.
105
105
  */
106
106
  export function instanceOfIntegrationListing(value: object): boolean {
107
- let isInstance = true;
108
- isInstance = isInstance && "code" in value;
109
- isInstance = isInstance && "name" in value;
110
- isInstance = isInstance && "description" in value;
111
- isInstance = isInstance && "content" in value;
112
- isInstance = isInstance && "author" in value;
113
- isInstance = isInstance && "icon" in value;
114
- isInstance = isInstance && "gradient" in value;
115
- isInstance = isInstance && "dependencies" in value;
116
- isInstance = isInstance && "categories" in value;
117
-
118
- return isInstance;
107
+ if (!('slug' in value)) return false;
108
+ if (!('code' in value)) return false;
109
+ if (!('name' in value)) return false;
110
+ if (!('description' in value)) return false;
111
+ if (!('content' in value)) return false;
112
+ if (!('author' in value)) return false;
113
+ if (!('icon' in value)) return false;
114
+ if (!('gradient' in value)) return false;
115
+ if (!('dependencies' in value)) return false;
116
+ if (!('categories' in value)) return false;
117
+ return true;
119
118
  }
120
119
 
121
120
  export function IntegrationListingFromJSON(json: any): IntegrationListing {
@@ -123,13 +122,13 @@ export function IntegrationListingFromJSON(json: any): IntegrationListing {
123
122
  }
124
123
 
125
124
  export function IntegrationListingFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationListing {
126
- if ((json === undefined) || (json === null)) {
125
+ if (json == null) {
127
126
  return json;
128
127
  }
129
128
  return {
130
129
 
131
- 'id': !exists(json, 'id') ? undefined : json['id'],
132
- 'slug': !exists(json, 'slug') ? undefined : json['slug'],
130
+ 'id': json['id'] == null ? undefined : json['id'],
131
+ 'slug': json['slug'],
133
132
  'code': json['code'],
134
133
  'name': json['name'],
135
134
  'description': json['description'],
@@ -142,25 +141,22 @@ export function IntegrationListingFromJSONTyped(json: any, ignoreDiscriminator:
142
141
  };
143
142
  }
144
143
 
145
- export function IntegrationListingToJSON(value?: IntegrationListing | null): any {
146
- if (value === undefined) {
147
- return undefined;
148
- }
149
- if (value === null) {
150
- return null;
144
+ export function IntegrationListingToJSON(value?: Omit<IntegrationListing, 'id'> | null): any {
145
+ if (value == null) {
146
+ return value;
151
147
  }
152
148
  return {
153
149
 
154
- 'slug': value.slug,
155
- 'code': value.code,
156
- 'name': value.name,
157
- 'description': value.description,
158
- 'content': value.content,
159
- 'author': value.author,
160
- 'icon': value.icon,
161
- 'gradient': IntegrationListingGradientToJSON(value.gradient),
162
- 'dependencies': value.dependencies,
163
- 'categories': ((value.categories as Array<any>).map(IntegrationCategoryToJSON)),
150
+ 'slug': value['slug'],
151
+ 'code': value['code'],
152
+ 'name': value['name'],
153
+ 'description': value['description'],
154
+ 'content': value['content'],
155
+ 'author': value['author'],
156
+ 'icon': value['icon'],
157
+ 'gradient': IntegrationListingGradientToJSON(value['gradient']),
158
+ 'dependencies': value['dependencies'],
159
+ 'categories': ((value['categories'] as Array<any>).map(IntegrationCategoryToJSON)),
164
160
  };
165
161
  }
166
162
 
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
16
  /**
17
17
  * The gradient that is used to display the listing
18
18
  * @export
@@ -37,9 +37,7 @@ export interface IntegrationListingGradient {
37
37
  * Check if a given object implements the IntegrationListingGradient interface.
38
38
  */
39
39
  export function instanceOfIntegrationListingGradient(value: object): boolean {
40
- let isInstance = true;
41
-
42
- return isInstance;
40
+ return true;
43
41
  }
44
42
 
45
43
  export function IntegrationListingGradientFromJSON(json: any): IntegrationListingGradient {
@@ -47,27 +45,24 @@ export function IntegrationListingGradientFromJSON(json: any): IntegrationListin
47
45
  }
48
46
 
49
47
  export function IntegrationListingGradientFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationListingGradient {
50
- if ((json === undefined) || (json === null)) {
48
+ if (json == null) {
51
49
  return json;
52
50
  }
53
51
  return {
54
52
 
55
- 'from': !exists(json, 'from') ? undefined : json['from'],
56
- 'to': !exists(json, 'to') ? undefined : json['to'],
53
+ 'from': json['from'] == null ? undefined : json['from'],
54
+ 'to': json['to'] == null ? undefined : json['to'],
57
55
  };
58
56
  }
59
57
 
60
58
  export function IntegrationListingGradientToJSON(value?: IntegrationListingGradient | null): any {
61
- if (value === undefined) {
62
- return undefined;
63
- }
64
- if (value === null) {
65
- return null;
59
+ if (value == null) {
60
+ return value;
66
61
  }
67
62
  return {
68
63
 
69
- 'from': value.from,
70
- 'to': value.to,
64
+ 'from': value['from'],
65
+ 'to': value['to'],
71
66
  };
72
67
  }
73
68
 
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
16
  import type { IntegrationListing } from './IntegrationListing';
17
17
  import {
18
18
  IntegrationListingFromJSON,
@@ -31,16 +31,15 @@ export interface IntegrationListingsResponse {
31
31
  * @type {Array<IntegrationListing>}
32
32
  * @memberof IntegrationListingsResponse
33
33
  */
34
- listings?: Array<IntegrationListing>;
34
+ listings: Array<IntegrationListing>;
35
35
  }
36
36
 
37
37
  /**
38
38
  * Check if a given object implements the IntegrationListingsResponse interface.
39
39
  */
40
40
  export function instanceOfIntegrationListingsResponse(value: object): boolean {
41
- let isInstance = true;
42
-
43
- return isInstance;
41
+ if (!('listings' in value)) return false;
42
+ return true;
44
43
  }
45
44
 
46
45
  export function IntegrationListingsResponseFromJSON(json: any): IntegrationListingsResponse {
@@ -48,25 +47,22 @@ export function IntegrationListingsResponseFromJSON(json: any): IntegrationListi
48
47
  }
49
48
 
50
49
  export function IntegrationListingsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationListingsResponse {
51
- if ((json === undefined) || (json === null)) {
50
+ if (json == null) {
52
51
  return json;
53
52
  }
54
53
  return {
55
54
 
56
- 'listings': !exists(json, 'listings') ? undefined : ((json['listings'] as Array<any>).map(IntegrationListingFromJSON)),
55
+ 'listings': ((json['listings'] as Array<any>).map(IntegrationListingFromJSON)),
57
56
  };
58
57
  }
59
58
 
60
59
  export function IntegrationListingsResponseToJSON(value?: IntegrationListingsResponse | null): any {
61
- if (value === undefined) {
62
- return undefined;
63
- }
64
- if (value === null) {
65
- return null;
60
+ if (value == null) {
61
+ return value;
66
62
  }
67
63
  return {
68
64
 
69
- 'listings': value.listings === undefined ? undefined : ((value.listings as Array<any>).map(IntegrationListingToJSON)),
65
+ 'listings': ((value['listings'] as Array<any>).map(IntegrationListingToJSON)),
70
66
  };
71
67
  }
72
68
 
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
16
  /**
17
17
  *
18
18
  * @export
@@ -61,14 +61,12 @@ export interface IntegrationProduct {
61
61
  * Check if a given object implements the IntegrationProduct interface.
62
62
  */
63
63
  export function instanceOfIntegrationProduct(value: object): boolean {
64
- let isInstance = true;
65
- isInstance = isInstance && "sku" in value;
66
- isInstance = isInstance && "name" in value;
67
- isInstance = isInstance && "slug" in value;
68
- isInstance = isInstance && "description" in value;
69
- isInstance = isInstance && "price" in value;
70
-
71
- return isInstance;
64
+ if (!('sku' in value)) return false;
65
+ if (!('name' in value)) return false;
66
+ if (!('slug' in value)) return false;
67
+ if (!('description' in value)) return false;
68
+ if (!('price' in value)) return false;
69
+ return true;
72
70
  }
73
71
 
74
72
  export function IntegrationProductFromJSON(json: any): IntegrationProduct {
@@ -76,12 +74,12 @@ export function IntegrationProductFromJSON(json: any): IntegrationProduct {
76
74
  }
77
75
 
78
76
  export function IntegrationProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationProduct {
79
- if ((json === undefined) || (json === null)) {
77
+ if (json == null) {
80
78
  return json;
81
79
  }
82
80
  return {
83
81
 
84
- 'id': !exists(json, 'id') ? undefined : json['id'],
82
+ 'id': json['id'] == null ? undefined : json['id'],
85
83
  'sku': json['sku'],
86
84
  'name': json['name'],
87
85
  'slug': json['slug'],
@@ -90,20 +88,17 @@ export function IntegrationProductFromJSONTyped(json: any, ignoreDiscriminator:
90
88
  };
91
89
  }
92
90
 
93
- export function IntegrationProductToJSON(value?: IntegrationProduct | null): any {
94
- if (value === undefined) {
95
- return undefined;
96
- }
97
- if (value === null) {
98
- return null;
91
+ export function IntegrationProductToJSON(value?: Omit<IntegrationProduct, 'id'> | null): any {
92
+ if (value == null) {
93
+ return value;
99
94
  }
100
95
  return {
101
96
 
102
- 'sku': value.sku,
103
- 'name': value.name,
104
- 'slug': value.slug,
105
- 'description': value.description,
106
- 'price': value.price,
97
+ 'sku': value['sku'],
98
+ 'name': value['name'],
99
+ 'slug': value['slug'],
100
+ 'description': value['description'],
101
+ 'price': value['price'],
107
102
  };
108
103
  }
109
104
 
@@ -4,7 +4,7 @@
4
4
  * Integrations API
5
5
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 0.8.2
7
+ * The version of the OpenAPI document: 0.8.4
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
16
  import type { IntegrationProduct } from './IntegrationProduct';
17
17
  import {
18
18
  IntegrationProductFromJSON,
@@ -38,10 +38,8 @@ export interface IntegrationProductsResponse {
38
38
  * Check if a given object implements the IntegrationProductsResponse interface.
39
39
  */
40
40
  export function instanceOfIntegrationProductsResponse(value: object): boolean {
41
- let isInstance = true;
42
- isInstance = isInstance && "products" in value;
43
-
44
- return isInstance;
41
+ if (!('products' in value)) return false;
42
+ return true;
45
43
  }
46
44
 
47
45
  export function IntegrationProductsResponseFromJSON(json: any): IntegrationProductsResponse {
@@ -49,7 +47,7 @@ export function IntegrationProductsResponseFromJSON(json: any): IntegrationProdu
49
47
  }
50
48
 
51
49
  export function IntegrationProductsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationProductsResponse {
52
- if ((json === undefined) || (json === null)) {
50
+ if (json == null) {
53
51
  return json;
54
52
  }
55
53
  return {
@@ -59,15 +57,12 @@ export function IntegrationProductsResponseFromJSONTyped(json: any, ignoreDiscri
59
57
  }
60
58
 
61
59
  export function IntegrationProductsResponseToJSON(value?: IntegrationProductsResponse | null): any {
62
- if (value === undefined) {
63
- return undefined;
64
- }
65
- if (value === null) {
66
- return null;
60
+ if (value == null) {
61
+ return value;
67
62
  }
68
63
  return {
69
64
 
70
- 'products': ((value.products as Array<any>).map(IntegrationProductToJSON)),
65
+ 'products': ((value['products'] as Array<any>).map(IntegrationProductToJSON)),
71
66
  };
72
67
  }
73
68
 
@@ -1,7 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './ApiError';
4
- export * from './CategoriesResponse';
4
+ export * from './IntegrationCategoriesResponse';
5
5
  export * from './IntegrationCategory';
6
6
  export * from './IntegrationListing';
7
7
  export * from './IntegrationListingGradient';