@quantum-hub/qhubctl 1.0.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 (270) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +41 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/dev.js +15 -0
  5. package/bin/run.cmd +3 -0
  6. package/bin/run.js +12 -0
  7. package/dist/client/kqh/apis/ServicePlatformApplicationsApi.d.ts +89 -0
  8. package/dist/client/kqh/apis/ServicePlatformApplicationsApi.js +259 -0
  9. package/dist/client/kqh/apis/ServicePlatformDashboardApi.d.ts +44 -0
  10. package/dist/client/kqh/apis/ServicePlatformDashboardApi.js +143 -0
  11. package/dist/client/kqh/apis/ServicePlatformDataPoolsApi.d.ts +133 -0
  12. package/dist/client/kqh/apis/ServicePlatformDataPoolsApi.js +410 -0
  13. package/dist/client/kqh/apis/ServicePlatformJobsApi.d.ts +101 -0
  14. package/dist/client/kqh/apis/ServicePlatformJobsApi.js +298 -0
  15. package/dist/client/kqh/apis/ServicePlatformMarketplaceApi.d.ts +48 -0
  16. package/dist/client/kqh/apis/ServicePlatformMarketplaceApi.js +152 -0
  17. package/dist/client/kqh/apis/ServicePlatformMeteringAPIApi.d.ts +29 -0
  18. package/dist/client/kqh/apis/ServicePlatformMeteringAPIApi.js +90 -0
  19. package/dist/client/kqh/apis/ServicePlatformServicesApi.d.ts +501 -0
  20. package/dist/client/kqh/apis/ServicePlatformServicesApi.js +1509 -0
  21. package/dist/client/kqh/apis/ServicePlatformSubscriptionsApi.d.ts +66 -0
  22. package/dist/client/kqh/apis/ServicePlatformSubscriptionsApi.js +194 -0
  23. package/dist/client/kqh/apis/TaxonomiesApi.d.ts +90 -0
  24. package/dist/client/kqh/apis/TaxonomiesApi.js +309 -0
  25. package/dist/client/kqh/apis/index.d.ts +9 -0
  26. package/dist/client/kqh/apis/index.js +27 -0
  27. package/dist/client/kqh/index.d.ts +3 -0
  28. package/dist/client/kqh/index.js +21 -0
  29. package/dist/client/kqh/models/AccessTokenDto.d.ts +81 -0
  30. package/dist/client/kqh/models/AccessTokenDto.js +66 -0
  31. package/dist/client/kqh/models/AmountMajorDto.d.ts +37 -0
  32. package/dist/client/kqh/models/AmountMajorDto.js +46 -0
  33. package/dist/client/kqh/models/ApiDto.d.ts +144 -0
  34. package/dist/client/kqh/models/ApiDto.js +99 -0
  35. package/dist/client/kqh/models/ApiOverviewDto.d.ts +119 -0
  36. package/dist/client/kqh/models/ApiOverviewDto.js +90 -0
  37. package/dist/client/kqh/models/ApplicationDto.d.ts +64 -0
  38. package/dist/client/kqh/models/ApplicationDto.js +60 -0
  39. package/dist/client/kqh/models/BuildJobDto.d.ts +75 -0
  40. package/dist/client/kqh/models/BuildJobDto.js +71 -0
  41. package/dist/client/kqh/models/CpuConfiguration.d.ts +38 -0
  42. package/dist/client/kqh/models/CpuConfiguration.js +49 -0
  43. package/dist/client/kqh/models/CreateApplicationRequest.d.ts +31 -0
  44. package/dist/client/kqh/models/CreateApplicationRequest.js +44 -0
  45. package/dist/client/kqh/models/CreateDataPoolRequest.d.ts +31 -0
  46. package/dist/client/kqh/models/CreateDataPoolRequest.js +46 -0
  47. package/dist/client/kqh/models/CreateExternalServicePricingPlanRequest.d.ts +46 -0
  48. package/dist/client/kqh/models/CreateExternalServicePricingPlanRequest.js +57 -0
  49. package/dist/client/kqh/models/CreateJobRequest.d.ts +62 -0
  50. package/dist/client/kqh/models/CreateJobRequest.js +57 -0
  51. package/dist/client/kqh/models/CreateManagedServicePricingPlanRequest.d.ts +73 -0
  52. package/dist/client/kqh/models/CreateManagedServicePricingPlanRequest.js +79 -0
  53. package/dist/client/kqh/models/CreateProductRequest.d.ts +43 -0
  54. package/dist/client/kqh/models/CreateProductRequest.js +52 -0
  55. package/dist/client/kqh/models/CreateSubscriptionRequest.d.ts +37 -0
  56. package/dist/client/kqh/models/CreateSubscriptionRequest.js +50 -0
  57. package/dist/client/kqh/models/CreateWorkflowServiceRequest.d.ts +37 -0
  58. package/dist/client/kqh/models/CreateWorkflowServiceRequest.js +48 -0
  59. package/dist/client/kqh/models/DataPoolDto.d.ts +166 -0
  60. package/dist/client/kqh/models/DataPoolDto.js +105 -0
  61. package/dist/client/kqh/models/DataPoolRef.d.ts +43 -0
  62. package/dist/client/kqh/models/DataPoolRef.js +48 -0
  63. package/dist/client/kqh/models/DataSourceDescriptorDto.d.ts +89 -0
  64. package/dist/client/kqh/models/DataSourceDescriptorDto.js +69 -0
  65. package/dist/client/kqh/models/FileDto.d.ts +73 -0
  66. package/dist/client/kqh/models/FileDto.js +51 -0
  67. package/dist/client/kqh/models/FileSource.d.ts +26 -0
  68. package/dist/client/kqh/models/FileSource.js +34 -0
  69. package/dist/client/kqh/models/GpuConfiguration.d.ts +49 -0
  70. package/dist/client/kqh/models/GpuConfiguration.js +60 -0
  71. package/dist/client/kqh/models/JobDto.d.ts +117 -0
  72. package/dist/client/kqh/models/JobDto.js +82 -0
  73. package/dist/client/kqh/models/JobOverviewDto.d.ts +74 -0
  74. package/dist/client/kqh/models/JobOverviewDto.js +67 -0
  75. package/dist/client/kqh/models/MemoryConfiguration.d.ts +38 -0
  76. package/dist/client/kqh/models/MemoryConfiguration.js +49 -0
  77. package/dist/client/kqh/models/MeteringRequest.d.ts +43 -0
  78. package/dist/client/kqh/models/MeteringRequest.js +48 -0
  79. package/dist/client/kqh/models/MeteringResponse.d.ts +49 -0
  80. package/dist/client/kqh/models/MeteringResponse.js +50 -0
  81. package/dist/client/kqh/models/MonthAmountDto.d.ts +51 -0
  82. package/dist/client/kqh/models/MonthAmountDto.js +52 -0
  83. package/dist/client/kqh/models/OwnerDto.d.ts +67 -0
  84. package/dist/client/kqh/models/OwnerDto.js +56 -0
  85. package/dist/client/kqh/models/PageDataPoolDto.d.ts +94 -0
  86. package/dist/client/kqh/models/PageDataPoolDto.js +67 -0
  87. package/dist/client/kqh/models/PageableObject.d.ts +62 -0
  88. package/dist/client/kqh/models/PageableObject.js +55 -0
  89. package/dist/client/kqh/models/PricingPlanDto.d.ts +52 -0
  90. package/dist/client/kqh/models/PricingPlanDto.js +57 -0
  91. package/dist/client/kqh/models/ProductAmountDto.d.ts +38 -0
  92. package/dist/client/kqh/models/ProductAmountDto.js +47 -0
  93. package/dist/client/kqh/models/ProductDto.d.ts +83 -0
  94. package/dist/client/kqh/models/ProductDto.js +76 -0
  95. package/dist/client/kqh/models/ProductGroupDto.d.ts +45 -0
  96. package/dist/client/kqh/models/ProductGroupDto.js +50 -0
  97. package/dist/client/kqh/models/ProductUsageDto.d.ts +61 -0
  98. package/dist/client/kqh/models/ProductUsageDto.js +54 -0
  99. package/dist/client/kqh/models/RegistrySource.d.ts +52 -0
  100. package/dist/client/kqh/models/RegistrySource.js +55 -0
  101. package/dist/client/kqh/models/RepositorySource.d.ts +32 -0
  102. package/dist/client/kqh/models/RepositorySource.js +47 -0
  103. package/dist/client/kqh/models/ResourceConfiguration.d.ts +31 -0
  104. package/dist/client/kqh/models/ResourceConfiguration.js +58 -0
  105. package/dist/client/kqh/models/ReviewDto.d.ts +51 -0
  106. package/dist/client/kqh/models/ReviewDto.js +56 -0
  107. package/dist/client/kqh/models/RuntimeConfiguration.d.ts +53 -0
  108. package/dist/client/kqh/models/RuntimeConfiguration.js +56 -0
  109. package/dist/client/kqh/models/ServiceDefinitionCommand.d.ts +39 -0
  110. package/dist/client/kqh/models/ServiceDefinitionCommand.js +52 -0
  111. package/dist/client/kqh/models/ServiceDefinitionDto.d.ts +180 -0
  112. package/dist/client/kqh/models/ServiceDefinitionDto.js +108 -0
  113. package/dist/client/kqh/models/ServiceDefinitionDtoSource.d.ts +23 -0
  114. package/dist/client/kqh/models/ServiceDefinitionDtoSource.js +54 -0
  115. package/dist/client/kqh/models/ServiceDefinitionOverviewDto.d.ts +79 -0
  116. package/dist/client/kqh/models/ServiceDefinitionOverviewDto.js +71 -0
  117. package/dist/client/kqh/models/ServiceDto.d.ts +59 -0
  118. package/dist/client/kqh/models/ServiceDto.js +59 -0
  119. package/dist/client/kqh/models/ServiceExecutionConsumerDto.d.ts +67 -0
  120. package/dist/client/kqh/models/ServiceExecutionConsumerDto.js +64 -0
  121. package/dist/client/kqh/models/ServiceExecutionDto.d.ts +49 -0
  122. package/dist/client/kqh/models/ServiceExecutionDto.js +50 -0
  123. package/dist/client/kqh/models/ServiceOverviewDto.d.ts +115 -0
  124. package/dist/client/kqh/models/ServiceOverviewDto.js +92 -0
  125. package/dist/client/kqh/models/ServiceSource.d.ts +31 -0
  126. package/dist/client/kqh/models/ServiceSource.js +58 -0
  127. package/dist/client/kqh/models/SortObject.d.ts +43 -0
  128. package/dist/client/kqh/models/SortObject.js +48 -0
  129. package/dist/client/kqh/models/SubscriptionDto.d.ts +58 -0
  130. package/dist/client/kqh/models/SubscriptionDto.js +55 -0
  131. package/dist/client/kqh/models/TaxonomyElement.d.ts +43 -0
  132. package/dist/client/kqh/models/TaxonomyElement.js +48 -0
  133. package/dist/client/kqh/models/UpdateDataPoolRequest.d.ts +109 -0
  134. package/dist/client/kqh/models/UpdateDataPoolRequest.js +72 -0
  135. package/dist/client/kqh/models/UpdateResourceConfigurationRequest.d.ts +23 -0
  136. package/dist/client/kqh/models/UpdateResourceConfigurationRequest.js +54 -0
  137. package/dist/client/kqh/models/UpdateVersionRequest.d.ts +44 -0
  138. package/dist/client/kqh/models/UpdateVersionRequest.js +49 -0
  139. package/dist/client/kqh/models/UpdateWorkflowServiceRequest.d.ts +31 -0
  140. package/dist/client/kqh/models/UpdateWorkflowServiceRequest.js +44 -0
  141. package/dist/client/kqh/models/ValidationResult.d.ts +52 -0
  142. package/dist/client/kqh/models/ValidationResult.js +57 -0
  143. package/dist/client/kqh/models/index.d.ts +57 -0
  144. package/dist/client/kqh/models/index.js +75 -0
  145. package/dist/client/kqh/runtime.d.ts +181 -0
  146. package/dist/client/kqh/runtime.js +340 -0
  147. package/dist/client/users/apis/AuthenticationApi.d.ts +31 -0
  148. package/dist/client/users/apis/AuthenticationApi.js +83 -0
  149. package/dist/client/users/apis/ExpertsApi.d.ts +44 -0
  150. package/dist/client/users/apis/ExpertsApi.js +112 -0
  151. package/dist/client/users/apis/SearchApi.d.ts +46 -0
  152. package/dist/client/users/apis/SearchApi.js +134 -0
  153. package/dist/client/users/apis/UserSettingsApi.d.ts +139 -0
  154. package/dist/client/users/apis/UserSettingsApi.js +417 -0
  155. package/dist/client/users/apis/UserSettingsPersonalAccessTokensApi.d.ts +64 -0
  156. package/dist/client/users/apis/UserSettingsPersonalAccessTokensApi.js +184 -0
  157. package/dist/client/users/apis/UsersApi.d.ts +70 -0
  158. package/dist/client/users/apis/UsersApi.js +170 -0
  159. package/dist/client/users/apis/index.d.ts +6 -0
  160. package/dist/client/users/apis/index.js +24 -0
  161. package/dist/client/users/index.d.ts +3 -0
  162. package/dist/client/users/index.js +21 -0
  163. package/dist/client/users/models/AccessTokenCreateRequest.d.ts +51 -0
  164. package/dist/client/users/models/AccessTokenCreateRequest.js +60 -0
  165. package/dist/client/users/models/AccessTokenDto.d.ts +75 -0
  166. package/dist/client/users/models/AccessTokenDto.js +68 -0
  167. package/dist/client/users/models/AccessTokensResponse.d.ts +38 -0
  168. package/dist/client/users/models/AccessTokensResponse.js +47 -0
  169. package/dist/client/users/models/DefaultAccessTokenResponse.d.ts +31 -0
  170. package/dist/client/users/models/DefaultAccessTokenResponse.js +44 -0
  171. package/dist/client/users/models/Language.d.ts +31 -0
  172. package/dist/client/users/models/Language.js +44 -0
  173. package/dist/client/users/models/PageUserDto.d.ts +94 -0
  174. package/dist/client/users/models/PageUserDto.js +67 -0
  175. package/dist/client/users/models/Pageable.d.ts +43 -0
  176. package/dist/client/users/models/Pageable.js +48 -0
  177. package/dist/client/users/models/PageableObject.d.ts +62 -0
  178. package/dist/client/users/models/PageableObject.js +55 -0
  179. package/dist/client/users/models/PersonalAccessTokenPrincipal.d.ts +38 -0
  180. package/dist/client/users/models/PersonalAccessTokenPrincipal.js +47 -0
  181. package/dist/client/users/models/Skill.d.ts +31 -0
  182. package/dist/client/users/models/Skill.js +44 -0
  183. package/dist/client/users/models/SortObject.d.ts +43 -0
  184. package/dist/client/users/models/SortObject.js +48 -0
  185. package/dist/client/users/models/UpdateUserRequest.d.ts +61 -0
  186. package/dist/client/users/models/UpdateUserRequest.js +54 -0
  187. package/dist/client/users/models/UserDto.d.ts +111 -0
  188. package/dist/client/users/models/UserDto.js +72 -0
  189. package/dist/client/users/models/UserOverviewDto.d.ts +67 -0
  190. package/dist/client/users/models/UserOverviewDto.js +56 -0
  191. package/dist/client/users/models/index.d.ts +14 -0
  192. package/dist/client/users/models/index.js +32 -0
  193. package/dist/client/users/runtime.d.ts +181 -0
  194. package/dist/client/users/runtime.js +340 -0
  195. package/dist/commands/compress/index.d.ts +6 -0
  196. package/dist/commands/compress/index.js +31 -0
  197. package/dist/commands/datapool/upload.d.ts +23 -0
  198. package/dist/commands/datapool/upload.js +266 -0
  199. package/dist/commands/get-context/index.d.ts +6 -0
  200. package/dist/commands/get-context/index.js +13 -0
  201. package/dist/commands/init/index.d.ts +10 -0
  202. package/dist/commands/init/index.js +81 -0
  203. package/dist/commands/list-contexts/index.d.ts +9 -0
  204. package/dist/commands/list-contexts/index.js +36 -0
  205. package/dist/commands/login/index.d.ts +10 -0
  206. package/dist/commands/login/index.js +68 -0
  207. package/dist/commands/logout/index.d.ts +6 -0
  208. package/dist/commands/logout/index.js +21 -0
  209. package/dist/commands/openapi/index.d.ts +26 -0
  210. package/dist/commands/openapi/index.js +313 -0
  211. package/dist/commands/run/index.d.ts +18 -0
  212. package/dist/commands/run/index.js +155 -0
  213. package/dist/commands/serve/index.d.ts +13 -0
  214. package/dist/commands/serve/index.js +93 -0
  215. package/dist/commands/services/index.d.ts +14 -0
  216. package/dist/commands/services/index.js +71 -0
  217. package/dist/commands/set-context/index.d.ts +17 -0
  218. package/dist/commands/set-context/index.js +69 -0
  219. package/dist/commands/up/index.d.ts +19 -0
  220. package/dist/commands/up/index.js +196 -0
  221. package/dist/index.d.ts +1 -0
  222. package/dist/index.js +4 -0
  223. package/dist/lib/command.d.ts +6 -0
  224. package/dist/lib/command.js +21 -0
  225. package/dist/lib/debug.d.ts +1 -0
  226. package/dist/lib/debug.js +5 -0
  227. package/dist/lib/entrypoint-resolver.d.ts +52 -0
  228. package/dist/lib/entrypoint-resolver.js +125 -0
  229. package/dist/lib/error.d.ts +1 -0
  230. package/dist/lib/error.js +20 -0
  231. package/dist/lib/fetch.d.ts +7 -0
  232. package/dist/lib/fetch.js +43 -0
  233. package/dist/lib/init-user-input.d.ts +18 -0
  234. package/dist/lib/init-user-input.js +87 -0
  235. package/dist/lib/random-name.d.ts +1 -0
  236. package/dist/lib/random-name.js +161 -0
  237. package/dist/lib/random-string.d.ts +1 -0
  238. package/dist/lib/random-string.js +12 -0
  239. package/dist/lib/repository.d.ts +3 -0
  240. package/dist/lib/repository.js +51 -0
  241. package/dist/lib/stream-to-blob.d.ts +2 -0
  242. package/dist/lib/stream-to-blob.js +27 -0
  243. package/dist/lib/up/get-description.d.ts +1 -0
  244. package/dist/lib/up/get-description.js +29 -0
  245. package/dist/lib/up/ignore.d.ts +1 -0
  246. package/dist/lib/up/ignore.js +21 -0
  247. package/dist/lib/up/zip.d.ts +1 -0
  248. package/dist/lib/up/zip.js +40 -0
  249. package/dist/model/account.d.ts +5 -0
  250. package/dist/model/account.js +2 -0
  251. package/dist/model/command.d.ts +12 -0
  252. package/dist/model/command.js +55 -0
  253. package/dist/model/managed-service-config.d.ts +28 -0
  254. package/dist/model/managed-service-config.js +16 -0
  255. package/dist/model/user-config.d.ts +22 -0
  256. package/dist/model/user-config.js +8 -0
  257. package/dist/service/auth-service.d.ts +9 -0
  258. package/dist/service/auth-service.js +38 -0
  259. package/dist/service/command-service.d.ts +9 -0
  260. package/dist/service/command-service.js +14 -0
  261. package/dist/service/quantum-hub-service.d.ts +24 -0
  262. package/dist/service/quantum-hub-service.js +222 -0
  263. package/dist/service/service-config-service.d.ts +3 -0
  264. package/dist/service/service-config-service.js +26 -0
  265. package/dist/service/user-config-service.d.ts +3 -0
  266. package/dist/service/user-config-service.js +26 -0
  267. package/dist/service/user-service.d.ts +9 -0
  268. package/dist/service/user-service.js +35 -0
  269. package/oclif.manifest.json +530 -0
  270. package/package.json +107 -0
