@ember-home/unbound-ts-client 0.0.1 → 0.0.3

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/dist/index.js CHANGED
@@ -1 +1,1608 @@
1
- "use strict";//# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/api.ts
2
+ var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);
3
+
4
+ // src/base.ts
5
+
6
+ var BASE_PATH = "http://localhost".replace(/\/+$/, "");
7
+ var BaseAPI = class {
8
+ constructor(configuration, basePath = BASE_PATH, axios = _axios2.default) {
9
+ this.basePath = basePath;
10
+ this.axios = axios;
11
+ if (configuration) {
12
+ this.configuration = configuration;
13
+ this.basePath = _nullishCoalesce(configuration.basePath, () => ( basePath));
14
+ }
15
+ }
16
+
17
+ };
18
+ var RequiredError = class extends Error {
19
+ constructor(field, msg) {
20
+ super(msg);
21
+ this.field = field;
22
+ this.name = "RequiredError";
23
+ }
24
+ };
25
+ var operationServerMap = {};
26
+
27
+ // src/common.ts
28
+ var DUMMY_BASE_URL = "https://example.com";
29
+ var assertParamExists = function(functionName, paramName, paramValue) {
30
+ if (paramValue === null || paramValue === void 0) {
31
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
32
+ }
33
+ };
34
+ var setBasicAuthToObject = function(object, configuration) {
35
+ if (configuration && (configuration.username || configuration.password)) {
36
+ object["auth"] = { username: configuration.username, password: configuration.password };
37
+ }
38
+ };
39
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
40
+ if (parameter == null) return;
41
+ if (typeof parameter === "object") {
42
+ if (Array.isArray(parameter)) {
43
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
44
+ } else {
45
+ Object.keys(parameter).forEach(
46
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
47
+ );
48
+ }
49
+ } else {
50
+ if (urlSearchParams.has(key)) {
51
+ urlSearchParams.append(key, parameter);
52
+ } else {
53
+ urlSearchParams.set(key, parameter);
54
+ }
55
+ }
56
+ }
57
+ var setSearchParams = function(url, ...objects) {
58
+ const searchParams = new URLSearchParams(url.search);
59
+ setFlattenedQueryParams(searchParams, objects);
60
+ url.search = searchParams.toString();
61
+ };
62
+ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
63
+ const nonString = typeof value !== "string";
64
+ const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
65
+ return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
66
+ };
67
+ var toPathString = function(url) {
68
+ return url.pathname + url.search + url.hash;
69
+ };
70
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
71
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
72
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _ => _.basePath]), () => ( basePath))) + axiosArgs.url };
73
+ return axios.request(axiosRequestArgs);
74
+ };
75
+ };
76
+
77
+ // src/api.ts
78
+ var ContactAvatarAvatarTypeEnum = {
79
+ ProfilePic: "profilePic",
80
+ Generic: "generic",
81
+ Initials: "initials"
82
+ };
83
+ var ContactsApiAxiosParamCreator = function(configuration) {
84
+ return {
85
+ /**
86
+ * Create a new contact
87
+ * @summary Contacts Create
88
+ * @param {ContactCreate} contactCreate
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ contactsCreate: async (contactCreate, options = {}) => {
93
+ assertParamExists("contactsCreate", "contactCreate", contactCreate);
94
+ const localVarPath = `/contacts`;
95
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
96
+ let baseOptions;
97
+ if (configuration) {
98
+ baseOptions = configuration.baseOptions;
99
+ }
100
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
101
+ const localVarHeaderParameter = {};
102
+ const localVarQueryParameter = {};
103
+ localVarHeaderParameter["Content-Type"] = "application/json";
104
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
105
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
106
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
107
+ localVarRequestOptions.data = serializeDataIfNeeded(contactCreate, localVarRequestOptions, configuration);
108
+ return {
109
+ url: toPathString(localVarUrlObj),
110
+ options: localVarRequestOptions
111
+ };
112
+ },
113
+ /**
114
+ * Delete a contact
115
+ * @summary Contacts Delete
116
+ * @param {string} contactId
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ */
120
+ contactsDelete: async (contactId, options = {}) => {
121
+ assertParamExists("contactsDelete", "contactId", contactId);
122
+ const localVarPath = `/contacts/{contact_id}`.replace(`{${"contact_id"}}`, encodeURIComponent(String(contactId)));
123
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
124
+ let baseOptions;
125
+ if (configuration) {
126
+ baseOptions = configuration.baseOptions;
127
+ }
128
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
129
+ const localVarHeaderParameter = {};
130
+ const localVarQueryParameter = {};
131
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
132
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions
137
+ };
138
+ },
139
+ /**
140
+ * Get a contact by ID
141
+ * @summary Contacts Get
142
+ * @param {string} contactId
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ contactsGet: async (contactId, options = {}) => {
147
+ assertParamExists("contactsGet", "contactId", contactId);
148
+ const localVarPath = `/contacts/{contact_id}`.replace(`{${"contact_id"}}`, encodeURIComponent(String(contactId)));
149
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
150
+ let baseOptions;
151
+ if (configuration) {
152
+ baseOptions = configuration.baseOptions;
153
+ }
154
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
155
+ const localVarHeaderParameter = {};
156
+ const localVarQueryParameter = {};
157
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
158
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
159
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
160
+ return {
161
+ url: toPathString(localVarUrlObj),
162
+ options: localVarRequestOptions
163
+ };
164
+ },
165
+ /**
166
+ * List all contacts
167
+ * @summary Contacts List
168
+ * @param {*} [options] Override http request option.
169
+ * @throws {RequiredError}
170
+ */
171
+ contactsList: async (options = {}) => {
172
+ const localVarPath = `/contacts`;
173
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
174
+ let baseOptions;
175
+ if (configuration) {
176
+ baseOptions = configuration.baseOptions;
177
+ }
178
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
179
+ const localVarHeaderParameter = {};
180
+ const localVarQueryParameter = {};
181
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
182
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
184
+ return {
185
+ url: toPathString(localVarUrlObj),
186
+ options: localVarRequestOptions
187
+ };
188
+ },
189
+ /**
190
+ * Update a contact
191
+ * @summary Contacts Update
192
+ * @param {string} contactId
193
+ * @param {ContactUpdate} contactUpdate
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ contactsUpdate: async (contactId, contactUpdate, options = {}) => {
198
+ assertParamExists("contactsUpdate", "contactId", contactId);
199
+ assertParamExists("contactsUpdate", "contactUpdate", contactUpdate);
200
+ const localVarPath = `/contacts/{contact_id}`.replace(`{${"contact_id"}}`, encodeURIComponent(String(contactId)));
201
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
202
+ let baseOptions;
203
+ if (configuration) {
204
+ baseOptions = configuration.baseOptions;
205
+ }
206
+ const localVarRequestOptions = { method: "PATCH", ...baseOptions, ...options };
207
+ const localVarHeaderParameter = {};
208
+ const localVarQueryParameter = {};
209
+ localVarHeaderParameter["Content-Type"] = "application/json";
210
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
211
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
212
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
213
+ localVarRequestOptions.data = serializeDataIfNeeded(contactUpdate, localVarRequestOptions, configuration);
214
+ return {
215
+ url: toPathString(localVarUrlObj),
216
+ options: localVarRequestOptions
217
+ };
218
+ }
219
+ };
220
+ };
221
+ var ContactsApiFp = function(configuration) {
222
+ const localVarAxiosParamCreator = ContactsApiAxiosParamCreator(configuration);
223
+ return {
224
+ /**
225
+ * Create a new contact
226
+ * @summary Contacts Create
227
+ * @param {ContactCreate} contactCreate
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ async contactsCreate(contactCreate, options) {
232
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsCreate(contactCreate, options);
233
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _2 => _2.serverIndex]), () => ( 0));
234
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _3 => _3["ContactsApi.contactsCreate"], 'optionalAccess', _4 => _4[localVarOperationServerIndex], 'optionalAccess', _5 => _5.url]);
235
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
236
+ },
237
+ /**
238
+ * Delete a contact
239
+ * @summary Contacts Delete
240
+ * @param {string} contactId
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ async contactsDelete(contactId, options) {
245
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsDelete(contactId, options);
246
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _6 => _6.serverIndex]), () => ( 0));
247
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _7 => _7["ContactsApi.contactsDelete"], 'optionalAccess', _8 => _8[localVarOperationServerIndex], 'optionalAccess', _9 => _9.url]);
248
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
249
+ },
250
+ /**
251
+ * Get a contact by ID
252
+ * @summary Contacts Get
253
+ * @param {string} contactId
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ */
257
+ async contactsGet(contactId, options) {
258
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsGet(contactId, options);
259
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _10 => _10.serverIndex]), () => ( 0));
260
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _11 => _11["ContactsApi.contactsGet"], 'optionalAccess', _12 => _12[localVarOperationServerIndex], 'optionalAccess', _13 => _13.url]);
261
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
262
+ },
263
+ /**
264
+ * List all contacts
265
+ * @summary Contacts List
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ async contactsList(options) {
270
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsList(options);
271
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _14 => _14.serverIndex]), () => ( 0));
272
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _15 => _15["ContactsApi.contactsList"], 'optionalAccess', _16 => _16[localVarOperationServerIndex], 'optionalAccess', _17 => _17.url]);
273
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
274
+ },
275
+ /**
276
+ * Update a contact
277
+ * @summary Contacts Update
278
+ * @param {string} contactId
279
+ * @param {ContactUpdate} contactUpdate
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ async contactsUpdate(contactId, contactUpdate, options) {
284
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsUpdate(contactId, contactUpdate, options);
285
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _18 => _18.serverIndex]), () => ( 0));
286
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _19 => _19["ContactsApi.contactsUpdate"], 'optionalAccess', _20 => _20[localVarOperationServerIndex], 'optionalAccess', _21 => _21.url]);
287
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
288
+ }
289
+ };
290
+ };
291
+ var ContactsApiFactory = function(configuration, basePath, axios) {
292
+ const localVarFp = ContactsApiFp(configuration);
293
+ return {
294
+ /**
295
+ * Create a new contact
296
+ * @summary Contacts Create
297
+ * @param {ContactCreate} contactCreate
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ contactsCreate(contactCreate, options) {
302
+ return localVarFp.contactsCreate(contactCreate, options).then((request) => request(axios, basePath));
303
+ },
304
+ /**
305
+ * Delete a contact
306
+ * @summary Contacts Delete
307
+ * @param {string} contactId
308
+ * @param {*} [options] Override http request option.
309
+ * @throws {RequiredError}
310
+ */
311
+ contactsDelete(contactId, options) {
312
+ return localVarFp.contactsDelete(contactId, options).then((request) => request(axios, basePath));
313
+ },
314
+ /**
315
+ * Get a contact by ID
316
+ * @summary Contacts Get
317
+ * @param {string} contactId
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ */
321
+ contactsGet(contactId, options) {
322
+ return localVarFp.contactsGet(contactId, options).then((request) => request(axios, basePath));
323
+ },
324
+ /**
325
+ * List all contacts
326
+ * @summary Contacts List
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ contactsList(options) {
331
+ return localVarFp.contactsList(options).then((request) => request(axios, basePath));
332
+ },
333
+ /**
334
+ * Update a contact
335
+ * @summary Contacts Update
336
+ * @param {string} contactId
337
+ * @param {ContactUpdate} contactUpdate
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ */
341
+ contactsUpdate(contactId, contactUpdate, options) {
342
+ return localVarFp.contactsUpdate(contactId, contactUpdate, options).then((request) => request(axios, basePath));
343
+ }
344
+ };
345
+ };
346
+ var ContactsApi = class extends BaseAPI {
347
+ /**
348
+ * Create a new contact
349
+ * @summary Contacts Create
350
+ * @param {ContactCreate} contactCreate
351
+ * @param {*} [options] Override http request option.
352
+ * @throws {RequiredError}
353
+ * @memberof ContactsApi
354
+ */
355
+ contactsCreate(contactCreate, options) {
356
+ return ContactsApiFp(this.configuration).contactsCreate(contactCreate, options).then((request) => request(this.axios, this.basePath));
357
+ }
358
+ /**
359
+ * Delete a contact
360
+ * @summary Contacts Delete
361
+ * @param {string} contactId
362
+ * @param {*} [options] Override http request option.
363
+ * @throws {RequiredError}
364
+ * @memberof ContactsApi
365
+ */
366
+ contactsDelete(contactId, options) {
367
+ return ContactsApiFp(this.configuration).contactsDelete(contactId, options).then((request) => request(this.axios, this.basePath));
368
+ }
369
+ /**
370
+ * Get a contact by ID
371
+ * @summary Contacts Get
372
+ * @param {string} contactId
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ * @memberof ContactsApi
376
+ */
377
+ contactsGet(contactId, options) {
378
+ return ContactsApiFp(this.configuration).contactsGet(contactId, options).then((request) => request(this.axios, this.basePath));
379
+ }
380
+ /**
381
+ * List all contacts
382
+ * @summary Contacts List
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ * @memberof ContactsApi
386
+ */
387
+ contactsList(options) {
388
+ return ContactsApiFp(this.configuration).contactsList(options).then((request) => request(this.axios, this.basePath));
389
+ }
390
+ /**
391
+ * Update a contact
392
+ * @summary Contacts Update
393
+ * @param {string} contactId
394
+ * @param {ContactUpdate} contactUpdate
395
+ * @param {*} [options] Override http request option.
396
+ * @throws {RequiredError}
397
+ * @memberof ContactsApi
398
+ */
399
+ contactsUpdate(contactId, contactUpdate, options) {
400
+ return ContactsApiFp(this.configuration).contactsUpdate(contactId, contactUpdate, options).then((request) => request(this.axios, this.basePath));
401
+ }
402
+ };
403
+ var HostawayApiAxiosParamCreator = function(configuration) {
404
+ return {
405
+ /**
406
+ *
407
+ * @summary Unifiedwebhook
408
+ * @param {object} body
409
+ * @param {*} [options] Override http request option.
410
+ * @throws {RequiredError}
411
+ */
412
+ webhook: async (body, options = {}) => {
413
+ assertParamExists("webhook", "body", body);
414
+ const localVarPath = `/hostawayUnifiedWebHooks`;
415
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
416
+ let baseOptions;
417
+ if (configuration) {
418
+ baseOptions = configuration.baseOptions;
419
+ }
420
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
421
+ const localVarHeaderParameter = {};
422
+ const localVarQueryParameter = {};
423
+ setBasicAuthToObject(localVarRequestOptions, configuration);
424
+ localVarHeaderParameter["Content-Type"] = "application/json";
425
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
426
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
427
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
428
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
429
+ return {
430
+ url: toPathString(localVarUrlObj),
431
+ options: localVarRequestOptions
432
+ };
433
+ }
434
+ };
435
+ };
436
+ var HostawayApiFp = function(configuration) {
437
+ const localVarAxiosParamCreator = HostawayApiAxiosParamCreator(configuration);
438
+ return {
439
+ /**
440
+ *
441
+ * @summary Unifiedwebhook
442
+ * @param {object} body
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ async webhook(body, options) {
447
+ const localVarAxiosArgs = await localVarAxiosParamCreator.webhook(body, options);
448
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _22 => _22.serverIndex]), () => ( 0));
449
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _23 => _23["HostawayApi.webhook"], 'optionalAccess', _24 => _24[localVarOperationServerIndex], 'optionalAccess', _25 => _25.url]);
450
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
451
+ }
452
+ };
453
+ };
454
+ var HostawayApiFactory = function(configuration, basePath, axios) {
455
+ const localVarFp = HostawayApiFp(configuration);
456
+ return {
457
+ /**
458
+ *
459
+ * @summary Unifiedwebhook
460
+ * @param {object} body
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ webhook(body, options) {
465
+ return localVarFp.webhook(body, options).then((request) => request(axios, basePath));
466
+ }
467
+ };
468
+ };
469
+ var HostawayApi = class extends BaseAPI {
470
+ /**
471
+ *
472
+ * @summary Unifiedwebhook
473
+ * @param {object} body
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ * @memberof HostawayApi
477
+ */
478
+ webhook(body, options) {
479
+ return HostawayApiFp(this.configuration).webhook(body, options).then((request) => request(this.axios, this.basePath));
480
+ }
481
+ };
482
+ var TasksApiAxiosParamCreator = function(configuration) {
483
+ return {
484
+ /**
485
+ *
486
+ * @summary Tasks Create
487
+ * @param {string} projectId
488
+ * @param {TaskCreate} taskCreate
489
+ * @param {*} [options] Override http request option.
490
+ * @throws {RequiredError}
491
+ */
492
+ tasksCreate: async (projectId, taskCreate, options = {}) => {
493
+ assertParamExists("tasksCreate", "projectId", projectId);
494
+ assertParamExists("tasksCreate", "taskCreate", taskCreate);
495
+ const localVarPath = `/projects/{project_id}/tasks`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
496
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
497
+ let baseOptions;
498
+ if (configuration) {
499
+ baseOptions = configuration.baseOptions;
500
+ }
501
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
502
+ const localVarHeaderParameter = {};
503
+ const localVarQueryParameter = {};
504
+ localVarHeaderParameter["Content-Type"] = "application/json";
505
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
506
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
507
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
508
+ localVarRequestOptions.data = serializeDataIfNeeded(taskCreate, localVarRequestOptions, configuration);
509
+ return {
510
+ url: toPathString(localVarUrlObj),
511
+ options: localVarRequestOptions
512
+ };
513
+ },
514
+ /**
515
+ *
516
+ * @summary Tasks Delete
517
+ * @param {string} taskId
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ tasksDelete: async (taskId, options = {}) => {
522
+ assertParamExists("tasksDelete", "taskId", taskId);
523
+ const localVarPath = `/tasks/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
524
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
525
+ let baseOptions;
526
+ if (configuration) {
527
+ baseOptions = configuration.baseOptions;
528
+ }
529
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
530
+ const localVarHeaderParameter = {};
531
+ const localVarQueryParameter = {};
532
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
533
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
534
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
535
+ return {
536
+ url: toPathString(localVarUrlObj),
537
+ options: localVarRequestOptions
538
+ };
539
+ },
540
+ /**
541
+ *
542
+ * @summary Tasks Get
543
+ * @param {string} taskId
544
+ * @param {*} [options] Override http request option.
545
+ * @throws {RequiredError}
546
+ */
547
+ tasksGet: async (taskId, options = {}) => {
548
+ assertParamExists("tasksGet", "taskId", taskId);
549
+ const localVarPath = `/tasks/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
550
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
551
+ let baseOptions;
552
+ if (configuration) {
553
+ baseOptions = configuration.baseOptions;
554
+ }
555
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
556
+ const localVarHeaderParameter = {};
557
+ const localVarQueryParameter = {};
558
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
559
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
560
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
561
+ return {
562
+ url: toPathString(localVarUrlObj),
563
+ options: localVarRequestOptions
564
+ };
565
+ },
566
+ /**
567
+ *
568
+ * @summary Tasks List
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ */
572
+ tasksList: async (options = {}) => {
573
+ const localVarPath = `/tasks`;
574
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
575
+ let baseOptions;
576
+ if (configuration) {
577
+ baseOptions = configuration.baseOptions;
578
+ }
579
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
580
+ const localVarHeaderParameter = {};
581
+ const localVarQueryParameter = {};
582
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
583
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
584
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
585
+ return {
586
+ url: toPathString(localVarUrlObj),
587
+ options: localVarRequestOptions
588
+ };
589
+ },
590
+ /**
591
+ *
592
+ * @summary Tasks Update
593
+ * @param {string} taskId
594
+ * @param {TaskUpdate} taskUpdate
595
+ * @param {*} [options] Override http request option.
596
+ * @throws {RequiredError}
597
+ */
598
+ tasksUpdate: async (taskId, taskUpdate, options = {}) => {
599
+ assertParamExists("tasksUpdate", "taskId", taskId);
600
+ assertParamExists("tasksUpdate", "taskUpdate", taskUpdate);
601
+ const localVarPath = `/tasks/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
602
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
603
+ let baseOptions;
604
+ if (configuration) {
605
+ baseOptions = configuration.baseOptions;
606
+ }
607
+ const localVarRequestOptions = { method: "PATCH", ...baseOptions, ...options };
608
+ const localVarHeaderParameter = {};
609
+ const localVarQueryParameter = {};
610
+ localVarHeaderParameter["Content-Type"] = "application/json";
611
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
612
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
613
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
614
+ localVarRequestOptions.data = serializeDataIfNeeded(taskUpdate, localVarRequestOptions, configuration);
615
+ return {
616
+ url: toPathString(localVarUrlObj),
617
+ options: localVarRequestOptions
618
+ };
619
+ }
620
+ };
621
+ };
622
+ var TasksApiFp = function(configuration) {
623
+ const localVarAxiosParamCreator = TasksApiAxiosParamCreator(configuration);
624
+ return {
625
+ /**
626
+ *
627
+ * @summary Tasks Create
628
+ * @param {string} projectId
629
+ * @param {TaskCreate} taskCreate
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ async tasksCreate(projectId, taskCreate, options) {
634
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksCreate(projectId, taskCreate, options);
635
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _26 => _26.serverIndex]), () => ( 0));
636
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _27 => _27["TasksApi.tasksCreate"], 'optionalAccess', _28 => _28[localVarOperationServerIndex], 'optionalAccess', _29 => _29.url]);
637
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
638
+ },
639
+ /**
640
+ *
641
+ * @summary Tasks Delete
642
+ * @param {string} taskId
643
+ * @param {*} [options] Override http request option.
644
+ * @throws {RequiredError}
645
+ */
646
+ async tasksDelete(taskId, options) {
647
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksDelete(taskId, options);
648
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _30 => _30.serverIndex]), () => ( 0));
649
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _31 => _31["TasksApi.tasksDelete"], 'optionalAccess', _32 => _32[localVarOperationServerIndex], 'optionalAccess', _33 => _33.url]);
650
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
651
+ },
652
+ /**
653
+ *
654
+ * @summary Tasks Get
655
+ * @param {string} taskId
656
+ * @param {*} [options] Override http request option.
657
+ * @throws {RequiredError}
658
+ */
659
+ async tasksGet(taskId, options) {
660
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksGet(taskId, options);
661
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _34 => _34.serverIndex]), () => ( 0));
662
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _35 => _35["TasksApi.tasksGet"], 'optionalAccess', _36 => _36[localVarOperationServerIndex], 'optionalAccess', _37 => _37.url]);
663
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
664
+ },
665
+ /**
666
+ *
667
+ * @summary Tasks List
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ */
671
+ async tasksList(options) {
672
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksList(options);
673
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _38 => _38.serverIndex]), () => ( 0));
674
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _39 => _39["TasksApi.tasksList"], 'optionalAccess', _40 => _40[localVarOperationServerIndex], 'optionalAccess', _41 => _41.url]);
675
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
676
+ },
677
+ /**
678
+ *
679
+ * @summary Tasks Update
680
+ * @param {string} taskId
681
+ * @param {TaskUpdate} taskUpdate
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ */
685
+ async tasksUpdate(taskId, taskUpdate, options) {
686
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksUpdate(taskId, taskUpdate, options);
687
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _42 => _42.serverIndex]), () => ( 0));
688
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _43 => _43["TasksApi.tasksUpdate"], 'optionalAccess', _44 => _44[localVarOperationServerIndex], 'optionalAccess', _45 => _45.url]);
689
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
690
+ }
691
+ };
692
+ };
693
+ var TasksApiFactory = function(configuration, basePath, axios) {
694
+ const localVarFp = TasksApiFp(configuration);
695
+ return {
696
+ /**
697
+ *
698
+ * @summary Tasks Create
699
+ * @param {string} projectId
700
+ * @param {TaskCreate} taskCreate
701
+ * @param {*} [options] Override http request option.
702
+ * @throws {RequiredError}
703
+ */
704
+ tasksCreate(projectId, taskCreate, options) {
705
+ return localVarFp.tasksCreate(projectId, taskCreate, options).then((request) => request(axios, basePath));
706
+ },
707
+ /**
708
+ *
709
+ * @summary Tasks Delete
710
+ * @param {string} taskId
711
+ * @param {*} [options] Override http request option.
712
+ * @throws {RequiredError}
713
+ */
714
+ tasksDelete(taskId, options) {
715
+ return localVarFp.tasksDelete(taskId, options).then((request) => request(axios, basePath));
716
+ },
717
+ /**
718
+ *
719
+ * @summary Tasks Get
720
+ * @param {string} taskId
721
+ * @param {*} [options] Override http request option.
722
+ * @throws {RequiredError}
723
+ */
724
+ tasksGet(taskId, options) {
725
+ return localVarFp.tasksGet(taskId, options).then((request) => request(axios, basePath));
726
+ },
727
+ /**
728
+ *
729
+ * @summary Tasks List
730
+ * @param {*} [options] Override http request option.
731
+ * @throws {RequiredError}
732
+ */
733
+ tasksList(options) {
734
+ return localVarFp.tasksList(options).then((request) => request(axios, basePath));
735
+ },
736
+ /**
737
+ *
738
+ * @summary Tasks Update
739
+ * @param {string} taskId
740
+ * @param {TaskUpdate} taskUpdate
741
+ * @param {*} [options] Override http request option.
742
+ * @throws {RequiredError}
743
+ */
744
+ tasksUpdate(taskId, taskUpdate, options) {
745
+ return localVarFp.tasksUpdate(taskId, taskUpdate, options).then((request) => request(axios, basePath));
746
+ }
747
+ };
748
+ };
749
+ var TasksApi = class extends BaseAPI {
750
+ /**
751
+ *
752
+ * @summary Tasks Create
753
+ * @param {string} projectId
754
+ * @param {TaskCreate} taskCreate
755
+ * @param {*} [options] Override http request option.
756
+ * @throws {RequiredError}
757
+ * @memberof TasksApi
758
+ */
759
+ tasksCreate(projectId, taskCreate, options) {
760
+ return TasksApiFp(this.configuration).tasksCreate(projectId, taskCreate, options).then((request) => request(this.axios, this.basePath));
761
+ }
762
+ /**
763
+ *
764
+ * @summary Tasks Delete
765
+ * @param {string} taskId
766
+ * @param {*} [options] Override http request option.
767
+ * @throws {RequiredError}
768
+ * @memberof TasksApi
769
+ */
770
+ tasksDelete(taskId, options) {
771
+ return TasksApiFp(this.configuration).tasksDelete(taskId, options).then((request) => request(this.axios, this.basePath));
772
+ }
773
+ /**
774
+ *
775
+ * @summary Tasks Get
776
+ * @param {string} taskId
777
+ * @param {*} [options] Override http request option.
778
+ * @throws {RequiredError}
779
+ * @memberof TasksApi
780
+ */
781
+ tasksGet(taskId, options) {
782
+ return TasksApiFp(this.configuration).tasksGet(taskId, options).then((request) => request(this.axios, this.basePath));
783
+ }
784
+ /**
785
+ *
786
+ * @summary Tasks List
787
+ * @param {*} [options] Override http request option.
788
+ * @throws {RequiredError}
789
+ * @memberof TasksApi
790
+ */
791
+ tasksList(options) {
792
+ return TasksApiFp(this.configuration).tasksList(options).then((request) => request(this.axios, this.basePath));
793
+ }
794
+ /**
795
+ *
796
+ * @summary Tasks Update
797
+ * @param {string} taskId
798
+ * @param {TaskUpdate} taskUpdate
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ * @memberof TasksApi
802
+ */
803
+ tasksUpdate(taskId, taskUpdate, options) {
804
+ return TasksApiFp(this.configuration).tasksUpdate(taskId, taskUpdate, options).then((request) => request(this.axios, this.basePath));
805
+ }
806
+ };
807
+ var UnboundApiAxiosParamCreator = function(configuration) {
808
+ return {
809
+ /**
810
+ * Create a new contact
811
+ * @summary Contacts Create
812
+ * @param {ContactCreate} contactCreate
813
+ * @param {*} [options] Override http request option.
814
+ * @throws {RequiredError}
815
+ */
816
+ contactsCreate: async (contactCreate, options = {}) => {
817
+ assertParamExists("contactsCreate", "contactCreate", contactCreate);
818
+ const localVarPath = `/contacts`;
819
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
820
+ let baseOptions;
821
+ if (configuration) {
822
+ baseOptions = configuration.baseOptions;
823
+ }
824
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
825
+ const localVarHeaderParameter = {};
826
+ const localVarQueryParameter = {};
827
+ localVarHeaderParameter["Content-Type"] = "application/json";
828
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
829
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
830
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
831
+ localVarRequestOptions.data = serializeDataIfNeeded(contactCreate, localVarRequestOptions, configuration);
832
+ return {
833
+ url: toPathString(localVarUrlObj),
834
+ options: localVarRequestOptions
835
+ };
836
+ },
837
+ /**
838
+ * Delete a contact
839
+ * @summary Contacts Delete
840
+ * @param {string} contactId
841
+ * @param {*} [options] Override http request option.
842
+ * @throws {RequiredError}
843
+ */
844
+ contactsDelete: async (contactId, options = {}) => {
845
+ assertParamExists("contactsDelete", "contactId", contactId);
846
+ const localVarPath = `/contacts/{contact_id}`.replace(`{${"contact_id"}}`, encodeURIComponent(String(contactId)));
847
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
848
+ let baseOptions;
849
+ if (configuration) {
850
+ baseOptions = configuration.baseOptions;
851
+ }
852
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
853
+ const localVarHeaderParameter = {};
854
+ const localVarQueryParameter = {};
855
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
856
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
857
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
858
+ return {
859
+ url: toPathString(localVarUrlObj),
860
+ options: localVarRequestOptions
861
+ };
862
+ },
863
+ /**
864
+ * Get a contact by ID
865
+ * @summary Contacts Get
866
+ * @param {string} contactId
867
+ * @param {*} [options] Override http request option.
868
+ * @throws {RequiredError}
869
+ */
870
+ contactsGet: async (contactId, options = {}) => {
871
+ assertParamExists("contactsGet", "contactId", contactId);
872
+ const localVarPath = `/contacts/{contact_id}`.replace(`{${"contact_id"}}`, encodeURIComponent(String(contactId)));
873
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
874
+ let baseOptions;
875
+ if (configuration) {
876
+ baseOptions = configuration.baseOptions;
877
+ }
878
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
879
+ const localVarHeaderParameter = {};
880
+ const localVarQueryParameter = {};
881
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
882
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
883
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
884
+ return {
885
+ url: toPathString(localVarUrlObj),
886
+ options: localVarRequestOptions
887
+ };
888
+ },
889
+ /**
890
+ * List all contacts
891
+ * @summary Contacts List
892
+ * @param {*} [options] Override http request option.
893
+ * @throws {RequiredError}
894
+ */
895
+ contactsList: async (options = {}) => {
896
+ const localVarPath = `/contacts`;
897
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
898
+ let baseOptions;
899
+ if (configuration) {
900
+ baseOptions = configuration.baseOptions;
901
+ }
902
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
903
+ const localVarHeaderParameter = {};
904
+ const localVarQueryParameter = {};
905
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
906
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
907
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
908
+ return {
909
+ url: toPathString(localVarUrlObj),
910
+ options: localVarRequestOptions
911
+ };
912
+ },
913
+ /**
914
+ * Update a contact
915
+ * @summary Contacts Update
916
+ * @param {string} contactId
917
+ * @param {ContactUpdate} contactUpdate
918
+ * @param {*} [options] Override http request option.
919
+ * @throws {RequiredError}
920
+ */
921
+ contactsUpdate: async (contactId, contactUpdate, options = {}) => {
922
+ assertParamExists("contactsUpdate", "contactId", contactId);
923
+ assertParamExists("contactsUpdate", "contactUpdate", contactUpdate);
924
+ const localVarPath = `/contacts/{contact_id}`.replace(`{${"contact_id"}}`, encodeURIComponent(String(contactId)));
925
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
926
+ let baseOptions;
927
+ if (configuration) {
928
+ baseOptions = configuration.baseOptions;
929
+ }
930
+ const localVarRequestOptions = { method: "PATCH", ...baseOptions, ...options };
931
+ const localVarHeaderParameter = {};
932
+ const localVarQueryParameter = {};
933
+ localVarHeaderParameter["Content-Type"] = "application/json";
934
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
935
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
936
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
937
+ localVarRequestOptions.data = serializeDataIfNeeded(contactUpdate, localVarRequestOptions, configuration);
938
+ return {
939
+ url: toPathString(localVarUrlObj),
940
+ options: localVarRequestOptions
941
+ };
942
+ },
943
+ /**
944
+ *
945
+ * @summary Tasks Create
946
+ * @param {string} projectId
947
+ * @param {TaskCreate} taskCreate
948
+ * @param {*} [options] Override http request option.
949
+ * @throws {RequiredError}
950
+ */
951
+ tasksCreate: async (projectId, taskCreate, options = {}) => {
952
+ assertParamExists("tasksCreate", "projectId", projectId);
953
+ assertParamExists("tasksCreate", "taskCreate", taskCreate);
954
+ const localVarPath = `/projects/{project_id}/tasks`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
955
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
956
+ let baseOptions;
957
+ if (configuration) {
958
+ baseOptions = configuration.baseOptions;
959
+ }
960
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
961
+ const localVarHeaderParameter = {};
962
+ const localVarQueryParameter = {};
963
+ localVarHeaderParameter["Content-Type"] = "application/json";
964
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
965
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
966
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
967
+ localVarRequestOptions.data = serializeDataIfNeeded(taskCreate, localVarRequestOptions, configuration);
968
+ return {
969
+ url: toPathString(localVarUrlObj),
970
+ options: localVarRequestOptions
971
+ };
972
+ },
973
+ /**
974
+ *
975
+ * @summary Tasks Delete
976
+ * @param {string} taskId
977
+ * @param {*} [options] Override http request option.
978
+ * @throws {RequiredError}
979
+ */
980
+ tasksDelete: async (taskId, options = {}) => {
981
+ assertParamExists("tasksDelete", "taskId", taskId);
982
+ const localVarPath = `/tasks/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
983
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
984
+ let baseOptions;
985
+ if (configuration) {
986
+ baseOptions = configuration.baseOptions;
987
+ }
988
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
989
+ const localVarHeaderParameter = {};
990
+ const localVarQueryParameter = {};
991
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
992
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
993
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
994
+ return {
995
+ url: toPathString(localVarUrlObj),
996
+ options: localVarRequestOptions
997
+ };
998
+ },
999
+ /**
1000
+ *
1001
+ * @summary Tasks Get
1002
+ * @param {string} taskId
1003
+ * @param {*} [options] Override http request option.
1004
+ * @throws {RequiredError}
1005
+ */
1006
+ tasksGet: async (taskId, options = {}) => {
1007
+ assertParamExists("tasksGet", "taskId", taskId);
1008
+ const localVarPath = `/tasks/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
1009
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1010
+ let baseOptions;
1011
+ if (configuration) {
1012
+ baseOptions = configuration.baseOptions;
1013
+ }
1014
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
1015
+ const localVarHeaderParameter = {};
1016
+ const localVarQueryParameter = {};
1017
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1018
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1019
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1020
+ return {
1021
+ url: toPathString(localVarUrlObj),
1022
+ options: localVarRequestOptions
1023
+ };
1024
+ },
1025
+ /**
1026
+ *
1027
+ * @summary Tasks List
1028
+ * @param {*} [options] Override http request option.
1029
+ * @throws {RequiredError}
1030
+ */
1031
+ tasksList: async (options = {}) => {
1032
+ const localVarPath = `/tasks`;
1033
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1034
+ let baseOptions;
1035
+ if (configuration) {
1036
+ baseOptions = configuration.baseOptions;
1037
+ }
1038
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
1039
+ const localVarHeaderParameter = {};
1040
+ const localVarQueryParameter = {};
1041
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1042
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1043
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1044
+ return {
1045
+ url: toPathString(localVarUrlObj),
1046
+ options: localVarRequestOptions
1047
+ };
1048
+ },
1049
+ /**
1050
+ *
1051
+ * @summary Tasks Update
1052
+ * @param {string} taskId
1053
+ * @param {TaskUpdate} taskUpdate
1054
+ * @param {*} [options] Override http request option.
1055
+ * @throws {RequiredError}
1056
+ */
1057
+ tasksUpdate: async (taskId, taskUpdate, options = {}) => {
1058
+ assertParamExists("tasksUpdate", "taskId", taskId);
1059
+ assertParamExists("tasksUpdate", "taskUpdate", taskUpdate);
1060
+ const localVarPath = `/tasks/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
1061
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1062
+ let baseOptions;
1063
+ if (configuration) {
1064
+ baseOptions = configuration.baseOptions;
1065
+ }
1066
+ const localVarRequestOptions = { method: "PATCH", ...baseOptions, ...options };
1067
+ const localVarHeaderParameter = {};
1068
+ const localVarQueryParameter = {};
1069
+ localVarHeaderParameter["Content-Type"] = "application/json";
1070
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1071
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1072
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1073
+ localVarRequestOptions.data = serializeDataIfNeeded(taskUpdate, localVarRequestOptions, configuration);
1074
+ return {
1075
+ url: toPathString(localVarUrlObj),
1076
+ options: localVarRequestOptions
1077
+ };
1078
+ },
1079
+ /**
1080
+ *
1081
+ * @summary Unifiedwebhook
1082
+ * @param {object} body
1083
+ * @param {*} [options] Override http request option.
1084
+ * @throws {RequiredError}
1085
+ */
1086
+ webhook: async (body, options = {}) => {
1087
+ assertParamExists("webhook", "body", body);
1088
+ const localVarPath = `/hostawayUnifiedWebHooks`;
1089
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1090
+ let baseOptions;
1091
+ if (configuration) {
1092
+ baseOptions = configuration.baseOptions;
1093
+ }
1094
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
1095
+ const localVarHeaderParameter = {};
1096
+ const localVarQueryParameter = {};
1097
+ setBasicAuthToObject(localVarRequestOptions, configuration);
1098
+ localVarHeaderParameter["Content-Type"] = "application/json";
1099
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1100
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1101
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1102
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
1103
+ return {
1104
+ url: toPathString(localVarUrlObj),
1105
+ options: localVarRequestOptions
1106
+ };
1107
+ }
1108
+ };
1109
+ };
1110
+ var UnboundApiFp = function(configuration) {
1111
+ const localVarAxiosParamCreator = UnboundApiAxiosParamCreator(configuration);
1112
+ return {
1113
+ /**
1114
+ * Create a new contact
1115
+ * @summary Contacts Create
1116
+ * @param {ContactCreate} contactCreate
1117
+ * @param {*} [options] Override http request option.
1118
+ * @throws {RequiredError}
1119
+ */
1120
+ async contactsCreate(contactCreate, options) {
1121
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsCreate(contactCreate, options);
1122
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _46 => _46.serverIndex]), () => ( 0));
1123
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _47 => _47["UnboundApi.contactsCreate"], 'optionalAccess', _48 => _48[localVarOperationServerIndex], 'optionalAccess', _49 => _49.url]);
1124
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1125
+ },
1126
+ /**
1127
+ * Delete a contact
1128
+ * @summary Contacts Delete
1129
+ * @param {string} contactId
1130
+ * @param {*} [options] Override http request option.
1131
+ * @throws {RequiredError}
1132
+ */
1133
+ async contactsDelete(contactId, options) {
1134
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsDelete(contactId, options);
1135
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _50 => _50.serverIndex]), () => ( 0));
1136
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _51 => _51["UnboundApi.contactsDelete"], 'optionalAccess', _52 => _52[localVarOperationServerIndex], 'optionalAccess', _53 => _53.url]);
1137
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1138
+ },
1139
+ /**
1140
+ * Get a contact by ID
1141
+ * @summary Contacts Get
1142
+ * @param {string} contactId
1143
+ * @param {*} [options] Override http request option.
1144
+ * @throws {RequiredError}
1145
+ */
1146
+ async contactsGet(contactId, options) {
1147
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsGet(contactId, options);
1148
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _54 => _54.serverIndex]), () => ( 0));
1149
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _55 => _55["UnboundApi.contactsGet"], 'optionalAccess', _56 => _56[localVarOperationServerIndex], 'optionalAccess', _57 => _57.url]);
1150
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1151
+ },
1152
+ /**
1153
+ * List all contacts
1154
+ * @summary Contacts List
1155
+ * @param {*} [options] Override http request option.
1156
+ * @throws {RequiredError}
1157
+ */
1158
+ async contactsList(options) {
1159
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsList(options);
1160
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _58 => _58.serverIndex]), () => ( 0));
1161
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _59 => _59["UnboundApi.contactsList"], 'optionalAccess', _60 => _60[localVarOperationServerIndex], 'optionalAccess', _61 => _61.url]);
1162
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1163
+ },
1164
+ /**
1165
+ * Update a contact
1166
+ * @summary Contacts Update
1167
+ * @param {string} contactId
1168
+ * @param {ContactUpdate} contactUpdate
1169
+ * @param {*} [options] Override http request option.
1170
+ * @throws {RequiredError}
1171
+ */
1172
+ async contactsUpdate(contactId, contactUpdate, options) {
1173
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contactsUpdate(contactId, contactUpdate, options);
1174
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _62 => _62.serverIndex]), () => ( 0));
1175
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _63 => _63["UnboundApi.contactsUpdate"], 'optionalAccess', _64 => _64[localVarOperationServerIndex], 'optionalAccess', _65 => _65.url]);
1176
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1177
+ },
1178
+ /**
1179
+ *
1180
+ * @summary Tasks Create
1181
+ * @param {string} projectId
1182
+ * @param {TaskCreate} taskCreate
1183
+ * @param {*} [options] Override http request option.
1184
+ * @throws {RequiredError}
1185
+ */
1186
+ async tasksCreate(projectId, taskCreate, options) {
1187
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksCreate(projectId, taskCreate, options);
1188
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _66 => _66.serverIndex]), () => ( 0));
1189
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _67 => _67["UnboundApi.tasksCreate"], 'optionalAccess', _68 => _68[localVarOperationServerIndex], 'optionalAccess', _69 => _69.url]);
1190
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1191
+ },
1192
+ /**
1193
+ *
1194
+ * @summary Tasks Delete
1195
+ * @param {string} taskId
1196
+ * @param {*} [options] Override http request option.
1197
+ * @throws {RequiredError}
1198
+ */
1199
+ async tasksDelete(taskId, options) {
1200
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksDelete(taskId, options);
1201
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _70 => _70.serverIndex]), () => ( 0));
1202
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _71 => _71["UnboundApi.tasksDelete"], 'optionalAccess', _72 => _72[localVarOperationServerIndex], 'optionalAccess', _73 => _73.url]);
1203
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1204
+ },
1205
+ /**
1206
+ *
1207
+ * @summary Tasks Get
1208
+ * @param {string} taskId
1209
+ * @param {*} [options] Override http request option.
1210
+ * @throws {RequiredError}
1211
+ */
1212
+ async tasksGet(taskId, options) {
1213
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksGet(taskId, options);
1214
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _74 => _74.serverIndex]), () => ( 0));
1215
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _75 => _75["UnboundApi.tasksGet"], 'optionalAccess', _76 => _76[localVarOperationServerIndex], 'optionalAccess', _77 => _77.url]);
1216
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1217
+ },
1218
+ /**
1219
+ *
1220
+ * @summary Tasks List
1221
+ * @param {*} [options] Override http request option.
1222
+ * @throws {RequiredError}
1223
+ */
1224
+ async tasksList(options) {
1225
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksList(options);
1226
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _78 => _78.serverIndex]), () => ( 0));
1227
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _79 => _79["UnboundApi.tasksList"], 'optionalAccess', _80 => _80[localVarOperationServerIndex], 'optionalAccess', _81 => _81.url]);
1228
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1229
+ },
1230
+ /**
1231
+ *
1232
+ * @summary Tasks Update
1233
+ * @param {string} taskId
1234
+ * @param {TaskUpdate} taskUpdate
1235
+ * @param {*} [options] Override http request option.
1236
+ * @throws {RequiredError}
1237
+ */
1238
+ async tasksUpdate(taskId, taskUpdate, options) {
1239
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tasksUpdate(taskId, taskUpdate, options);
1240
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _82 => _82.serverIndex]), () => ( 0));
1241
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _83 => _83["UnboundApi.tasksUpdate"], 'optionalAccess', _84 => _84[localVarOperationServerIndex], 'optionalAccess', _85 => _85.url]);
1242
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1243
+ },
1244
+ /**
1245
+ *
1246
+ * @summary Unifiedwebhook
1247
+ * @param {object} body
1248
+ * @param {*} [options] Override http request option.
1249
+ * @throws {RequiredError}
1250
+ */
1251
+ async webhook(body, options) {
1252
+ const localVarAxiosArgs = await localVarAxiosParamCreator.webhook(body, options);
1253
+ const localVarOperationServerIndex = _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _86 => _86.serverIndex]), () => ( 0));
1254
+ const localVarOperationServerBasePath = _optionalChain([operationServerMap, 'access', _87 => _87["UnboundApi.webhook"], 'optionalAccess', _88 => _88[localVarOperationServerIndex], 'optionalAccess', _89 => _89.url]);
1255
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, _axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1256
+ }
1257
+ };
1258
+ };
1259
+ var UnboundApiFactory = function(configuration, basePath, axios) {
1260
+ const localVarFp = UnboundApiFp(configuration);
1261
+ return {
1262
+ /**
1263
+ * Create a new contact
1264
+ * @summary Contacts Create
1265
+ * @param {ContactCreate} contactCreate
1266
+ * @param {*} [options] Override http request option.
1267
+ * @throws {RequiredError}
1268
+ */
1269
+ contactsCreate(contactCreate, options) {
1270
+ return localVarFp.contactsCreate(contactCreate, options).then((request) => request(axios, basePath));
1271
+ },
1272
+ /**
1273
+ * Delete a contact
1274
+ * @summary Contacts Delete
1275
+ * @param {string} contactId
1276
+ * @param {*} [options] Override http request option.
1277
+ * @throws {RequiredError}
1278
+ */
1279
+ contactsDelete(contactId, options) {
1280
+ return localVarFp.contactsDelete(contactId, options).then((request) => request(axios, basePath));
1281
+ },
1282
+ /**
1283
+ * Get a contact by ID
1284
+ * @summary Contacts Get
1285
+ * @param {string} contactId
1286
+ * @param {*} [options] Override http request option.
1287
+ * @throws {RequiredError}
1288
+ */
1289
+ contactsGet(contactId, options) {
1290
+ return localVarFp.contactsGet(contactId, options).then((request) => request(axios, basePath));
1291
+ },
1292
+ /**
1293
+ * List all contacts
1294
+ * @summary Contacts List
1295
+ * @param {*} [options] Override http request option.
1296
+ * @throws {RequiredError}
1297
+ */
1298
+ contactsList(options) {
1299
+ return localVarFp.contactsList(options).then((request) => request(axios, basePath));
1300
+ },
1301
+ /**
1302
+ * Update a contact
1303
+ * @summary Contacts Update
1304
+ * @param {string} contactId
1305
+ * @param {ContactUpdate} contactUpdate
1306
+ * @param {*} [options] Override http request option.
1307
+ * @throws {RequiredError}
1308
+ */
1309
+ contactsUpdate(contactId, contactUpdate, options) {
1310
+ return localVarFp.contactsUpdate(contactId, contactUpdate, options).then((request) => request(axios, basePath));
1311
+ },
1312
+ /**
1313
+ *
1314
+ * @summary Tasks Create
1315
+ * @param {string} projectId
1316
+ * @param {TaskCreate} taskCreate
1317
+ * @param {*} [options] Override http request option.
1318
+ * @throws {RequiredError}
1319
+ */
1320
+ tasksCreate(projectId, taskCreate, options) {
1321
+ return localVarFp.tasksCreate(projectId, taskCreate, options).then((request) => request(axios, basePath));
1322
+ },
1323
+ /**
1324
+ *
1325
+ * @summary Tasks Delete
1326
+ * @param {string} taskId
1327
+ * @param {*} [options] Override http request option.
1328
+ * @throws {RequiredError}
1329
+ */
1330
+ tasksDelete(taskId, options) {
1331
+ return localVarFp.tasksDelete(taskId, options).then((request) => request(axios, basePath));
1332
+ },
1333
+ /**
1334
+ *
1335
+ * @summary Tasks Get
1336
+ * @param {string} taskId
1337
+ * @param {*} [options] Override http request option.
1338
+ * @throws {RequiredError}
1339
+ */
1340
+ tasksGet(taskId, options) {
1341
+ return localVarFp.tasksGet(taskId, options).then((request) => request(axios, basePath));
1342
+ },
1343
+ /**
1344
+ *
1345
+ * @summary Tasks List
1346
+ * @param {*} [options] Override http request option.
1347
+ * @throws {RequiredError}
1348
+ */
1349
+ tasksList(options) {
1350
+ return localVarFp.tasksList(options).then((request) => request(axios, basePath));
1351
+ },
1352
+ /**
1353
+ *
1354
+ * @summary Tasks Update
1355
+ * @param {string} taskId
1356
+ * @param {TaskUpdate} taskUpdate
1357
+ * @param {*} [options] Override http request option.
1358
+ * @throws {RequiredError}
1359
+ */
1360
+ tasksUpdate(taskId, taskUpdate, options) {
1361
+ return localVarFp.tasksUpdate(taskId, taskUpdate, options).then((request) => request(axios, basePath));
1362
+ },
1363
+ /**
1364
+ *
1365
+ * @summary Unifiedwebhook
1366
+ * @param {object} body
1367
+ * @param {*} [options] Override http request option.
1368
+ * @throws {RequiredError}
1369
+ */
1370
+ webhook(body, options) {
1371
+ return localVarFp.webhook(body, options).then((request) => request(axios, basePath));
1372
+ }
1373
+ };
1374
+ };
1375
+ var UnboundApi = class extends BaseAPI {
1376
+ /**
1377
+ * Create a new contact
1378
+ * @summary Contacts Create
1379
+ * @param {ContactCreate} contactCreate
1380
+ * @param {*} [options] Override http request option.
1381
+ * @throws {RequiredError}
1382
+ * @memberof UnboundApi
1383
+ */
1384
+ contactsCreate(contactCreate, options) {
1385
+ return UnboundApiFp(this.configuration).contactsCreate(contactCreate, options).then((request) => request(this.axios, this.basePath));
1386
+ }
1387
+ /**
1388
+ * Delete a contact
1389
+ * @summary Contacts Delete
1390
+ * @param {string} contactId
1391
+ * @param {*} [options] Override http request option.
1392
+ * @throws {RequiredError}
1393
+ * @memberof UnboundApi
1394
+ */
1395
+ contactsDelete(contactId, options) {
1396
+ return UnboundApiFp(this.configuration).contactsDelete(contactId, options).then((request) => request(this.axios, this.basePath));
1397
+ }
1398
+ /**
1399
+ * Get a contact by ID
1400
+ * @summary Contacts Get
1401
+ * @param {string} contactId
1402
+ * @param {*} [options] Override http request option.
1403
+ * @throws {RequiredError}
1404
+ * @memberof UnboundApi
1405
+ */
1406
+ contactsGet(contactId, options) {
1407
+ return UnboundApiFp(this.configuration).contactsGet(contactId, options).then((request) => request(this.axios, this.basePath));
1408
+ }
1409
+ /**
1410
+ * List all contacts
1411
+ * @summary Contacts List
1412
+ * @param {*} [options] Override http request option.
1413
+ * @throws {RequiredError}
1414
+ * @memberof UnboundApi
1415
+ */
1416
+ contactsList(options) {
1417
+ return UnboundApiFp(this.configuration).contactsList(options).then((request) => request(this.axios, this.basePath));
1418
+ }
1419
+ /**
1420
+ * Update a contact
1421
+ * @summary Contacts Update
1422
+ * @param {string} contactId
1423
+ * @param {ContactUpdate} contactUpdate
1424
+ * @param {*} [options] Override http request option.
1425
+ * @throws {RequiredError}
1426
+ * @memberof UnboundApi
1427
+ */
1428
+ contactsUpdate(contactId, contactUpdate, options) {
1429
+ return UnboundApiFp(this.configuration).contactsUpdate(contactId, contactUpdate, options).then((request) => request(this.axios, this.basePath));
1430
+ }
1431
+ /**
1432
+ *
1433
+ * @summary Tasks Create
1434
+ * @param {string} projectId
1435
+ * @param {TaskCreate} taskCreate
1436
+ * @param {*} [options] Override http request option.
1437
+ * @throws {RequiredError}
1438
+ * @memberof UnboundApi
1439
+ */
1440
+ tasksCreate(projectId, taskCreate, options) {
1441
+ return UnboundApiFp(this.configuration).tasksCreate(projectId, taskCreate, options).then((request) => request(this.axios, this.basePath));
1442
+ }
1443
+ /**
1444
+ *
1445
+ * @summary Tasks Delete
1446
+ * @param {string} taskId
1447
+ * @param {*} [options] Override http request option.
1448
+ * @throws {RequiredError}
1449
+ * @memberof UnboundApi
1450
+ */
1451
+ tasksDelete(taskId, options) {
1452
+ return UnboundApiFp(this.configuration).tasksDelete(taskId, options).then((request) => request(this.axios, this.basePath));
1453
+ }
1454
+ /**
1455
+ *
1456
+ * @summary Tasks Get
1457
+ * @param {string} taskId
1458
+ * @param {*} [options] Override http request option.
1459
+ * @throws {RequiredError}
1460
+ * @memberof UnboundApi
1461
+ */
1462
+ tasksGet(taskId, options) {
1463
+ return UnboundApiFp(this.configuration).tasksGet(taskId, options).then((request) => request(this.axios, this.basePath));
1464
+ }
1465
+ /**
1466
+ *
1467
+ * @summary Tasks List
1468
+ * @param {*} [options] Override http request option.
1469
+ * @throws {RequiredError}
1470
+ * @memberof UnboundApi
1471
+ */
1472
+ tasksList(options) {
1473
+ return UnboundApiFp(this.configuration).tasksList(options).then((request) => request(this.axios, this.basePath));
1474
+ }
1475
+ /**
1476
+ *
1477
+ * @summary Tasks Update
1478
+ * @param {string} taskId
1479
+ * @param {TaskUpdate} taskUpdate
1480
+ * @param {*} [options] Override http request option.
1481
+ * @throws {RequiredError}
1482
+ * @memberof UnboundApi
1483
+ */
1484
+ tasksUpdate(taskId, taskUpdate, options) {
1485
+ return UnboundApiFp(this.configuration).tasksUpdate(taskId, taskUpdate, options).then((request) => request(this.axios, this.basePath));
1486
+ }
1487
+ /**
1488
+ *
1489
+ * @summary Unifiedwebhook
1490
+ * @param {object} body
1491
+ * @param {*} [options] Override http request option.
1492
+ * @throws {RequiredError}
1493
+ * @memberof UnboundApi
1494
+ */
1495
+ webhook(body, options) {
1496
+ return UnboundApiFp(this.configuration).webhook(body, options).then((request) => request(this.axios, this.basePath));
1497
+ }
1498
+ };
1499
+
1500
+ // src/configuration.ts
1501
+ var Configuration = class {
1502
+ /**
1503
+ * parameter for apiKey security
1504
+ * @param name security name
1505
+ * @memberof Configuration
1506
+ */
1507
+
1508
+ /**
1509
+ * parameter for basic security
1510
+ *
1511
+ * @type {string}
1512
+ * @memberof Configuration
1513
+ */
1514
+
1515
+ /**
1516
+ * parameter for basic security
1517
+ *
1518
+ * @type {string}
1519
+ * @memberof Configuration
1520
+ */
1521
+
1522
+ /**
1523
+ * parameter for oauth2 security
1524
+ * @param name security name
1525
+ * @param scopes oauth2 scope
1526
+ * @memberof Configuration
1527
+ */
1528
+
1529
+ /**
1530
+ * override base path
1531
+ *
1532
+ * @type {string}
1533
+ * @memberof Configuration
1534
+ */
1535
+
1536
+ /**
1537
+ * override server index
1538
+ *
1539
+ * @type {number}
1540
+ * @memberof Configuration
1541
+ */
1542
+
1543
+ /**
1544
+ * base options for axios calls
1545
+ *
1546
+ * @type {any}
1547
+ * @memberof Configuration
1548
+ */
1549
+
1550
+ /**
1551
+ * The FormData constructor that will be used to create multipart form data
1552
+ * requests. You can inject this here so that execution environments that
1553
+ * do not support the FormData class can still run the generated client.
1554
+ *
1555
+ * @type {new () => FormData}
1556
+ */
1557
+
1558
+ constructor(param = {}) {
1559
+ this.apiKey = param.apiKey;
1560
+ this.username = param.username;
1561
+ this.password = param.password;
1562
+ this.accessToken = param.accessToken;
1563
+ this.basePath = param.basePath;
1564
+ this.serverIndex = param.serverIndex;
1565
+ this.baseOptions = {
1566
+ ...param.baseOptions,
1567
+ headers: {
1568
+ ..._optionalChain([param, 'access', _90 => _90.baseOptions, 'optionalAccess', _91 => _91.headers])
1569
+ }
1570
+ };
1571
+ this.formDataCtor = param.formDataCtor;
1572
+ }
1573
+ /**
1574
+ * Check if the given MIME is a JSON MIME.
1575
+ * JSON MIME examples:
1576
+ * application/json
1577
+ * application/json; charset=UTF8
1578
+ * APPLICATION/JSON
1579
+ * application/vnd.company+json
1580
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
1581
+ * @return True if the given MIME is JSON, false otherwise.
1582
+ */
1583
+ isJsonMime(mime) {
1584
+ const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
1585
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
1586
+ }
1587
+ };
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+
1604
+
1605
+
1606
+
1607
+ exports.Configuration = Configuration; exports.ContactAvatarAvatarTypeEnum = ContactAvatarAvatarTypeEnum; exports.ContactsApi = ContactsApi; exports.ContactsApiAxiosParamCreator = ContactsApiAxiosParamCreator; exports.ContactsApiFactory = ContactsApiFactory; exports.ContactsApiFp = ContactsApiFp; exports.HostawayApi = HostawayApi; exports.HostawayApiAxiosParamCreator = HostawayApiAxiosParamCreator; exports.HostawayApiFactory = HostawayApiFactory; exports.HostawayApiFp = HostawayApiFp; exports.TasksApi = TasksApi; exports.TasksApiAxiosParamCreator = TasksApiAxiosParamCreator; exports.TasksApiFactory = TasksApiFactory; exports.TasksApiFp = TasksApiFp; exports.UnboundApi = UnboundApi; exports.UnboundApiAxiosParamCreator = UnboundApiAxiosParamCreator; exports.UnboundApiFactory = UnboundApiFactory; exports.UnboundApiFp = UnboundApiFp;
1608
+ //# sourceMappingURL=index.js.map