@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
@@ -5,28 +5,13 @@
5
5
  * Integrations API
6
6
  * Manage Teemill Integrations For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 0.8.2
8
+ * The version of the OpenAPI document: 0.8.4
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
13
13
  * Do not edit the class manually.
14
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
15
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
16
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
17
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -36,404 +21,240 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
36
21
  step((generator = generator.apply(thisArg, _arguments || [])).next());
37
22
  });
38
23
  };
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
24
  Object.defineProperty(exports, "__esModule", { value: true });
67
25
  exports.IntegrationsApi = void 0;
68
- var runtime = require("../runtime");
69
- var index_1 = require("../models/index");
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
70
28
  /**
71
29
  *
72
30
  */
73
- var IntegrationsApi = /** @class */ (function (_super) {
74
- __extends(IntegrationsApi, _super);
75
- function IntegrationsApi() {
76
- return _super !== null && _super.apply(this, arguments) || this;
77
- }
31
+ class IntegrationsApi extends runtime.BaseAPI {
78
32
  /**
79
33
  * List all integration categories
80
34
  * List integration categories
81
35
  */
82
- IntegrationsApi.prototype.getIntegrationCategoriesRaw = function (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
- queryParameters = {};
89
- headerParameters = {};
90
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
91
- // oauth required
92
- _a = headerParameters;
93
- _b = "Authorization";
94
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
95
- case 1:
96
- // oauth required
97
- _a[_b] = _c.sent();
98
- _c.label = 2;
99
- case 2:
100
- if (this.configuration && this.configuration.apiKey) {
101
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
102
- }
103
- return [4 /*yield*/, this.request({
104
- path: "/v1/integrations/categories",
105
- method: 'GET',
106
- headers: headerParameters,
107
- query: queryParameters,
108
- }, initOverrides)];
109
- case 3:
110
- response = _c.sent();
111
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CategoriesResponseFromJSON)(jsonValue); })];
112
- }
113
- });
36
+ getIntegrationCategoriesRaw(initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const queryParameters = {};
39
+ const headerParameters = {};
40
+ if (this.configuration && this.configuration.accessToken) {
41
+ // oauth required
42
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
43
+ }
44
+ if (this.configuration && this.configuration.apiKey) {
45
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
46
+ }
47
+ const response = yield this.request({
48
+ path: `/v1/integrations/categories`,
49
+ method: 'GET',
50
+ headers: headerParameters,
51
+ query: queryParameters,
52
+ }, initOverrides);
53
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntegrationCategoriesResponseFromJSON)(jsonValue));
114
54
  });
115
- };
55
+ }
116
56
  /**
117
57
  * List all integration categories
118
58
  * List integration categories
119
59
  */
120
- IntegrationsApi.prototype.getIntegrationCategories = function (initOverrides) {
121
- return __awaiter(this, void 0, void 0, function () {
122
- var response;
123
- return __generator(this, function (_a) {
124
- switch (_a.label) {
125
- case 0: return [4 /*yield*/, this.getIntegrationCategoriesRaw(initOverrides)];
126
- case 1:
127
- response = _a.sent();
128
- return [4 /*yield*/, response.value()];
129
- case 2: return [2 /*return*/, _a.sent()];
130
- }
131
- });
60
+ getIntegrationCategories(initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const response = yield this.getIntegrationCategoriesRaw(initOverrides);
63
+ return yield response.value();
132
64
  });
133
- };
65
+ }
134
66
  /**
135
67
  * Get an integration category
136
68
  * Get integration category
137
69
  */