@@ -0,0 +1,417 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Quantum Platform User Service API
6
+ * Part of the OpenAPI specification for the Quantum Platform.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: support-hub@kipu-quantum.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class 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 () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.UserSettingsApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class UserSettingsApi extends runtime.BaseAPI {
56
+ /**
57
+ * Adds a new language to the currently logged-in user\'s profile.
58
+ * Adds a new language to the currently logged-in user\'s profile.
59
+ */
60
+ async addLanguageRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['language'] == null) {
62
+ throw new runtime.RequiredError('language', 'Required parameter "language" was null or undefined when calling addLanguage().');
63
+ }
64
+ const queryParameters = {};
65
+ const headerParameters = {};
66
+ headerParameters['Content-Type'] = 'application/json';
67
+ if (this.configuration && this.configuration.apiKey) {
68
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
69
+ }
70
+ if (this.configuration && this.configuration.accessToken) {
71
+ // oauth required
72
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
73
+ }
74
+ const response = await this.request({
75
+ path: `/me/languages`,
76
+ method: 'POST',
77
+ headers: headerParameters,
78
+ query: queryParameters,
79
+ body: (0, index_1.LanguageToJSON)(requestParameters['language']),
80
+ }, initOverrides);
81
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserDtoFromJSON)(jsonValue));
82
+ }
83
+ /**
84
+ * Adds a new language to the currently logged-in user\'s profile.
85
+ * Adds a new language to the currently logged-in user\'s profile.
86
+ */
87
+ async addLanguage(requestParameters, initOverrides) {
88
+ const response = await this.addLanguageRaw(requestParameters, initOverrides);
89
+ return await response.value();
90
+ }
91
+ /**
92
+ * Adds a new skill to the currently logged-in user\'s profile.
93
+ * Adds a new skill to the currently logged-in user\'s profile.
94
+ */
95
+ async addSkillRaw(requestParameters, initOverrides) {
96
+ if (requestParameters['skill'] == null) {
97
+ throw new runtime.RequiredError('skill', 'Required parameter "skill" was null or undefined when calling addSkill().');
98
+ }
99
+ const queryParameters = {};
100
+ const headerParameters = {};
101
+ headerParameters['Content-Type'] = 'application/json';
102
+ if (this.configuration && this.configuration.apiKey) {
103
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
104
+ }
105
+ if (this.configuration && this.configuration.accessToken) {
106
+ // oauth required
107
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
108
+ }
109
+ const response = await this.request({
110
+ path: `/me/skills`,
111
+ method: 'POST',
112
+ headers: headerParameters,
113
+ query: queryParameters,
114
+ body: (0, index_1.SkillToJSON)(requestParameters['skill']),
115
+ }, initOverrides);
116
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserDtoFromJSON)(jsonValue));
117
+ }
118
+ /**
119
+ * Adds a new skill to the currently logged-in user\'s profile.
120
+ * Adds a new skill to the currently logged-in user\'s profile.
121
+ */
122
+ async addSkill(requestParameters, initOverrides) {
123
+ const response = await this.addSkillRaw(requestParameters, initOverrides);
124
+ return await response.value();
125
+ }
126
+ /**
127
+ * Deletes a language from the currently logged-in user\'s profile.
128
+ * Deletes a language from the currently logged-in user\'s profile.
129
+ */
130
+ async deleteLanguageRaw(requestParameters, initOverrides) {
131
+ if (requestParameters['isoCode'] == null) {
132
+ throw new runtime.RequiredError('isoCode', 'Required parameter "isoCode" was null or undefined when calling deleteLanguage().');
133
+ }
134
+ const queryParameters = {};
135
+ const headerParameters = {};
136
+ if (this.configuration && this.configuration.apiKey) {
137
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
138
+ }
139
+ if (this.configuration && this.configuration.accessToken) {
140
+ // oauth required
141
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
142
+ }
143
+ const response = await this.request({
144
+ path: `/me/languages/{isoCode}`.replace(`{${"isoCode"}}`, encodeURIComponent(String(requestParameters['isoCode']))),
145
+ method: 'DELETE',
146
+ headers: headerParameters,
147
+ query: queryParameters,
148
+ }, initOverrides);
149
+ return new runtime.VoidApiResponse(response);
150
+ }
151
+ /**
152
+ * Deletes a language from the currently logged-in user\'s profile.
153
+ * Deletes a language from the currently logged-in user\'s profile.
154
+ */
155
+ async deleteLanguage(requestParameters, initOverrides) {
156
+ await this.deleteLanguageRaw(requestParameters, initOverrides);
157
+ }
158
+ /**
159
+ * Deletes a skill from the currently logged-in user\'s profile.
160
+ * Deletes a skill from the currently logged-in user\'s profile.
161
+ */
162
+ async deleteSkillRaw(requestParameters, initOverrides) {
163
+ if (requestParameters['name'] == null) {
164
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteSkill().');
165
+ }
166
+ const queryParameters = {};
167
+ const headerParameters = {};
168
+ if (this.configuration && this.configuration.apiKey) {
169
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
170
+ }
171
+ if (this.configuration && this.configuration.accessToken) {
172
+ // oauth required
173
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
174
+ }
175
+ const response = await this.request({
176
+ path: `/me/skills/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))),
177
+ method: 'DELETE',
178
+ headers: headerParameters,
179
+ query: queryParameters,
180
+ }, initOverrides);
181
+ return new runtime.VoidApiResponse(response);
182
+ }
183
+ /**
184
+ * Deletes a skill from the currently logged-in user\'s profile.
185
+ * Deletes a skill from the currently logged-in user\'s profile.
186
+ */
187
+ async deleteSkill(requestParameters, initOverrides) {
188
+ await this.deleteSkillRaw(requestParameters, initOverrides);
189
+ }
190
+ /**
191
+ * Deletes the currently logged-in user.
192
+ * Deletes the currently logged-in user.
193
+ */
194
+ async deleteUserRaw(initOverrides) {
195
+ const queryParameters = {};
196
+ const headerParameters = {};
197
+ if (this.configuration && this.configuration.apiKey) {
198
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
199
+ }
200
+ if (this.configuration && this.configuration.accessToken) {
201
+ // oauth required
202
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
203
+ }
204
+ const response = await this.request({
205
+ path: `/me`,
206
+ method: 'DELETE',
207
+ headers: headerParameters,
208
+ query: queryParameters,
209
+ }, initOverrides);
210
+ return new runtime.VoidApiResponse(response);
211
+ }
212
+ /**
213
+ * Deletes the currently logged-in user.
214
+ * Deletes the currently logged-in user.
215
+ */
216
+ async deleteUser(initOverrides) {
217
+ await this.deleteUserRaw(initOverrides);
218
+ }
219
+ /**
220
+ * Returns the user details of the currently logged-in user.
221
+ * Returns the user details of the currently logged-in user.
222
+ */
223
+ async getUserRaw(initOverrides) {
224
+ const queryParameters = {};
225
+ const headerParameters = {};
226
+ if (this.configuration && this.configuration.apiKey) {
227
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
228
+ }
229
+ if (this.configuration && this.configuration.accessToken) {
230
+ // oauth required
231
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
232
+ }
233
+ const response = await this.request({
234
+ path: `/me`,
235
+ method: 'GET',
236
+ headers: headerParameters,
237
+ query: queryParameters,
238
+ }, initOverrides);
239
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserDtoFromJSON)(jsonValue));
240
+ }
241
+ /**
242
+ * Returns the user details of the currently logged-in user.
243
+ * Returns the user details of the currently logged-in user.
244
+ */
245
+ async getUser(initOverrides) {
246
+ const response = await this.getUserRaw(initOverrides);
247
+ return await response.value();
248
+ }
249
+ /**
250
+ * Updates the background image (profile page) of the currently logged-in user.
251
+ * Updates the background image (profile page) of the currently logged-in user.
252
+ */
253
+ async updateBackgroundImageRaw(requestParameters, initOverrides) {
254
+ if (requestParameters['file'] == null) {
255
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling updateBackgroundImage().');
256
+ }
257
+ const queryParameters = {};
258
+ const headerParameters = {};
259
+ if (this.configuration && this.configuration.apiKey) {
260
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
261
+ }
262
+ if (this.configuration && this.configuration.accessToken) {
263
+ // oauth required
264
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
265
+ }
266
+ const consumes = [
267
+ { contentType: 'multipart/form-data' },
268
+ ];
269
+ // @ts-ignore: canConsumeForm may be unused
270
+ const canConsumeForm = runtime.canConsumeForm(consumes);
271
+ let formParams;
272
+ let useForm = false;
273
+ // use FormData to transmit files using content-type "multipart/form-data"
274
+ useForm = canConsumeForm;
275
+ if (useForm) {
276
+ formParams = new FormData();
277
+ }
278
+ else {
279
+ formParams = new URLSearchParams();
280
+ }
281
+ if (requestParameters['file'] != null) {
282
+ formParams.append('file', requestParameters['file']);
283
+ }
284
+ const response = await this.request({
285
+ path: `/me/background-image`,
286
+ method: 'POST',
287
+ headers: headerParameters,
288
+ query: queryParameters,
289
+ body: formParams,
290
+ }, initOverrides);
291
+ return new runtime.VoidApiResponse(response);
292
+ }
293
+ /**
294
+ * Updates the background image (profile page) of the currently logged-in user.
295
+ * Updates the background image (profile page) of the currently logged-in user.
296
+ */
297
+ async updateBackgroundImage(requestParameters, initOverrides) {
298
+ await this.updateBackgroundImageRaw(requestParameters, initOverrides);
299
+ }
300
+ /**
301
+ * Updates the notification settings of the currently logged-in user.
302
+ * Updates the notification settings of the currently logged-in user.
303
+ */
304
+ async updateNotificationSettingsRaw(initOverrides) {
305
+ const queryParameters = {};
306
+ const headerParameters = {};
307
+ if (this.configuration && this.configuration.apiKey) {
308
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
309
+ }
310
+ if (this.configuration && this.configuration.accessToken) {
311
+ // oauth required
312
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
313
+ }
314
+ const response = await this.request({
315
+ path: `/me/notification-settings`,
316
+ method: 'PUT',
317
+ headers: headerParameters,
318
+ query: queryParameters,
319
+ }, initOverrides);
320
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserDtoFromJSON)(jsonValue));
321
+ }
322
+ /**
323
+ * Updates the notification settings of the currently logged-in user.
324
+ * Updates the notification settings of the currently logged-in user.
325
+ */
326
+ async updateNotificationSettings(initOverrides) {
327
+ const response = await this.updateNotificationSettingsRaw(initOverrides);
328
+ return await response.value();
329
+ }
330
+ /**
331
+ * Updates the profile image of the currently logged-in user.
332
+ * Updates the profile image of the currently logged-in user.
333
+ */
334
+ async updateProfileImageRaw(requestParameters, initOverrides) {
335
+ if (requestParameters['file'] == null) {
336
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling updateProfileImage().');
337
+ }
338
+ const queryParameters = {};
339
+ const headerParameters = {};
340
+ if (this.configuration && this.configuration.apiKey) {
341
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
342
+ }
343
+ if (this.configuration && this.configuration.accessToken) {
344
+ // oauth required
345
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
346
+ }
347
+ const consumes = [
348
+ { contentType: 'multipart/form-data' },
349
+ ];
350
+ // @ts-ignore: canConsumeForm may be unused
351
+ const canConsumeForm = runtime.canConsumeForm(consumes);
352
+ let formParams;
353
+ let useForm = false;
354
+ // use FormData to transmit files using content-type "multipart/form-data"
355
+ useForm = canConsumeForm;
356
+ if (useForm) {
357
+ formParams = new FormData();
358
+ }
359
+ else {
360
+ formParams = new URLSearchParams();
361
+ }
362
+ if (requestParameters['file'] != null) {
363
+ formParams.append('file', requestParameters['file']);
364
+ }
365
+ const response = await this.request({
366
+ path: `/me/profile-image`,
367
+ method: 'POST',
368
+ headers: headerParameters,
369
+ query: queryParameters,
370
+ body: formParams,
371
+ }, initOverrides);
372
+ return new runtime.VoidApiResponse(response);
373
+ }
374
+ /**
375
+ * Updates the profile image of the currently logged-in user.
376
+ * Updates the profile image of the currently logged-in user.
377
+ */
378
+ async updateProfileImage(requestParameters, initOverrides) {
379
+ await this.updateProfileImageRaw(requestParameters, initOverrides);
380
+ }
381
+ /**
382
+ * Updates the user details of the currently logged-in user.
383
+ * Updates the user details of the currently logged-in user.
384
+ */
385
+ async updateUserRaw(requestParameters, initOverrides) {
386
+ if (requestParameters['updateUserRequest'] == null) {
387
+ throw new runtime.RequiredError('updateUserRequest', 'Required parameter "updateUserRequest" was null or undefined when calling updateUser().');
388
+ }
389
+ const queryParameters = {};
390
+ const headerParameters = {};
391
+ headerParameters['Content-Type'] = 'application/json';
392
+ if (this.configuration && this.configuration.apiKey) {
393
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
394
+ }
395
+ if (this.configuration && this.configuration.accessToken) {
396
+ // oauth required
397
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
398
+ }
399
+ const response = await this.request({
400
+ path: `/me`,
401
+ method: 'PUT',
402
+ headers: headerParameters,
403
+ query: queryParameters,
404
+ body: (0, index_1.UpdateUserRequestToJSON)(requestParameters['updateUserRequest']),
405
+ }, initOverrides);
406
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserDtoFromJSON)(jsonValue));
407
+ }
408
+ /**
409
+ * Updates the user details of the currently logged-in user.
410
+ * Updates the user details of the currently logged-in user.
411
+ */
412
+ async updateUser(requestParameters, initOverrides) {
413
+ const response = await this.updateUserRaw(requestParameters, initOverrides);
414
+ return await response.value();
415
+ }
416
+ }
417
+ exports.UserSettingsApi = UserSettingsApi;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Quantum Platform User Service API
3
+ * Part of the OpenAPI specification for the Quantum Platform.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: support-hub@kipu-quantum.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { AccessTokenCreateRequest, AccessTokenDto, AccessTokensResponse, DefaultAccessTokenResponse } from '../models/index';
14
+ export interface CreateAccessTokenRequest {
15
+ accessTokenCreateRequest: AccessTokenCreateRequest;
16
+ }
17
+ export interface DeleteAccessTokenRequest {
18
+ id: string;
19
+ }
20
+ /**
21
+ *
22
+ */
23
+ export declare class UserSettingsPersonalAccessTokensApi extends runtime.BaseAPI {
24
+ /**
25
+ * Creates a new personal access token for the current user.
26
+ * Creates a new personal access token for the current user.
27
+ */
28
+ createAccessTokenRaw(requestParameters: CreateAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessTokenDto>>;
29
+ /**
30
+ * Creates a new personal access token for the current user.
31
+ * Creates a new personal access token for the current user.
32
+ */
33
+ createAccessToken(requestParameters: CreateAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessTokenDto>;
34
+ /**
35
+ * Deletes a personal access token of the current user.
36
+ * Deletes a personal access token of the current user.
37
+ */
38
+ deleteAccessTokenRaw(requestParameters: DeleteAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
39
+ /**
40
+ * Deletes a personal access token of the current user.
41
+ * Deletes a personal access token of the current user.
42
+ */
43
+ deleteAccessToken(requestParameters: DeleteAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
44
+ /**
45
+ * Returns the personal access tokens of the current user.
46
+ * Returns the personal access tokens of the current user.
47
+ */
48
+ getAccessTokensRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessTokensResponse>>;
49
+ /**
50
+ * Returns the personal access tokens of the current user.
51
+ * Returns the personal access tokens of the current user.
52
+ */
53
+ getAccessTokens(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessTokensResponse>;
54
+ /**
55
+ * Updates the default personal access token of the current user.
56
+ * Updates the default personal access token of the current user.
57
+ */
58
+ updateDefaultAccessTokenRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefaultAccessTokenResponse>>;
59
+ /**
60
+ * Updates the default personal access token of the current user.
61
+ * Updates the default personal access token of the current user.
62
+ */
63
+ updateDefaultAccessToken(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DefaultAccessTokenResponse>;
64
+ }
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Quantum Platform User Service API
6
+ * Part of the OpenAPI specification for the Quantum Platform.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: support-hub@kipu-quantum.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class 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 () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.UserSettingsPersonalAccessTokensApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class UserSettingsPersonalAccessTokensApi extends runtime.BaseAPI {
56
+ /**
57
+ * Creates a new personal access token for the current user.
58
+ * Creates a new personal access token for the current user.
59
+ */
60
+ async createAccessTokenRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['accessTokenCreateRequest'] == null) {
62
+ throw new runtime.RequiredError('accessTokenCreateRequest', 'Required parameter "accessTokenCreateRequest" was null or undefined when calling createAccessToken().');
63
+ }
64
+ const queryParameters = {};
65
+ const headerParameters = {};
66
+ headerParameters['Content-Type'] = 'application/json';
67
+ if (this.configuration && this.configuration.apiKey) {
68
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
69
+ }
70
+ if (this.configuration && this.configuration.accessToken) {
71
+ // oauth required
72
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
73
+ }
74
+ const response = await this.request({
75
+ path: `/me/access-tokens`,
76
+ method: 'POST',
77
+ headers: headerParameters,
78
+ query: queryParameters,
79
+ body: (0, index_1.AccessTokenCreateRequestToJSON)(requestParameters['accessTokenCreateRequest']),
80
+ }, initOverrides);
81
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccessTokenDtoFromJSON)(jsonValue));
82
+ }
83
+ /**
84
+ * Creates a new personal access token for the current user.
85
+ * Creates a new personal access token for the current user.
86
+ */
87
+ async createAccessToken(requestParameters, initOverrides) {
88
+ const response = await this.createAccessTokenRaw(requestParameters, initOverrides);
89
+ return await response.value();
90
+ }
91
+ /**
92
+ * Deletes a personal access token of the current user.
93
+ * Deletes a personal access token of the current user.
94
+ */
95
+ async deleteAccessTokenRaw(requestParameters, initOverrides) {
96
+ if (requestParameters['id'] == null) {
97
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteAccessToken().');
98
+ }
99
+ const queryParameters = {};
100
+ const headerParameters = {};
101
+ if (this.configuration && this.configuration.apiKey) {
102
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
103
+ }
104
+ if (this.configuration && this.configuration.accessToken) {
105
+ // oauth required
106
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
107
+ }
108
+ const response = await this.request({
109
+ path: `/me/access-tokens/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
110
+ method: 'DELETE',
111
+ headers: headerParameters,
112
+ query: queryParameters,
113
+ }, initOverrides);
114
+ return new runtime.VoidApiResponse(response);
115
+ }
116
+ /**
117
+ * Deletes a personal access token of the current user.
118
+ * Deletes a personal access token of the current user.
119
+ */
120
+ async deleteAccessToken(requestParameters, initOverrides) {
121
+ await this.deleteAccessTokenRaw(requestParameters, initOverrides);
122
+ }
123
+ /**
124
+ * Returns the personal access tokens of the current user.
125
+ * Returns the personal access tokens of the current user.
126
+ */
127
+ async getAccessTokensRaw(initOverrides) {
128
+ const queryParameters = {};
129
+ const headerParameters = {};
130
+ if (this.configuration && this.configuration.apiKey) {
131
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
132
+ }
133
+ if (this.configuration && this.configuration.accessToken) {
134
+ // oauth required
135
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
136
+ }
137
+ const response = await this.request({
138
+ path: `/me/access-tokens`,
139
+ method: 'GET',
140
+ headers: headerParameters,
141
+ query: queryParameters,
142
+ }, initOverrides);
143
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccessTokensResponseFromJSON)(jsonValue));
144
+ }
145
+ /**
146
+ * Returns the personal access tokens of the current user.
147
+ * Returns the personal access tokens of the current user.
148
+ */
149
+ async getAccessTokens(initOverrides) {
150
+ const response = await this.getAccessTokensRaw(initOverrides);
151
+ return await response.value();
152
+ }
153
+ /**
154
+ * Updates the default personal access token of the current user.
155
+ * Updates the default personal access token of the current user.
156
+ */
157
+ async updateDefaultAccessTokenRaw(initOverrides) {
158
+ const queryParameters = {};
159
+ const headerParameters = {};
160
+ if (this.configuration && this.configuration.apiKey) {
161
+ headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
162
+ }
163
+ if (this.configuration && this.configuration.accessToken) {
164
+ // oauth required
165
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
166
+ }
167
+ const response = await this.request({
168
+ path: `/me/access-tokens/default`,
169
+ method: 'PUT',
170
+ headers: headerParameters,
171
+ query: queryParameters,
172
+ }, initOverrides);
173
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DefaultAccessTokenResponseFromJSON)(jsonValue));
174
+ }
175
+ /**
176
+ * Updates the default personal access token of the current user.
177
+ * Updates the default personal access token of the current user.
178
+ */
179
+ async updateDefaultAccessToken(initOverrides) {
180
+ const response = await this.updateDefaultAccessTokenRaw(initOverrides);
181
+ return await response.value();
182
+ }
183
+ }
184
+ exports.UserSettingsPersonalAccessTokensApi = UserSettingsPersonalAccessTokensApi;