simplelogin-client 0.1.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +8 -6
  2. package/docs/development.md +30 -0
  3. package/docs/faq.md +53 -0
  4. package/package.json +8 -7
  5. package/tscBuild/config.d.ts +26 -0
  6. package/tscBuild/config.js +22 -0
  7. package/tscBuild/config.js.map +1 -0
  8. package/tscBuild/index.d.ts +2 -1
  9. package/tscBuild/index.js +4 -13
  10. package/tscBuild/index.js.map +1 -1
  11. package/tscBuild/sdk/apis/AccountApi.d.ts +177 -0
  12. package/tscBuild/sdk/apis/AccountApi.js +409 -0
  13. package/tscBuild/sdk/apis/AccountApi.js.map +1 -0
  14. package/tscBuild/sdk/apis/AliasApi.d.ts +181 -0
  15. package/tscBuild/sdk/apis/AliasApi.js +421 -0
  16. package/tscBuild/sdk/apis/AliasApi.js.map +1 -0
  17. package/tscBuild/sdk/apis/CustomDomainApi.d.ts +33 -0
  18. package/tscBuild/sdk/apis/CustomDomainApi.js +77 -0
  19. package/tscBuild/sdk/apis/CustomDomainApi.js.map +1 -0
  20. package/tscBuild/sdk/apis/MailboxApi.d.ts +70 -0
  21. package/tscBuild/sdk/apis/MailboxApi.js +166 -0
  22. package/tscBuild/sdk/apis/MailboxApi.js.map +1 -0
  23. package/tscBuild/sdk/apis/index.d.ts +4 -0
  24. package/tscBuild/sdk/apis/index.js +23 -0
  25. package/tscBuild/sdk/apis/index.js.map +1 -0
  26. package/tscBuild/sdk/index.d.ts +3 -13
  27. package/tscBuild/sdk/index.js +5 -13
  28. package/tscBuild/sdk/index.js.map +1 -1
  29. package/tscBuild/sdk/models/Alias.d.ts +112 -0
  30. package/tscBuild/sdk/models/Alias.js +85 -0
  31. package/tscBuild/sdk/models/Alias.js.map +1 -0
  32. package/tscBuild/sdk/models/AliasAliasIdActivities.d.ts +50 -0
  33. package/tscBuild/sdk/models/AliasAliasIdActivities.js +53 -0
  34. package/tscBuild/sdk/models/AliasAliasIdActivities.js.map +1 -0
  35. package/tscBuild/sdk/models/AliasAliasIdActivitiesModelArray.d.ts +21 -0
  36. package/tscBuild/sdk/models/AliasAliasIdActivitiesModelArray.js +52 -0
  37. package/tscBuild/sdk/models/AliasAliasIdActivitiesModelArray.js.map +1 -0
  38. package/tscBuild/sdk/models/AliasAliasIdContacts.d.ts +68 -0
  39. package/tscBuild/sdk/models/AliasAliasIdContacts.js +72 -0
  40. package/tscBuild/sdk/models/AliasAliasIdContacts.js.map +1 -0
  41. package/tscBuild/sdk/models/AliasAliasIdContactsModelArray.d.ts +21 -0
  42. package/tscBuild/sdk/models/AliasAliasIdContactsModelArray.js +52 -0
  43. package/tscBuild/sdk/models/AliasAliasIdContactsModelArray.js.map +1 -0
  44. package/tscBuild/sdk/models/AliasAliasIdContactsPost.d.ts +20 -0
  45. package/tscBuild/sdk/models/AliasAliasIdContactsPost.js +38 -0
  46. package/tscBuild/sdk/models/AliasAliasIdContactsPost.js.map +1 -0
  47. package/tscBuild/sdk/models/AliasAliasIdDelete.d.ts +20 -0
  48. package/tscBuild/sdk/models/AliasAliasIdDelete.js +51 -0
  49. package/tscBuild/sdk/models/AliasAliasIdDelete.js.map +1 -0
  50. package/tscBuild/sdk/models/AliasAliasIdPatch.d.ts +50 -0
  51. package/tscBuild/sdk/models/AliasAliasIdPatch.js +61 -0
  52. package/tscBuild/sdk/models/AliasAliasIdPatch.js.map +1 -0
  53. package/tscBuild/sdk/models/AliasAliasIdTogglePost.d.ts +20 -0
  54. package/tscBuild/sdk/models/AliasAliasIdTogglePost.js +51 -0
  55. package/tscBuild/sdk/models/AliasAliasIdTogglePost.js.map +1 -0
  56. package/tscBuild/sdk/models/AliasCustomNewPost.d.ts +44 -0
  57. package/tscBuild/sdk/models/AliasCustomNewPost.js +62 -0
  58. package/tscBuild/sdk/models/AliasCustomNewPost.js.map +1 -0
  59. package/tscBuild/sdk/models/AliasLatestActivity.d.ts +33 -0
  60. package/tscBuild/sdk/models/AliasLatestActivity.js +45 -0
  61. package/tscBuild/sdk/models/AliasLatestActivity.js.map +1 -0
  62. package/tscBuild/sdk/models/AliasLatestActivityContact.d.ts +32 -0
  63. package/tscBuild/sdk/models/AliasLatestActivityContact.js +44 -0
  64. package/tscBuild/sdk/models/AliasLatestActivityContact.js.map +1 -0
  65. package/tscBuild/sdk/models/AliasModelArray.d.ts +21 -0
  66. package/tscBuild/sdk/models/AliasModelArray.js +52 -0
  67. package/tscBuild/sdk/models/AliasModelArray.js.map +1 -0
  68. package/tscBuild/sdk/models/AliasOptions.d.ts +40 -0
  69. package/tscBuild/sdk/models/AliasOptions.js +62 -0
  70. package/tscBuild/sdk/models/AliasOptions.js.map +1 -0
  71. package/tscBuild/sdk/models/AliasOptionsRecommendationInner.d.ts +26 -0
  72. package/tscBuild/sdk/models/AliasOptionsRecommendationInner.js +41 -0
  73. package/tscBuild/sdk/models/AliasOptionsRecommendationInner.js.map +1 -0
  74. package/tscBuild/sdk/models/AliasOptionsSuffixesInner.d.ts +38 -0
  75. package/tscBuild/sdk/models/AliasOptionsSuffixesInner.js +47 -0
  76. package/tscBuild/sdk/models/AliasOptionsSuffixesInner.js.map +1 -0
  77. package/tscBuild/sdk/models/AliasRandomNewPost.d.ts +20 -0
  78. package/tscBuild/sdk/models/AliasRandomNewPost.js +51 -0
  79. package/tscBuild/sdk/models/AliasRandomNewPost.js.map +1 -0
  80. package/tscBuild/sdk/models/AuthActivatePost.d.ts +26 -0
  81. package/tscBuild/sdk/models/AuthActivatePost.js +41 -0
  82. package/tscBuild/sdk/models/AuthActivatePost.js.map +1 -0
  83. package/tscBuild/sdk/models/AuthForgotPasswordPost.d.ts +20 -0
  84. package/tscBuild/sdk/models/AuthForgotPasswordPost.js +38 -0
  85. package/tscBuild/sdk/models/AuthForgotPasswordPost.js.map +1 -0
  86. package/tscBuild/sdk/models/AuthLogin.d.ts +44 -0
  87. package/tscBuild/sdk/models/AuthLogin.js +50 -0
  88. package/tscBuild/sdk/models/AuthLogin.js.map +1 -0
  89. package/tscBuild/sdk/models/AuthLoginPost.d.ts +32 -0
  90. package/tscBuild/sdk/models/AuthLoginPost.js +44 -0
  91. package/tscBuild/sdk/models/AuthLoginPost.js.map +1 -0
  92. package/tscBuild/sdk/models/AuthMfa.d.ts +32 -0
  93. package/tscBuild/sdk/models/AuthMfa.js +44 -0
  94. package/tscBuild/sdk/models/AuthMfa.js.map +1 -0
  95. package/tscBuild/sdk/models/AuthMfaPost.d.ts +32 -0
  96. package/tscBuild/sdk/models/AuthMfaPost.js +44 -0
  97. package/tscBuild/sdk/models/AuthMfaPost.js.map +1 -0
  98. package/tscBuild/sdk/models/AuthReactivatePost.d.ts +20 -0
  99. package/tscBuild/sdk/models/AuthReactivatePost.js +38 -0
  100. package/tscBuild/sdk/models/AuthReactivatePost.js.map +1 -0
  101. package/tscBuild/sdk/models/AuthRegisterPost.d.ts +26 -0
  102. package/tscBuild/sdk/models/AuthRegisterPost.js +41 -0
  103. package/tscBuild/sdk/models/AuthRegisterPost.js.map +1 -0
  104. package/tscBuild/sdk/models/CustomDomain.d.ts +75 -0
  105. package/tscBuild/sdk/models/CustomDomain.js +66 -0
  106. package/tscBuild/sdk/models/CustomDomain.js.map +1 -0
  107. package/tscBuild/sdk/models/Mailbox.d.ts +50 -0
  108. package/tscBuild/sdk/models/Mailbox.js +53 -0
  109. package/tscBuild/sdk/models/Mailbox.js.map +1 -0
  110. package/tscBuild/sdk/models/MailboxMailboxIdPut.d.ts +32 -0
  111. package/tscBuild/sdk/models/MailboxMailboxIdPut.js +55 -0
  112. package/tscBuild/sdk/models/MailboxMailboxIdPut.js.map +1 -0
  113. package/tscBuild/sdk/models/MailboxModelArray.d.ts +21 -0
  114. package/tscBuild/sdk/models/MailboxModelArray.js +52 -0
  115. package/tscBuild/sdk/models/MailboxModelArray.js.map +1 -0
  116. package/tscBuild/sdk/models/MailboxModelRef.d.ts +26 -0
  117. package/tscBuild/sdk/models/MailboxModelRef.js +41 -0
  118. package/tscBuild/sdk/models/MailboxModelRef.js.map +1 -0
  119. package/tscBuild/sdk/models/MailboxPost.d.ts +20 -0
  120. package/tscBuild/sdk/models/MailboxPost.js +51 -0
  121. package/tscBuild/sdk/models/MailboxPost.js.map +1 -0
  122. package/tscBuild/sdk/models/ModelError.d.ts +20 -0
  123. package/tscBuild/sdk/models/ModelError.js +51 -0
  124. package/tscBuild/sdk/models/ModelError.js.map +1 -0
  125. package/tscBuild/sdk/models/Success.d.ts +20 -0
  126. package/tscBuild/sdk/models/Success.js +38 -0
  127. package/tscBuild/sdk/models/Success.js.map +1 -0
  128. package/tscBuild/sdk/models/SudoPatch.d.ts +20 -0
  129. package/tscBuild/sdk/models/SudoPatch.js +51 -0
  130. package/tscBuild/sdk/models/SudoPatch.js.map +1 -0
  131. package/tscBuild/sdk/models/UserApiKey.d.ts +20 -0
  132. package/tscBuild/sdk/models/UserApiKey.js +38 -0
  133. package/tscBuild/sdk/models/UserApiKey.js.map +1 -0
  134. package/tscBuild/sdk/models/UserApiKeyPost.d.ts +20 -0
  135. package/tscBuild/sdk/models/UserApiKeyPost.js +38 -0
  136. package/tscBuild/sdk/models/UserApiKeyPost.js.map +1 -0
  137. package/tscBuild/sdk/models/UserCookieToken.d.ts +20 -0
  138. package/tscBuild/sdk/models/UserCookieToken.js +38 -0
  139. package/tscBuild/sdk/models/UserCookieToken.js.map +1 -0
  140. package/tscBuild/sdk/models/UserInfo.d.ts +50 -0
  141. package/tscBuild/sdk/models/UserInfo.js +53 -0
  142. package/tscBuild/sdk/models/UserInfo.js.map +1 -0
  143. package/tscBuild/sdk/models/UserInfoPatch.d.ts +26 -0
  144. package/tscBuild/sdk/models/UserInfoPatch.js +53 -0
  145. package/tscBuild/sdk/models/UserInfoPatch.js.map +1 -0
  146. package/tscBuild/sdk/models/index.d.ts +39 -0
  147. package/tscBuild/sdk/models/index.js +58 -0
  148. package/tscBuild/sdk/models/index.js.map +1 -0
  149. package/tscBuild/sdk/runtime.d.ts +178 -0
  150. package/tscBuild/sdk/runtime.js +321 -0
  151. package/tscBuild/sdk/runtime.js.map +1 -0
  152. package/tscBuild/tsconfig.build.tsbuildinfo +1 -1
  153. package/tscBuild/sdk/api.d.ts +0 -2173
  154. package/tscBuild/sdk/api.js +0 -2441
  155. package/tscBuild/sdk/api.js.map +0 -1
  156. package/tscBuild/sdk/configuration.d.ts +0 -55
  157. package/tscBuild/sdk/configuration.js +0 -59
  158. package/tscBuild/sdk/configuration.js.map +0 -1