138
- IntegrationsApi.prototype.getIntegrationCategoryRaw = function (requestParameters, initOverrides) {
139
- return __awaiter(this, void 0, void 0, function () {
140
- var queryParameters, headerParameters, _a, _b, response;
141
- return __generator(this, function (_c) {
142
- switch (_c.label) {
143
- case 0:
144
- if (requestParameters.category === null || requestParameters.category === undefined) {
145
- throw new runtime.RequiredError('category', 'Required parameter requestParameters.category was null or undefined when calling getIntegrationCategory.');
146
- }
147
- queryParameters = {};
148
- headerParameters = {};
149
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
150
- // oauth required
151
- _a = headerParameters;
152
- _b = "Authorization";
153
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
154
- case 1:
155
- // oauth required
156
- _a[_b] = _c.sent();
157
- _c.label = 2;
158
- case 2:
159
- if (this.configuration && this.configuration.apiKey) {
160
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
161
- }
162
- return [4 /*yield*/, this.request({
163
- path: "/v1/integrations/categories/{category}".replace("{".concat("category", "}"), encodeURIComponent(String(requestParameters.category))),
164
- method: 'GET',
165
- headers: headerParameters,
166
- query: queryParameters,
167
- }, initOverrides)];
168
- case 3:
169
- response = _c.sent();
170
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationListingsResponseFromJSON)(jsonValue); })];
171
- }
172
- });
70
+ getIntegrationCategoryRaw(requestParameters, initOverrides) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (requestParameters.category === null || requestParameters.category === undefined) {
73
+ throw new runtime.RequiredError('category', 'Required parameter requestParameters.category was null or undefined when calling getIntegrationCategory.');
74
+ }
75
+ const queryParameters = {};
76
+ const headerParameters = {};
77
+ if (this.configuration && this.configuration.accessToken) {
78
+ // oauth required
79
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
80
+ }
81
+ if (this.configuration && this.configuration.apiKey) {
82
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
83
+ }
84
+ const response = yield this.request({
85
+ path: `/v1/integrations/categories/{category}`.replace(`{${"category"}}`, encodeURIComponent(String(requestParameters.category))),
86
+ method: 'GET',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ }, initOverrides);
90
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntegrationListingsResponseFromJSON)(jsonValue));
173
91
  });
174
- };
92
+ }
175
93
  /**
176
94
  * Get an integration category
177
95
  * Get integration category
178
96
  */
179
- IntegrationsApi.prototype.getIntegrationCategory = function (category, initOverrides) {
180
- return __awaiter(this, void 0, void 0, function () {
181
- var response;
182
- return __generator(this, function (_a) {
183
- switch (_a.label) {
184
- case 0: return [4 /*yield*/, this.getIntegrationCategoryRaw({
185
- category: category,
186
- }, initOverrides)];
187
- case 1:
188
- response = _a.sent();
189
- return [4 /*yield*/, response.value()];
190
- case 2: return [2 /*return*/, _a.sent()];
191
- }
192
- });
97
+ getIntegrationCategory(category, initOverrides) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ const response = yield this.getIntegrationCategoryRaw({
100
+ category: category,
101
+ }, initOverrides);
102
+ return yield response.value();
193
103
  });
194
- };
104
+ }
195
105
  /**
196
106
  * Get an integration listing
197
107
  * Get integration listing
198
108
  */
199
- IntegrationsApi.prototype.getIntegrationListingRaw = function (requestParameters, initOverrides) {
200
- return __awaiter(this, void 0, void 0, function () {
201
- var queryParameters, headerParameters, _a, _b, response;
202
- return __generator(this, function (_c) {
203
- switch (_c.label) {
204
- case 0:
205
- if (requestParameters.listing === null || requestParameters.listing === undefined) {
206
- throw new runtime.RequiredError('listing', 'Required parameter requestParameters.listing was null or undefined when calling getIntegrationListing.');
207
- }
208
- queryParameters = {};
209
- headerParameters = {};
210
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
211
- // oauth required
212
- _a = headerParameters;
213
- _b = "Authorization";
214
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
215
- case 1:
216
- // oauth required
217
- _a[_b] = _c.sent();
218
- _c.label = 2;
219
- case 2:
220
- if (this.configuration && this.configuration.apiKey) {
221
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
222
- }
223
- return [4 /*yield*/, this.request({
224
- path: "/v1/integrations/listings/{listing}".replace("{".concat("listing", "}"), encodeURIComponent(String(requestParameters.listing))),
225
- method: 'GET',
226
- headers: headerParameters,
227
- query: queryParameters,
228
- }, initOverrides)];
229
- case 3:
230
- response = _c.sent();
231
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationListingFromJSON)(jsonValue); })];
232
- }
233
- });
109
+ getIntegrationListingRaw(requestParameters, initOverrides) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ if (requestParameters.listing === null || requestParameters.listing === undefined) {
112
+ throw new runtime.RequiredError('listing', 'Required parameter requestParameters.listing was null or undefined when calling getIntegrationListing.');
113
+ }
114
+ const queryParameters = {};
115
+ const headerParameters = {};
116
+ if (this.configuration && this.configuration.accessToken) {
117
+ // oauth required
118
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
119
+ }
120
+ if (this.configuration && this.configuration.apiKey) {
121
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
122
+ }
123
+ const response = yield this.request({
124
+ path: `/v1/integrations/listings/{listing}`.replace(`{${"listing"}}`, encodeURIComponent(String(requestParameters.listing))),
125
+ method: 'GET',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ }, initOverrides);
129
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntegrationListingFromJSON)(jsonValue));
234
130
  });
