simplelogin-client 0.0.1 → 0.1.6
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/package.json +16 -5
- package/tscBuild/index.js +23 -40
- package/tscBuild/sdk/api.d.ts +1732 -1801
- package/tscBuild/sdk/api.js +2129 -2252
- package/tscBuild/sdk/configuration.d.ts +40 -40
- package/tscBuild/sdk/configuration.js +44 -44
- package/tscBuild/sdk/index.d.ts +2 -2
- package/tscBuild/sdk/index.js +19 -31
package/tscBuild/sdk/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
/**
|
|
@@ -12,80 +12,43 @@
|
|
|
12
12
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
13
|
* Do not edit the file manually.
|
|
14
14
|
*/
|
|
15
|
-
var __createBinding =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (k2 === undefined) k2 = k;
|
|
33
|
-
o[k2] = m[k];
|
|
34
|
-
});
|
|
35
|
-
var __setModuleDefault =
|
|
36
|
-
(this && this.__setModuleDefault) ||
|
|
37
|
-
(Object.create
|
|
38
|
-
? function (o, v) {
|
|
39
|
-
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
40
|
-
}
|
|
41
|
-
: function (o, v) {
|
|
42
|
-
o['default'] = v;
|
|
43
|
-
});
|
|
44
|
-
var __importStar =
|
|
45
|
-
(this && this.__importStar) ||
|
|
46
|
-
function (mod) {
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
47
32
|
if (mod && mod.__esModule) return mod;
|
|
48
33
|
var result = {};
|
|
49
|
-
if (mod != null)
|
|
50
|
-
for (var k in mod)
|
|
51
|
-
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
34
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
52
35
|
__setModuleDefault(result, mod);
|
|
53
36
|
return result;
|
|
54
|
-
|
|
55
|
-
Object.defineProperty(exports,
|
|
56
|
-
exports.MailboxApi =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
exports.CustomDomainApi =
|
|
61
|
-
exports.CustomDomainApiFactory =
|
|
62
|
-
exports.CustomDomainApiFp =
|
|
63
|
-
exports.CustomDomainApiFetchParamCreator =
|
|
64
|
-
exports.AliasApi =
|
|
65
|
-
exports.AliasApiFactory =
|
|
66
|
-
exports.AliasApiFp =
|
|
67
|
-
exports.AliasApiFetchParamCreator =
|
|
68
|
-
exports.AccountApi =
|
|
69
|
-
exports.AccountApiFactory =
|
|
70
|
-
exports.AccountApiFp =
|
|
71
|
-
exports.AccountApiFetchParamCreator =
|
|
72
|
-
exports.RequiredError =
|
|
73
|
-
exports.BaseAPI =
|
|
74
|
-
exports.COLLECTION_FORMATS =
|
|
75
|
-
exports.BASE_PATH =
|
|
76
|
-
void 0;
|
|
77
|
-
const url = __importStar(require('url'));
|
|
78
|
-
const defaultFetchApi = typeof fetch === 'undefined' ? undefined : fetch;
|
|
79
|
-
exports.BASE_PATH = 'https://app.simplelogin.io/api'.replace(/\/+$/, '');
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.MailboxApi = exports.MailboxApiFactory = exports.MailboxApiFp = exports.MailboxApiFetchParamCreator = exports.CustomDomainApi = exports.CustomDomainApiFactory = exports.CustomDomainApiFp = exports.CustomDomainApiFetchParamCreator = exports.AliasApi = exports.AliasApiFactory = exports.AliasApiFp = exports.AliasApiFetchParamCreator = exports.AccountApi = exports.AccountApiFactory = exports.AccountApiFp = exports.AccountApiFetchParamCreator = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
40
|
+
const url = __importStar(require("url"));
|
|
41
|
+
const defaultFetchApi = typeof fetch === "undefined" ? undefined : fetch;
|
|
42
|
+
exports.BASE_PATH = "https://app.simplelogin.io/api".replace(/\/+$/, "");
|
|
80
43
|
/**
|
|
81
44
|
*
|
|
82
45
|
* @export
|
|
83
46
|
*/
|
|
84
47
|
exports.COLLECTION_FORMATS = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
48
|
+
csv: ",",
|
|
49
|
+
ssv: " ",
|
|
50
|
+
tsv: "\t",
|
|
51
|
+
pipes: "|",
|
|
89
52
|
};
|
|
90
53
|
/**
|
|
91
54
|
*
|
|
@@ -93,19 +56,20 @@ exports.COLLECTION_FORMATS = {
|
|
|
93
56
|
* @class BaseAPI
|
|
94
57
|
*/
|
|
95
58
|
class BaseAPI {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
59
|
+
basePath;
|
|
60
|
+
fetch;
|
|
61
|
+
configuration;
|
|
62
|
+
constructor(configuration, basePath = exports.BASE_PATH, fetch = defaultFetchApi) {
|
|
63
|
+
this.basePath = basePath;
|
|
64
|
+
this.fetch = fetch;
|
|
65
|
+
if (configuration) {
|
|
66
|
+
this.configuration = configuration;
|
|
67
|
+
this.basePath = configuration.basePath || this.basePath;
|
|
68
|
+
}
|
|
105
69
|
}
|
|
106
|
-
}
|
|
107
70
|
}
|
|
108
71
|
exports.BaseAPI = BaseAPI;
|
|
72
|
+
;
|
|
109
73
|
/**
|
|
110
74
|
*
|
|
111
75
|
* @export
|
|
@@ -113,12 +77,12 @@ exports.BaseAPI = BaseAPI;
|
|
|
113
77
|
* @extends {Error}
|
|
114
78
|
*/
|
|
115
79
|
class RequiredError extends Error {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
80
|
+
field;
|
|
81
|
+
name;
|
|
82
|
+
constructor(field, msg) {
|
|
83
|
+
super(msg);
|
|
84
|
+
this.field = field;
|
|
85
|
+
}
|
|
122
86
|
}
|
|
123
87
|
exports.RequiredError = RequiredError;
|
|
124
88
|
/**
|
|
@@ -126,407 +90,402 @@ exports.RequiredError = RequiredError;
|
|
|
126
90
|
* @export
|
|
127
91
|
*/
|
|
128
92
|
const AccountApiFetchParamCreator = function (configuration) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
url: url.format(localVarUrlObj),
|
|
526
|
-
options: localVarRequestOptions,
|
|
527
|
-
};
|
|
528
|
-
},
|
|
529
|
-
};
|
|
93
|
+
return {
|
|
94
|
+
/**
|
|
95
|
+
* Activate a new account with the activation code that was sent to the user's email.
|
|
96
|
+
* @summary Activate account
|
|
97
|
+
* @param {AuthActivatePost} body
|
|
98
|
+
* @param {*} [options] Override http request option.
|
|
99
|
+
* @throws {RequiredError}
|
|
100
|
+
*/
|
|
101
|
+
activateAccount(body, options = {}) {
|
|
102
|
+
// verify required parameter 'body' is not null or undefined
|
|
103
|
+
if (body === null || body === undefined) {
|
|
104
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling activateAccount.');
|
|
105
|
+
}
|
|
106
|
+
const localVarPath = `/auth/activate`;
|
|
107
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
108
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
109
|
+
const localVarHeaderParameter = {};
|
|
110
|
+
const localVarQueryParameter = {};
|
|
111
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
112
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
113
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
114
|
+
delete localVarUrlObj.search;
|
|
115
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
116
|
+
const needsSerialization = ("AuthActivatePost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
117
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
118
|
+
return {
|
|
119
|
+
url: url.format(localVarUrlObj),
|
|
120
|
+
options: localVarRequestOptions,
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* Create a new API key
|
|
125
|
+
* @summary Create API key
|
|
126
|
+
* @param {UserApiKeyPost} body
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
createApiKey(body, options = {}) {
|
|
131
|
+
// verify required parameter 'body' is not null or undefined
|
|
132
|
+
if (body === null || body === undefined) {
|
|
133
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createApiKey.');
|
|
134
|
+
}
|
|
135
|
+
const localVarPath = `/user/api_key`;
|
|
136
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
137
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
138
|
+
const localVarHeaderParameter = {};
|
|
139
|
+
const localVarQueryParameter = {};
|
|
140
|
+
// authentication apiKeyAuth required
|
|
141
|
+
if (configuration && configuration.apiKey) {
|
|
142
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
143
|
+
? configuration.apiKey("Authentication")
|
|
144
|
+
: configuration.apiKey;
|
|
145
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
146
|
+
}
|
|
147
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
148
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
149
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
150
|
+
delete localVarUrlObj.search;
|
|
151
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
152
|
+
const needsSerialization = ("UserApiKeyPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
153
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
154
|
+
return {
|
|
155
|
+
url: url.format(localVarUrlObj),
|
|
156
|
+
options: localVarRequestOptions,
|
|
157
|
+
};
|
|
158
|
+
},
|
|
159
|
+
/**
|
|
160
|
+
* Delete user (requires sudo mode)
|
|
161
|
+
* @summary Delete user
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
*/
|
|
165
|
+
deleteUser(options = {}) {
|
|
166
|
+
const localVarPath = `/user`;
|
|
167
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
168
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
|
169
|
+
const localVarHeaderParameter = {};
|
|
170
|
+
const localVarQueryParameter = {};
|
|
171
|
+
// authentication apiKeyAuth required
|
|
172
|
+
if (configuration && configuration.apiKey) {
|
|
173
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
174
|
+
? configuration.apiKey("Authentication")
|
|
175
|
+
: configuration.apiKey;
|
|
176
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
177
|
+
}
|
|
178
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
179
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
180
|
+
delete localVarUrlObj.search;
|
|
181
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
182
|
+
return {
|
|
183
|
+
url: url.format(localVarUrlObj),
|
|
184
|
+
options: localVarRequestOptions,
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* Enable sudo mode
|
|
189
|
+
* @summary Enable sudo mode
|
|
190
|
+
* @param {SudoPatch} body
|
|
191
|
+
* @param {*} [options] Override http request option.
|
|
192
|
+
* @throws {RequiredError}
|
|
193
|
+
*/
|
|
194
|
+
enableSudoMode(body, options = {}) {
|
|
195
|
+
// verify required parameter 'body' is not null or undefined
|
|
196
|
+
if (body === null || body === undefined) {
|
|
197
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling enableSudoMode.');
|
|
198
|
+
}
|
|
199
|
+
const localVarPath = `/sudo`;
|
|
200
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
201
|
+
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
202
|
+
const localVarHeaderParameter = {};
|
|
203
|
+
const localVarQueryParameter = {};
|
|
204
|
+
// authentication apiKeyAuth required
|
|
205
|
+
if (configuration && configuration.apiKey) {
|
|
206
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
207
|
+
? configuration.apiKey("Authentication")
|
|
208
|
+
: configuration.apiKey;
|
|
209
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
210
|
+
}
|
|
211
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
212
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
213
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
214
|
+
delete localVarUrlObj.search;
|
|
215
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
216
|
+
const needsSerialization = ("SudoPatch" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
217
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
218
|
+
return {
|
|
219
|
+
url: url.format(localVarUrlObj),
|
|
220
|
+
options: localVarRequestOptions,
|
|
221
|
+
};
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Request a link to reset the password for a registered account.
|
|
225
|
+
* @summary Forgot password
|
|
226
|
+
* @param {AuthForgotPasswordPost} body
|
|
227
|
+
* @param {*} [options] Override http request option.
|
|
228
|
+
* @throws {RequiredError}
|
|
229
|
+
*/
|
|
230
|
+
forgotPassword(body, options = {}) {
|
|
231
|
+
// verify required parameter 'body' is not null or undefined
|
|
232
|
+
if (body === null || body === undefined) {
|
|
233
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling forgotPassword.');
|
|
234
|
+
}
|
|
235
|
+
const localVarPath = `/auth/forgot_password`;
|
|
236
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
237
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
238
|
+
const localVarHeaderParameter = {};
|
|
239
|
+
const localVarQueryParameter = {};
|
|
240
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
241
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
242
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
243
|
+
delete localVarUrlObj.search;
|
|
244
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
245
|
+
const needsSerialization = ("AuthForgotPasswordPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
246
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
247
|
+
return {
|
|
248
|
+
url: url.format(localVarUrlObj),
|
|
249
|
+
options: localVarRequestOptions,
|
|
250
|
+
};
|
|
251
|
+
},
|
|
252
|
+
/**
|
|
253
|
+
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
254
|
+
* @summary Get cookie token
|
|
255
|
+
* @param {*} [options] Override http request option.
|
|
256
|
+
* @throws {RequiredError}
|
|
257
|
+
*/
|
|
258
|
+
getCookieToken(options = {}) {
|
|
259
|
+
const localVarPath = `/user/cookie_token`;
|
|
260
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
261
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
262
|
+
const localVarHeaderParameter = {};
|
|
263
|
+
const localVarQueryParameter = {};
|
|
264
|
+
// authentication apiKeyAuth required
|
|
265
|
+
if (configuration && configuration.apiKey) {
|
|
266
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
267
|
+
? configuration.apiKey("Authentication")
|
|
268
|
+
: configuration.apiKey;
|
|
269
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
270
|
+
}
|
|
271
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
272
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
273
|
+
delete localVarUrlObj.search;
|
|
274
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
275
|
+
return {
|
|
276
|
+
url: url.format(localVarUrlObj),
|
|
277
|
+
options: localVarRequestOptions,
|
|
278
|
+
};
|
|
279
|
+
},
|
|
280
|
+
/**
|
|
281
|
+
* Get user info
|
|
282
|
+
* @summary Get user info
|
|
283
|
+
* @param {*} [options] Override http request option.
|
|
284
|
+
* @throws {RequiredError}
|
|
285
|
+
*/
|
|
286
|
+
getUserInfo(options = {}) {
|
|
287
|
+
const localVarPath = `/user_info`;
|
|
288
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
289
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
290
|
+
const localVarHeaderParameter = {};
|
|
291
|
+
const localVarQueryParameter = {};
|
|
292
|
+
// authentication apiKeyAuth required
|
|
293
|
+
if (configuration && configuration.apiKey) {
|
|
294
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
295
|
+
? configuration.apiKey("Authentication")
|
|
296
|
+
: configuration.apiKey;
|
|
297
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
298
|
+
}
|
|
299
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
300
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
301
|
+
delete localVarUrlObj.search;
|
|
302
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
303
|
+
return {
|
|
304
|
+
url: url.format(localVarUrlObj),
|
|
305
|
+
options: localVarRequestOptions,
|
|
306
|
+
};
|
|
307
|
+
},
|
|
308
|
+
/**
|
|
309
|
+
* Login using email and password to get an access token.
|
|
310
|
+
* @summary Login
|
|
311
|
+
* @param {AuthLoginPost} body
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
login(body, options = {}) {
|
|
316
|
+
// verify required parameter 'body' is not null or undefined
|
|
317
|
+
if (body === null || body === undefined) {
|
|
318
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling login.');
|
|
319
|
+
}
|
|
320
|
+
const localVarPath = `/auth/login`;
|
|
321
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
322
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
323
|
+
const localVarHeaderParameter = {};
|
|
324
|
+
const localVarQueryParameter = {};
|
|
325
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
326
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
327
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
328
|
+
delete localVarUrlObj.search;
|
|
329
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
330
|
+
const needsSerialization = ("AuthLoginPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
331
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
332
|
+
return {
|
|
333
|
+
url: url.format(localVarUrlObj),
|
|
334
|
+
options: localVarRequestOptions,
|
|
335
|
+
};
|
|
336
|
+
},
|
|
337
|
+
/**
|
|
338
|
+
* Log out user
|
|
339
|
+
* @summary Logout
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
*/
|
|
343
|
+
logout(options = {}) {
|
|
344
|
+
const localVarPath = `/logout`;
|
|
345
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
346
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
347
|
+
const localVarHeaderParameter = {};
|
|
348
|
+
const localVarQueryParameter = {};
|
|
349
|
+
// authentication apiKeyAuth required
|
|
350
|
+
if (configuration && configuration.apiKey) {
|
|
351
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
352
|
+
? configuration.apiKey("Authentication")
|
|
353
|
+
: configuration.apiKey;
|
|
354
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
355
|
+
}
|
|
356
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
357
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
358
|
+
delete localVarUrlObj.search;
|
|
359
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
360
|
+
return {
|
|
361
|
+
url: url.format(localVarUrlObj),
|
|
362
|
+
options: localVarRequestOptions,
|
|
363
|
+
};
|
|
364
|
+
},
|
|
365
|
+
/**
|
|
366
|
+
* Authenticate using MFA
|
|
367
|
+
* @summary MFA authentication
|
|
368
|
+
* @param {AuthMfaPost} body The api_key is used in all subsequent requests. It's empty if MFA is enabled. If user hasn't enabled MFA, mfa_key is empty.
|
|
369
|
+
* @param {*} [options] Override http request option.
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
*/
|
|
372
|
+
mfa(body, options = {}) {
|
|
373
|
+
// verify required parameter 'body' is not null or undefined
|
|
374
|
+
if (body === null || body === undefined) {
|
|
375
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling mfa.');
|
|
376
|
+
}
|
|
377
|
+
const localVarPath = `/auth/mfa`;
|
|
378
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
379
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
380
|
+
const localVarHeaderParameter = {};
|
|
381
|
+
const localVarQueryParameter = {};
|
|
382
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
383
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
384
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
385
|
+
delete localVarUrlObj.search;
|
|
386
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
387
|
+
const needsSerialization = ("AuthMfaPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
388
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
389
|
+
return {
|
|
390
|
+
url: url.format(localVarUrlObj),
|
|
391
|
+
options: localVarRequestOptions,
|
|
392
|
+
};
|
|
393
|
+
},
|
|
394
|
+
/**
|
|
395
|
+
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
396
|
+
* @summary Reactivate account
|
|
397
|
+
* @param {AuthReactivatePost} body
|
|
398
|
+
* @param {*} [options] Override http request option.
|
|
399
|
+
* @throws {RequiredError}
|
|
400
|
+
*/
|
|
401
|
+
reactivateAccount(body, options = {}) {
|
|
402
|
+
// verify required parameter 'body' is not null or undefined
|
|
403
|
+
if (body === null || body === undefined) {
|
|
404
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling reactivateAccount.');
|
|
405
|
+
}
|
|
406
|
+
const localVarPath = `/auth/reactivate`;
|
|
407
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
408
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
409
|
+
const localVarHeaderParameter = {};
|
|
410
|
+
const localVarQueryParameter = {};
|
|
411
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
412
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
413
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
414
|
+
delete localVarUrlObj.search;
|
|
415
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
416
|
+
const needsSerialization = ("AuthReactivatePost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
417
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
418
|
+
return {
|
|
419
|
+
url: url.format(localVarUrlObj),
|
|
420
|
+
options: localVarRequestOptions,
|
|
421
|
+
};
|
|
422
|
+
},
|
|
423
|
+
/**
|
|
424
|
+
* Register a new account
|
|
425
|
+
* @summary Register account
|
|
426
|
+
* @param {AuthRegisterPost} body
|
|
427
|
+
* @param {*} [options] Override http request option.
|
|
428
|
+
* @throws {RequiredError}
|
|
429
|
+
*/
|
|
430
|
+
registerAccount(body, options = {}) {
|
|
431
|
+
// verify required parameter 'body' is not null or undefined
|
|
432
|
+
if (body === null || body === undefined) {
|
|
433
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling registerAccount.');
|
|
434
|
+
}
|
|
435
|
+
const localVarPath = `/auth/register`;
|
|
436
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
437
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
438
|
+
const localVarHeaderParameter = {};
|
|
439
|
+
const localVarQueryParameter = {};
|
|
440
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
441
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
442
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
443
|
+
delete localVarUrlObj.search;
|
|
444
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
445
|
+
const needsSerialization = ("AuthRegisterPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
446
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
447
|
+
return {
|
|
448
|
+
url: url.format(localVarUrlObj),
|
|
449
|
+
options: localVarRequestOptions,
|
|
450
|
+
};
|
|
451
|
+
},
|
|
452
|
+
/**
|
|
453
|
+
* Update user info
|
|
454
|
+
* @summary Update user info
|
|
455
|
+
* @param {UserInfoPatch} body
|
|
456
|
+
* @param {*} [options] Override http request option.
|
|
457
|
+
* @throws {RequiredError}
|
|
458
|
+
*/
|
|
459
|
+
updateUserInfo(body, options = {}) {
|
|
460
|
+
// verify required parameter 'body' is not null or undefined
|
|
461
|
+
if (body === null || body === undefined) {
|
|
462
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateUserInfo.');
|
|
463
|
+
}
|
|
464
|
+
const localVarPath = `/user_info`;
|
|
465
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
466
|
+
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
467
|
+
const localVarHeaderParameter = {};
|
|
468
|
+
const localVarQueryParameter = {};
|
|
469
|
+
// authentication apiKeyAuth required
|
|
470
|
+
if (configuration && configuration.apiKey) {
|
|
471
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
472
|
+
? configuration.apiKey("Authentication")
|
|
473
|
+
: configuration.apiKey;
|
|
474
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
475
|
+
}
|
|
476
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
477
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
478
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
479
|
+
delete localVarUrlObj.search;
|
|
480
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
481
|
+
const needsSerialization = ("UserInfoPatch" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
482
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
483
|
+
return {
|
|
484
|
+
url: url.format(localVarUrlObj),
|
|
485
|
+
options: localVarRequestOptions,
|
|
486
|
+
};
|
|
487
|
+
},
|
|
488
|
+
};
|
|
530
489
|
};
|
|
531
490
|
exports.AccountApiFetchParamCreator = AccountApiFetchParamCreator;
|
|
532
491
|
/**
|
|
@@ -534,254 +493,264 @@ exports.AccountApiFetchParamCreator = AccountApiFetchParamCreator;
|
|
|
534
493
|
* @export
|
|
535
494
|
*/
|
|
536
495
|
const AccountApiFp = function (configuration) {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
return
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
496
|
+
return {
|
|
497
|
+
/**
|
|
498
|
+
* Activate a new account with the activation code that was sent to the user's email.
|
|
499
|
+
* @summary Activate account
|
|
500
|
+
* @param {AuthActivatePost} body
|
|
501
|
+
* @param {*} [options] Override http request option.
|
|
502
|
+
* @throws {RequiredError}
|
|
503
|
+
*/
|
|
504
|
+
activateAccount(body, options) {
|
|
505
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).activateAccount(body, options);
|
|
506
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
507
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
508
|
+
if (response.status >= 200 && response.status < 300) {
|
|
509
|
+
return response;
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
throw response;
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
};
|
|
516
|
+
},
|
|
517
|
+
/**
|
|
518
|
+
* Create a new API key
|
|
519
|
+
* @summary Create API key
|
|
520
|
+
* @param {UserApiKeyPost} body
|
|
521
|
+
* @param {*} [options] Override http request option.
|
|
522
|
+
* @throws {RequiredError}
|
|
523
|
+
*/
|
|
524
|
+
createApiKey(body, options) {
|
|
525
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).createApiKey(body, options);
|
|
526
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
527
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
528
|
+
if (response.status >= 200 && response.status < 300) {
|
|
529
|
+
return response.json();
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
throw response;
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
},
|
|
537
|
+
/**
|
|
538
|
+
* Delete user (requires sudo mode)
|
|
539
|
+
* @summary Delete user
|
|
540
|
+
* @param {*} [options] Override http request option.
|
|
541
|
+
* @throws {RequiredError}
|
|
542
|
+
*/
|
|
543
|
+
deleteUser(options) {
|
|
544
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).deleteUser(options);
|
|
545
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
546
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
547
|
+
if (response.status >= 200 && response.status < 300) {
|
|
548
|
+
return response.json();
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
throw response;
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
},
|
|
556
|
+
/**
|
|
557
|
+
* Enable sudo mode
|
|
558
|
+
* @summary Enable sudo mode
|
|
559
|
+
* @param {SudoPatch} body
|
|
560
|
+
* @param {*} [options] Override http request option.
|
|
561
|
+
* @throws {RequiredError}
|
|
562
|
+
*/
|
|
563
|
+
enableSudoMode(body, options) {
|
|
564
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).enableSudoMode(body, options);
|
|
565
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
566
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
567
|
+
if (response.status >= 200 && response.status < 300) {
|
|
568
|
+
return response.json();
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
throw response;
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
};
|
|
575
|
+
},
|
|
576
|
+
/**
|
|
577
|
+
* Request a link to reset the password for a registered account.
|
|
578
|
+
* @summary Forgot password
|
|
579
|
+
* @param {AuthForgotPasswordPost} body
|
|
580
|
+
* @param {*} [options] Override http request option.
|
|
581
|
+
* @throws {RequiredError}
|
|
582
|
+
*/
|
|
583
|
+
forgotPassword(body, options) {
|
|
584
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).forgotPassword(body, options);
|
|
585
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
586
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
587
|
+
if (response.status >= 200 && response.status < 300) {
|
|
588
|
+
return response;
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
throw response;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
/**
|
|
597
|
+
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
598
|
+
* @summary Get cookie token
|
|
599
|
+
* @param {*} [options] Override http request option.
|
|
600
|
+
* @throws {RequiredError}
|
|
601
|
+
*/
|
|
602
|
+
getCookieToken(options) {
|
|
603
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).getCookieToken(options);
|
|
604
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
605
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
606
|
+
if (response.status >= 200 && response.status < 300) {
|
|
607
|
+
return response.json();
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
throw response;
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
};
|
|
614
|
+
},
|
|
615
|
+
/**
|
|
616
|
+
* Get user info
|
|
617
|
+
* @summary Get user info
|
|
618
|
+
* @param {*} [options] Override http request option.
|
|
619
|
+
* @throws {RequiredError}
|
|
620
|
+
*/
|
|
621
|
+
getUserInfo(options) {
|
|
622
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).getUserInfo(options);
|
|
623
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
624
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
625
|
+
if (response.status >= 200 && response.status < 300) {
|
|
626
|
+
return response.json();
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
throw response;
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
};
|
|
633
|
+
},
|
|
634
|
+
/**
|
|
635
|
+
* Login using email and password to get an access token.
|
|
636
|
+
* @summary Login
|
|
637
|
+
* @param {AuthLoginPost} body
|
|
638
|
+
* @param {*} [options] Override http request option.
|
|
639
|
+
* @throws {RequiredError}
|
|
640
|
+
*/
|
|
641
|
+
login(body, options) {
|
|
642
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).login(body, options);
|
|
643
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
644
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
645
|
+
if (response.status >= 200 && response.status < 300) {
|
|
646
|
+
return response.json();
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
throw response;
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
};
|
|
653
|
+
},
|
|
654
|
+
/**
|
|
655
|
+
* Log out user
|
|
656
|
+
* @summary Logout
|
|
657
|
+
* @param {*} [options] Override http request option.
|
|
658
|
+
* @throws {RequiredError}
|
|
659
|
+
*/
|
|
660
|
+
logout(options) {
|
|
661
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).logout(options);
|
|
662
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
663
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
664
|
+
if (response.status >= 200 && response.status < 300) {
|
|
665
|
+
return response.json();
|
|
666
|
+
}
|
|
667
|
+
else {
|
|
668
|
+
throw response;
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
};
|
|
672
|
+
},
|
|
673
|
+
/**
|
|
674
|
+
* Authenticate using MFA
|
|
675
|
+
* @summary MFA authentication
|
|
676
|
+
* @param {AuthMfaPost} body The api_key is used in all subsequent requests. It's empty if MFA is enabled. If user hasn't enabled MFA, mfa_key is empty.
|
|
677
|
+
* @param {*} [options] Override http request option.
|
|
678
|
+
* @throws {RequiredError}
|
|
679
|
+
*/
|
|
680
|
+
mfa(body, options) {
|
|
681
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).mfa(body, options);
|
|
682
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
683
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
684
|
+
if (response.status >= 200 && response.status < 300) {
|
|
685
|
+
return response.json();
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
throw response;
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
},
|
|
693
|
+
/**
|
|
694
|
+
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
695
|
+
* @summary Reactivate account
|
|
696
|
+
* @param {AuthReactivatePost} body
|
|
697
|
+
* @param {*} [options] Override http request option.
|
|
698
|
+
* @throws {RequiredError}
|
|
699
|
+
*/
|
|
700
|
+
reactivateAccount(body, options) {
|
|
701
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).reactivateAccount(body, options);
|
|
702
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
703
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
704
|
+
if (response.status >= 200 && response.status < 300) {
|
|
705
|
+
return response;
|
|
706
|
+
}
|
|
707
|
+
else {
|
|
708
|
+
throw response;
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
};
|
|
712
|
+
},
|
|
713
|
+
/**
|
|
714
|
+
* Register a new account
|
|
715
|
+
* @summary Register account
|
|
716
|
+
* @param {AuthRegisterPost} body
|
|
717
|
+
* @param {*} [options] Override http request option.
|
|
718
|
+
* @throws {RequiredError}
|
|
719
|
+
*/
|
|
720
|
+
registerAccount(body, options) {
|
|
721
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).registerAccount(body, options);
|
|
722
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
723
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
724
|
+
if (response.status >= 200 && response.status < 300) {
|
|
725
|
+
return response;
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
throw response;
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
};
|
|
732
|
+
},
|
|
733
|
+
/**
|
|
734
|
+
* Update user info
|
|
735
|
+
* @summary Update user info
|
|
736
|
+
* @param {UserInfoPatch} body
|
|
737
|
+
* @param {*} [options] Override http request option.
|
|
738
|
+
* @throws {RequiredError}
|
|
739
|
+
*/
|
|
740
|
+
updateUserInfo(body, options) {
|
|
741
|
+
const localVarFetchArgs = (0, exports.AccountApiFetchParamCreator)(configuration).updateUserInfo(body, options);
|
|
742
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
743
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
744
|
+
if (response.status >= 200 && response.status < 300) {
|
|
745
|
+
return response.json();
|
|
746
|
+
}
|
|
747
|
+
else {
|
|
748
|
+
throw response;
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
},
|
|
753
|
+
};
|
|
785
754
|
};
|
|
786
755
|
exports.AccountApiFp = AccountApiFp;
|
|
787
756
|
/**
|
|
@@ -789,1010 +758,964 @@ exports.AccountApiFp = AccountApiFp;
|
|
|
789
758
|
* @export
|
|
790
759
|
*/
|
|
791
760
|
const AccountApiFactory = function (configuration, fetch, basePath) {
|
|
792
|
-
|
|
761
|
+
return {
|
|
762
|
+
/**
|
|
763
|
+
* Activate a new account with the activation code that was sent to the user's email.
|
|
764
|
+
* @summary Activate account
|
|
765
|
+
* @param {AuthActivatePost} body
|
|
766
|
+
* @param {*} [options] Override http request option.
|
|
767
|
+
* @throws {RequiredError}
|
|
768
|
+
*/
|
|
769
|
+
activateAccount(body, options) {
|
|
770
|
+
return (0, exports.AccountApiFp)(configuration).activateAccount(body, options)(fetch, basePath);
|
|
771
|
+
},
|
|
772
|
+
/**
|
|
773
|
+
* Create a new API key
|
|
774
|
+
* @summary Create API key
|
|
775
|
+
* @param {UserApiKeyPost} body
|
|
776
|
+
* @param {*} [options] Override http request option.
|
|
777
|
+
* @throws {RequiredError}
|
|
778
|
+
*/
|
|
779
|
+
createApiKey(body, options) {
|
|
780
|
+
return (0, exports.AccountApiFp)(configuration).createApiKey(body, options)(fetch, basePath);
|
|
781
|
+
},
|
|
782
|
+
/**
|
|
783
|
+
* Delete user (requires sudo mode)
|
|
784
|
+
* @summary Delete user
|
|
785
|
+
* @param {*} [options] Override http request option.
|
|
786
|
+
* @throws {RequiredError}
|
|
787
|
+
*/
|
|
788
|
+
deleteUser(options) {
|
|
789
|
+
return (0, exports.AccountApiFp)(configuration).deleteUser(options)(fetch, basePath);
|
|
790
|
+
},
|
|
791
|
+
/**
|
|
792
|
+
* Enable sudo mode
|
|
793
|
+
* @summary Enable sudo mode
|
|
794
|
+
* @param {SudoPatch} body
|
|
795
|
+
* @param {*} [options] Override http request option.
|
|
796
|
+
* @throws {RequiredError}
|
|
797
|
+
*/
|
|
798
|
+
enableSudoMode(body, options) {
|
|
799
|
+
return (0, exports.AccountApiFp)(configuration).enableSudoMode(body, options)(fetch, basePath);
|
|
800
|
+
},
|
|
801
|
+
/**
|
|
802
|
+
* Request a link to reset the password for a registered account.
|
|
803
|
+
* @summary Forgot password
|
|
804
|
+
* @param {AuthForgotPasswordPost} body
|
|
805
|
+
* @param {*} [options] Override http request option.
|
|
806
|
+
* @throws {RequiredError}
|
|
807
|
+
*/
|
|
808
|
+
forgotPassword(body, options) {
|
|
809
|
+
return (0, exports.AccountApiFp)(configuration).forgotPassword(body, options)(fetch, basePath);
|
|
810
|
+
},
|
|
811
|
+
/**
|
|
812
|
+
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
813
|
+
* @summary Get cookie token
|
|
814
|
+
* @param {*} [options] Override http request option.
|
|
815
|
+
* @throws {RequiredError}
|
|
816
|
+
*/
|
|
817
|
+
getCookieToken(options) {
|
|
818
|
+
return (0, exports.AccountApiFp)(configuration).getCookieToken(options)(fetch, basePath);
|
|
819
|
+
},
|
|
820
|
+
/**
|
|
821
|
+
* Get user info
|
|
822
|
+
* @summary Get user info
|
|
823
|
+
* @param {*} [options] Override http request option.
|
|
824
|
+
* @throws {RequiredError}
|
|
825
|
+
*/
|
|
826
|
+
getUserInfo(options) {
|
|
827
|
+
return (0, exports.AccountApiFp)(configuration).getUserInfo(options)(fetch, basePath);
|
|
828
|
+
},
|
|
829
|
+
/**
|
|
830
|
+
* Login using email and password to get an access token.
|
|
831
|
+
* @summary Login
|
|
832
|
+
* @param {AuthLoginPost} body
|
|
833
|
+
* @param {*} [options] Override http request option.
|
|
834
|
+
* @throws {RequiredError}
|
|
835
|
+
*/
|
|
836
|
+
login(body, options) {
|
|
837
|
+
return (0, exports.AccountApiFp)(configuration).login(body, options)(fetch, basePath);
|
|
838
|
+
},
|
|
839
|
+
/**
|
|
840
|
+
* Log out user
|
|
841
|
+
* @summary Logout
|
|
842
|
+
* @param {*} [options] Override http request option.
|
|
843
|
+
* @throws {RequiredError}
|
|
844
|
+
*/
|
|
845
|
+
logout(options) {
|
|
846
|
+
return (0, exports.AccountApiFp)(configuration).logout(options)(fetch, basePath);
|
|
847
|
+
},
|
|
848
|
+
/**
|
|
849
|
+
* Authenticate using MFA
|
|
850
|
+
* @summary MFA authentication
|
|
851
|
+
* @param {AuthMfaPost} body The api_key is used in all subsequent requests. It's empty if MFA is enabled. If user hasn't enabled MFA, mfa_key is empty.
|
|
852
|
+
* @param {*} [options] Override http request option.
|
|
853
|
+
* @throws {RequiredError}
|
|
854
|
+
*/
|
|
855
|
+
mfa(body, options) {
|
|
856
|
+
return (0, exports.AccountApiFp)(configuration).mfa(body, options)(fetch, basePath);
|
|
857
|
+
},
|
|
858
|
+
/**
|
|
859
|
+
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
860
|
+
* @summary Reactivate account
|
|
861
|
+
* @param {AuthReactivatePost} body
|
|
862
|
+
* @param {*} [options] Override http request option.
|
|
863
|
+
* @throws {RequiredError}
|
|
864
|
+
*/
|
|
865
|
+
reactivateAccount(body, options) {
|
|
866
|
+
return (0, exports.AccountApiFp)(configuration).reactivateAccount(body, options)(fetch, basePath);
|
|
867
|
+
},
|
|
868
|
+
/**
|
|
869
|
+
* Register a new account
|
|
870
|
+
* @summary Register account
|
|
871
|
+
* @param {AuthRegisterPost} body
|
|
872
|
+
* @param {*} [options] Override http request option.
|
|
873
|
+
* @throws {RequiredError}
|
|
874
|
+
*/
|
|
875
|
+
registerAccount(body, options) {
|
|
876
|
+
return (0, exports.AccountApiFp)(configuration).registerAccount(body, options)(fetch, basePath);
|
|
877
|
+
},
|
|
878
|
+
/**
|
|
879
|
+
* Update user info
|
|
880
|
+
* @summary Update user info
|
|
881
|
+
* @param {UserInfoPatch} body
|
|
882
|
+
* @param {*} [options] Override http request option.
|
|
883
|
+
* @throws {RequiredError}
|
|
884
|
+
*/
|
|
885
|
+
updateUserInfo(body, options) {
|
|
886
|
+
return (0, exports.AccountApiFp)(configuration).updateUserInfo(body, options)(fetch, basePath);
|
|
887
|
+
},
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
exports.AccountApiFactory = AccountApiFactory;
|
|
891
|
+
/**
|
|
892
|
+
* AccountApi - object-oriented interface
|
|
893
|
+
* @export
|
|
894
|
+
* @class AccountApi
|
|
895
|
+
* @extends {BaseAPI}
|
|
896
|
+
*/
|
|
897
|
+
class AccountApi extends BaseAPI {
|
|
793
898
|
/**
|
|
794
899
|
* Activate a new account with the activation code that was sent to the user's email.
|
|
795
900
|
* @summary Activate account
|
|
796
901
|
* @param {AuthActivatePost} body
|
|
797
902
|
* @param {*} [options] Override http request option.
|
|
798
903
|
* @throws {RequiredError}
|
|
904
|
+
* @memberof AccountApi
|
|
799
905
|
*/
|
|
800
906
|
activateAccount(body, options) {
|
|
801
|
-
|
|
802
|
-
}
|
|
907
|
+
return (0, exports.AccountApiFp)(this.configuration).activateAccount(body, options)(this.fetch, this.basePath);
|
|
908
|
+
}
|
|
803
909
|
/**
|
|
804
910
|
* Create a new API key
|
|
805
911
|
* @summary Create API key
|
|
806
912
|
* @param {UserApiKeyPost} body
|
|
807
913
|
* @param {*} [options] Override http request option.
|
|
808
914
|
* @throws {RequiredError}
|
|
915
|
+
* @memberof AccountApi
|
|
809
916
|
*/
|
|
810
917
|
createApiKey(body, options) {
|
|
811
|
-
|
|
812
|
-
}
|
|
918
|
+
return (0, exports.AccountApiFp)(this.configuration).createApiKey(body, options)(this.fetch, this.basePath);
|
|
919
|
+
}
|
|
813
920
|
/**
|
|
814
921
|
* Delete user (requires sudo mode)
|
|
815
922
|
* @summary Delete user
|
|
816
923
|
* @param {*} [options] Override http request option.
|
|
817
924
|
* @throws {RequiredError}
|
|
925
|
+
* @memberof AccountApi
|
|
818
926
|
*/
|
|
819
|
-
deleteUser(options) {
|
|
820
|
-
|
|
821
|
-
}
|
|
822
|
-
/**
|
|
823
|
-
* Enable sudo mode
|
|
824
|
-
* @summary Enable sudo mode
|
|
825
|
-
* @param {SudoPatch} body
|
|
826
|
-
* @param {*} [options] Override http request option.
|
|
827
|
-
* @throws {RequiredError}
|
|
828
|
-
*/
|
|
829
|
-
enableSudoMode(body, options) {
|
|
830
|
-
return (0, exports.AccountApiFp)(configuration).enableSudoMode(body, options)(fetch, basePath);
|
|
831
|
-
},
|
|
832
|
-
/**
|
|
833
|
-
* Request a link to reset the password for a registered account.
|
|
834
|
-
* @summary Forgot password
|
|
835
|
-
* @param {AuthForgotPasswordPost} body
|
|
836
|
-
* @param {*} [options] Override http request option.
|
|
837
|
-
* @throws {RequiredError}
|
|
838
|
-
*/
|
|
839
|
-
forgotPassword(body, options) {
|
|
840
|
-
return (0, exports.AccountApiFp)(configuration).forgotPassword(body, options)(fetch, basePath);
|
|
841
|
-
},
|
|
842
|
-
/**
|
|
843
|
-
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
844
|
-
* @summary Get cookie token
|
|
845
|
-
* @param {*} [options] Override http request option.
|
|
846
|
-
* @throws {RequiredError}
|
|
847
|
-
*/
|
|
848
|
-
getCookieToken(options) {
|
|
849
|
-
return (0, exports.AccountApiFp)(configuration).getCookieToken(options)(fetch, basePath);
|
|
850
|
-
},
|
|
851
|
-
/**
|
|
852
|
-
* Get user info
|
|
853
|
-
* @summary Get user info
|
|
854
|
-
* @param {*} [options] Override http request option.
|
|
855
|
-
* @throws {RequiredError}
|
|
856
|
-
*/
|
|
857
|
-
getUserInfo(options) {
|
|
858
|
-
return (0, exports.AccountApiFp)(configuration).getUserInfo(options)(fetch, basePath);
|
|
859
|
-
},
|
|
860
|
-
/**
|
|
861
|
-
* Login using email and password to get an access token.
|
|
862
|
-
* @summary Login
|
|
863
|
-
* @param {AuthLoginPost} body
|
|
864
|
-
* @param {*} [options] Override http request option.
|
|
865
|
-
* @throws {RequiredError}
|
|
866
|
-
*/
|
|
867
|
-
login(body, options) {
|
|
868
|
-
return (0, exports.AccountApiFp)(configuration).login(body, options)(fetch, basePath);
|
|
869
|
-
},
|
|
870
|
-
/**
|
|
871
|
-
* Log out user
|
|
872
|
-
* @summary Logout
|
|
873
|
-
* @param {*} [options] Override http request option.
|
|
874
|
-
* @throws {RequiredError}
|
|
875
|
-
*/
|
|
876
|
-
logout(options) {
|
|
877
|
-
return (0, exports.AccountApiFp)(configuration).logout(options)(fetch, basePath);
|
|
878
|
-
},
|
|
879
|
-
/**
|
|
880
|
-
* Authenticate using MFA
|
|
881
|
-
* @summary MFA authentication
|
|
882
|
-
* @param {AuthMfaPost} body The api_key is used in all subsequent requests. It's empty if MFA is enabled. If user hasn't enabled MFA, mfa_key is empty.
|
|
883
|
-
* @param {*} [options] Override http request option.
|
|
884
|
-
* @throws {RequiredError}
|
|
885
|
-
*/
|
|
886
|
-
mfa(body, options) {
|
|
887
|
-
return (0, exports.AccountApiFp)(configuration).mfa(body, options)(fetch, basePath);
|
|
888
|
-
},
|
|
889
|
-
/**
|
|
890
|
-
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
891
|
-
* @summary Reactivate account
|
|
892
|
-
* @param {AuthReactivatePost} body
|
|
893
|
-
* @param {*} [options] Override http request option.
|
|
894
|
-
* @throws {RequiredError}
|
|
895
|
-
*/
|
|
896
|
-
reactivateAccount(body, options) {
|
|
897
|
-
return (0, exports.AccountApiFp)(configuration).reactivateAccount(body, options)(fetch, basePath);
|
|
898
|
-
},
|
|
899
|
-
/**
|
|
900
|
-
* Register a new account
|
|
901
|
-
* @summary Register account
|
|
902
|
-
* @param {AuthRegisterPost} body
|
|
903
|
-
* @param {*} [options] Override http request option.
|
|
904
|
-
* @throws {RequiredError}
|
|
905
|
-
*/
|
|
906
|
-
registerAccount(body, options) {
|
|
907
|
-
return (0, exports.AccountApiFp)(configuration).registerAccount(body, options)(fetch, basePath);
|
|
908
|
-
},
|
|
909
|
-
/**
|
|
910
|
-
* Update user info
|
|
911
|
-
* @summary Update user info
|
|
912
|
-
* @param {UserInfoPatch} body
|
|
913
|
-
* @param {*} [options] Override http request option.
|
|
914
|
-
* @throws {RequiredError}
|
|
915
|
-
*/
|
|
916
|
-
updateUserInfo(body, options) {
|
|
917
|
-
return (0, exports.AccountApiFp)(configuration).updateUserInfo(body, options)(fetch, basePath);
|
|
918
|
-
},
|
|
919
|
-
};
|
|
920
|
-
};
|
|
921
|
-
exports.AccountApiFactory = AccountApiFactory;
|
|
922
|
-
/**
|
|
923
|
-
* AccountApi - object-oriented interface
|
|
924
|
-
* @export
|
|
925
|
-
* @class AccountApi
|
|
926
|
-
* @extends {BaseAPI}
|
|
927
|
-
*/
|
|
928
|
-
class AccountApi extends BaseAPI {
|
|
929
|
-
/**
|
|
930
|
-
* Activate a new account with the activation code that was sent to the user's email.
|
|
931
|
-
* @summary Activate account
|
|
932
|
-
* @param {AuthActivatePost} body
|
|
933
|
-
* @param {*} [options] Override http request option.
|
|
934
|
-
* @throws {RequiredError}
|
|
935
|
-
* @memberof AccountApi
|
|
936
|
-
*/
|
|
937
|
-
activateAccount(body, options) {
|
|
938
|
-
return (0, exports.AccountApiFp)(this.configuration).activateAccount(body, options)(this.fetch, this.basePath);
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* Create a new API key
|
|
942
|
-
* @summary Create API key
|
|
943
|
-
* @param {UserApiKeyPost} body
|
|
944
|
-
* @param {*} [options] Override http request option.
|
|
945
|
-
* @throws {RequiredError}
|
|
946
|
-
* @memberof AccountApi
|
|
947
|
-
*/
|
|
948
|
-
createApiKey(body, options) {
|
|
949
|
-
return (0, exports.AccountApiFp)(this.configuration).createApiKey(body, options)(this.fetch, this.basePath);
|
|
950
|
-
}
|
|
951
|
-
/**
|
|
952
|
-
* Delete user (requires sudo mode)
|
|
953
|
-
* @summary Delete user
|
|
954
|
-
* @param {*} [options] Override http request option.
|
|
955
|
-
* @throws {RequiredError}
|
|
956
|
-
* @memberof AccountApi
|
|
957
|
-
*/
|
|
958
|
-
deleteUser(options) {
|
|
959
|
-
return (0, exports.AccountApiFp)(this.configuration).deleteUser(options)(this.fetch, this.basePath);
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* Enable sudo mode
|
|
963
|
-
* @summary Enable sudo mode
|
|
964
|
-
* @param {SudoPatch} body
|
|
965
|
-
* @param {*} [options] Override http request option.
|
|
966
|
-
* @throws {RequiredError}
|
|
967
|
-
* @memberof AccountApi
|
|
968
|
-
*/
|
|
969
|
-
enableSudoMode(body, options) {
|
|
970
|
-
return (0, exports.AccountApiFp)(this.configuration).enableSudoMode(body, options)(this.fetch, this.basePath);
|
|
971
|
-
}
|
|
972
|
-
/**
|
|
973
|
-
* Request a link to reset the password for a registered account.
|
|
974
|
-
* @summary Forgot password
|
|
975
|
-
* @param {AuthForgotPasswordPost} body
|
|
976
|
-
* @param {*} [options] Override http request option.
|
|
977
|
-
* @throws {RequiredError}
|
|
978
|
-
* @memberof AccountApi
|
|
979
|
-
*/
|
|
980
|
-
forgotPassword(body, options) {
|
|
981
|
-
return (0, exports.AccountApiFp)(this.configuration).forgotPassword(body, options)(this.fetch, this.basePath);
|
|
982
|
-
}
|
|
983
|
-
/**
|
|
984
|
-
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
985
|
-
* @summary Get cookie token
|
|
986
|
-
* @param {*} [options] Override http request option.
|
|
987
|
-
* @throws {RequiredError}
|
|
988
|
-
* @memberof AccountApi
|
|
989
|
-
*/
|
|
990
|
-
getCookieToken(options) {
|
|
991
|
-
return (0, exports.AccountApiFp)(this.configuration).getCookieToken(options)(this.fetch, this.basePath);
|
|
992
|
-
}
|
|
993
|
-
/**
|
|
994
|
-
* Get user info
|
|
995
|
-
* @summary Get user info
|
|
996
|
-
* @param {*} [options] Override http request option.
|
|
997
|
-
* @throws {RequiredError}
|
|
998
|
-
* @memberof AccountApi
|
|
999
|
-
*/
|
|
1000
|
-
getUserInfo(options) {
|
|
1001
|
-
return (0, exports.AccountApiFp)(this.configuration).getUserInfo(options)(this.fetch, this.basePath);
|
|
1002
|
-
}
|
|
1003
|
-
/**
|
|
1004
|
-
* Login using email and password to get an access token.
|
|
1005
|
-
* @summary Login
|
|
1006
|
-
* @param {AuthLoginPost} body
|
|
1007
|
-
* @param {*} [options] Override http request option.
|
|
1008
|
-
* @throws {RequiredError}
|
|
1009
|
-
* @memberof AccountApi
|
|
1010
|
-
*/
|
|
1011
|
-
login(body, options) {
|
|
1012
|
-
return (0, exports.AccountApiFp)(this.configuration).login(body, options)(this.fetch, this.basePath);
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Log out user
|
|
1016
|
-
* @summary Logout
|
|
1017
|
-
* @param {*} [options] Override http request option.
|
|
1018
|
-
* @throws {RequiredError}
|
|
1019
|
-
* @memberof AccountApi
|
|
1020
|
-
*/
|
|
1021
|
-
logout(options) {
|
|
1022
|
-
return (0, exports.AccountApiFp)(this.configuration).logout(options)(this.fetch, this.basePath);
|
|
1023
|
-
}
|
|
1024
|
-
/**
|
|
1025
|
-
* Authenticate using MFA
|
|
1026
|
-
* @summary MFA authentication
|
|
1027
|
-
* @param {AuthMfaPost} body The api_key is used in all subsequent requests. It's empty if MFA is enabled. If user hasn't enabled MFA, mfa_key is empty.
|
|
1028
|
-
* @param {*} [options] Override http request option.
|
|
1029
|
-
* @throws {RequiredError}
|
|
1030
|
-
* @memberof AccountApi
|
|
1031
|
-
*/
|
|
1032
|
-
mfa(body, options) {
|
|
1033
|
-
return (0, exports.AccountApiFp)(this.configuration).mfa(body, options)(this.fetch, this.basePath);
|
|
1034
|
-
}
|
|
1035
|
-
/**
|
|
1036
|
-
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
1037
|
-
* @summary Reactivate account
|
|
1038
|
-
* @param {AuthReactivatePost} body
|
|
1039
|
-
* @param {*} [options] Override http request option.
|
|
1040
|
-
* @throws {RequiredError}
|
|
1041
|
-
* @memberof AccountApi
|
|
1042
|
-
*/
|
|
1043
|
-
reactivateAccount(body, options) {
|
|
1044
|
-
return (0, exports.AccountApiFp)(this.configuration).reactivateAccount(body, options)(this.fetch, this.basePath);
|
|
1045
|
-
}
|
|
1046
|
-
/**
|
|
1047
|
-
* Register a new account
|
|
1048
|
-
* @summary Register account
|
|
1049
|
-
* @param {AuthRegisterPost} body
|
|
1050
|
-
* @param {*} [options] Override http request option.
|
|
1051
|
-
* @throws {RequiredError}
|
|
1052
|
-
* @memberof AccountApi
|
|
1053
|
-
*/
|
|
1054
|
-
registerAccount(body, options) {
|
|
1055
|
-
return (0, exports.AccountApiFp)(this.configuration).registerAccount(body, options)(this.fetch, this.basePath);
|
|
1056
|
-
}
|
|
1057
|
-
/**
|
|
1058
|
-
* Update user info
|
|
1059
|
-
* @summary Update user info
|
|
1060
|
-
* @param {UserInfoPatch} body
|
|
1061
|
-
* @param {*} [options] Override http request option.
|
|
1062
|
-
* @throws {RequiredError}
|
|
1063
|
-
* @memberof AccountApi
|
|
1064
|
-
*/
|
|
1065
|
-
updateUserInfo(body, options) {
|
|
1066
|
-
return (0, exports.AccountApiFp)(this.configuration).updateUserInfo(body, options)(this.fetch, this.basePath);
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
exports.AccountApi = AccountApi;
|
|
1070
|
-
/**
|
|
1071
|
-
* AliasApi - fetch parameter creator
|
|
1072
|
-
* @export
|
|
1073
|
-
*/
|
|
1074
|
-
const AliasApiFetchParamCreator = function (configuration) {
|
|
1075
|
-
return {
|
|
1076
|
-
/**
|
|
1077
|
-
* Create a new contact for an alias by id.
|
|
1078
|
-
* @summary Create contact
|
|
1079
|
-
* @param {AliasAliasIdContactsPost} body Updated settings for the given alias.
|
|
1080
|
-
* @param {number} aliasId ID of an alias
|
|
1081
|
-
* @param {*} [options] Override http request option.
|
|
1082
|
-
* @throws {RequiredError}
|
|
1083
|
-
*/
|
|
1084
|
-
createContact(body, aliasId, options = {}) {
|
|
1085
|
-
// verify required parameter 'body' is not null or undefined
|
|
1086
|
-
if (body === null || body === undefined) {
|
|
1087
|
-
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createContact.');
|
|
1088
|
-
}
|
|
1089
|
-
// verify required parameter 'aliasId' is not null or undefined
|
|
1090
|
-
if (aliasId === null || aliasId === undefined) {
|
|
1091
|
-
throw new RequiredError(
|
|
1092
|
-
'aliasId',
|
|
1093
|
-
'Required parameter aliasId was null or undefined when calling createContact.',
|
|
1094
|
-
);
|
|
1095
|
-
}
|
|
1096
|
-
const localVarPath = `/aliases/{alias_id}/contacts`.replace(
|
|
1097
|
-
`{${'alias_id'}}`,
|
|
1098
|
-
encodeURIComponent(String(aliasId)),
|
|
1099
|
-
);
|
|
1100
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1101
|
-
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1102
|
-
const localVarHeaderParameter = {};
|
|
1103
|
-
const localVarQueryParameter = {};
|
|
1104
|
-
// authentication apiKeyAuth required
|
|
1105
|
-
if (configuration && configuration.apiKey) {
|
|
1106
|
-
const localVarApiKeyValue =
|
|
1107
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1108
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1109
|
-
}
|
|
1110
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1111
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1112
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1113
|
-
delete localVarUrlObj.search;
|
|
1114
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1115
|
-
const needsSerialization =
|
|
1116
|
-
'AliasAliasIdContactsPost' !== 'string' ||
|
|
1117
|
-
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1118
|
-
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
|
|
1119
|
-
return {
|
|
1120
|
-
url: url.format(localVarUrlObj),
|
|
1121
|
-
options: localVarRequestOptions,
|
|
1122
|
-
};
|
|
1123
|
-
},
|
|
1124
|
-
/**
|
|
1125
|
-
* Create a new custom alias
|
|
1126
|
-
* @summary Create custom alias
|
|
1127
|
-
* @param {AliasCustomNewPost} body
|
|
1128
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1129
|
-
* @param {*} [options] Override http request option.
|
|
1130
|
-
* @throws {RequiredError}
|
|
1131
|
-
*/
|
|
1132
|
-
createCustomAlias(body, hostname, options = {}) {
|
|
1133
|
-
// verify required parameter 'body' is not null or undefined
|
|
1134
|
-
if (body === null || body === undefined) {
|
|
1135
|
-
throw new RequiredError(
|
|
1136
|
-
'body',
|
|
1137
|
-
'Required parameter body was null or undefined when calling createCustomAlias.',
|
|
1138
|
-
);
|
|
1139
|
-
}
|
|
1140
|
-
const localVarPath = `/v3/alias/custom/new`;
|
|
1141
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1142
|
-
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1143
|
-
const localVarHeaderParameter = {};
|
|
1144
|
-
const localVarQueryParameter = {};
|
|
1145
|
-
// authentication apiKeyAuth required
|
|
1146
|
-
if (configuration && configuration.apiKey) {
|
|
1147
|
-
const localVarApiKeyValue =
|
|
1148
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1149
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1150
|
-
}
|
|
1151
|
-
if (hostname !== undefined) {
|
|
1152
|
-
localVarQueryParameter['hostname'] = hostname;
|
|
1153
|
-
}
|
|
1154
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1155
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1156
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1157
|
-
delete localVarUrlObj.search;
|
|
1158
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1159
|
-
const needsSerialization =
|
|
1160
|
-
'AliasCustomNewPost' !== 'string' || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1161
|
-
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
|
|
1162
|
-
return {
|
|
1163
|
-
url: url.format(localVarUrlObj),
|
|
1164
|
-
options: localVarRequestOptions,
|
|
1165
|
-
};
|
|
1166
|
-
},
|
|
1167
|
-
/**
|
|
1168
|
-
* Create a new random alias
|
|
1169
|
-
* @summary Create random alias
|
|
1170
|
-
* @param {AliasRandomNewPost} body
|
|
1171
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1172
|
-
* @param {string} [mode] Either `uuid` or `word`. By default, use the user setting when creating new random alias.
|
|
1173
|
-
* @param {*} [options] Override http request option.
|
|
1174
|
-
* @throws {RequiredError}
|
|
1175
|
-
*/
|
|
1176
|
-
createRandomAlias(body, hostname, mode, options = {}) {
|
|
1177
|
-
// verify required parameter 'body' is not null or undefined
|
|
1178
|
-
if (body === null || body === undefined) {
|
|
1179
|
-
throw new RequiredError(
|
|
1180
|
-
'body',
|
|
1181
|
-
'Required parameter body was null or undefined when calling createRandomAlias.',
|
|
1182
|
-
);
|
|
1183
|
-
}
|
|
1184
|
-
const localVarPath = `/alias/random/new`;
|
|
1185
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1186
|
-
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1187
|
-
const localVarHeaderParameter = {};
|
|
1188
|
-
const localVarQueryParameter = {};
|
|
1189
|
-
// authentication apiKeyAuth required
|
|
1190
|
-
if (configuration && configuration.apiKey) {
|
|
1191
|
-
const localVarApiKeyValue =
|
|
1192
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1193
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1194
|
-
}
|
|
1195
|
-
if (hostname !== undefined) {
|
|
1196
|
-
localVarQueryParameter['hostname'] = hostname;
|
|
1197
|
-
}
|
|
1198
|
-
if (mode !== undefined) {
|
|
1199
|
-
localVarQueryParameter['mode'] = mode;
|
|
1200
|
-
}
|
|
1201
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1202
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1203
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1204
|
-
delete localVarUrlObj.search;
|
|
1205
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1206
|
-
const needsSerialization =
|
|
1207
|
-
'AliasRandomNewPost' !== 'string' || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1208
|
-
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
|
|
1209
|
-
return {
|
|
1210
|
-
url: url.format(localVarUrlObj),
|
|
1211
|
-
options: localVarRequestOptions,
|
|
1212
|
-
};
|
|
1213
|
-
},
|
|
1214
|
-
/**
|
|
1215
|
-
* Delete specific alias by id.
|
|
1216
|
-
* @summary Delete alias
|
|
1217
|
-
* @param {number} aliasId ID of an alias
|
|
1218
|
-
* @param {*} [options] Override http request option.
|
|
1219
|
-
* @throws {RequiredError}
|
|
1220
|
-
*/
|
|
1221
|
-
deleteAlias(aliasId, options = {}) {
|
|
1222
|
-
// verify required parameter 'aliasId' is not null or undefined
|
|
1223
|
-
if (aliasId === null || aliasId === undefined) {
|
|
1224
|
-
throw new RequiredError(
|
|
1225
|
-
'aliasId',
|
|
1226
|
-
'Required parameter aliasId was null or undefined when calling deleteAlias.',
|
|
1227
|
-
);
|
|
1228
|
-
}
|
|
1229
|
-
const localVarPath = `/aliases/{alias_id}`.replace(`{${'alias_id'}}`, encodeURIComponent(String(aliasId)));
|
|
1230
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1231
|
-
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
|
1232
|
-
const localVarHeaderParameter = {};
|
|
1233
|
-
const localVarQueryParameter = {};
|
|
1234
|
-
// authentication apiKeyAuth required
|
|
1235
|
-
if (configuration && configuration.apiKey) {
|
|
1236
|
-
const localVarApiKeyValue =
|
|
1237
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1238
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1239
|
-
}
|
|
1240
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1241
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1242
|
-
delete localVarUrlObj.search;
|
|
1243
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1244
|
-
return {
|
|
1245
|
-
url: url.format(localVarUrlObj),
|
|
1246
|
-
options: localVarRequestOptions,
|
|
1247
|
-
};
|
|
1248
|
-
},
|
|
1249
|
-
/**
|
|
1250
|
-
* Get activities for specific alias by id.
|
|
1251
|
-
* @summary Get activities
|
|
1252
|
-
* @param {number} aliasId ID of an alias
|
|
1253
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1254
|
-
* @param {*} [options] Override http request option.
|
|
1255
|
-
* @throws {RequiredError}
|
|
1256
|
-
*/
|
|
1257
|
-
getActivities(aliasId, pageId, options = {}) {
|
|
1258
|
-
// verify required parameter 'aliasId' is not null or undefined
|
|
1259
|
-
if (aliasId === null || aliasId === undefined) {
|
|
1260
|
-
throw new RequiredError(
|
|
1261
|
-
'aliasId',
|
|
1262
|
-
'Required parameter aliasId was null or undefined when calling getActivities.',
|
|
1263
|
-
);
|
|
1264
|
-
}
|
|
1265
|
-
// verify required parameter 'pageId' is not null or undefined
|
|
1266
|
-
if (pageId === null || pageId === undefined) {
|
|
1267
|
-
throw new RequiredError(
|
|
1268
|
-
'pageId',
|
|
1269
|
-
'Required parameter pageId was null or undefined when calling getActivities.',
|
|
1270
|
-
);
|
|
1271
|
-
}
|
|
1272
|
-
const localVarPath = `/aliases/{alias_id}/activities`.replace(
|
|
1273
|
-
`{${'alias_id'}}`,
|
|
1274
|
-
encodeURIComponent(String(aliasId)),
|
|
1275
|
-
);
|
|
1276
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1277
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1278
|
-
const localVarHeaderParameter = {};
|
|
1279
|
-
const localVarQueryParameter = {};
|
|
1280
|
-
// authentication apiKeyAuth required
|
|
1281
|
-
if (configuration && configuration.apiKey) {
|
|
1282
|
-
const localVarApiKeyValue =
|
|
1283
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1284
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1285
|
-
}
|
|
1286
|
-
if (pageId !== undefined) {
|
|
1287
|
-
localVarQueryParameter['page_id'] = pageId;
|
|
1288
|
-
}
|
|
1289
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1290
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1291
|
-
delete localVarUrlObj.search;
|
|
1292
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1293
|
-
return {
|
|
1294
|
-
url: url.format(localVarUrlObj),
|
|
1295
|
-
options: localVarRequestOptions,
|
|
1296
|
-
};
|
|
1297
|
-
},
|
|
1298
|
-
/**
|
|
1299
|
-
* Get specific alias by id.
|
|
1300
|
-
* @summary Get alias
|
|
1301
|
-
* @param {number} aliasId ID of an alias
|
|
1302
|
-
* @param {*} [options] Override http request option.
|
|
1303
|
-
* @throws {RequiredError}
|
|
1304
|
-
*/
|
|
1305
|
-
getAlias(aliasId, options = {}) {
|
|
1306
|
-
// verify required parameter 'aliasId' is not null or undefined
|
|
1307
|
-
if (aliasId === null || aliasId === undefined) {
|
|
1308
|
-
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling getAlias.');
|
|
1309
|
-
}
|
|
1310
|
-
const localVarPath = `/aliases/{alias_id}`.replace(`{${'alias_id'}}`, encodeURIComponent(String(aliasId)));
|
|
1311
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1312
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1313
|
-
const localVarHeaderParameter = {};
|
|
1314
|
-
const localVarQueryParameter = {};
|
|
1315
|
-
// authentication apiKeyAuth required
|
|
1316
|
-
if (configuration && configuration.apiKey) {
|
|
1317
|
-
const localVarApiKeyValue =
|
|
1318
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1319
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1320
|
-
}
|
|
1321
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1322
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1323
|
-
delete localVarUrlObj.search;
|
|
1324
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1325
|
-
return {
|
|
1326
|
-
url: url.format(localVarUrlObj),
|
|
1327
|
-
options: localVarRequestOptions,
|
|
1328
|
-
};
|
|
1329
|
-
},
|
|
1330
|
-
/**
|
|
1331
|
-
* User alias info and suggestion. Used by the first extension screen when user opens the extension.
|
|
1332
|
-
* @summary Get alias options
|
|
1333
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1334
|
-
* @param {*} [options] Override http request option.
|
|
1335
|
-
* @throws {RequiredError}
|
|
1336
|
-
*/
|
|
1337
|
-
getAliasOptions(hostname, options = {}) {
|
|
1338
|
-
const localVarPath = `/v5/alias/options`;
|
|
1339
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1340
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1341
|
-
const localVarHeaderParameter = {};
|
|
1342
|
-
const localVarQueryParameter = {};
|
|
1343
|
-
// authentication apiKeyAuth required
|
|
1344
|
-
if (configuration && configuration.apiKey) {
|
|
1345
|
-
const localVarApiKeyValue =
|
|
1346
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1347
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1348
|
-
}
|
|
1349
|
-
if (hostname !== undefined) {
|
|
1350
|
-
localVarQueryParameter['hostname'] = hostname;
|
|
1351
|
-
}
|
|
1352
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1353
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1354
|
-
delete localVarUrlObj.search;
|
|
1355
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1356
|
-
return {
|
|
1357
|
-
url: url.format(localVarUrlObj),
|
|
1358
|
-
options: localVarRequestOptions,
|
|
1359
|
-
};
|
|
1360
|
-
},
|
|
1361
|
-
/**
|
|
1362
|
-
* Get user aliases. Please note `pinned`, `disabled`, `enabled` are exclusive, i.e. only one can be present. They can only be set to `true`.
|
|
1363
|
-
* @summary Get aliases
|
|
1364
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1365
|
-
* @param {boolean} [pinned] If set, only pinned aliases are returned.
|
|
1366
|
-
* @param {boolean} [disabled] If set, only disabled aliases are returned.
|
|
1367
|
-
* @param {boolean} [enabled] If set, only enabled aliases are returned.
|
|
1368
|
-
* @param {*} [options] Override http request option.
|
|
1369
|
-
* @throws {RequiredError}
|
|
1370
|
-
*/
|
|
1371
|
-
getAliases(pageId, pinned, disabled, enabled, options = {}) {
|
|
1372
|
-
// verify required parameter 'pageId' is not null or undefined
|
|
1373
|
-
if (pageId === null || pageId === undefined) {
|
|
1374
|
-
throw new RequiredError('pageId', 'Required parameter pageId was null or undefined when calling getAliases.');
|
|
1375
|
-
}
|
|
1376
|
-
const localVarPath = `/v2/aliases`;
|
|
1377
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1378
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1379
|
-
const localVarHeaderParameter = {};
|
|
1380
|
-
const localVarQueryParameter = {};
|
|
1381
|
-
// authentication apiKeyAuth required
|
|
1382
|
-
if (configuration && configuration.apiKey) {
|
|
1383
|
-
const localVarApiKeyValue =
|
|
1384
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1385
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1386
|
-
}
|
|
1387
|
-
if (pageId !== undefined) {
|
|
1388
|
-
localVarQueryParameter['page_id'] = pageId;
|
|
1389
|
-
}
|
|
1390
|
-
if (pinned !== undefined) {
|
|
1391
|
-
localVarQueryParameter['pinned'] = pinned;
|
|
1392
|
-
}
|
|
1393
|
-
if (disabled !== undefined) {
|
|
1394
|
-
localVarQueryParameter['disabled'] = disabled;
|
|
1395
|
-
}
|
|
1396
|
-
if (enabled !== undefined) {
|
|
1397
|
-
localVarQueryParameter['enabled'] = enabled;
|
|
1398
|
-
}
|
|
1399
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1400
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1401
|
-
delete localVarUrlObj.search;
|
|
1402
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1403
|
-
return {
|
|
1404
|
-
url: url.format(localVarUrlObj),
|
|
1405
|
-
options: localVarRequestOptions,
|
|
1406
|
-
};
|
|
1407
|
-
},
|
|
1408
|
-
/**
|
|
1409
|
-
* Get contacts for specific alias by id.
|
|
1410
|
-
* @summary Get contacts
|
|
1411
|
-
* @param {number} aliasId ID of an alias
|
|
1412
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1413
|
-
* @param {*} [options] Override http request option.
|
|
1414
|
-
* @throws {RequiredError}
|
|
1415
|
-
*/
|
|
1416
|
-
getContacts(aliasId, pageId, options = {}) {
|
|
1417
|
-
// verify required parameter 'aliasId' is not null or undefined
|
|
1418
|
-
if (aliasId === null || aliasId === undefined) {
|
|
1419
|
-
throw new RequiredError(
|
|
1420
|
-
'aliasId',
|
|
1421
|
-
'Required parameter aliasId was null or undefined when calling getContacts.',
|
|
1422
|
-
);
|
|
1423
|
-
}
|
|
1424
|
-
// verify required parameter 'pageId' is not null or undefined
|
|
1425
|
-
if (pageId === null || pageId === undefined) {
|
|
1426
|
-
throw new RequiredError('pageId', 'Required parameter pageId was null or undefined when calling getContacts.');
|
|
1427
|
-
}
|
|
1428
|
-
const localVarPath = `/aliases/{alias_id}/contacts`.replace(
|
|
1429
|
-
`{${'alias_id'}}`,
|
|
1430
|
-
encodeURIComponent(String(aliasId)),
|
|
1431
|
-
);
|
|
1432
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1433
|
-
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1434
|
-
const localVarHeaderParameter = {};
|
|
1435
|
-
const localVarQueryParameter = {};
|
|
1436
|
-
// authentication apiKeyAuth required
|
|
1437
|
-
if (configuration && configuration.apiKey) {
|
|
1438
|
-
const localVarApiKeyValue =
|
|
1439
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1440
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1441
|
-
}
|
|
1442
|
-
if (pageId !== undefined) {
|
|
1443
|
-
localVarQueryParameter['page_id'] = pageId;
|
|
1444
|
-
}
|
|
1445
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1446
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1447
|
-
delete localVarUrlObj.search;
|
|
1448
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1449
|
-
return {
|
|
1450
|
-
url: url.format(localVarUrlObj),
|
|
1451
|
-
options: localVarRequestOptions,
|
|
1452
|
-
};
|
|
1453
|
-
},
|
|
1454
|
-
/**
|
|
1455
|
-
* Enable or disable specific alias by id.
|
|
1456
|
-
* @summary Toggle alias
|
|
1457
|
-
* @param {number} aliasId ID of an alias
|
|
1458
|
-
* @param {*} [options] Override http request option.
|
|
1459
|
-
* @throws {RequiredError}
|
|
1460
|
-
*/
|
|
1461
|
-
toggleAlias(aliasId, options = {}) {
|
|
1462
|
-
// verify required parameter 'aliasId' is not null or undefined
|
|
1463
|
-
if (aliasId === null || aliasId === undefined) {
|
|
1464
|
-
throw new RequiredError(
|
|
1465
|
-
'aliasId',
|
|
1466
|
-
'Required parameter aliasId was null or undefined when calling toggleAlias.',
|
|
1467
|
-
);
|
|
1468
|
-
}
|
|
1469
|
-
const localVarPath = `/aliases/{alias_id}/toggle`.replace(`{${'alias_id'}}`, encodeURIComponent(String(aliasId)));
|
|
1470
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1471
|
-
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1472
|
-
const localVarHeaderParameter = {};
|
|
1473
|
-
const localVarQueryParameter = {};
|
|
1474
|
-
// authentication apiKeyAuth required
|
|
1475
|
-
if (configuration && configuration.apiKey) {
|
|
1476
|
-
const localVarApiKeyValue =
|
|
1477
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1478
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1479
|
-
}
|
|
1480
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1481
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1482
|
-
delete localVarUrlObj.search;
|
|
1483
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1484
|
-
return {
|
|
1485
|
-
url: url.format(localVarUrlObj),
|
|
1486
|
-
options: localVarRequestOptions,
|
|
1487
|
-
};
|
|
1488
|
-
},
|
|
1489
|
-
/**
|
|
1490
|
-
* Update specific alias by id.
|
|
1491
|
-
* @summary Update alias
|
|
1492
|
-
* @param {AliasAliasIdPatch} body Updated settings for the given alias.
|
|
1493
|
-
* @param {number} aliasId ID of an alias
|
|
1494
|
-
* @param {*} [options] Override http request option.
|
|
1495
|
-
* @throws {RequiredError}
|
|
1496
|
-
*/
|
|
1497
|
-
updateAlias(body, aliasId, options = {}) {
|
|
1498
|
-
// verify required parameter 'body' is not null or undefined
|
|
1499
|
-
if (body === null || body === undefined) {
|
|
1500
|
-
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateAlias.');
|
|
1501
|
-
}
|
|
1502
|
-
// verify required parameter 'aliasId' is not null or undefined
|
|
1503
|
-
if (aliasId === null || aliasId === undefined) {
|
|
1504
|
-
throw new RequiredError(
|
|
1505
|
-
'aliasId',
|
|
1506
|
-
'Required parameter aliasId was null or undefined when calling updateAlias.',
|
|
1507
|
-
);
|
|
1508
|
-
}
|
|
1509
|
-
const localVarPath = `/aliases/{alias_id}`.replace(`{${'alias_id'}}`, encodeURIComponent(String(aliasId)));
|
|
1510
|
-
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1511
|
-
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
1512
|
-
const localVarHeaderParameter = {};
|
|
1513
|
-
const localVarQueryParameter = {};
|
|
1514
|
-
// authentication apiKeyAuth required
|
|
1515
|
-
if (configuration && configuration.apiKey) {
|
|
1516
|
-
const localVarApiKeyValue =
|
|
1517
|
-
typeof configuration.apiKey === 'function' ? configuration.apiKey('Authentication') : configuration.apiKey;
|
|
1518
|
-
localVarHeaderParameter['Authentication'] = localVarApiKeyValue;
|
|
1519
|
-
}
|
|
1520
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1521
|
-
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1522
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1523
|
-
delete localVarUrlObj.search;
|
|
1524
|
-
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1525
|
-
const needsSerialization =
|
|
1526
|
-
'AliasAliasIdPatch' !== 'string' || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1527
|
-
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
|
|
1528
|
-
return {
|
|
1529
|
-
url: url.format(localVarUrlObj),
|
|
1530
|
-
options: localVarRequestOptions,
|
|
1531
|
-
};
|
|
1532
|
-
},
|
|
1533
|
-
};
|
|
1534
|
-
};
|
|
1535
|
-
exports.AliasApiFetchParamCreator = AliasApiFetchParamCreator;
|
|
1536
|
-
/**
|
|
1537
|
-
* AliasApi - functional programming interface
|
|
1538
|
-
* @export
|
|
1539
|
-
*/
|
|
1540
|
-
const AliasApiFp = function (configuration) {
|
|
1541
|
-
return {
|
|
1542
|
-
/**
|
|
1543
|
-
* Create a new contact for an alias by id.
|
|
1544
|
-
* @summary Create contact
|
|
1545
|
-
* @param {AliasAliasIdContactsPost} body Updated settings for the given alias.
|
|
1546
|
-
* @param {number} aliasId ID of an alias
|
|
1547
|
-
* @param {*} [options] Override http request option.
|
|
1548
|
-
* @throws {RequiredError}
|
|
1549
|
-
*/
|
|
1550
|
-
createContact(body, aliasId, options) {
|
|
1551
|
-
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).createContact(
|
|
1552
|
-
body,
|
|
1553
|
-
aliasId,
|
|
1554
|
-
options,
|
|
1555
|
-
);
|
|
1556
|
-
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1557
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1558
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1559
|
-
return response.json();
|
|
1560
|
-
} else {
|
|
1561
|
-
throw response;
|
|
1562
|
-
}
|
|
1563
|
-
});
|
|
1564
|
-
};
|
|
1565
|
-
},
|
|
927
|
+
deleteUser(options) {
|
|
928
|
+
return (0, exports.AccountApiFp)(this.configuration).deleteUser(options)(this.fetch, this.basePath);
|
|
929
|
+
}
|
|
1566
930
|
/**
|
|
1567
|
-
*
|
|
1568
|
-
* @summary
|
|
1569
|
-
* @param {
|
|
1570
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
931
|
+
* Enable sudo mode
|
|
932
|
+
* @summary Enable sudo mode
|
|
933
|
+
* @param {SudoPatch} body
|
|
1571
934
|
* @param {*} [options] Override http request option.
|
|
1572
935
|
* @throws {RequiredError}
|
|
936
|
+
* @memberof AccountApi
|
|
1573
937
|
*/
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
hostname,
|
|
1578
|
-
options,
|
|
1579
|
-
);
|
|
1580
|
-
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1581
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1582
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1583
|
-
return response.json();
|
|
1584
|
-
} else {
|
|
1585
|
-
throw response;
|
|
1586
|
-
}
|
|
1587
|
-
});
|
|
1588
|
-
};
|
|
1589
|
-
},
|
|
938
|
+
enableSudoMode(body, options) {
|
|
939
|
+
return (0, exports.AccountApiFp)(this.configuration).enableSudoMode(body, options)(this.fetch, this.basePath);
|
|
940
|
+
}
|
|
1590
941
|
/**
|
|
1591
|
-
*
|
|
1592
|
-
* @summary
|
|
1593
|
-
* @param {
|
|
1594
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1595
|
-
* @param {string} [mode] Either `uuid` or `word`. By default, use the user setting when creating new random alias.
|
|
942
|
+
* Request a link to reset the password for a registered account.
|
|
943
|
+
* @summary Forgot password
|
|
944
|
+
* @param {AuthForgotPasswordPost} body
|
|
1596
945
|
* @param {*} [options] Override http request option.
|
|
1597
946
|
* @throws {RequiredError}
|
|
947
|
+
* @memberof AccountApi
|
|
1598
948
|
*/
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
hostname,
|
|
1603
|
-
mode,
|
|
1604
|
-
options,
|
|
1605
|
-
);
|
|
1606
|
-
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1607
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1608
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1609
|
-
return response.json();
|
|
1610
|
-
} else {
|
|
1611
|
-
throw response;
|
|
1612
|
-
}
|
|
1613
|
-
});
|
|
1614
|
-
};
|
|
1615
|
-
},
|
|
949
|
+
forgotPassword(body, options) {
|
|
950
|
+
return (0, exports.AccountApiFp)(this.configuration).forgotPassword(body, options)(this.fetch, this.basePath);
|
|
951
|
+
}
|
|
1616
952
|
/**
|
|
1617
|
-
*
|
|
1618
|
-
* @summary
|
|
1619
|
-
* @param {number} aliasId ID of an alias
|
|
953
|
+
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
954
|
+
* @summary Get cookie token
|
|
1620
955
|
* @param {*} [options] Override http request option.
|
|
1621
956
|
* @throws {RequiredError}
|
|
957
|
+
* @memberof AccountApi
|
|
1622
958
|
*/
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1627
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1628
|
-
return response.json();
|
|
1629
|
-
} else {
|
|
1630
|
-
throw response;
|
|
1631
|
-
}
|
|
1632
|
-
});
|
|
1633
|
-
};
|
|
1634
|
-
},
|
|
959
|
+
getCookieToken(options) {
|
|
960
|
+
return (0, exports.AccountApiFp)(this.configuration).getCookieToken(options)(this.fetch, this.basePath);
|
|
961
|
+
}
|
|
1635
962
|
/**
|
|
1636
|
-
* Get
|
|
1637
|
-
* @summary Get
|
|
1638
|
-
* @param {number} aliasId ID of an alias
|
|
1639
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
963
|
+
* Get user info
|
|
964
|
+
* @summary Get user info
|
|
1640
965
|
* @param {*} [options] Override http request option.
|
|
1641
966
|
* @throws {RequiredError}
|
|
967
|
+
* @memberof AccountApi
|
|
1642
968
|
*/
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
pageId,
|
|
1647
|
-
options,
|
|
1648
|
-
);
|
|
1649
|
-
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1650
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1651
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1652
|
-
return response.json();
|
|
1653
|
-
} else {
|
|
1654
|
-
throw response;
|
|
1655
|
-
}
|
|
1656
|
-
});
|
|
1657
|
-
};
|
|
1658
|
-
},
|
|
969
|
+
getUserInfo(options) {
|
|
970
|
+
return (0, exports.AccountApiFp)(this.configuration).getUserInfo(options)(this.fetch, this.basePath);
|
|
971
|
+
}
|
|
1659
972
|
/**
|
|
1660
|
-
*
|
|
1661
|
-
* @summary
|
|
1662
|
-
* @param {
|
|
973
|
+
* Login using email and password to get an access token.
|
|
974
|
+
* @summary Login
|
|
975
|
+
* @param {AuthLoginPost} body
|
|
1663
976
|
* @param {*} [options] Override http request option.
|
|
1664
977
|
* @throws {RequiredError}
|
|
978
|
+
* @memberof AccountApi
|
|
1665
979
|
*/
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1670
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1671
|
-
return response.json();
|
|
1672
|
-
} else {
|
|
1673
|
-
throw response;
|
|
1674
|
-
}
|
|
1675
|
-
});
|
|
1676
|
-
};
|
|
1677
|
-
},
|
|
980
|
+
login(body, options) {
|
|
981
|
+
return (0, exports.AccountApiFp)(this.configuration).login(body, options)(this.fetch, this.basePath);
|
|
982
|
+
}
|
|
1678
983
|
/**
|
|
1679
|
-
*
|
|
1680
|
-
* @summary
|
|
1681
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
984
|
+
* Log out user
|
|
985
|
+
* @summary Logout
|
|
1682
986
|
* @param {*} [options] Override http request option.
|
|
1683
987
|
* @throws {RequiredError}
|
|
988
|
+
* @memberof AccountApi
|
|
1684
989
|
*/
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
options,
|
|
1689
|
-
);
|
|
1690
|
-
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1691
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1692
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1693
|
-
return response.json();
|
|
1694
|
-
} else {
|
|
1695
|
-
throw response;
|
|
1696
|
-
}
|
|
1697
|
-
});
|
|
1698
|
-
};
|
|
1699
|
-
},
|
|
990
|
+
logout(options) {
|
|
991
|
+
return (0, exports.AccountApiFp)(this.configuration).logout(options)(this.fetch, this.basePath);
|
|
992
|
+
}
|
|
1700
993
|
/**
|
|
1701
|
-
*
|
|
1702
|
-
* @summary
|
|
1703
|
-
* @param {
|
|
1704
|
-
* @param {boolean} [pinned] If set, only pinned aliases are returned.
|
|
1705
|
-
* @param {boolean} [disabled] If set, only disabled aliases are returned.
|
|
1706
|
-
* @param {boolean} [enabled] If set, only enabled aliases are returned.
|
|
994
|
+
* Authenticate using MFA
|
|
995
|
+
* @summary MFA authentication
|
|
996
|
+
* @param {AuthMfaPost} body The api_key is used in all subsequent requests. It's empty if MFA is enabled. If user hasn't enabled MFA, mfa_key is empty.
|
|
1707
997
|
* @param {*} [options] Override http request option.
|
|
1708
998
|
* @throws {RequiredError}
|
|
999
|
+
* @memberof AccountApi
|
|
1709
1000
|
*/
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
pinned,
|
|
1714
|
-
disabled,
|
|
1715
|
-
enabled,
|
|
1716
|
-
options,
|
|
1717
|
-
);
|
|
1718
|
-
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1719
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1720
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1721
|
-
return response.json();
|
|
1722
|
-
} else {
|
|
1723
|
-
throw response;
|
|
1724
|
-
}
|
|
1725
|
-
});
|
|
1726
|
-
};
|
|
1727
|
-
},
|
|
1001
|
+
mfa(body, options) {
|
|
1002
|
+
return (0, exports.AccountApiFp)(this.configuration).mfa(body, options)(this.fetch, this.basePath);
|
|
1003
|
+
}
|
|
1728
1004
|
/**
|
|
1729
|
-
*
|
|
1730
|
-
* @summary
|
|
1731
|
-
* @param {
|
|
1732
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1005
|
+
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
1006
|
+
* @summary Reactivate account
|
|
1007
|
+
* @param {AuthReactivatePost} body
|
|
1733
1008
|
* @param {*} [options] Override http request option.
|
|
1734
1009
|
* @throws {RequiredError}
|
|
1010
|
+
* @memberof AccountApi
|
|
1735
1011
|
*/
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
pageId,
|
|
1740
|
-
options,
|
|
1741
|
-
);
|
|
1742
|
-
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1743
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1744
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1745
|
-
return response.json();
|
|
1746
|
-
} else {
|
|
1747
|
-
throw response;
|
|
1748
|
-
}
|
|
1749
|
-
});
|
|
1750
|
-
};
|
|
1751
|
-
},
|
|
1012
|
+
reactivateAccount(body, options) {
|
|
1013
|
+
return (0, exports.AccountApiFp)(this.configuration).reactivateAccount(body, options)(this.fetch, this.basePath);
|
|
1014
|
+
}
|
|
1752
1015
|
/**
|
|
1753
|
-
*
|
|
1754
|
-
* @summary
|
|
1755
|
-
* @param {
|
|
1016
|
+
* Register a new account
|
|
1017
|
+
* @summary Register account
|
|
1018
|
+
* @param {AuthRegisterPost} body
|
|
1756
1019
|
* @param {*} [options] Override http request option.
|
|
1757
1020
|
* @throws {RequiredError}
|
|
1021
|
+
* @memberof AccountApi
|
|
1758
1022
|
*/
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1763
|
-
if (response.status >= 200 && response.status < 300) {
|
|
1764
|
-
return response.json();
|
|
1765
|
-
} else {
|
|
1766
|
-
throw response;
|
|
1767
|
-
}
|
|
1768
|
-
});
|
|
1769
|
-
};
|
|
1770
|
-
},
|
|
1023
|
+
registerAccount(body, options) {
|
|
1024
|
+
return (0, exports.AccountApiFp)(this.configuration).registerAccount(body, options)(this.fetch, this.basePath);
|
|
1025
|
+
}
|
|
1771
1026
|
/**
|
|
1772
|
-
* Update
|
|
1773
|
-
* @summary Update
|
|
1774
|
-
* @param {
|
|
1775
|
-
* @param {number} aliasId ID of an alias
|
|
1027
|
+
* Update user info
|
|
1028
|
+
* @summary Update user info
|
|
1029
|
+
* @param {UserInfoPatch} body
|
|
1776
1030
|
* @param {*} [options] Override http request option.
|
|
1777
1031
|
* @throws {RequiredError}
|
|
1032
|
+
* @memberof AccountApi
|
|
1778
1033
|
*/
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1034
|
+
updateUserInfo(body, options) {
|
|
1035
|
+
return (0, exports.AccountApiFp)(this.configuration).updateUserInfo(body, options)(this.fetch, this.basePath);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
exports.AccountApi = AccountApi;
|
|
1039
|
+
/**
|
|
1040
|
+
* AliasApi - fetch parameter creator
|
|
1041
|
+
* @export
|
|
1042
|
+
*/
|
|
1043
|
+
const AliasApiFetchParamCreator = function (configuration) {
|
|
1044
|
+
return {
|
|
1045
|
+
/**
|
|
1046
|
+
* Create a new contact for an alias by id.
|
|
1047
|
+
* @summary Create contact
|
|
1048
|
+
* @param {AliasAliasIdContactsPost} body Updated settings for the given alias.
|
|
1049
|
+
* @param {number} aliasId ID of an alias
|
|
1050
|
+
* @param {*} [options] Override http request option.
|
|
1051
|
+
* @throws {RequiredError}
|
|
1052
|
+
*/
|
|
1053
|
+
createContact(body, aliasId, options = {}) {
|
|
1054
|
+
// verify required parameter 'body' is not null or undefined
|
|
1055
|
+
if (body === null || body === undefined) {
|
|
1056
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createContact.');
|
|
1057
|
+
}
|
|
1058
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1059
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1060
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling createContact.');
|
|
1061
|
+
}
|
|
1062
|
+
const localVarPath = `/aliases/{alias_id}/contacts`
|
|
1063
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
1064
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1065
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1066
|
+
const localVarHeaderParameter = {};
|
|
1067
|
+
const localVarQueryParameter = {};
|
|
1068
|
+
// authentication apiKeyAuth required
|
|
1069
|
+
if (configuration && configuration.apiKey) {
|
|
1070
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1071
|
+
? configuration.apiKey("Authentication")
|
|
1072
|
+
: configuration.apiKey;
|
|
1073
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1074
|
+
}
|
|
1075
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1076
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1077
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1078
|
+
delete localVarUrlObj.search;
|
|
1079
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1080
|
+
const needsSerialization = ("AliasAliasIdContactsPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1081
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
1082
|
+
return {
|
|
1083
|
+
url: url.format(localVarUrlObj),
|
|
1084
|
+
options: localVarRequestOptions,
|
|
1085
|
+
};
|
|
1086
|
+
},
|
|
1087
|
+
/**
|
|
1088
|
+
* Create a new custom alias
|
|
1089
|
+
* @summary Create custom alias
|
|
1090
|
+
* @param {AliasCustomNewPost} body
|
|
1091
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1092
|
+
* @param {*} [options] Override http request option.
|
|
1093
|
+
* @throws {RequiredError}
|
|
1094
|
+
*/
|
|
1095
|
+
createCustomAlias(body, hostname, options = {}) {
|
|
1096
|
+
// verify required parameter 'body' is not null or undefined
|
|
1097
|
+
if (body === null || body === undefined) {
|
|
1098
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createCustomAlias.');
|
|
1099
|
+
}
|
|
1100
|
+
const localVarPath = `/v3/alias/custom/new`;
|
|
1101
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1102
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1103
|
+
const localVarHeaderParameter = {};
|
|
1104
|
+
const localVarQueryParameter = {};
|
|
1105
|
+
// authentication apiKeyAuth required
|
|
1106
|
+
if (configuration && configuration.apiKey) {
|
|
1107
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1108
|
+
? configuration.apiKey("Authentication")
|
|
1109
|
+
: configuration.apiKey;
|
|
1110
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1111
|
+
}
|
|
1112
|
+
if (hostname !== undefined) {
|
|
1113
|
+
localVarQueryParameter['hostname'] = hostname;
|
|
1114
|
+
}
|
|
1115
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1116
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1117
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1118
|
+
delete localVarUrlObj.search;
|
|
1119
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1120
|
+
const needsSerialization = ("AliasCustomNewPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1121
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
1122
|
+
return {
|
|
1123
|
+
url: url.format(localVarUrlObj),
|
|
1124
|
+
options: localVarRequestOptions,
|
|
1125
|
+
};
|
|
1126
|
+
},
|
|
1127
|
+
/**
|
|
1128
|
+
* Create a new random alias
|
|
1129
|
+
* @summary Create random alias
|
|
1130
|
+
* @param {AliasRandomNewPost} body
|
|
1131
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1132
|
+
* @param {string} [mode] Either `uuid` or `word`. By default, use the user setting when creating new random alias.
|
|
1133
|
+
* @param {*} [options] Override http request option.
|
|
1134
|
+
* @throws {RequiredError}
|
|
1135
|
+
*/
|
|
1136
|
+
createRandomAlias(body, hostname, mode, options = {}) {
|
|
1137
|
+
// verify required parameter 'body' is not null or undefined
|
|
1138
|
+
if (body === null || body === undefined) {
|
|
1139
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createRandomAlias.');
|
|
1140
|
+
}
|
|
1141
|
+
const localVarPath = `/alias/random/new`;
|
|
1142
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1143
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1144
|
+
const localVarHeaderParameter = {};
|
|
1145
|
+
const localVarQueryParameter = {};
|
|
1146
|
+
// authentication apiKeyAuth required
|
|
1147
|
+
if (configuration && configuration.apiKey) {
|
|
1148
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1149
|
+
? configuration.apiKey("Authentication")
|
|
1150
|
+
: configuration.apiKey;
|
|
1151
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1152
|
+
}
|
|
1153
|
+
if (hostname !== undefined) {
|
|
1154
|
+
localVarQueryParameter['hostname'] = hostname;
|
|
1155
|
+
}
|
|
1156
|
+
if (mode !== undefined) {
|
|
1157
|
+
localVarQueryParameter['mode'] = mode;
|
|
1158
|
+
}
|
|
1159
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1160
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1161
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1162
|
+
delete localVarUrlObj.search;
|
|
1163
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1164
|
+
const needsSerialization = ("AliasRandomNewPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1165
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
1166
|
+
return {
|
|
1167
|
+
url: url.format(localVarUrlObj),
|
|
1168
|
+
options: localVarRequestOptions,
|
|
1169
|
+
};
|
|
1170
|
+
},
|
|
1171
|
+
/**
|
|
1172
|
+
* Delete specific alias by id.
|
|
1173
|
+
* @summary Delete alias
|
|
1174
|
+
* @param {number} aliasId ID of an alias
|
|
1175
|
+
* @param {*} [options] Override http request option.
|
|
1176
|
+
* @throws {RequiredError}
|
|
1177
|
+
*/
|
|
1178
|
+
deleteAlias(aliasId, options = {}) {
|
|
1179
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1180
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1181
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling deleteAlias.');
|
|
1182
|
+
}
|
|
1183
|
+
const localVarPath = `/aliases/{alias_id}`
|
|
1184
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
1185
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1186
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
|
1187
|
+
const localVarHeaderParameter = {};
|
|
1188
|
+
const localVarQueryParameter = {};
|
|
1189
|
+
// authentication apiKeyAuth required
|
|
1190
|
+
if (configuration && configuration.apiKey) {
|
|
1191
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1192
|
+
? configuration.apiKey("Authentication")
|
|
1193
|
+
: configuration.apiKey;
|
|
1194
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1195
|
+
}
|
|
1196
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1197
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1198
|
+
delete localVarUrlObj.search;
|
|
1199
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1200
|
+
return {
|
|
1201
|
+
url: url.format(localVarUrlObj),
|
|
1202
|
+
options: localVarRequestOptions,
|
|
1203
|
+
};
|
|
1204
|
+
},
|
|
1205
|
+
/**
|
|
1206
|
+
* Get activities for specific alias by id.
|
|
1207
|
+
* @summary Get activities
|
|
1208
|
+
* @param {number} aliasId ID of an alias
|
|
1209
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1210
|
+
* @param {*} [options] Override http request option.
|
|
1211
|
+
* @throws {RequiredError}
|
|
1212
|
+
*/
|
|
1213
|
+
getActivities(aliasId, pageId, options = {}) {
|
|
1214
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1215
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1216
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling getActivities.');
|
|
1217
|
+
}
|
|
1218
|
+
// verify required parameter 'pageId' is not null or undefined
|
|
1219
|
+
if (pageId === null || pageId === undefined) {
|
|
1220
|
+
throw new RequiredError('pageId', 'Required parameter pageId was null or undefined when calling getActivities.');
|
|
1221
|
+
}
|
|
1222
|
+
const localVarPath = `/aliases/{alias_id}/activities`
|
|
1223
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
1224
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1225
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1226
|
+
const localVarHeaderParameter = {};
|
|
1227
|
+
const localVarQueryParameter = {};
|
|
1228
|
+
// authentication apiKeyAuth required
|
|
1229
|
+
if (configuration && configuration.apiKey) {
|
|
1230
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1231
|
+
? configuration.apiKey("Authentication")
|
|
1232
|
+
: configuration.apiKey;
|
|
1233
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1234
|
+
}
|
|
1235
|
+
if (pageId !== undefined) {
|
|
1236
|
+
localVarQueryParameter['page_id'] = pageId;
|
|
1237
|
+
}
|
|
1238
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1239
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1240
|
+
delete localVarUrlObj.search;
|
|
1241
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1242
|
+
return {
|
|
1243
|
+
url: url.format(localVarUrlObj),
|
|
1244
|
+
options: localVarRequestOptions,
|
|
1245
|
+
};
|
|
1246
|
+
},
|
|
1247
|
+
/**
|
|
1248
|
+
* Get specific alias by id.
|
|
1249
|
+
* @summary Get alias
|
|
1250
|
+
* @param {number} aliasId ID of an alias
|
|
1251
|
+
* @param {*} [options] Override http request option.
|
|
1252
|
+
* @throws {RequiredError}
|
|
1253
|
+
*/
|
|
1254
|
+
getAlias(aliasId, options = {}) {
|
|
1255
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1256
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1257
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling getAlias.');
|
|
1258
|
+
}
|
|
1259
|
+
const localVarPath = `/aliases/{alias_id}`
|
|
1260
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
1261
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1262
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1263
|
+
const localVarHeaderParameter = {};
|
|
1264
|
+
const localVarQueryParameter = {};
|
|
1265
|
+
// authentication apiKeyAuth required
|
|
1266
|
+
if (configuration && configuration.apiKey) {
|
|
1267
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1268
|
+
? configuration.apiKey("Authentication")
|
|
1269
|
+
: configuration.apiKey;
|
|
1270
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1271
|
+
}
|
|
1272
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1273
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1274
|
+
delete localVarUrlObj.search;
|
|
1275
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1276
|
+
return {
|
|
1277
|
+
url: url.format(localVarUrlObj),
|
|
1278
|
+
options: localVarRequestOptions,
|
|
1279
|
+
};
|
|
1280
|
+
},
|
|
1281
|
+
/**
|
|
1282
|
+
* User alias info and suggestion. Used by the first extension screen when user opens the extension.
|
|
1283
|
+
* @summary Get alias options
|
|
1284
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1285
|
+
* @param {*} [options] Override http request option.
|
|
1286
|
+
* @throws {RequiredError}
|
|
1287
|
+
*/
|
|
1288
|
+
getAliasOptions(hostname, options = {}) {
|
|
1289
|
+
const localVarPath = `/v5/alias/options`;
|
|
1290
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1291
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1292
|
+
const localVarHeaderParameter = {};
|
|
1293
|
+
const localVarQueryParameter = {};
|
|
1294
|
+
// authentication apiKeyAuth required
|
|
1295
|
+
if (configuration && configuration.apiKey) {
|
|
1296
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1297
|
+
? configuration.apiKey("Authentication")
|
|
1298
|
+
: configuration.apiKey;
|
|
1299
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1300
|
+
}
|
|
1301
|
+
if (hostname !== undefined) {
|
|
1302
|
+
localVarQueryParameter['hostname'] = hostname;
|
|
1303
|
+
}
|
|
1304
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1305
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1306
|
+
delete localVarUrlObj.search;
|
|
1307
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1308
|
+
return {
|
|
1309
|
+
url: url.format(localVarUrlObj),
|
|
1310
|
+
options: localVarRequestOptions,
|
|
1311
|
+
};
|
|
1312
|
+
},
|
|
1313
|
+
/**
|
|
1314
|
+
* Get user aliases. Please note `pinned`, `disabled`, `enabled` are exclusive, i.e. only one can be present. They can only be set to `true`.
|
|
1315
|
+
* @summary Get aliases
|
|
1316
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1317
|
+
* @param {boolean} [pinned] If set, only pinned aliases are returned.
|
|
1318
|
+
* @param {boolean} [disabled] If set, only disabled aliases are returned.
|
|
1319
|
+
* @param {boolean} [enabled] If set, only enabled aliases are returned.
|
|
1320
|
+
* @param {*} [options] Override http request option.
|
|
1321
|
+
* @throws {RequiredError}
|
|
1322
|
+
*/
|
|
1323
|
+
getAliases(pageId, pinned, disabled, enabled, options = {}) {
|
|
1324
|
+
// verify required parameter 'pageId' is not null or undefined
|
|
1325
|
+
if (pageId === null || pageId === undefined) {
|
|
1326
|
+
throw new RequiredError('pageId', 'Required parameter pageId was null or undefined when calling getAliases.');
|
|
1327
|
+
}
|
|
1328
|
+
const localVarPath = `/v2/aliases`;
|
|
1329
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1330
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1331
|
+
const localVarHeaderParameter = {};
|
|
1332
|
+
const localVarQueryParameter = {};
|
|
1333
|
+
// authentication apiKeyAuth required
|
|
1334
|
+
if (configuration && configuration.apiKey) {
|
|
1335
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1336
|
+
? configuration.apiKey("Authentication")
|
|
1337
|
+
: configuration.apiKey;
|
|
1338
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1339
|
+
}
|
|
1340
|
+
if (pageId !== undefined) {
|
|
1341
|
+
localVarQueryParameter['page_id'] = pageId;
|
|
1342
|
+
}
|
|
1343
|
+
if (pinned !== undefined) {
|
|
1344
|
+
localVarQueryParameter['pinned'] = pinned;
|
|
1345
|
+
}
|
|
1346
|
+
if (disabled !== undefined) {
|
|
1347
|
+
localVarQueryParameter['disabled'] = disabled;
|
|
1348
|
+
}
|
|
1349
|
+
if (enabled !== undefined) {
|
|
1350
|
+
localVarQueryParameter['enabled'] = enabled;
|
|
1351
|
+
}
|
|
1352
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1353
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1354
|
+
delete localVarUrlObj.search;
|
|
1355
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1356
|
+
return {
|
|
1357
|
+
url: url.format(localVarUrlObj),
|
|
1358
|
+
options: localVarRequestOptions,
|
|
1359
|
+
};
|
|
1360
|
+
},
|
|
1361
|
+
/**
|
|
1362
|
+
* Get contacts for specific alias by id.
|
|
1363
|
+
* @summary Get contacts
|
|
1364
|
+
* @param {number} aliasId ID of an alias
|
|
1365
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1366
|
+
* @param {*} [options] Override http request option.
|
|
1367
|
+
* @throws {RequiredError}
|
|
1368
|
+
*/
|
|
1369
|
+
getContacts(aliasId, pageId, options = {}) {
|
|
1370
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1371
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1372
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling getContacts.');
|
|
1373
|
+
}
|
|
1374
|
+
// verify required parameter 'pageId' is not null or undefined
|
|
1375
|
+
if (pageId === null || pageId === undefined) {
|
|
1376
|
+
throw new RequiredError('pageId', 'Required parameter pageId was null or undefined when calling getContacts.');
|
|
1377
|
+
}
|
|
1378
|
+
const localVarPath = `/aliases/{alias_id}/contacts`
|
|
1379
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
1380
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1381
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
1382
|
+
const localVarHeaderParameter = {};
|
|
1383
|
+
const localVarQueryParameter = {};
|
|
1384
|
+
// authentication apiKeyAuth required
|
|
1385
|
+
if (configuration && configuration.apiKey) {
|
|
1386
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1387
|
+
? configuration.apiKey("Authentication")
|
|
1388
|
+
: configuration.apiKey;
|
|
1389
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1390
|
+
}
|
|
1391
|
+
if (pageId !== undefined) {
|
|
1392
|
+
localVarQueryParameter['page_id'] = pageId;
|
|
1393
|
+
}
|
|
1394
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1395
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1396
|
+
delete localVarUrlObj.search;
|
|
1397
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1398
|
+
return {
|
|
1399
|
+
url: url.format(localVarUrlObj),
|
|
1400
|
+
options: localVarRequestOptions,
|
|
1401
|
+
};
|
|
1402
|
+
},
|
|
1403
|
+
/**
|
|
1404
|
+
* Enable or disable specific alias by id.
|
|
1405
|
+
* @summary Toggle alias
|
|
1406
|
+
* @param {number} aliasId ID of an alias
|
|
1407
|
+
* @param {*} [options] Override http request option.
|
|
1408
|
+
* @throws {RequiredError}
|
|
1409
|
+
*/
|
|
1410
|
+
toggleAlias(aliasId, options = {}) {
|
|
1411
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1412
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1413
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling toggleAlias.');
|
|
1414
|
+
}
|
|
1415
|
+
const localVarPath = `/aliases/{alias_id}/toggle`
|
|
1416
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
1417
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1418
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
1419
|
+
const localVarHeaderParameter = {};
|
|
1420
|
+
const localVarQueryParameter = {};
|
|
1421
|
+
// authentication apiKeyAuth required
|
|
1422
|
+
if (configuration && configuration.apiKey) {
|
|
1423
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1424
|
+
? configuration.apiKey("Authentication")
|
|
1425
|
+
: configuration.apiKey;
|
|
1426
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1427
|
+
}
|
|
1428
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1429
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1430
|
+
delete localVarUrlObj.search;
|
|
1431
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1432
|
+
return {
|
|
1433
|
+
url: url.format(localVarUrlObj),
|
|
1434
|
+
options: localVarRequestOptions,
|
|
1435
|
+
};
|
|
1436
|
+
},
|
|
1437
|
+
/**
|
|
1438
|
+
* Update specific alias by id.
|
|
1439
|
+
* @summary Update alias
|
|
1440
|
+
* @param {AliasAliasIdPatch} body Updated settings for the given alias.
|
|
1441
|
+
* @param {number} aliasId ID of an alias
|
|
1442
|
+
* @param {*} [options] Override http request option.
|
|
1443
|
+
* @throws {RequiredError}
|
|
1444
|
+
*/
|
|
1445
|
+
updateAlias(body, aliasId, options = {}) {
|
|
1446
|
+
// verify required parameter 'body' is not null or undefined
|
|
1447
|
+
if (body === null || body === undefined) {
|
|
1448
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateAlias.');
|
|
1449
|
+
}
|
|
1450
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1451
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1452
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling updateAlias.');
|
|
1453
|
+
}
|
|
1454
|
+
const localVarPath = `/aliases/{alias_id}`
|
|
1455
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
1456
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
1457
|
+
const localVarRequestOptions = Object.assign({ method: 'PATCH' }, options);
|
|
1458
|
+
const localVarHeaderParameter = {};
|
|
1459
|
+
const localVarQueryParameter = {};
|
|
1460
|
+
// authentication apiKeyAuth required
|
|
1461
|
+
if (configuration && configuration.apiKey) {
|
|
1462
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1463
|
+
? configuration.apiKey("Authentication")
|
|
1464
|
+
: configuration.apiKey;
|
|
1465
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
1466
|
+
}
|
|
1467
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1468
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
1469
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
1470
|
+
delete localVarUrlObj.search;
|
|
1471
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
1472
|
+
const needsSerialization = ("AliasAliasIdPatch" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
1473
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
1474
|
+
return {
|
|
1475
|
+
url: url.format(localVarUrlObj),
|
|
1476
|
+
options: localVarRequestOptions,
|
|
1477
|
+
};
|
|
1478
|
+
},
|
|
1479
|
+
};
|
|
1480
|
+
};
|
|
1481
|
+
exports.AliasApiFetchParamCreator = AliasApiFetchParamCreator;
|
|
1482
|
+
/**
|
|
1483
|
+
* AliasApi - functional programming interface
|
|
1484
|
+
* @export
|
|
1485
|
+
*/
|
|
1486
|
+
const AliasApiFp = function (configuration) {
|
|
1487
|
+
return {
|
|
1488
|
+
/**
|
|
1489
|
+
* Create a new contact for an alias by id.
|
|
1490
|
+
* @summary Create contact
|
|
1491
|
+
* @param {AliasAliasIdContactsPost} body Updated settings for the given alias.
|
|
1492
|
+
* @param {number} aliasId ID of an alias
|
|
1493
|
+
* @param {*} [options] Override http request option.
|
|
1494
|
+
* @throws {RequiredError}
|
|
1495
|
+
*/
|
|
1496
|
+
createContact(body, aliasId, options) {
|
|
1497
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).createContact(body, aliasId, options);
|
|
1498
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1499
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1500
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1501
|
+
return response.json();
|
|
1502
|
+
}
|
|
1503
|
+
else {
|
|
1504
|
+
throw response;
|
|
1505
|
+
}
|
|
1506
|
+
});
|
|
1507
|
+
};
|
|
1508
|
+
},
|
|
1509
|
+
/**
|
|
1510
|
+
* Create a new custom alias
|
|
1511
|
+
* @summary Create custom alias
|
|
1512
|
+
* @param {AliasCustomNewPost} body
|
|
1513
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1514
|
+
* @param {*} [options] Override http request option.
|
|
1515
|
+
* @throws {RequiredError}
|
|
1516
|
+
*/
|
|
1517
|
+
createCustomAlias(body, hostname, options) {
|
|
1518
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).createCustomAlias(body, hostname, options);
|
|
1519
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1520
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1521
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1522
|
+
return response.json();
|
|
1523
|
+
}
|
|
1524
|
+
else {
|
|
1525
|
+
throw response;
|
|
1526
|
+
}
|
|
1527
|
+
});
|
|
1528
|
+
};
|
|
1529
|
+
},
|
|
1530
|
+
/**
|
|
1531
|
+
* Create a new random alias
|
|
1532
|
+
* @summary Create random alias
|
|
1533
|
+
* @param {AliasRandomNewPost} body
|
|
1534
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1535
|
+
* @param {string} [mode] Either `uuid` or `word`. By default, use the user setting when creating new random alias.
|
|
1536
|
+
* @param {*} [options] Override http request option.
|
|
1537
|
+
* @throws {RequiredError}
|
|
1538
|
+
*/
|
|
1539
|
+
createRandomAlias(body, hostname, mode, options) {
|
|
1540
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).createRandomAlias(body, hostname, mode, options);
|
|
1541
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1542
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1543
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1544
|
+
return response.json();
|
|
1545
|
+
}
|
|
1546
|
+
else {
|
|
1547
|
+
throw response;
|
|
1548
|
+
}
|
|
1549
|
+
});
|
|
1550
|
+
};
|
|
1551
|
+
},
|
|
1552
|
+
/**
|
|
1553
|
+
* Delete specific alias by id.
|
|
1554
|
+
* @summary Delete alias
|
|
1555
|
+
* @param {number} aliasId ID of an alias
|
|
1556
|
+
* @param {*} [options] Override http request option.
|
|
1557
|
+
* @throws {RequiredError}
|
|
1558
|
+
*/
|
|
1559
|
+
deleteAlias(aliasId, options) {
|
|
1560
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).deleteAlias(aliasId, options);
|
|
1561
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1562
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1563
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1564
|
+
return response.json();
|
|
1565
|
+
}
|
|
1566
|
+
else {
|
|
1567
|
+
throw response;
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
};
|
|
1571
|
+
},
|
|
1572
|
+
/**
|
|
1573
|
+
* Get activities for specific alias by id.
|
|
1574
|
+
* @summary Get activities
|
|
1575
|
+
* @param {number} aliasId ID of an alias
|
|
1576
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1577
|
+
* @param {*} [options] Override http request option.
|
|
1578
|
+
* @throws {RequiredError}
|
|
1579
|
+
*/
|
|
1580
|
+
getActivities(aliasId, pageId, options) {
|
|
1581
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).getActivities(aliasId, pageId, options);
|
|
1582
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1583
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1584
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1585
|
+
return response.json();
|
|
1586
|
+
}
|
|
1587
|
+
else {
|
|
1588
|
+
throw response;
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
};
|
|
1592
|
+
},
|
|
1593
|
+
/**
|
|
1594
|
+
* Get specific alias by id.
|
|
1595
|
+
* @summary Get alias
|
|
1596
|
+
* @param {number} aliasId ID of an alias
|
|
1597
|
+
* @param {*} [options] Override http request option.
|
|
1598
|
+
* @throws {RequiredError}
|
|
1599
|
+
*/
|
|
1600
|
+
getAlias(aliasId, options) {
|
|
1601
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).getAlias(aliasId, options);
|
|
1602
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1603
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1604
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1605
|
+
return response.json();
|
|
1606
|
+
}
|
|
1607
|
+
else {
|
|
1608
|
+
throw response;
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1611
|
+
};
|
|
1612
|
+
},
|
|
1613
|
+
/**
|
|
1614
|
+
* User alias info and suggestion. Used by the first extension screen when user opens the extension.
|
|
1615
|
+
* @summary Get alias options
|
|
1616
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1617
|
+
* @param {*} [options] Override http request option.
|
|
1618
|
+
* @throws {RequiredError}
|
|
1619
|
+
*/
|
|
1620
|
+
getAliasOptions(hostname, options) {
|
|
1621
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).getAliasOptions(hostname, options);
|
|
1622
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1623
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1624
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1625
|
+
return response.json();
|
|
1626
|
+
}
|
|
1627
|
+
else {
|
|
1628
|
+
throw response;
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
};
|
|
1632
|
+
},
|
|
1633
|
+
/**
|
|
1634
|
+
* Get user aliases. Please note `pinned`, `disabled`, `enabled` are exclusive, i.e. only one can be present. They can only be set to `true`.
|
|
1635
|
+
* @summary Get aliases
|
|
1636
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1637
|
+
* @param {boolean} [pinned] If set, only pinned aliases are returned.
|
|
1638
|
+
* @param {boolean} [disabled] If set, only disabled aliases are returned.
|
|
1639
|
+
* @param {boolean} [enabled] If set, only enabled aliases are returned.
|
|
1640
|
+
* @param {*} [options] Override http request option.
|
|
1641
|
+
* @throws {RequiredError}
|
|
1642
|
+
*/
|
|
1643
|
+
getAliases(pageId, pinned, disabled, enabled, options) {
|
|
1644
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).getAliases(pageId, pinned, disabled, enabled, options);
|
|
1645
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1646
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1647
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1648
|
+
return response.json();
|
|
1649
|
+
}
|
|
1650
|
+
else {
|
|
1651
|
+
throw response;
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
};
|
|
1655
|
+
},
|
|
1656
|
+
/**
|
|
1657
|
+
* Get contacts for specific alias by id.
|
|
1658
|
+
* @summary Get contacts
|
|
1659
|
+
* @param {number} aliasId ID of an alias
|
|
1660
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1661
|
+
* @param {*} [options] Override http request option.
|
|
1662
|
+
* @throws {RequiredError}
|
|
1663
|
+
*/
|
|
1664
|
+
getContacts(aliasId, pageId, options) {
|
|
1665
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).getContacts(aliasId, pageId, options);
|
|
1666
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1667
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1668
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1669
|
+
return response.json();
|
|
1670
|
+
}
|
|
1671
|
+
else {
|
|
1672
|
+
throw response;
|
|
1673
|
+
}
|
|
1674
|
+
});
|
|
1675
|
+
};
|
|
1676
|
+
},
|
|
1677
|
+
/**
|
|
1678
|
+
* Enable or disable specific alias by id.
|
|
1679
|
+
* @summary Toggle alias
|
|
1680
|
+
* @param {number} aliasId ID of an alias
|
|
1681
|
+
* @param {*} [options] Override http request option.
|
|
1682
|
+
* @throws {RequiredError}
|
|
1683
|
+
*/
|
|
1684
|
+
toggleAlias(aliasId, options) {
|
|
1685
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).toggleAlias(aliasId, options);
|
|
1686
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1687
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1688
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1689
|
+
return response.json();
|
|
1690
|
+
}
|
|
1691
|
+
else {
|
|
1692
|
+
throw response;
|
|
1693
|
+
}
|
|
1694
|
+
});
|
|
1695
|
+
};
|
|
1696
|
+
},
|
|
1697
|
+
/**
|
|
1698
|
+
* Update specific alias by id.
|
|
1699
|
+
* @summary Update alias
|
|
1700
|
+
* @param {AliasAliasIdPatch} body Updated settings for the given alias.
|
|
1701
|
+
* @param {number} aliasId ID of an alias
|
|
1702
|
+
* @param {*} [options] Override http request option.
|
|
1703
|
+
* @throws {RequiredError}
|
|
1704
|
+
*/
|
|
1705
|
+
updateAlias(body, aliasId, options) {
|
|
1706
|
+
const localVarFetchArgs = (0, exports.AliasApiFetchParamCreator)(configuration).updateAlias(body, aliasId, options);
|
|
1707
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
1708
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
1709
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1710
|
+
return response.json();
|
|
1711
|
+
}
|
|
1712
|
+
else {
|
|
1713
|
+
throw response;
|
|
1714
|
+
}
|
|
1715
|
+
});
|
|
1716
|
+
};
|
|
1717
|
+
},
|
|
1718
|
+
};
|
|
1796
1719
|
};
|
|
1797
1720
|
exports.AliasApiFp = AliasApiFp;
|
|
1798
1721
|
/**
|
|
@@ -1800,7 +1723,137 @@ exports.AliasApiFp = AliasApiFp;
|
|
|
1800
1723
|
* @export
|
|
1801
1724
|
*/
|
|
1802
1725
|
const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
1803
|
-
|
|
1726
|
+
return {
|
|
1727
|
+
/**
|
|
1728
|
+
* Create a new contact for an alias by id.
|
|
1729
|
+
* @summary Create contact
|
|
1730
|
+
* @param {AliasAliasIdContactsPost} body Updated settings for the given alias.
|
|
1731
|
+
* @param {number} aliasId ID of an alias
|
|
1732
|
+
* @param {*} [options] Override http request option.
|
|
1733
|
+
* @throws {RequiredError}
|
|
1734
|
+
*/
|
|
1735
|
+
createContact(body, aliasId, options) {
|
|
1736
|
+
return (0, exports.AliasApiFp)(configuration).createContact(body, aliasId, options)(fetch, basePath);
|
|
1737
|
+
},
|
|
1738
|
+
/**
|
|
1739
|
+
* Create a new custom alias
|
|
1740
|
+
* @summary Create custom alias
|
|
1741
|
+
* @param {AliasCustomNewPost} body
|
|
1742
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1743
|
+
* @param {*} [options] Override http request option.
|
|
1744
|
+
* @throws {RequiredError}
|
|
1745
|
+
*/
|
|
1746
|
+
createCustomAlias(body, hostname, options) {
|
|
1747
|
+
return (0, exports.AliasApiFp)(configuration).createCustomAlias(body, hostname, options)(fetch, basePath);
|
|
1748
|
+
},
|
|
1749
|
+
/**
|
|
1750
|
+
* Create a new random alias
|
|
1751
|
+
* @summary Create random alias
|
|
1752
|
+
* @param {AliasRandomNewPost} body
|
|
1753
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1754
|
+
* @param {string} [mode] Either `uuid` or `word`. By default, use the user setting when creating new random alias.
|
|
1755
|
+
* @param {*} [options] Override http request option.
|
|
1756
|
+
* @throws {RequiredError}
|
|
1757
|
+
*/
|
|
1758
|
+
createRandomAlias(body, hostname, mode, options) {
|
|
1759
|
+
return (0, exports.AliasApiFp)(configuration).createRandomAlias(body, hostname, mode, options)(fetch, basePath);
|
|
1760
|
+
},
|
|
1761
|
+
/**
|
|
1762
|
+
* Delete specific alias by id.
|
|
1763
|
+
* @summary Delete alias
|
|
1764
|
+
* @param {number} aliasId ID of an alias
|
|
1765
|
+
* @param {*} [options] Override http request option.
|
|
1766
|
+
* @throws {RequiredError}
|
|
1767
|
+
*/
|
|
1768
|
+
deleteAlias(aliasId, options) {
|
|
1769
|
+
return (0, exports.AliasApiFp)(configuration).deleteAlias(aliasId, options)(fetch, basePath);
|
|
1770
|
+
},
|
|
1771
|
+
/**
|
|
1772
|
+
* Get activities for specific alias by id.
|
|
1773
|
+
* @summary Get activities
|
|
1774
|
+
* @param {number} aliasId ID of an alias
|
|
1775
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1776
|
+
* @param {*} [options] Override http request option.
|
|
1777
|
+
* @throws {RequiredError}
|
|
1778
|
+
*/
|
|
1779
|
+
getActivities(aliasId, pageId, options) {
|
|
1780
|
+
return (0, exports.AliasApiFp)(configuration).getActivities(aliasId, pageId, options)(fetch, basePath);
|
|
1781
|
+
},
|
|
1782
|
+
/**
|
|
1783
|
+
* Get specific alias by id.
|
|
1784
|
+
* @summary Get alias
|
|
1785
|
+
* @param {number} aliasId ID of an alias
|
|
1786
|
+
* @param {*} [options] Override http request option.
|
|
1787
|
+
* @throws {RequiredError}
|
|
1788
|
+
*/
|
|
1789
|
+
getAlias(aliasId, options) {
|
|
1790
|
+
return (0, exports.AliasApiFp)(configuration).getAlias(aliasId, options)(fetch, basePath);
|
|
1791
|
+
},
|
|
1792
|
+
/**
|
|
1793
|
+
* User alias info and suggestion. Used by the first extension screen when user opens the extension.
|
|
1794
|
+
* @summary Get alias options
|
|
1795
|
+
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1796
|
+
* @param {*} [options] Override http request option.
|
|
1797
|
+
* @throws {RequiredError}
|
|
1798
|
+
*/
|
|
1799
|
+
getAliasOptions(hostname, options) {
|
|
1800
|
+
return (0, exports.AliasApiFp)(configuration).getAliasOptions(hostname, options)(fetch, basePath);
|
|
1801
|
+
},
|
|
1802
|
+
/**
|
|
1803
|
+
* Get user aliases. Please note `pinned`, `disabled`, `enabled` are exclusive, i.e. only one can be present. They can only be set to `true`.
|
|
1804
|
+
* @summary Get aliases
|
|
1805
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1806
|
+
* @param {boolean} [pinned] If set, only pinned aliases are returned.
|
|
1807
|
+
* @param {boolean} [disabled] If set, only disabled aliases are returned.
|
|
1808
|
+
* @param {boolean} [enabled] If set, only enabled aliases are returned.
|
|
1809
|
+
* @param {*} [options] Override http request option.
|
|
1810
|
+
* @throws {RequiredError}
|
|
1811
|
+
*/
|
|
1812
|
+
getAliases(pageId, pinned, disabled, enabled, options) {
|
|
1813
|
+
return (0, exports.AliasApiFp)(configuration).getAliases(pageId, pinned, disabled, enabled, options)(fetch, basePath);
|
|
1814
|
+
},
|
|
1815
|
+
/**
|
|
1816
|
+
* Get contacts for specific alias by id.
|
|
1817
|
+
* @summary Get contacts
|
|
1818
|
+
* @param {number} aliasId ID of an alias
|
|
1819
|
+
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1820
|
+
* @param {*} [options] Override http request option.
|
|
1821
|
+
* @throws {RequiredError}
|
|
1822
|
+
*/
|
|
1823
|
+
getContacts(aliasId, pageId, options) {
|
|
1824
|
+
return (0, exports.AliasApiFp)(configuration).getContacts(aliasId, pageId, options)(fetch, basePath);
|
|
1825
|
+
},
|
|
1826
|
+
/**
|
|
1827
|
+
* Enable or disable specific alias by id.
|
|
1828
|
+
* @summary Toggle alias
|
|
1829
|
+
* @param {number} aliasId ID of an alias
|
|
1830
|
+
* @param {*} [options] Override http request option.
|
|
1831
|
+
* @throws {RequiredError}
|
|
1832
|
+
*/
|
|
1833
|
+
toggleAlias(aliasId, options) {
|
|
1834
|
+
return (0, exports.AliasApiFp)(configuration).toggleAlias(aliasId, options)(fetch, basePath);
|
|
1835
|
+
},
|
|
1836
|
+
/**
|
|
1837
|
+
* Update specific alias by id.
|
|
1838
|
+
* @summary Update alias
|
|
1839
|
+
* @param {AliasAliasIdPatch} body Updated settings for the given alias.
|
|
1840
|
+
* @param {number} aliasId ID of an alias
|
|
1841
|
+
* @param {*} [options] Override http request option.
|
|
1842
|
+
* @throws {RequiredError}
|
|
1843
|
+
*/
|
|
1844
|
+
updateAlias(body, aliasId, options) {
|
|
1845
|
+
return (0, exports.AliasApiFp)(configuration).updateAlias(body, aliasId, options)(fetch, basePath);
|
|
1846
|
+
},
|
|
1847
|
+
};
|
|
1848
|
+
};
|
|
1849
|
+
exports.AliasApiFactory = AliasApiFactory;
|
|
1850
|
+
/**
|
|
1851
|
+
* AliasApi - object-oriented interface
|
|
1852
|
+
* @export
|
|
1853
|
+
* @class AliasApi
|
|
1854
|
+
* @extends {BaseAPI}
|
|
1855
|
+
*/
|
|
1856
|
+
class AliasApi extends BaseAPI {
|
|
1804
1857
|
/**
|
|
1805
1858
|
* Create a new contact for an alias by id.
|
|
1806
1859
|
* @summary Create contact
|
|
@@ -1808,10 +1861,11 @@ const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
|
1808
1861
|
* @param {number} aliasId ID of an alias
|
|
1809
1862
|
* @param {*} [options] Override http request option.
|
|
1810
1863
|
* @throws {RequiredError}
|
|
1864
|
+
* @memberof AliasApi
|
|
1811
1865
|
*/
|
|
1812
1866
|
createContact(body, aliasId, options) {
|
|
1813
|
-
|
|
1814
|
-
}
|
|
1867
|
+
return (0, exports.AliasApiFp)(this.configuration).createContact(body, aliasId, options)(this.fetch, this.basePath);
|
|
1868
|
+
}
|
|
1815
1869
|
/**
|
|
1816
1870
|
* Create a new custom alias
|
|
1817
1871
|
* @summary Create custom alias
|
|
@@ -1819,10 +1873,11 @@ const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
|
1819
1873
|
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1820
1874
|
* @param {*} [options] Override http request option.
|
|
1821
1875
|
* @throws {RequiredError}
|
|
1876
|
+
* @memberof AliasApi
|
|
1822
1877
|
*/
|
|
1823
1878
|
createCustomAlias(body, hostname, options) {
|
|
1824
|
-
|
|
1825
|
-
}
|
|
1879
|
+
return (0, exports.AliasApiFp)(this.configuration).createCustomAlias(body, hostname, options)(this.fetch, this.basePath);
|
|
1880
|
+
}
|
|
1826
1881
|
/**
|
|
1827
1882
|
* Create a new random alias
|
|
1828
1883
|
* @summary Create random alias
|
|
@@ -1831,20 +1886,22 @@ const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
|
1831
1886
|
* @param {string} [mode] Either `uuid` or `word`. By default, use the user setting when creating new random alias.
|
|
1832
1887
|
* @param {*} [options] Override http request option.
|
|
1833
1888
|
* @throws {RequiredError}
|
|
1889
|
+
* @memberof AliasApi
|
|
1834
1890
|
*/
|
|
1835
1891
|
createRandomAlias(body, hostname, mode, options) {
|
|
1836
|
-
|
|
1837
|
-
}
|
|
1892
|
+
return (0, exports.AliasApiFp)(this.configuration).createRandomAlias(body, hostname, mode, options)(this.fetch, this.basePath);
|
|
1893
|
+
}
|
|
1838
1894
|
/**
|
|
1839
1895
|
* Delete specific alias by id.
|
|
1840
1896
|
* @summary Delete alias
|
|
1841
1897
|
* @param {number} aliasId ID of an alias
|
|
1842
1898
|
* @param {*} [options] Override http request option.
|
|
1843
1899
|
* @throws {RequiredError}
|
|
1900
|
+
* @memberof AliasApi
|
|
1844
1901
|
*/
|
|
1845
1902
|
deleteAlias(aliasId, options) {
|
|
1846
|
-
|
|
1847
|
-
}
|
|
1903
|
+
return (0, exports.AliasApiFp)(this.configuration).deleteAlias(aliasId, options)(this.fetch, this.basePath);
|
|
1904
|
+
}
|
|
1848
1905
|
/**
|
|
1849
1906
|
* Get activities for specific alias by id.
|
|
1850
1907
|
* @summary Get activities
|
|
@@ -1852,30 +1909,33 @@ const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
|
1852
1909
|
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1853
1910
|
* @param {*} [options] Override http request option.
|
|
1854
1911
|
* @throws {RequiredError}
|
|
1912
|
+
* @memberof AliasApi
|
|
1855
1913
|
*/
|
|
1856
1914
|
getActivities(aliasId, pageId, options) {
|
|
1857
|
-
|
|
1858
|
-
}
|
|
1915
|
+
return (0, exports.AliasApiFp)(this.configuration).getActivities(aliasId, pageId, options)(this.fetch, this.basePath);
|
|
1916
|
+
}
|
|
1859
1917
|
/**
|
|
1860
1918
|
* Get specific alias by id.
|
|
1861
1919
|
* @summary Get alias
|
|
1862
1920
|
* @param {number} aliasId ID of an alias
|
|
1863
1921
|
* @param {*} [options] Override http request option.
|
|
1864
1922
|
* @throws {RequiredError}
|
|
1923
|
+
* @memberof AliasApi
|
|
1865
1924
|
*/
|
|
1866
1925
|
getAlias(aliasId, options) {
|
|
1867
|
-
|
|
1868
|
-
}
|
|
1926
|
+
return (0, exports.AliasApiFp)(this.configuration).getAlias(aliasId, options)(this.fetch, this.basePath);
|
|
1927
|
+
}
|
|
1869
1928
|
/**
|
|
1870
1929
|
* User alias info and suggestion. Used by the first extension screen when user opens the extension.
|
|
1871
1930
|
* @summary Get alias options
|
|
1872
1931
|
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1873
1932
|
* @param {*} [options] Override http request option.
|
|
1874
1933
|
* @throws {RequiredError}
|
|
1934
|
+
* @memberof AliasApi
|
|
1875
1935
|
*/
|
|
1876
1936
|
getAliasOptions(hostname, options) {
|
|
1877
|
-
|
|
1878
|
-
}
|
|
1937
|
+
return (0, exports.AliasApiFp)(this.configuration).getAliasOptions(hostname, options)(this.fetch, this.basePath);
|
|
1938
|
+
}
|
|
1879
1939
|
/**
|
|
1880
1940
|
* Get user aliases. Please note `pinned`, `disabled`, `enabled` are exclusive, i.e. only one can be present. They can only be set to `true`.
|
|
1881
1941
|
* @summary Get aliases
|
|
@@ -1885,16 +1945,11 @@ const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
|
1885
1945
|
* @param {boolean} [enabled] If set, only enabled aliases are returned.
|
|
1886
1946
|
* @param {*} [options] Override http request option.
|
|
1887
1947
|
* @throws {RequiredError}
|
|
1948
|
+
* @memberof AliasApi
|
|
1888
1949
|
*/
|
|
1889
1950
|
getAliases(pageId, pinned, disabled, enabled, options) {
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
pinned,
|
|
1893
|
-
disabled,
|
|
1894
|
-
enabled,
|
|
1895
|
-
options,
|
|
1896
|
-
)(fetch, basePath);
|
|
1897
|
-
},
|
|
1951
|
+
return (0, exports.AliasApiFp)(this.configuration).getAliases(pageId, pinned, disabled, enabled, options)(this.fetch, this.basePath);
|
|
1952
|
+
}
|
|
1898
1953
|
/**
|
|
1899
1954
|
* Get contacts for specific alias by id.
|
|
1900
1955
|
* @summary Get contacts
|
|
@@ -1902,20 +1957,22 @@ const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
|
1902
1957
|
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
1903
1958
|
* @param {*} [options] Override http request option.
|
|
1904
1959
|
* @throws {RequiredError}
|
|
1960
|
+
* @memberof AliasApi
|
|
1905
1961
|
*/
|
|
1906
1962
|
getContacts(aliasId, pageId, options) {
|
|
1907
|
-
|
|
1908
|
-
}
|
|
1963
|
+
return (0, exports.AliasApiFp)(this.configuration).getContacts(aliasId, pageId, options)(this.fetch, this.basePath);
|
|
1964
|
+
}
|
|
1909
1965
|
/**
|
|
1910
1966
|
* Enable or disable specific alias by id.
|
|
1911
1967
|
* @summary Toggle alias
|
|
1912
1968
|
* @param {number} aliasId ID of an alias
|
|
1913
1969
|
* @param {*} [options] Override http request option.
|
|
1914
1970
|
* @throws {RequiredError}
|
|
1971
|
+
* @memberof AliasApi
|
|
1915
1972
|
*/
|
|
1916
1973
|
toggleAlias(aliasId, options) {
|
|
1917
|
-
|
|
1918
|
-
}
|
|
1974
|
+
return (0, exports.AliasApiFp)(this.configuration).toggleAlias(aliasId, options)(this.fetch, this.basePath);
|
|
1975
|
+
}
|
|
1919
1976
|
/**
|
|
1920
1977
|
* Update specific alias by id.
|
|
1921
1978
|
* @summary Update alias
|
|
@@ -1923,170 +1980,11 @@ const AliasApiFactory = function (configuration, fetch, basePath) {
|
|
|
1923
1980
|
* @param {number} aliasId ID of an alias
|
|
1924
1981
|
* @param {*} [options] Override http request option.
|
|
1925
1982
|
* @throws {RequiredError}
|
|
1983
|
+
* @memberof AliasApi
|
|
1926
1984
|
*/
|
|
1927
1985
|
updateAlias(body, aliasId, options) {
|
|
1928
|
-
|
|
1929
|
-
}
|
|
1930
|
-
};
|
|
1931
|
-
};
|
|
1932
|
-
exports.AliasApiFactory = AliasApiFactory;
|
|
1933
|
-
/**
|
|
1934
|
-
* AliasApi - object-oriented interface
|
|
1935
|
-
* @export
|
|
1936
|
-
* @class AliasApi
|
|
1937
|
-
* @extends {BaseAPI}
|
|
1938
|
-
*/
|
|
1939
|
-
class AliasApi extends BaseAPI {
|
|
1940
|
-
/**
|
|
1941
|
-
* Create a new contact for an alias by id.
|
|
1942
|
-
* @summary Create contact
|
|
1943
|
-
* @param {AliasAliasIdContactsPost} body Updated settings for the given alias.
|
|
1944
|
-
* @param {number} aliasId ID of an alias
|
|
1945
|
-
* @param {*} [options] Override http request option.
|
|
1946
|
-
* @throws {RequiredError}
|
|
1947
|
-
* @memberof AliasApi
|
|
1948
|
-
*/
|
|
1949
|
-
createContact(body, aliasId, options) {
|
|
1950
|
-
return (0, exports.AliasApiFp)(this.configuration).createContact(body, aliasId, options)(this.fetch, this.basePath);
|
|
1951
|
-
}
|
|
1952
|
-
/**
|
|
1953
|
-
* Create a new custom alias
|
|
1954
|
-
* @summary Create custom alias
|
|
1955
|
-
* @param {AliasCustomNewPost} body
|
|
1956
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1957
|
-
* @param {*} [options] Override http request option.
|
|
1958
|
-
* @throws {RequiredError}
|
|
1959
|
-
* @memberof AliasApi
|
|
1960
|
-
*/
|
|
1961
|
-
createCustomAlias(body, hostname, options) {
|
|
1962
|
-
return (0, exports.AliasApiFp)(this.configuration).createCustomAlias(
|
|
1963
|
-
body,
|
|
1964
|
-
hostname,
|
|
1965
|
-
options,
|
|
1966
|
-
)(this.fetch, this.basePath);
|
|
1967
|
-
}
|
|
1968
|
-
/**
|
|
1969
|
-
* Create a new random alias
|
|
1970
|
-
* @summary Create random alias
|
|
1971
|
-
* @param {AliasRandomNewPost} body
|
|
1972
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
1973
|
-
* @param {string} [mode] Either `uuid` or `word`. By default, use the user setting when creating new random alias.
|
|
1974
|
-
* @param {*} [options] Override http request option.
|
|
1975
|
-
* @throws {RequiredError}
|
|
1976
|
-
* @memberof AliasApi
|
|
1977
|
-
*/
|
|
1978
|
-
createRandomAlias(body, hostname, mode, options) {
|
|
1979
|
-
return (0, exports.AliasApiFp)(this.configuration).createRandomAlias(
|
|
1980
|
-
body,
|
|
1981
|
-
hostname,
|
|
1982
|
-
mode,
|
|
1983
|
-
options,
|
|
1984
|
-
)(this.fetch, this.basePath);
|
|
1985
|
-
}
|
|
1986
|
-
/**
|
|
1987
|
-
* Delete specific alias by id.
|
|
1988
|
-
* @summary Delete alias
|
|
1989
|
-
* @param {number} aliasId ID of an alias
|
|
1990
|
-
* @param {*} [options] Override http request option.
|
|
1991
|
-
* @throws {RequiredError}
|
|
1992
|
-
* @memberof AliasApi
|
|
1993
|
-
*/
|
|
1994
|
-
deleteAlias(aliasId, options) {
|
|
1995
|
-
return (0, exports.AliasApiFp)(this.configuration).deleteAlias(aliasId, options)(this.fetch, this.basePath);
|
|
1996
|
-
}
|
|
1997
|
-
/**
|
|
1998
|
-
* Get activities for specific alias by id.
|
|
1999
|
-
* @summary Get activities
|
|
2000
|
-
* @param {number} aliasId ID of an alias
|
|
2001
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
2002
|
-
* @param {*} [options] Override http request option.
|
|
2003
|
-
* @throws {RequiredError}
|
|
2004
|
-
* @memberof AliasApi
|
|
2005
|
-
*/
|
|
2006
|
-
getActivities(aliasId, pageId, options) {
|
|
2007
|
-
return (0, exports.AliasApiFp)(this.configuration).getActivities(
|
|
2008
|
-
aliasId,
|
|
2009
|
-
pageId,
|
|
2010
|
-
options,
|
|
2011
|
-
)(this.fetch, this.basePath);
|
|
2012
|
-
}
|
|
2013
|
-
/**
|
|
2014
|
-
* Get specific alias by id.
|
|
2015
|
-
* @summary Get alias
|
|
2016
|
-
* @param {number} aliasId ID of an alias
|
|
2017
|
-
* @param {*} [options] Override http request option.
|
|
2018
|
-
* @throws {RequiredError}
|
|
2019
|
-
* @memberof AliasApi
|
|
2020
|
-
*/
|
|
2021
|
-
getAlias(aliasId, options) {
|
|
2022
|
-
return (0, exports.AliasApiFp)(this.configuration).getAlias(aliasId, options)(this.fetch, this.basePath);
|
|
2023
|
-
}
|
|
2024
|
-
/**
|
|
2025
|
-
* User alias info and suggestion. Used by the first extension screen when user opens the extension.
|
|
2026
|
-
* @summary Get alias options
|
|
2027
|
-
* @param {string} [hostname] This information is important to know where an alias is used in order to suggest user the same alias if they want to create on alias on the same website in the future.
|
|
2028
|
-
* @param {*} [options] Override http request option.
|
|
2029
|
-
* @throws {RequiredError}
|
|
2030
|
-
* @memberof AliasApi
|
|
2031
|
-
*/
|
|
2032
|
-
getAliasOptions(hostname, options) {
|
|
2033
|
-
return (0, exports.AliasApiFp)(this.configuration).getAliasOptions(hostname, options)(this.fetch, this.basePath);
|
|
2034
|
-
}
|
|
2035
|
-
/**
|
|
2036
|
-
* Get user aliases. Please note `pinned`, `disabled`, `enabled` are exclusive, i.e. only one can be present. They can only be set to `true`.
|
|
2037
|
-
* @summary Get aliases
|
|
2038
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
2039
|
-
* @param {boolean} [pinned] If set, only pinned aliases are returned.
|
|
2040
|
-
* @param {boolean} [disabled] If set, only disabled aliases are returned.
|
|
2041
|
-
* @param {boolean} [enabled] If set, only enabled aliases are returned.
|
|
2042
|
-
* @param {*} [options] Override http request option.
|
|
2043
|
-
* @throws {RequiredError}
|
|
2044
|
-
* @memberof AliasApi
|
|
2045
|
-
*/
|
|
2046
|
-
getAliases(pageId, pinned, disabled, enabled, options) {
|
|
2047
|
-
return (0, exports.AliasApiFp)(this.configuration).getAliases(
|
|
2048
|
-
pageId,
|
|
2049
|
-
pinned,
|
|
2050
|
-
disabled,
|
|
2051
|
-
enabled,
|
|
2052
|
-
options,
|
|
2053
|
-
)(this.fetch, this.basePath);
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* Get contacts for specific alias by id.
|
|
2057
|
-
* @summary Get contacts
|
|
2058
|
-
* @param {number} aliasId ID of an alias
|
|
2059
|
-
* @param {number} pageId The endpoint returns maximum 20 aliases for each page.
|
|
2060
|
-
* @param {*} [options] Override http request option.
|
|
2061
|
-
* @throws {RequiredError}
|
|
2062
|
-
* @memberof AliasApi
|
|
2063
|
-
*/
|
|
2064
|
-
getContacts(aliasId, pageId, options) {
|
|
2065
|
-
return (0, exports.AliasApiFp)(this.configuration).getContacts(aliasId, pageId, options)(this.fetch, this.basePath);
|
|
2066
|
-
}
|
|
2067
|
-
/**
|
|
2068
|
-
* Enable or disable specific alias by id.
|
|
2069
|
-
* @summary Toggle alias
|
|
2070
|
-
* @param {number} aliasId ID of an alias
|
|
2071
|
-
* @param {*} [options] Override http request option.
|
|
2072
|
-
* @throws {RequiredError}
|
|
2073
|
-
* @memberof AliasApi
|
|
2074
|
-
*/
|
|
2075
|
-
toggleAlias(aliasId, options) {
|
|
2076
|
-
return (0, exports.AliasApiFp)(this.configuration).toggleAlias(aliasId, options)(this.fetch, this.basePath);
|
|
2077
|
-
}
|
|
2078
|
-
/**
|
|
2079
|
-
* Update specific alias by id.
|
|
2080
|
-
* @summary Update alias
|
|
2081
|
-
* @param {AliasAliasIdPatch} body Updated settings for the given alias.
|
|
2082
|
-
* @param {number} aliasId ID of an alias
|
|
2083
|
-
* @param {*} [options] Override http request option.
|
|
2084
|
-
* @throws {RequiredError}
|
|
2085
|
-
* @memberof AliasApi
|
|
2086
|
-
*/
|
|
2087
|
-
updateAlias(body, aliasId, options) {
|
|
2088
|
-
return (0, exports.AliasApiFp)(this.configuration).updateAlias(body, aliasId, options)(this.fetch, this.basePath);
|
|
2089
|
-
}
|
|
1986
|
+
return (0, exports.AliasApiFp)(this.configuration).updateAlias(body, aliasId, options)(this.fetch, this.basePath);
|
|
1987
|
+
}
|
|
2090
1988
|
}
|
|
2091
1989
|
exports.AliasApi = AliasApi;
|
|
2092
1990
|
/**
|
|
@@ -2094,43 +1992,42 @@ exports.AliasApi = AliasApi;
|
|
|
2094
1992
|
* @export
|
|
2095
1993
|
*/
|
|
2096
1994
|
const CustomDomainApiFetchParamCreator = function (configuration) {
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
}
|
|
2133
|
-
};
|
|
1995
|
+
return {
|
|
1996
|
+
/**
|
|
1997
|
+
* Get users custom domains.
|
|
1998
|
+
* @summary Get custom domains
|
|
1999
|
+
* @param {number} aliasId ID of an alias
|
|
2000
|
+
* @param {*} [options] Override http request option.
|
|
2001
|
+
* @throws {RequiredError}
|
|
2002
|
+
*/
|
|
2003
|
+
getCustomDomains(aliasId, options = {}) {
|
|
2004
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
2005
|
+
if (aliasId === null || aliasId === undefined) {
|
|
2006
|
+
throw new RequiredError('aliasId', 'Required parameter aliasId was null or undefined when calling getCustomDomains.');
|
|
2007
|
+
}
|
|
2008
|
+
const localVarPath = `/custom_domains`
|
|
2009
|
+
.replace(`{${"alias_id"}}`, encodeURIComponent(String(aliasId)));
|
|
2010
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
2011
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2012
|
+
const localVarHeaderParameter = {};
|
|
2013
|
+
const localVarQueryParameter = {};
|
|
2014
|
+
// authentication apiKeyAuth required
|
|
2015
|
+
if (configuration && configuration.apiKey) {
|
|
2016
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
2017
|
+
? configuration.apiKey("Authentication")
|
|
2018
|
+
: configuration.apiKey;
|
|
2019
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
2020
|
+
}
|
|
2021
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
2022
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
2023
|
+
delete localVarUrlObj.search;
|
|
2024
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2025
|
+
return {
|
|
2026
|
+
url: url.format(localVarUrlObj),
|
|
2027
|
+
options: localVarRequestOptions,
|
|
2028
|
+
};
|
|
2029
|
+
},
|
|
2030
|
+
};
|
|
2134
2031
|
};
|
|
2135
2032
|
exports.CustomDomainApiFetchParamCreator = CustomDomainApiFetchParamCreator;
|
|
2136
2033
|
/**
|
|
@@ -2138,30 +2035,28 @@ exports.CustomDomainApiFetchParamCreator = CustomDomainApiFetchParamCreator;
|
|
|
2138
2035
|
* @export
|
|
2139
2036
|
*/
|
|
2140
2037
|
const CustomDomainApiFp = function (configuration) {
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
},
|
|
2164
|
-
};
|
|
2038
|
+
return {
|
|
2039
|
+
/**
|
|
2040
|
+
* Get users custom domains.
|
|
2041
|
+
* @summary Get custom domains
|
|
2042
|
+
* @param {number} aliasId ID of an alias
|
|
2043
|
+
* @param {*} [options] Override http request option.
|
|
2044
|
+
* @throws {RequiredError}
|
|
2045
|
+
*/
|
|
2046
|
+
getCustomDomains(aliasId, options) {
|
|
2047
|
+
const localVarFetchArgs = (0, exports.CustomDomainApiFetchParamCreator)(configuration).getCustomDomains(aliasId, options);
|
|
2048
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
2049
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
2050
|
+
if (response.status >= 200 && response.status < 300) {
|
|
2051
|
+
return response.json();
|
|
2052
|
+
}
|
|
2053
|
+
else {
|
|
2054
|
+
throw response;
|
|
2055
|
+
}
|
|
2056
|
+
});
|
|
2057
|
+
};
|
|
2058
|
+
},
|
|
2059
|
+
};
|
|
2165
2060
|
};
|
|
2166
2061
|
exports.CustomDomainApiFp = CustomDomainApiFp;
|
|
2167
2062
|
/**
|
|
@@ -2169,18 +2064,18 @@ exports.CustomDomainApiFp = CustomDomainApiFp;
|
|
|
2169
2064
|
* @export
|
|
2170
2065
|
*/
|
|
2171
2066
|
const CustomDomainApiFactory = function (configuration, fetch, basePath) {
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2067
|
+
return {
|
|
2068
|
+
/**
|
|
2069
|
+
* Get users custom domains.
|
|
2070
|
+
* @summary Get custom domains
|
|
2071
|
+
* @param {number} aliasId ID of an alias
|
|
2072
|
+
* @param {*} [options] Override http request option.
|
|
2073
|
+
* @throws {RequiredError}
|
|
2074
|
+
*/
|
|
2075
|
+
getCustomDomains(aliasId, options) {
|
|
2076
|
+
return (0, exports.CustomDomainApiFp)(configuration).getCustomDomains(aliasId, options)(fetch, basePath);
|
|
2077
|
+
},
|
|
2078
|
+
};
|
|
2184
2079
|
};
|
|
2185
2080
|
exports.CustomDomainApiFactory = CustomDomainApiFactory;
|
|
2186
2081
|
/**
|
|
@@ -2190,20 +2085,17 @@ exports.CustomDomainApiFactory = CustomDomainApiFactory;
|
|
|
2190
2085
|
* @extends {BaseAPI}
|
|
2191
2086
|
*/
|
|
2192
2087
|
class CustomDomainApi extends BaseAPI {
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
this.basePath,
|
|
2205
|
-
);
|
|
2206
|
-
}
|
|
2088
|
+
/**
|
|
2089
|
+
* Get users custom domains.
|
|
2090
|
+
* @summary Get custom domains
|
|
2091
|
+
* @param {number} aliasId ID of an alias
|
|
2092
|
+
* @param {*} [options] Override http request option.
|
|
2093
|
+
* @throws {RequiredError}
|
|
2094
|
+
* @memberof CustomDomainApi
|
|
2095
|
+
*/
|
|
2096
|
+
getCustomDomains(aliasId, options) {
|
|
2097
|
+
return (0, exports.CustomDomainApiFp)(this.configuration).getCustomDomains(aliasId, options)(this.fetch, this.basePath);
|
|
2098
|
+
}
|
|
2207
2099
|
}
|
|
2208
2100
|
exports.CustomDomainApi = CustomDomainApi;
|
|
2209
2101
|
/**
|
|
@@ -2211,156 +2103,148 @@ exports.CustomDomainApi = CustomDomainApi;
|
|
|
2211
2103
|
* @export
|
|
2212
2104
|
*/
|
|
2213
2105
|
const MailboxApiFetchParamCreator = function (configuration) {
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
'MailboxMailboxIdPut' !== 'string' || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
2357
|
-
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
|
|
2358
|
-
return {
|
|
2359
|
-
url: url.format(localVarUrlObj),
|
|
2360
|
-
options: localVarRequestOptions,
|
|
2361
|
-
};
|
|
2362
|
-
},
|
|
2363
|
-
};
|
|
2106
|
+
return {
|
|
2107
|
+
/**
|
|
2108
|
+
* Create a new mailbox
|
|
2109
|
+
* @summary Create mailbox
|
|
2110
|
+
* @param {MailboxPost} body The new mailbox address
|
|
2111
|
+
* @param {*} [options] Override http request option.
|
|
2112
|
+
* @throws {RequiredError}
|
|
2113
|
+
*/
|
|
2114
|
+
createMailbox(body, options = {}) {
|
|
2115
|
+
// verify required parameter 'body' is not null or undefined
|
|
2116
|
+
if (body === null || body === undefined) {
|
|
2117
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createMailbox.');
|
|
2118
|
+
}
|
|
2119
|
+
const localVarPath = `/mailboxes`;
|
|
2120
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
2121
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
2122
|
+
const localVarHeaderParameter = {};
|
|
2123
|
+
const localVarQueryParameter = {};
|
|
2124
|
+
// authentication apiKeyAuth required
|
|
2125
|
+
if (configuration && configuration.apiKey) {
|
|
2126
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
2127
|
+
? configuration.apiKey("Authentication")
|
|
2128
|
+
: configuration.apiKey;
|
|
2129
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
2130
|
+
}
|
|
2131
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2132
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
2133
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
2134
|
+
delete localVarUrlObj.search;
|
|
2135
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2136
|
+
const needsSerialization = ("MailboxPost" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
2137
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
2138
|
+
return {
|
|
2139
|
+
url: url.format(localVarUrlObj),
|
|
2140
|
+
options: localVarRequestOptions,
|
|
2141
|
+
};
|
|
2142
|
+
},
|
|
2143
|
+
/**
|
|
2144
|
+
* Delete specific mailbox by id.
|
|
2145
|
+
* @summary Delete mailbox
|
|
2146
|
+
* @param {number} mailboxId ID of a mailbox
|
|
2147
|
+
* @param {*} [options] Override http request option.
|
|
2148
|
+
* @throws {RequiredError}
|
|
2149
|
+
*/
|
|
2150
|
+
deleteMailbox(mailboxId, options = {}) {
|
|
2151
|
+
// verify required parameter 'mailboxId' is not null or undefined
|
|
2152
|
+
if (mailboxId === null || mailboxId === undefined) {
|
|
2153
|
+
throw new RequiredError('mailboxId', 'Required parameter mailboxId was null or undefined when calling deleteMailbox.');
|
|
2154
|
+
}
|
|
2155
|
+
const localVarPath = `/mailboxes/{mailbox_id}`
|
|
2156
|
+
.replace(`{${"mailbox_id"}}`, encodeURIComponent(String(mailboxId)));
|
|
2157
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
2158
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
|
2159
|
+
const localVarHeaderParameter = {};
|
|
2160
|
+
const localVarQueryParameter = {};
|
|
2161
|
+
// authentication apiKeyAuth required
|
|
2162
|
+
if (configuration && configuration.apiKey) {
|
|
2163
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
2164
|
+
? configuration.apiKey("Authentication")
|
|
2165
|
+
: configuration.apiKey;
|
|
2166
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
2167
|
+
}
|
|
2168
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
2169
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
2170
|
+
delete localVarUrlObj.search;
|
|
2171
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2172
|
+
return {
|
|
2173
|
+
url: url.format(localVarUrlObj),
|
|
2174
|
+
options: localVarRequestOptions,
|
|
2175
|
+
};
|
|
2176
|
+
},
|
|
2177
|
+
/**
|
|
2178
|
+
* Get user mailboxes.
|
|
2179
|
+
* @summary Get mailboxes
|
|
2180
|
+
* @param {*} [options] Override http request option.
|
|
2181
|
+
* @throws {RequiredError}
|
|
2182
|
+
*/
|
|
2183
|
+
getMailboxes(options = {}) {
|
|
2184
|
+
const localVarPath = `/v2/mailboxes`;
|
|
2185
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
2186
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
2187
|
+
const localVarHeaderParameter = {};
|
|
2188
|
+
const localVarQueryParameter = {};
|
|
2189
|
+
// authentication apiKeyAuth required
|
|
2190
|
+
if (configuration && configuration.apiKey) {
|
|
2191
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
2192
|
+
? configuration.apiKey("Authentication")
|
|
2193
|
+
: configuration.apiKey;
|
|
2194
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
2195
|
+
}
|
|
2196
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
2197
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
2198
|
+
delete localVarUrlObj.search;
|
|
2199
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2200
|
+
return {
|
|
2201
|
+
url: url.format(localVarUrlObj),
|
|
2202
|
+
options: localVarRequestOptions,
|
|
2203
|
+
};
|
|
2204
|
+
},
|
|
2205
|
+
/**
|
|
2206
|
+
* Update specific mailbox by id.
|
|
2207
|
+
* @summary Update mailbox
|
|
2208
|
+
* @param {MailboxMailboxIdPut} body Updated settings of mailbox
|
|
2209
|
+
* @param {number} mailboxId ID of a mailbox
|
|
2210
|
+
* @param {*} [options] Override http request option.
|
|
2211
|
+
* @throws {RequiredError}
|
|
2212
|
+
*/
|
|
2213
|
+
updateMailbox(body, mailboxId, options = {}) {
|
|
2214
|
+
// verify required parameter 'body' is not null or undefined
|
|
2215
|
+
if (body === null || body === undefined) {
|
|
2216
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateMailbox.');
|
|
2217
|
+
}
|
|
2218
|
+
// verify required parameter 'mailboxId' is not null or undefined
|
|
2219
|
+
if (mailboxId === null || mailboxId === undefined) {
|
|
2220
|
+
throw new RequiredError('mailboxId', 'Required parameter mailboxId was null or undefined when calling updateMailbox.');
|
|
2221
|
+
}
|
|
2222
|
+
const localVarPath = `/mailboxes/{mailbox_id}`
|
|
2223
|
+
.replace(`{${"mailbox_id"}}`, encodeURIComponent(String(mailboxId)));
|
|
2224
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
2225
|
+
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
|
|
2226
|
+
const localVarHeaderParameter = {};
|
|
2227
|
+
const localVarQueryParameter = {};
|
|
2228
|
+
// authentication apiKeyAuth required
|
|
2229
|
+
if (configuration && configuration.apiKey) {
|
|
2230
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
2231
|
+
? configuration.apiKey("Authentication")
|
|
2232
|
+
: configuration.apiKey;
|
|
2233
|
+
localVarHeaderParameter["Authentication"] = localVarApiKeyValue;
|
|
2234
|
+
}
|
|
2235
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2236
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
2237
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
2238
|
+
delete localVarUrlObj.search;
|
|
2239
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2240
|
+
const needsSerialization = ("MailboxMailboxIdPut" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
2241
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
|
|
2242
|
+
return {
|
|
2243
|
+
url: url.format(localVarUrlObj),
|
|
2244
|
+
options: localVarRequestOptions,
|
|
2245
|
+
};
|
|
2246
|
+
},
|
|
2247
|
+
};
|
|
2364
2248
|
};
|
|
2365
2249
|
exports.MailboxApiFetchParamCreator = MailboxApiFetchParamCreator;
|
|
2366
2250
|
/**
|
|
@@ -2368,91 +2252,88 @@ exports.MailboxApiFetchParamCreator = MailboxApiFetchParamCreator;
|
|
|
2368
2252
|
* @export
|
|
2369
2253
|
*/
|
|
2370
2254
|
const MailboxApiFp = function (configuration) {
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
};
|
|
2454
|
-
},
|
|
2455
|
-
};
|
|
2255
|
+
return {
|
|
2256
|
+
/**
|
|
2257
|
+
* Create a new mailbox
|
|
2258
|
+
* @summary Create mailbox
|
|
2259
|
+
* @param {MailboxPost} body The new mailbox address
|
|
2260
|
+
* @param {*} [options] Override http request option.
|
|
2261
|
+
* @throws {RequiredError}
|
|
2262
|
+
*/
|
|
2263
|
+
createMailbox(body, options) {
|
|
2264
|
+
const localVarFetchArgs = (0, exports.MailboxApiFetchParamCreator)(configuration).createMailbox(body, options);
|
|
2265
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
2266
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
2267
|
+
if (response.status >= 200 && response.status < 300) {
|
|
2268
|
+
return response.json();
|
|
2269
|
+
}
|
|
2270
|
+
else {
|
|
2271
|
+
throw response;
|
|
2272
|
+
}
|
|
2273
|
+
});
|
|
2274
|
+
};
|
|
2275
|
+
},
|
|
2276
|
+
/**
|
|
2277
|
+
* Delete specific mailbox by id.
|
|
2278
|
+
* @summary Delete mailbox
|
|
2279
|
+
* @param {number} mailboxId ID of a mailbox
|
|
2280
|
+
* @param {*} [options] Override http request option.
|
|
2281
|
+
* @throws {RequiredError}
|
|
2282
|
+
*/
|
|
2283
|
+
deleteMailbox(mailboxId, options) {
|
|
2284
|
+
const localVarFetchArgs = (0, exports.MailboxApiFetchParamCreator)(configuration).deleteMailbox(mailboxId, options);
|
|
2285
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
2286
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
2287
|
+
if (response.status >= 200 && response.status < 300) {
|
|
2288
|
+
return response;
|
|
2289
|
+
}
|
|
2290
|
+
else {
|
|
2291
|
+
throw response;
|
|
2292
|
+
}
|
|
2293
|
+
});
|
|
2294
|
+
};
|
|
2295
|
+
},
|
|
2296
|
+
/**
|
|
2297
|
+
* Get user mailboxes.
|
|
2298
|
+
* @summary Get mailboxes
|
|
2299
|
+
* @param {*} [options] Override http request option.
|
|
2300
|
+
* @throws {RequiredError}
|
|
2301
|
+
*/
|
|
2302
|
+
getMailboxes(options) {
|
|
2303
|
+
const localVarFetchArgs = (0, exports.MailboxApiFetchParamCreator)(configuration).getMailboxes(options);
|
|
2304
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
2305
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
2306
|
+
if (response.status >= 200 && response.status < 300) {
|
|
2307
|
+
return response.json();
|
|
2308
|
+
}
|
|
2309
|
+
else {
|
|
2310
|
+
throw response;
|
|
2311
|
+
}
|
|
2312
|
+
});
|
|
2313
|
+
};
|
|
2314
|
+
},
|
|
2315
|
+
/**
|
|
2316
|
+
* Update specific mailbox by id.
|
|
2317
|
+
* @summary Update mailbox
|
|
2318
|
+
* @param {MailboxMailboxIdPut} body Updated settings of mailbox
|
|
2319
|
+
* @param {number} mailboxId ID of a mailbox
|
|
2320
|
+
* @param {*} [options] Override http request option.
|
|
2321
|
+
* @throws {RequiredError}
|
|
2322
|
+
*/
|
|
2323
|
+
updateMailbox(body, mailboxId, options) {
|
|
2324
|
+
const localVarFetchArgs = (0, exports.MailboxApiFetchParamCreator)(configuration).updateMailbox(body, mailboxId, options);
|
|
2325
|
+
return (fetch = defaultFetchApi, basePath = exports.BASE_PATH) => {
|
|
2326
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
2327
|
+
if (response.status >= 200 && response.status < 300) {
|
|
2328
|
+
return response;
|
|
2329
|
+
}
|
|
2330
|
+
else {
|
|
2331
|
+
throw response;
|
|
2332
|
+
}
|
|
2333
|
+
});
|
|
2334
|
+
};
|
|
2335
|
+
},
|
|
2336
|
+
};
|
|
2456
2337
|
};
|
|
2457
2338
|
exports.MailboxApiFp = MailboxApiFp;
|
|
2458
2339
|
/**
|
|
@@ -2460,36 +2341,89 @@ exports.MailboxApiFp = MailboxApiFp;
|
|
|
2460
2341
|
* @export
|
|
2461
2342
|
*/
|
|
2462
2343
|
const MailboxApiFactory = function (configuration, fetch, basePath) {
|
|
2463
|
-
|
|
2344
|
+
return {
|
|
2345
|
+
/**
|
|
2346
|
+
* Create a new mailbox
|
|
2347
|
+
* @summary Create mailbox
|
|
2348
|
+
* @param {MailboxPost} body The new mailbox address
|
|
2349
|
+
* @param {*} [options] Override http request option.
|
|
2350
|
+
* @throws {RequiredError}
|
|
2351
|
+
*/
|
|
2352
|
+
createMailbox(body, options) {
|
|
2353
|
+
return (0, exports.MailboxApiFp)(configuration).createMailbox(body, options)(fetch, basePath);
|
|
2354
|
+
},
|
|
2355
|
+
/**
|
|
2356
|
+
* Delete specific mailbox by id.
|
|
2357
|
+
* @summary Delete mailbox
|
|
2358
|
+
* @param {number} mailboxId ID of a mailbox
|
|
2359
|
+
* @param {*} [options] Override http request option.
|
|
2360
|
+
* @throws {RequiredError}
|
|
2361
|
+
*/
|
|
2362
|
+
deleteMailbox(mailboxId, options) {
|
|
2363
|
+
return (0, exports.MailboxApiFp)(configuration).deleteMailbox(mailboxId, options)(fetch, basePath);
|
|
2364
|
+
},
|
|
2365
|
+
/**
|
|
2366
|
+
* Get user mailboxes.
|
|
2367
|
+
* @summary Get mailboxes
|
|
2368
|
+
* @param {*} [options] Override http request option.
|
|
2369
|
+
* @throws {RequiredError}
|
|
2370
|
+
*/
|
|
2371
|
+
getMailboxes(options) {
|
|
2372
|
+
return (0, exports.MailboxApiFp)(configuration).getMailboxes(options)(fetch, basePath);
|
|
2373
|
+
},
|
|
2374
|
+
/**
|
|
2375
|
+
* Update specific mailbox by id.
|
|
2376
|
+
* @summary Update mailbox
|
|
2377
|
+
* @param {MailboxMailboxIdPut} body Updated settings of mailbox
|
|
2378
|
+
* @param {number} mailboxId ID of a mailbox
|
|
2379
|
+
* @param {*} [options] Override http request option.
|
|
2380
|
+
* @throws {RequiredError}
|
|
2381
|
+
*/
|
|
2382
|
+
updateMailbox(body, mailboxId, options) {
|
|
2383
|
+
return (0, exports.MailboxApiFp)(configuration).updateMailbox(body, mailboxId, options)(fetch, basePath);
|
|
2384
|
+
},
|
|
2385
|
+
};
|
|
2386
|
+
};
|
|
2387
|
+
exports.MailboxApiFactory = MailboxApiFactory;
|
|
2388
|
+
/**
|
|
2389
|
+
* MailboxApi - object-oriented interface
|
|
2390
|
+
* @export
|
|
2391
|
+
* @class MailboxApi
|
|
2392
|
+
* @extends {BaseAPI}
|
|
2393
|
+
*/
|
|
2394
|
+
class MailboxApi extends BaseAPI {
|
|
2464
2395
|
/**
|
|
2465
2396
|
* Create a new mailbox
|
|
2466
2397
|
* @summary Create mailbox
|
|
2467
2398
|
* @param {MailboxPost} body The new mailbox address
|
|
2468
2399
|
* @param {*} [options] Override http request option.
|
|
2469
2400
|
* @throws {RequiredError}
|
|
2401
|
+
* @memberof MailboxApi
|
|
2470
2402
|
*/
|
|
2471
2403
|
createMailbox(body, options) {
|
|
2472
|
-
|
|
2473
|
-
}
|
|
2404
|
+
return (0, exports.MailboxApiFp)(this.configuration).createMailbox(body, options)(this.fetch, this.basePath);
|
|
2405
|
+
}
|
|
2474
2406
|
/**
|
|
2475
2407
|
* Delete specific mailbox by id.
|
|
2476
2408
|
* @summary Delete mailbox
|
|
2477
2409
|
* @param {number} mailboxId ID of a mailbox
|
|
2478
2410
|
* @param {*} [options] Override http request option.
|
|
2479
2411
|
* @throws {RequiredError}
|
|
2412
|
+
* @memberof MailboxApi
|
|
2480
2413
|
*/
|
|
2481
2414
|
deleteMailbox(mailboxId, options) {
|
|
2482
|
-
|
|
2483
|
-
}
|
|
2415
|
+
return (0, exports.MailboxApiFp)(this.configuration).deleteMailbox(mailboxId, options)(this.fetch, this.basePath);
|
|
2416
|
+
}
|
|
2484
2417
|
/**
|
|
2485
2418
|
* Get user mailboxes.
|
|
2486
2419
|
* @summary Get mailboxes
|
|
2487
2420
|
* @param {*} [options] Override http request option.
|
|
2488
2421
|
* @throws {RequiredError}
|
|
2422
|
+
* @memberof MailboxApi
|
|
2489
2423
|
*/
|
|
2490
2424
|
getMailboxes(options) {
|
|
2491
|
-
|
|
2492
|
-
}
|
|
2425
|
+
return (0, exports.MailboxApiFp)(this.configuration).getMailboxes(options)(this.fetch, this.basePath);
|
|
2426
|
+
}
|
|
2493
2427
|
/**
|
|
2494
2428
|
* Update specific mailbox by id.
|
|
2495
2429
|
* @summary Update mailbox
|
|
@@ -2497,68 +2431,11 @@ const MailboxApiFactory = function (configuration, fetch, basePath) {
|
|
|
2497
2431
|
* @param {number} mailboxId ID of a mailbox
|
|
2498
2432
|
* @param {*} [options] Override http request option.
|
|
2499
2433
|
* @throws {RequiredError}
|
|
2434
|
+
* @memberof MailboxApi
|
|
2500
2435
|
*/
|
|
2501
2436
|
updateMailbox(body, mailboxId, options) {
|
|
2502
|
-
|
|
2503
|
-
}
|
|
2504
|
-
};
|
|
2505
|
-
};
|
|
2506
|
-
exports.MailboxApiFactory = MailboxApiFactory;
|
|
2507
|
-
/**
|
|
2508
|
-
* MailboxApi - object-oriented interface
|
|
2509
|
-
* @export
|
|
2510
|
-
* @class MailboxApi
|
|
2511
|
-
* @extends {BaseAPI}
|
|
2512
|
-
*/
|
|
2513
|
-
class MailboxApi extends BaseAPI {
|
|
2514
|
-
/**
|
|
2515
|
-
* Create a new mailbox
|
|
2516
|
-
* @summary Create mailbox
|
|
2517
|
-
* @param {MailboxPost} body The new mailbox address
|
|
2518
|
-
* @param {*} [options] Override http request option.
|
|
2519
|
-
* @throws {RequiredError}
|
|
2520
|
-
* @memberof MailboxApi
|
|
2521
|
-
*/
|
|
2522
|
-
createMailbox(body, options) {
|
|
2523
|
-
return (0, exports.MailboxApiFp)(this.configuration).createMailbox(body, options)(this.fetch, this.basePath);
|
|
2524
|
-
}
|
|
2525
|
-
/**
|
|
2526
|
-
* Delete specific mailbox by id.
|
|
2527
|
-
* @summary Delete mailbox
|
|
2528
|
-
* @param {number} mailboxId ID of a mailbox
|
|
2529
|
-
* @param {*} [options] Override http request option.
|
|
2530
|
-
* @throws {RequiredError}
|
|
2531
|
-
* @memberof MailboxApi
|
|
2532
|
-
*/
|
|
2533
|
-
deleteMailbox(mailboxId, options) {
|
|
2534
|
-
return (0, exports.MailboxApiFp)(this.configuration).deleteMailbox(mailboxId, options)(this.fetch, this.basePath);
|
|
2535
|
-
}
|
|
2536
|
-
/**
|
|
2537
|
-
* Get user mailboxes.
|
|
2538
|
-
* @summary Get mailboxes
|
|
2539
|
-
* @param {*} [options] Override http request option.
|
|
2540
|
-
* @throws {RequiredError}
|
|
2541
|
-
* @memberof MailboxApi
|
|
2542
|
-
*/
|
|
2543
|
-
getMailboxes(options) {
|
|
2544
|
-
return (0, exports.MailboxApiFp)(this.configuration).getMailboxes(options)(this.fetch, this.basePath);
|
|
2545
|
-
}
|
|
2546
|
-
/**
|
|
2547
|
-
* Update specific mailbox by id.
|
|
2548
|
-
* @summary Update mailbox
|
|
2549
|
-
* @param {MailboxMailboxIdPut} body Updated settings of mailbox
|
|
2550
|
-
* @param {number} mailboxId ID of a mailbox
|
|
2551
|
-
* @param {*} [options] Override http request option.
|
|
2552
|
-
* @throws {RequiredError}
|
|
2553
|
-
* @memberof MailboxApi
|
|
2554
|
-
*/
|
|
2555
|
-
updateMailbox(body, mailboxId, options) {
|
|
2556
|
-
return (0, exports.MailboxApiFp)(this.configuration).updateMailbox(
|
|
2557
|
-
body,
|
|
2558
|
-
mailboxId,
|
|
2559
|
-
options,
|
|
2560
|
-
)(this.fetch, this.basePath);
|
|
2561
|
-
}
|
|
2437
|
+
return (0, exports.MailboxApiFp)(this.configuration).updateMailbox(body, mailboxId, options)(this.fetch, this.basePath);
|
|
2438
|
+
}
|
|
2562
2439
|
}
|
|
2563
2440
|
exports.MailboxApi = MailboxApi;
|
|
2564
|
-
//# sourceMappingURL=api.js.map
|
|
2441
|
+
//# sourceMappingURL=api.js.map
|