@teemill/integrations 0.8.3 → 0.9.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.
- package/.openapi-generator/FILES +3 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +5 -4
- package/dist/apis/IntegrationsApi.d.ts +12 -2
- package/dist/apis/IntegrationsApi.js +206 -351
- package/dist/esm/apis/IntegrationsApi.d.ts +101 -0
- package/dist/esm/apis/IntegrationsApi.js +290 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/ApiError.d.ts +37 -0
- package/dist/esm/models/ApiError.js +42 -0
- package/dist/esm/models/CategoriesResponse.d.ts +32 -0
- package/dist/esm/models/CategoriesResponse.js +44 -0
- package/dist/esm/models/Integration.d.ts +45 -0
- package/dist/esm/models/Integration.js +41 -0
- package/dist/esm/models/IntegrationCategoriesResponse.d.ts +32 -0
- package/dist/esm/models/IntegrationCategoriesResponse.js +41 -0
- package/dist/esm/models/IntegrationCategory.d.ts +52 -0
- package/dist/esm/models/IntegrationCategory.js +56 -0
- package/dist/esm/models/IntegrationInfo.d.ts +49 -0
- package/dist/esm/models/IntegrationInfo.js +52 -0
- package/dist/esm/models/IntegrationListing.d.ts +93 -0
- package/dist/esm/models/IntegrationListing.js +79 -0
- package/dist/esm/models/IntegrationListingGradient.d.ts +37 -0
- package/dist/esm/models/IntegrationListingGradient.js +40 -0
- package/dist/esm/models/IntegrationListingsResponse.d.ts +32 -0
- package/dist/esm/models/IntegrationListingsResponse.js +41 -0
- package/dist/esm/models/IntegrationProduct.d.ts +61 -0
- package/dist/esm/models/IntegrationProduct.js +57 -0
- package/dist/esm/models/IntegrationProductsResponse.d.ts +32 -0
- package/dist/esm/models/IntegrationProductsResponse.js +41 -0
- package/dist/esm/models/IntegrationsResponse.d.ts +32 -0
- package/dist/esm/models/IntegrationsResponse.js +41 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/esm/runtime.d.ts +187 -0
- package/dist/esm/runtime.js +333 -0
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +10 -14
- package/dist/models/CategoriesResponse.js +2 -2
- package/dist/models/Integration.d.ts +9 -26
- package/dist/models/Integration.js +10 -26
- package/dist/models/IntegrationCategoriesResponse.d.ts +1 -1
- package/dist/models/IntegrationCategoriesResponse.js +9 -12
- package/dist/models/IntegrationCategory.d.ts +1 -1
- package/dist/models/IntegrationCategory.js +14 -15
- package/dist/models/IntegrationInfo.js +1 -1
- package/dist/models/IntegrationListing.d.ts +2 -2
- package/dist/models/IntegrationListing.js +38 -33
- package/dist/models/IntegrationListingGradient.d.ts +1 -1
- package/dist/models/IntegrationListingGradient.js +9 -14
- package/dist/models/IntegrationListingsResponse.d.ts +1 -1
- package/dist/models/IntegrationListingsResponse.js +9 -12
- package/dist/models/IntegrationProduct.d.ts +2 -2
- package/dist/models/IntegrationProduct.js +21 -21
- package/dist/models/IntegrationProductsResponse.d.ts +1 -1
- package/dist/models/IntegrationProductsResponse.js +9 -12
- package/dist/models/IntegrationsResponse.d.ts +1 -1
- package/dist/models/IntegrationsResponse.js +9 -12
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +223 -439
- package/package.json +4 -2
- package/src/apis/IntegrationsApi.ts +48 -1
- package/src/models/ApiError.ts +10 -15
- package/src/models/Integration.ts +17 -57
- package/src/models/IntegrationCategoriesResponse.ts +8 -13
- package/src/models/IntegrationCategory.ts +12 -17
- package/src/models/IntegrationListing.ts +28 -33
- package/src/models/IntegrationListingGradient.ts +10 -15
- package/src/models/IntegrationListingsResponse.ts +8 -13
- package/src/models/IntegrationProduct.ts +18 -23
- package/src/models/IntegrationProductsResponse.ts +8 -13
- package/src/models/IntegrationsResponse.ts +8 -13
- package/src/models/index.ts +2 -0
- package/src/runtime.ts +1 -1
- package/tsconfig.esm.json +7 -0
- 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
|
+
* The version of the OpenAPI document: 0.9.0
|
|
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,274 @@ 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
|
-
|
|
69
|
-
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
70
28
|
/**
|
|
71
29
|
*
|
|
72
30
|
*/
|
|
73
|
-
|
|
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
|
-
|
|
83
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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.IntegrationCategoriesResponseFromJSON)(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
|
-
|
|
121
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
|
|
123
|
-
return
|
|
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
|
-
|
|
139
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
180
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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
|
-
|
|
200
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
241
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
-
|
|
261
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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
|
-
|
|
299
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
300
|
-
|
|
301
|
-
return
|
|
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
|
-
|
|
317
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
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
|
-
|
|
361
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
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
|
-
|
|
381
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
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
|
-
|
|
422
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
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
|
-
|
|
438
|
-
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* List all integrations
|
|
261
|
+
* List integrations
|
|
262
|
+
*/
|
|
263
|
+
getIntegrationsRaw(initOverrides) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
const queryParameters = {};
|
|
266
|
+
const headerParameters = {};
|
|
267
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
268
|
+
// oauth required
|
|
269
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
270
|
+
}
|
|
271
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
272
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
273
|
+
}
|
|
274
|
+
const response = yield this.request({
|
|
275
|
+
path: `/v1/integrations`,
|
|
276
|
+
method: 'GET',
|
|
277
|
+
headers: headerParameters,
|
|
278
|
+
query: queryParameters,
|
|
279
|
+
}, initOverrides);
|
|
280
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IntegrationsResponseFromJSON)(jsonValue));
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* List all integrations
|
|
285
|
+
* List integrations
|
|
286
|
+
*/
|
|
287
|
+
getIntegrations(initOverrides) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
289
|
+
const response = yield this.getIntegrationsRaw(initOverrides);
|
|
290
|
+
return yield response.value();
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
439
294
|
exports.IntegrationsApi = IntegrationsApi;
|