235
- };
131
+ }
236
132
  /**
237
133
  * Get an integration listing
238
134
  * Get integration listing
239
135
  */
240
- IntegrationsApi.prototype.getIntegrationListing = function (listing, initOverrides) {
241
- return __awaiter(this, void 0, void 0, function () {
242
- var response;
243
- return __generator(this, function (_a) {
244
- switch (_a.label) {
245
- case 0: return [4 /*yield*/, this.getIntegrationListingRaw({
246
- listing: listing,
247
- }, initOverrides)];
248
- case 1:
249
- response = _a.sent();
250
- return [4 /*yield*/, response.value()];
251
- case 2: return [2 /*return*/, _a.sent()];
252
- }
253
- });
136
+ getIntegrationListing(listing, initOverrides) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ const response = yield this.getIntegrationListingRaw({
139
+ listing: listing,
140
+ }, initOverrides);
141
+ return yield response.value();
254
142
  });
255
- };
143
+ }
256
144
  /**
257
145
  * List all integration listings
258
146
  * List integration listings
259
147
  */
260
- IntegrationsApi.prototype.getIntegrationListingsRaw = function (initOverrides) {
261
- return __awaiter(this, void 0, void 0, function () {
262
- var queryParameters, headerParameters, _a, _b, response;
263
- return __generator(this, function (_c) {
264
- switch (_c.label) {
265
- case 0:
266
- queryParameters = {};
267
- headerParameters = {};
268
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
269
- // oauth required
270
- _a = headerParameters;
271
- _b = "Authorization";
272
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
273
- case 1:
274
- // oauth required
275
- _a[_b] = _c.sent();
276
- _c.label = 2;
277
- case 2:
278
- if (this.configuration && this.configuration.apiKey) {
279
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
280
- }
281
- return [4 /*yield*/, this.request({
282
- path: "/v1/integrations/listings",
283
- method: 'GET',
284
- headers: headerParameters,
285
- query: queryParameters,
286
- }, initOverrides)];
287
- case 3:
288
- response = _c.sent();
289
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationListingsResponseFromJSON)(jsonValue); })];
290
- }
291
- });
148
+ getIntegrationListingsRaw(initOverrides) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const queryParameters = {};
151
+ const headerParameters = {};
152
+ if (this.configuration && this.configuration.accessToken) {
153
+ // oauth required
154
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
155
+ }
156
+ if (this.configuration && this.configuration.apiKey) {
157
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
158
+ }
159
+ const response = yield this.request({
160
+ path: `/v1/integrations/listings`,
161
+ method: 'GET',
162
+ headers: headerParameters,
163
+ query: queryParameters,
164
+ }, initOverrides);
165
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntegrationListingsResponseFromJSON)(jsonValue));
292
166
  });
293
- };
167
+ }
294
168
  /**
295
169
  * List all integration listings
296
170
  * List integration listings
297
171
  */