@@ -1,2441 +0,0 @@
1
- "use strict";
2
- /* eslint-disable */
3
- // @ts-nocheck
4
- /**
5
- * SimpleLogin (unofficial)
6
- * The unofficial SimpleLogin API docs as OpenAPI 3.0.0 spec. This is based on the official markdown based docs, but written in OpenAPI to allow for easier integration with other tools and generation of client SDKs. Please do not contact the SimpleLogin team for support or issues with this API documentation.
7
- *
8
- * OpenAPI spec version: 4.22.0
9
- * Contact: contact@ketrwu.de
10
- *
11
- * NOTE: This file is auto generated by the swagger code generator program.
12
- * https://github.com/swagger-api/swagger-codegen.git
13
- * Do not edit the file manually.
14
- */
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) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
35
- __setModuleDefault(result, mod);
36
- return result;
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(/\/+$/, "");
43
- /**
44
- *
45
- * @export
46
- */
47
- exports.COLLECTION_FORMATS = {
48
- csv: ",",
49
- ssv: " ",
50
- tsv: "\t",
51
- pipes: "|",
52
- };
53
- /**
54
- *
55
- * @export
56
- * @class BaseAPI
57
- */
58
- class BaseAPI {
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
- }
69
- }
70
- }
71
- exports.BaseAPI = BaseAPI;
72
- ;
73
- /**
74
- *
75
- * @export
76
- * @class RequiredError
77
- * @extends {Error}
78
- */
79
- class RequiredError extends Error {
80
- field;
81
- name;
82
- constructor(field, msg) {
83
- super(msg);
84
- this.field = field;
85
- }
86
- }
87
- exports.RequiredError = RequiredError;
88
- /**
89
- * AccountApi - fetch parameter creator
90
- * @export
91
- */
92
- const AccountApiFetchParamCreator = function (configuration) {
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
- };
489
- };
490
- exports.AccountApiFetchParamCreator = AccountApiFetchParamCreator;
491
- /**
492
- * AccountApi - functional programming interface
493
- * @export
494
- */
495
- const AccountApiFp = function (configuration) {
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&#x27;s empty if MFA is enabled. If user hasn&#x27;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
- };
754
- };
755
- exports.AccountApiFp = AccountApiFp;
756
- /**
757
- * AccountApi - factory interface
758
- * @export
759
- */
760
- const AccountApiFactory = function (configuration, fetch, basePath) {
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&#x27;s empty if MFA is enabled. If user hasn&#x27;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 {
898
- /**
899
- * Activate a new account with the activation code that was sent to the user's email.
900
- * @summary Activate account
901
- * @param {AuthActivatePost} body
902
- * @param {*} [options] Override http request option.
903
- * @throws {RequiredError}
904
- * @memberof AccountApi
905
- */
906
- activateAccount(body, options) {
907
- return (0, exports.AccountApiFp)(this.configuration).activateAccount(body, options)(this.fetch, this.basePath);
908
- }
909
- /**
910
- * Create a new API key
911
- * @summary Create API key
912
- * @param {UserApiKeyPost} body
913
- * @param {*} [options] Override http request option.
914
- * @throws {RequiredError}
915
- * @memberof AccountApi
916
- */
917
- createApiKey(body, options) {
918
- return (0, exports.AccountApiFp)(this.configuration).createApiKey(body, options)(this.fetch, this.basePath);
919
- }
920
- /**
921
- * Delete user (requires sudo mode)
922
- * @summary Delete user
923
- * @param {*} [options] Override http request option.
924
- * @throws {RequiredError}
925
- * @memberof AccountApi
926
- */
927
- deleteUser(options) {
928
- return (0, exports.AccountApiFp)(this.configuration).deleteUser(options)(this.fetch, this.basePath);
929
- }
930
- /**
931
- * Enable sudo mode
932
- * @summary Enable sudo mode
933
- * @param {SudoPatch} body
934
- * @param {*} [options] Override http request option.
935
- * @throws {RequiredError}
936
- * @memberof AccountApi
937
- */
938
- enableSudoMode(body, options) {
939
- return (0, exports.AccountApiFp)(this.configuration).enableSudoMode(body, options)(this.fetch, this.basePath);
940
- }
941
- /**
942
- * Request a link to reset the password for a registered account.
943
- * @summary Forgot password
944
- * @param {AuthForgotPasswordPost} body
945
- * @param {*} [options] Override http request option.
946
- * @throws {RequiredError}
947
- * @memberof AccountApi
948
- */
949
- forgotPassword(body, options) {
950
- return (0, exports.AccountApiFp)(this.configuration).forgotPassword(body, options)(this.fetch, this.basePath);
951
- }
952
- /**
953
- * Get a one time use cookie to exchange it for a valid cookie in the web app
954
- * @summary Get cookie token
955
- * @param {*} [options] Override http request option.
956
- * @throws {RequiredError}
957
- * @memberof AccountApi
958
- */
959
- getCookieToken(options) {
960
- return (0, exports.AccountApiFp)(this.configuration).getCookieToken(options)(this.fetch, this.basePath);
961
- }
962
- /**
963
- * Get user info
964
- * @summary Get user info
965
- * @param {*} [options] Override http request option.
966
- * @throws {RequiredError}
967
- * @memberof AccountApi
968
- */
969
- getUserInfo(options) {
970
- return (0, exports.AccountApiFp)(this.configuration).getUserInfo(options)(this.fetch, this.basePath);
971
- }
972
- /**
973
- * Login using email and password to get an access token.
974
- * @summary Login
975
- * @param {AuthLoginPost} body
976
- * @param {*} [options] Override http request option.
977
- * @throws {RequiredError}
978
- * @memberof AccountApi
979
- */
980
- login(body, options) {
981
- return (0, exports.AccountApiFp)(this.configuration).login(body, options)(this.fetch, this.basePath);
982
- }
983
- /**
984
- * Log out user
985
- * @summary Logout
986
- * @param {*} [options] Override http request option.
987
- * @throws {RequiredError}
988
- * @memberof AccountApi
989
- */
990
- logout(options) {
991
- return (0, exports.AccountApiFp)(this.configuration).logout(options)(this.fetch, this.basePath);
992
- }
993
- /**
994
- * Authenticate using MFA
995
- * @summary MFA authentication
996
- * @param {AuthMfaPost} body The api_key is used in all subsequent requests. It&#x27;s empty if MFA is enabled. If user hasn&#x27;t enabled MFA, mfa_key is empty.
997
- * @param {*} [options] Override http request option.
998
- * @throws {RequiredError}
999
- * @memberof AccountApi
1000
- */
1001
- mfa(body, options) {
1002
- return (0, exports.AccountApiFp)(this.configuration).mfa(body, options)(this.fetch, this.basePath);
1003
- }
1004
- /**
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
1008
- * @param {*} [options] Override http request option.
1009
- * @throws {RequiredError}
1010
- * @memberof AccountApi
1011
- */
1012
- reactivateAccount(body, options) {
1013
- return (0, exports.AccountApiFp)(this.configuration).reactivateAccount(body, options)(this.fetch, this.basePath);
1014
- }
1015
- /**
1016
- * Register a new account
1017
- * @summary Register account
1018
- * @param {AuthRegisterPost} body
1019
- * @param {*} [options] Override http request option.
1020
- * @throws {RequiredError}
1021
- * @memberof AccountApi
1022
- */
1023
- registerAccount(body, options) {
1024
- return (0, exports.AccountApiFp)(this.configuration).registerAccount(body, options)(this.fetch, this.basePath);
1025
- }
1026
- /**
1027
- * Update user info
1028
- * @summary Update user info
1029
- * @param {UserInfoPatch} body
1030
- * @param {*} [options] Override http request option.
1031
- * @throws {RequiredError}
1032
- * @memberof AccountApi
1033
- */
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 &#x60;uuid&#x60; or &#x60;word&#x60;. 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 &#x60;uuid&#x60; or &#x60;word&#x60;. 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
- };
1719
- };
1720
- exports.AliasApiFp = AliasApiFp;
1721
- /**
1722
- * AliasApi - factory interface
1723
- * @export
1724
- */
1725
- const AliasApiFactory = function (configuration, fetch, basePath) {
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 &#x60;uuid&#x60; or &#x60;word&#x60;. 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 {
1857
- /**
1858
- * Create a new contact for an alias by id.
1859
- * @summary Create contact
1860
- * @param {AliasAliasIdContactsPost} body Updated settings for the given alias.
1861
- * @param {number} aliasId ID of an alias
1862
- * @param {*} [options] Override http request option.
1863
- * @throws {RequiredError}
1864
- * @memberof AliasApi
1865
- */
1866
- createContact(body, aliasId, options) {
1867
- return (0, exports.AliasApiFp)(this.configuration).createContact(body, aliasId, options)(this.fetch, this.basePath);
1868
- }
1869
- /**
1870
- * Create a new custom alias
1871
- * @summary Create custom alias
1872
- * @param {AliasCustomNewPost} body
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.
1874
- * @param {*} [options] Override http request option.
1875
- * @throws {RequiredError}
1876
- * @memberof AliasApi
1877
- */
1878
- createCustomAlias(body, hostname, options) {
1879
- return (0, exports.AliasApiFp)(this.configuration).createCustomAlias(body, hostname, options)(this.fetch, this.basePath);
1880
- }
1881
- /**
1882
- * Create a new random alias
1883
- * @summary Create random alias
1884
- * @param {AliasRandomNewPost} body
1885
- * @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.
1886
- * @param {string} [mode] Either &#x60;uuid&#x60; or &#x60;word&#x60;. By default, use the user setting when creating new random alias.
1887
- * @param {*} [options] Override http request option.
1888
- * @throws {RequiredError}
1889
- * @memberof AliasApi
1890
- */
1891
- createRandomAlias(body, hostname, mode, options) {
1892
- return (0, exports.AliasApiFp)(this.configuration).createRandomAlias(body, hostname, mode, options)(this.fetch, this.basePath);
1893
- }
1894
- /**
1895
- * Delete specific alias by id.
1896
- * @summary Delete alias
1897
- * @param {number} aliasId ID of an alias
1898
- * @param {*} [options] Override http request option.
1899
- * @throws {RequiredError}
1900
- * @memberof AliasApi
1901
- */
1902
- deleteAlias(aliasId, options) {
1903
- return (0, exports.AliasApiFp)(this.configuration).deleteAlias(aliasId, options)(this.fetch, this.basePath);
1904
- }
1905
- /**
1906
- * Get activities for specific alias by id.
1907
- * @summary Get activities
1908
- * @param {number} aliasId ID of an alias
1909
- * @param {number} pageId The endpoint returns maximum 20 aliases for each page.
1910
- * @param {*} [options] Override http request option.
1911
- * @throws {RequiredError}
1912
- * @memberof AliasApi
1913
- */
1914
- getActivities(aliasId, pageId, options) {
1915
- return (0, exports.AliasApiFp)(this.configuration).getActivities(aliasId, pageId, options)(this.fetch, this.basePath);
1916
- }
1917
- /**
1918
- * Get specific alias by id.
1919
- * @summary Get alias
1920
- * @param {number} aliasId ID of an alias
1921
- * @param {*} [options] Override http request option.
1922
- * @throws {RequiredError}
1923
- * @memberof AliasApi
1924
- */
1925
- getAlias(aliasId, options) {
1926
- return (0, exports.AliasApiFp)(this.configuration).getAlias(aliasId, options)(this.fetch, this.basePath);
1927
- }
1928
- /**
1929
- * User alias info and suggestion. Used by the first extension screen when user opens the extension.
1930
- * @summary Get alias options
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.
1932
- * @param {*} [options] Override http request option.
1933
- * @throws {RequiredError}
1934
- * @memberof AliasApi
1935
- */
1936
- getAliasOptions(hostname, options) {
1937
- return (0, exports.AliasApiFp)(this.configuration).getAliasOptions(hostname, options)(this.fetch, this.basePath);
1938
- }
1939
- /**
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`.
1941
- * @summary Get aliases
1942
- * @param {number} pageId The endpoint returns maximum 20 aliases for each page.
1943
- * @param {boolean} [pinned] If set, only pinned aliases are returned.
1944
- * @param {boolean} [disabled] If set, only disabled aliases are returned.
1945
- * @param {boolean} [enabled] If set, only enabled aliases are returned.
1946
- * @param {*} [options] Override http request option.
1947
- * @throws {RequiredError}
1948
- * @memberof AliasApi
1949
- */
1950
- getAliases(pageId, pinned, disabled, enabled, options) {
1951
- return (0, exports.AliasApiFp)(this.configuration).getAliases(pageId, pinned, disabled, enabled, options)(this.fetch, this.basePath);
1952
- }
1953
- /**
1954
- * Get contacts for specific alias by id.
1955
- * @summary Get contacts
1956
- * @param {number} aliasId ID of an alias
1957
- * @param {number} pageId The endpoint returns maximum 20 aliases for each page.
1958
- * @param {*} [options] Override http request option.
1959
- * @throws {RequiredError}
1960
- * @memberof AliasApi
1961
- */
1962
- getContacts(aliasId, pageId, options) {
1963
- return (0, exports.AliasApiFp)(this.configuration).getContacts(aliasId, pageId, options)(this.fetch, this.basePath);
1964
- }
1965
- /**
1966
- * Enable or disable specific alias by id.
1967
- * @summary Toggle alias
1968
- * @param {number} aliasId ID of an alias
1969
- * @param {*} [options] Override http request option.
1970
- * @throws {RequiredError}
1971
- * @memberof AliasApi
1972
- */
1973
- toggleAlias(aliasId, options) {
1974
- return (0, exports.AliasApiFp)(this.configuration).toggleAlias(aliasId, options)(this.fetch, this.basePath);
1975
- }
1976
- /**
1977
- * Update specific alias by id.
1978
- * @summary Update alias
1979
- * @param {AliasAliasIdPatch} body Updated settings for the given alias.
1980
- * @param {number} aliasId ID of an alias
1981
- * @param {*} [options] Override http request option.
1982
- * @throws {RequiredError}
1983
- * @memberof AliasApi
1984
- */
1985
- updateAlias(body, aliasId, options) {
1986
- return (0, exports.AliasApiFp)(this.configuration).updateAlias(body, aliasId, options)(this.fetch, this.basePath);
1987
- }
1988
- }
1989
- exports.AliasApi = AliasApi;
1990
- /**
1991
- * CustomDomainApi - fetch parameter creator
1992
- * @export
1993
- */
1994
- const CustomDomainApiFetchParamCreator = function (configuration) {
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
- };
2031
- };
2032
- exports.CustomDomainApiFetchParamCreator = CustomDomainApiFetchParamCreator;
2033
- /**
2034
- * CustomDomainApi - functional programming interface
2035
- * @export
2036
- */
2037
- const CustomDomainApiFp = function (configuration) {
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
- };
2060
- };
2061
- exports.CustomDomainApiFp = CustomDomainApiFp;
2062
- /**
2063
- * CustomDomainApi - factory interface
2064
- * @export
2065
- */
2066
- const CustomDomainApiFactory = function (configuration, fetch, basePath) {
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
- };
2079
- };
2080
- exports.CustomDomainApiFactory = CustomDomainApiFactory;
2081
- /**
2082
- * CustomDomainApi - object-oriented interface
2083
- * @export
2084
- * @class CustomDomainApi
2085
- * @extends {BaseAPI}
2086
- */
2087
- class CustomDomainApi extends BaseAPI {
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
- }
2099
- }
2100
- exports.CustomDomainApi = CustomDomainApi;
2101
- /**
2102
- * MailboxApi - fetch parameter creator
2103
- * @export
2104
- */
2105
- const MailboxApiFetchParamCreator = function (configuration) {
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
- };
2248
- };
2249
- exports.MailboxApiFetchParamCreator = MailboxApiFetchParamCreator;
2250
- /**
2251
- * MailboxApi - functional programming interface
2252
- * @export
2253
- */
2254
- const MailboxApiFp = function (configuration) {
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
- };
2337
- };
2338
- exports.MailboxApiFp = MailboxApiFp;
2339
- /**
2340
- * MailboxApi - factory interface
2341
- * @export
2342
- */
2343
- const MailboxApiFactory = function (configuration, fetch, basePath) {
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 {
2395
- /**
2396
- * Create a new mailbox
2397
- * @summary Create mailbox
2398
- * @param {MailboxPost} body The new mailbox address
2399
- * @param {*} [options] Override http request option.
2400
- * @throws {RequiredError}
2401
- * @memberof MailboxApi
2402
- */
2403
- createMailbox(body, options) {
2404
- return (0, exports.MailboxApiFp)(this.configuration).createMailbox(body, options)(this.fetch, this.basePath);
2405
- }
2406
- /**
2407
- * Delete specific mailbox by id.
2408
- * @summary Delete mailbox
2409
- * @param {number} mailboxId ID of a mailbox
2410
- * @param {*} [options] Override http request option.
2411
- * @throws {RequiredError}
2412
- * @memberof MailboxApi
2413
- */
2414
- deleteMailbox(mailboxId, options) {
2415
- return (0, exports.MailboxApiFp)(this.configuration).deleteMailbox(mailboxId, options)(this.fetch, this.basePath);
2416
- }
2417
- /**
2418
- * Get user mailboxes.
2419
- * @summary Get mailboxes
2420
- * @param {*} [options] Override http request option.
2421
- * @throws {RequiredError}
2422
- * @memberof MailboxApi
2423
- */
2424
- getMailboxes(options) {
2425
- return (0, exports.MailboxApiFp)(this.configuration).getMailboxes(options)(this.fetch, this.basePath);
2426
- }
2427
- /**
2428
- * Update specific mailbox by id.
2429
- * @summary Update mailbox
2430
- * @param {MailboxMailboxIdPut} body Updated settings of mailbox
2431
- * @param {number} mailboxId ID of a mailbox
2432
- * @param {*} [options] Override http request option.
2433
- * @throws {RequiredError}
2434
- * @memberof MailboxApi
2435
- */
2436
- updateMailbox(body, mailboxId, options) {
2437
- return (0, exports.MailboxApiFp)(this.configuration).updateMailbox(body, mailboxId, options)(this.fetch, this.basePath);
2438
- }
2439
- }
2440
- exports.MailboxApi = MailboxApi;
2441
- //# sourceMappingURL=api.js.map