298
- IntegrationsApi.prototype.getIntegrationListings = function (initOverrides) {
299
- return __awaiter(this, void 0, void 0, function () {
300
- var response;
301
- return __generator(this, function (_a) {
302
- switch (_a.label) {
303
- case 0: return [4 /*yield*/, this.getIntegrationListingsRaw(initOverrides)];
304
- case 1:
305
- response = _a.sent();
306
- return [4 /*yield*/, response.value()];
307
- case 2: return [2 /*return*/, _a.sent()];
308
- }
309
- });
172
+ getIntegrationListings(initOverrides) {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ const response = yield this.getIntegrationListingsRaw(initOverrides);
175
+ return yield response.value();
310
176
  });
311
- };
177
+ }
312
178
  /**
313
179
  * Get a product available for an integration
314
180
  * Get integration product
315
181
  */
316
- IntegrationsApi.prototype.getIntegrationProductRaw = function (requestParameters, initOverrides) {
317
- return __awaiter(this, void 0, void 0, function () {
318
- var queryParameters, headerParameters, _a, _b, response;
319
- return __generator(this, function (_c) {
320
- switch (_c.label) {
321
- case 0:
322
- if (requestParameters.integration === null || requestParameters.integration === undefined) {
323
- throw new runtime.RequiredError('integration', 'Required parameter requestParameters.integration was null or undefined when calling getIntegrationProduct.');
324
- }
325
- if (requestParameters.product === null || requestParameters.product === undefined) {
326
- throw new runtime.RequiredError('product', 'Required parameter requestParameters.product was null or undefined when calling getIntegrationProduct.');
327
- }
328
- queryParameters = {};
329
- headerParameters = {};
330
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
331
- // oauth required
332
- _a = headerParameters;
333
- _b = "Authorization";
334
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
335
- case 1:
336
- // oauth required
337
- _a[_b] = _c.sent();
338
- _c.label = 2;
339
- case 2:
340
- if (this.configuration && this.configuration.apiKey) {
341
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
342
- }
343
- return [4 /*yield*/, this.request({
344
- path: "/v1/integrations/{integration}/products/{product}".replace("{".concat("integration", "}"), encodeURIComponent(String(requestParameters.integration))).replace("{".concat("product", "}"), encodeURIComponent(String(requestParameters.product))),
345
- method: 'GET',
346
- headers: headerParameters,
347
- query: queryParameters,
348
- }, initOverrides)];
349
- case 3:
350
- response = _c.sent();
351
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationProductFromJSON)(jsonValue); })];
352
- }
353
- });
182
+ getIntegrationProductRaw(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ if (requestParameters.integration === null || requestParameters.integration === undefined) {
185
+ throw new runtime.RequiredError('integration', 'Required parameter requestParameters.integration was null or undefined when calling getIntegrationProduct.');
186
+ }
187
+ if (requestParameters.product === null || requestParameters.product === undefined) {
188
+ throw new runtime.RequiredError('product', 'Required parameter requestParameters.product was null or undefined when calling getIntegrationProduct.');
189
+ }
190
+ const queryParameters = {};
191
+ const headerParameters = {};
192
+ if (this.configuration && this.configuration.accessToken) {
193
+ // oauth required
194
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
195
+ }
196
+ if (this.configuration && this.configuration.apiKey) {
197
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
198
+ }
199
+ const response = yield this.request({
200
+ path: `/v1/integrations/{integration}/products/{product}`.replace(`{${"integration"}}`, encodeURIComponent(String(requestParameters.integration))).replace(`{${"product"}}`, encodeURIComponent(String(requestParameters.product))),
201
+ method: 'GET',
202
+ headers: headerParameters,
203
+ query: queryParameters,
204
+ }, initOverrides);
205
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntegrationProductFromJSON)(jsonValue));
354
206
  });
355
- };
207
+ }
356
208
  /**
357
209
  * Get a product available for an integration
358
210
  * Get integration product
359
211
  */
360
- IntegrationsApi.prototype.getIntegrationProduct = function (integration, product, initOverrides) {
361
- return __awaiter(this, void 0, void 0, function () {
362
- var response;
363
- return __generator(this, function (_a) {
364
- switch (_a.label) {
365
- case 0: return [4 /*yield*/, this.getIntegrationProductRaw({
366
- integration: integration, product: product,
367
- }, initOverrides)];
368
- case 1:
369
- response = _a.sent();
370
- return [4 /*yield*/, response.value()];
371
- case 2: return [2 /*return*/, _a.sent()];
372
- }
373
- });
212
+ getIntegrationProduct(integration, product, initOverrides) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const response = yield this.getIntegrationProductRaw({
215
+ integration: integration, product: product,
216
+ }, initOverrides);
217
+ return yield response.value();
374
218
  });
375
- };
219
+ }
376
220
  /**
377
221
  * List all products available for an integration
378
222
  * List integration products
379
223
  */
380
- IntegrationsApi.prototype.getIntegrationProductsRaw = function (requestParameters, initOverrides) {
381
- return __awaiter(this, void 0, void 0, function () {
382
- var queryParameters, headerParameters, _a, _b, response;
383
- return __generator(this, function (_c) {
384
- switch (_c.label) {
385
- case 0:
386
- if (requestParameters.integration === null || requestParameters.integration === undefined) {
387
- throw new runtime.RequiredError('integration', 'Required parameter requestParameters.integration was null or undefined when calling getIntegrationProducts.');
388
- }
389
- queryParameters = {};
390
- headerParameters = {};
391
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
392
- // oauth required
393
- _a = headerParameters;
394
- _b = "Authorization";
395
- return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
396
- case 1:
397
- // oauth required
398
- _a[_b] = _c.sent();
399
- _c.label = 2;
400
- case 2:
401
- if (this.configuration && this.configuration.apiKey) {
402
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
403
- }
404
- return [4 /*yield*/, this.request({
405
- path: "/v1/integrations/{integration}/products".replace("{".concat("integration", "}"), encodeURIComponent(String(requestParameters.integration))),
406
- method: 'GET',
407
- headers: headerParameters,
408
- query: queryParameters,
409
- }, initOverrides)];
410
- case 3:
411
- response = _c.sent();
412
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntegrationProductsResponseFromJSON)(jsonValue); })];
413
- }
414
- });
224
+ getIntegrationProductsRaw(requestParameters, initOverrides) {
225
+ return __awaiter(this, void 0, void 0, function* () {
226
+ if (requestParameters.integration === null || requestParameters.integration === undefined) {
227
+ throw new runtime.RequiredError('integration', 'Required parameter requestParameters.integration was null or undefined when calling getIntegrationProducts.');
228
+ }
229
+ const queryParameters = {};
230
+ const headerParameters = {};
231
+ if (this.configuration && this.configuration.accessToken) {
232
+ // oauth required
233
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
234
+ }
235
+ if (this.configuration && this.configuration.apiKey) {
236
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
237
+ }
238
+ const response = yield this.request({
239
+ path: `/v1/integrations/{integration}/products`.replace(`{${"integration"}}`, encodeURIComponent(String(requestParameters.integration))),
240
+ method: 'GET',
241
+ headers: headerParameters,
242
+ query: queryParameters,
243
+ }, initOverrides);
244
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntegrationProductsResponseFromJSON)(jsonValue));
415
245
  });
416
- };
246
+ }
417
247
  /**
418
248
  * List all products available for an integration
419
249
  * List integration products
420
250
  */
421
- IntegrationsApi.prototype.getIntegrationProducts = function (integration, initOverrides) {
422
- return __awaiter(this, void 0, void 0, function () {
423
- var response;
424
- return __generator(this, function (_a) {
425
- switch (_a.label) {
426
- case 0: return [4 /*yield*/, this.getIntegrationProductsRaw({
427
- integration: integration,
428
- }, initOverrides)];
429
- case 1:
430
- response = _a.sent();
431
- return [4 /*yield*/, response.value()];
432
- case 2: return [2 /*return*/, _a.sent()];
433
- }
434
- });
251
+ getIntegrationProducts(integration, initOverrides) {
252
+ return __awaiter(this, void 0, void 0, function* () {
253
+ const response = yield this.getIntegrationProductsRaw({
254
+ integration: integration,
255
+ }, initOverrides);
256
+ return yield response.value();
435
257
  });
436
- };
437
- return IntegrationsApi;
438
- }(runtime.BaseAPI));
258
+ }
259
+ }
439
260
  exports.IntegrationsApi = IntegrationsApi;