@quantum-hub/qhubctl 1.9.0 → 1.11.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 (155) hide show
  1. package/README.md +6 -35
  2. package/dist/commands/datapool-upload.js +7 -3
  3. package/dist/commands/init.js +2 -27
  4. package/dist/commands/list-contexts.js +1 -1
  5. package/dist/commands/services-build-status.js +1 -1
  6. package/dist/commands/set-context.js +6 -2
  7. package/dist/commands/up.js +11 -15
  8. package/dist/lib/error.js +25 -8
  9. package/dist/lib/repository.d.ts +1 -4
  10. package/dist/lib/repository.js +2 -9
  11. package/dist/service/quantum-hub-service.d.ts +9 -13
  12. package/dist/service/quantum-hub-service.js +67 -139
  13. package/package.json +2 -2
  14. package/dist/client/kqh/apis/ServicePlatformApplicationsApi.d.ts +0 -89
  15. package/dist/client/kqh/apis/ServicePlatformApplicationsApi.js +0 -222
  16. package/dist/client/kqh/apis/ServicePlatformDashboardApi.d.ts +0 -44
  17. package/dist/client/kqh/apis/ServicePlatformDashboardApi.js +0 -106
  18. package/dist/client/kqh/apis/ServicePlatformDataPoolsApi.d.ts +0 -133
  19. package/dist/client/kqh/apis/ServicePlatformDataPoolsApi.js +0 -373
  20. package/dist/client/kqh/apis/ServicePlatformJobsApi.d.ts +0 -101
  21. package/dist/client/kqh/apis/ServicePlatformJobsApi.js +0 -261
  22. package/dist/client/kqh/apis/ServicePlatformMarketplaceApi.d.ts +0 -48
  23. package/dist/client/kqh/apis/ServicePlatformMarketplaceApi.js +0 -115
  24. package/dist/client/kqh/apis/ServicePlatformMeteringAPIApi.d.ts +0 -29
  25. package/dist/client/kqh/apis/ServicePlatformMeteringAPIApi.js +0 -53
  26. package/dist/client/kqh/apis/ServicePlatformServicesApi.d.ts +0 -501
  27. package/dist/client/kqh/apis/ServicePlatformServicesApi.js +0 -1472
  28. package/dist/client/kqh/apis/ServicePlatformSubscriptionsApi.d.ts +0 -66
  29. package/dist/client/kqh/apis/ServicePlatformSubscriptionsApi.js +0 -157
  30. package/dist/client/kqh/apis/TaxonomiesApi.d.ts +0 -90
  31. package/dist/client/kqh/apis/TaxonomiesApi.js +0 -272
  32. package/dist/client/kqh/apis/index.d.ts +0 -9
  33. package/dist/client/kqh/apis/index.js +0 -11
  34. package/dist/client/kqh/index.d.ts +0 -3
  35. package/dist/client/kqh/index.js +0 -5
  36. package/dist/client/kqh/models/AccessTokenDto.d.ts +0 -81
  37. package/dist/client/kqh/models/AccessTokenDto.js +0 -59
  38. package/dist/client/kqh/models/AmountMajorDto.d.ts +0 -37
  39. package/dist/client/kqh/models/AmountMajorDto.js +0 -40
  40. package/dist/client/kqh/models/ApiDto.d.ts +0 -144
  41. package/dist/client/kqh/models/ApiDto.js +0 -92
  42. package/dist/client/kqh/models/ApiOverviewDto.d.ts +0 -119
  43. package/dist/client/kqh/models/ApiOverviewDto.js +0 -83
  44. package/dist/client/kqh/models/ApplicationDto.d.ts +0 -64
  45. package/dist/client/kqh/models/ApplicationDto.js +0 -53
  46. package/dist/client/kqh/models/BuildJobDto.d.ts +0 -75
  47. package/dist/client/kqh/models/BuildJobDto.js +0 -64
  48. package/dist/client/kqh/models/CpuConfiguration.d.ts +0 -38
  49. package/dist/client/kqh/models/CpuConfiguration.js +0 -43
  50. package/dist/client/kqh/models/CreateApplicationRequest.d.ts +0 -31
  51. package/dist/client/kqh/models/CreateApplicationRequest.js +0 -38
  52. package/dist/client/kqh/models/CreateDataPoolRequest.d.ts +0 -31
  53. package/dist/client/kqh/models/CreateDataPoolRequest.js +0 -40
  54. package/dist/client/kqh/models/CreateExternalServicePricingPlanRequest.d.ts +0 -46
  55. package/dist/client/kqh/models/CreateExternalServicePricingPlanRequest.js +0 -50
  56. package/dist/client/kqh/models/CreateJobRequest.d.ts +0 -62
  57. package/dist/client/kqh/models/CreateJobRequest.js +0 -51
  58. package/dist/client/kqh/models/CreateManagedServicePricingPlanRequest.d.ts +0 -73
  59. package/dist/client/kqh/models/CreateManagedServicePricingPlanRequest.js +0 -72
  60. package/dist/client/kqh/models/CreateProductRequest.d.ts +0 -43
  61. package/dist/client/kqh/models/CreateProductRequest.js +0 -46
  62. package/dist/client/kqh/models/CreateSubscriptionRequest.d.ts +0 -37
  63. package/dist/client/kqh/models/CreateSubscriptionRequest.js +0 -44
  64. package/dist/client/kqh/models/CreateWorkflowServiceRequest.d.ts +0 -37
  65. package/dist/client/kqh/models/CreateWorkflowServiceRequest.js +0 -42
  66. package/dist/client/kqh/models/DataPoolDto.d.ts +0 -166
  67. package/dist/client/kqh/models/DataPoolDto.js +0 -98
  68. package/dist/client/kqh/models/DataPoolRef.d.ts +0 -43
  69. package/dist/client/kqh/models/DataPoolRef.js +0 -42
  70. package/dist/client/kqh/models/DataSourceDescriptorDto.d.ts +0 -89
  71. package/dist/client/kqh/models/DataSourceDescriptorDto.js +0 -62
  72. package/dist/client/kqh/models/FileDto.d.ts +0 -73
  73. package/dist/client/kqh/models/FileDto.js +0 -45
  74. package/dist/client/kqh/models/FileSource.d.ts +0 -26
  75. package/dist/client/kqh/models/FileSource.js +0 -28
  76. package/dist/client/kqh/models/GpuConfiguration.d.ts +0 -49
  77. package/dist/client/kqh/models/GpuConfiguration.js +0 -53
  78. package/dist/client/kqh/models/JobDto.d.ts +0 -117
  79. package/dist/client/kqh/models/JobDto.js +0 -75
  80. package/dist/client/kqh/models/JobOverviewDto.d.ts +0 -74
  81. package/dist/client/kqh/models/JobOverviewDto.js +0 -60
  82. package/dist/client/kqh/models/MemoryConfiguration.d.ts +0 -38
  83. package/dist/client/kqh/models/MemoryConfiguration.js +0 -43
  84. package/dist/client/kqh/models/MeteringRequest.d.ts +0 -43
  85. package/dist/client/kqh/models/MeteringRequest.js +0 -42
  86. package/dist/client/kqh/models/MeteringResponse.d.ts +0 -49
  87. package/dist/client/kqh/models/MeteringResponse.js +0 -44
  88. package/dist/client/kqh/models/MonthAmountDto.d.ts +0 -51
  89. package/dist/client/kqh/models/MonthAmountDto.js +0 -46
  90. package/dist/client/kqh/models/OwnerDto.d.ts +0 -67
  91. package/dist/client/kqh/models/OwnerDto.js +0 -50
  92. package/dist/client/kqh/models/PageDataPoolDto.d.ts +0 -94
  93. package/dist/client/kqh/models/PageDataPoolDto.js +0 -61
  94. package/dist/client/kqh/models/PageableObject.d.ts +0 -62
  95. package/dist/client/kqh/models/PageableObject.js +0 -49
  96. package/dist/client/kqh/models/PricingPlanDto.d.ts +0 -52
  97. package/dist/client/kqh/models/PricingPlanDto.js +0 -50
  98. package/dist/client/kqh/models/ProductAmountDto.d.ts +0 -38
  99. package/dist/client/kqh/models/ProductAmountDto.js +0 -41
  100. package/dist/client/kqh/models/ProductDto.d.ts +0 -83
  101. package/dist/client/kqh/models/ProductDto.js +0 -69
  102. package/dist/client/kqh/models/ProductGroupDto.d.ts +0 -45
  103. package/dist/client/kqh/models/ProductGroupDto.js +0 -44
  104. package/dist/client/kqh/models/ProductUsageDto.d.ts +0 -61
  105. package/dist/client/kqh/models/ProductUsageDto.js +0 -48
  106. package/dist/client/kqh/models/RegistrySource.d.ts +0 -52
  107. package/dist/client/kqh/models/RegistrySource.js +0 -49
  108. package/dist/client/kqh/models/RepositorySource.d.ts +0 -32
  109. package/dist/client/kqh/models/RepositorySource.js +0 -41
  110. package/dist/client/kqh/models/ResourceConfiguration.d.ts +0 -31
  111. package/dist/client/kqh/models/ResourceConfiguration.js +0 -52
  112. package/dist/client/kqh/models/ReviewDto.d.ts +0 -51
  113. package/dist/client/kqh/models/ReviewDto.js +0 -49
  114. package/dist/client/kqh/models/RuntimeConfiguration.d.ts +0 -53
  115. package/dist/client/kqh/models/RuntimeConfiguration.js +0 -49
  116. package/dist/client/kqh/models/ServiceDefinitionCommand.d.ts +0 -39
  117. package/dist/client/kqh/models/ServiceDefinitionCommand.js +0 -45
  118. package/dist/client/kqh/models/ServiceDefinitionDto.d.ts +0 -180
  119. package/dist/client/kqh/models/ServiceDefinitionDto.js +0 -101
  120. package/dist/client/kqh/models/ServiceDefinitionDtoSource.d.ts +0 -23
  121. package/dist/client/kqh/models/ServiceDefinitionDtoSource.js +0 -49
  122. package/dist/client/kqh/models/ServiceDefinitionOverviewDto.d.ts +0 -79
  123. package/dist/client/kqh/models/ServiceDefinitionOverviewDto.js +0 -64
  124. package/dist/client/kqh/models/ServiceDto.d.ts +0 -59
  125. package/dist/client/kqh/models/ServiceDto.js +0 -52
  126. package/dist/client/kqh/models/ServiceExecutionConsumerDto.d.ts +0 -67
  127. package/dist/client/kqh/models/ServiceExecutionConsumerDto.js +0 -57
  128. package/dist/client/kqh/models/ServiceExecutionDto.d.ts +0 -49
  129. package/dist/client/kqh/models/ServiceExecutionDto.js +0 -44
  130. package/dist/client/kqh/models/ServiceOverviewDto.d.ts +0 -115
  131. package/dist/client/kqh/models/ServiceOverviewDto.js +0 -85
  132. package/dist/client/kqh/models/ServiceSource.d.ts +0 -31
  133. package/dist/client/kqh/models/ServiceSource.js +0 -52
  134. package/dist/client/kqh/models/SortObject.d.ts +0 -43
  135. package/dist/client/kqh/models/SortObject.js +0 -42
  136. package/dist/client/kqh/models/SubscriptionDto.d.ts +0 -58
  137. package/dist/client/kqh/models/SubscriptionDto.js +0 -49
  138. package/dist/client/kqh/models/TaxonomyElement.d.ts +0 -43
  139. package/dist/client/kqh/models/TaxonomyElement.js +0 -42
  140. package/dist/client/kqh/models/UpdateDataPoolRequest.d.ts +0 -109
  141. package/dist/client/kqh/models/UpdateDataPoolRequest.js +0 -66
  142. package/dist/client/kqh/models/UpdateResourceConfigurationRequest.d.ts +0 -23
  143. package/dist/client/kqh/models/UpdateResourceConfigurationRequest.js +0 -49
  144. package/dist/client/kqh/models/UpdateVersionRequest.d.ts +0 -44
  145. package/dist/client/kqh/models/UpdateVersionRequest.js +0 -43
  146. package/dist/client/kqh/models/UpdateWorkflowServiceRequest.d.ts +0 -31
  147. package/dist/client/kqh/models/UpdateWorkflowServiceRequest.js +0 -27
  148. package/dist/client/kqh/models/ValidationResult.d.ts +0 -52
  149. package/dist/client/kqh/models/ValidationResult.js +0 -50
  150. package/dist/client/kqh/models/index.d.ts +0 -57
  151. package/dist/client/kqh/models/index.js +0 -59
  152. package/dist/client/kqh/runtime.d.ts +0 -181
  153. package/dist/client/kqh/runtime.js +0 -325
  154. package/dist/model/account.d.ts +0 -5
  155. package/dist/model/account.js +0 -1
@@ -1,106 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Quantum Platform API
5
- * Part of the OpenAPI specification for the Quantum Platform.
6
- *
7
- * The version of the OpenAPI document: v1
8
- * Contact: info@anaqor.io
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import * as runtime from '../runtime.js';
15
- import { MonthAmountDtoFromJSON, } from '../models/index.js';
16
- /**
17
- *
18
- */
19
- export class ServicePlatformDashboardApi extends runtime.BaseAPI {
20
- /**
21
- * Returns the cost report for a given month.
22
- */
23
- async getCostsByMonthRaw(requestParameters, initOverrides) {
24
- if (requestParameters['year'] == null) {
25
- throw new runtime.RequiredError('year', 'Required parameter "year" was null or undefined when calling getCostsByMonth().');
26
- }
27
- if (requestParameters['month'] == null) {
28
- throw new runtime.RequiredError('month', 'Required parameter "month" was null or undefined when calling getCostsByMonth().');
29
- }
30
- const queryParameters = {};
31
- if (requestParameters['year'] != null) {
32
- queryParameters['year'] = requestParameters['year'];
33
- }
34
- if (requestParameters['month'] != null) {
35
- queryParameters['month'] = requestParameters['month'];
36
- }
37
- const headerParameters = {};
38
- if (requestParameters['xOrganizationId'] != null) {
39
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
40
- }
41
- if (this.configuration && this.configuration.apiKey) {
42
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
43
- }
44
- if (this.configuration && this.configuration.accessToken) {
45
- // oauth required
46
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
47
- }
48
- const response = await this.request({
49
- path: `/dashboard/costs`,
50
- method: 'GET',
51
- headers: headerParameters,
52
- query: queryParameters,
53
- }, initOverrides);
54
- return new runtime.JSONApiResponse(response, (jsonValue) => MonthAmountDtoFromJSON(jsonValue));
55
- }
56
- /**
57
- * Returns the cost report for a given month.
58
- */
59
- async getCostsByMonth(requestParameters, initOverrides) {
60
- const response = await this.getCostsByMonthRaw(requestParameters, initOverrides);
61
- return await response.value();
62
- }
63
- /**
64
- * Returns the revenue report for a given month.
65
- */
66
- async getRevenueByMonthRaw(requestParameters, initOverrides) {
67
- if (requestParameters['year'] == null) {
68
- throw new runtime.RequiredError('year', 'Required parameter "year" was null or undefined when calling getRevenueByMonth().');
69
- }
70
- if (requestParameters['month'] == null) {
71
- throw new runtime.RequiredError('month', 'Required parameter "month" was null or undefined when calling getRevenueByMonth().');
72
- }
73
- const queryParameters = {};
74
- if (requestParameters['year'] != null) {
75
- queryParameters['year'] = requestParameters['year'];
76
- }
77
- if (requestParameters['month'] != null) {
78
- queryParameters['month'] = requestParameters['month'];
79
- }
80
- const headerParameters = {};
81
- if (requestParameters['xOrganizationId'] != null) {
82
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
83
- }
84
- if (this.configuration && this.configuration.apiKey) {
85
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
86
- }
87
- if (this.configuration && this.configuration.accessToken) {
88
- // oauth required
89
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
90
- }
91
- const response = await this.request({
92
- path: `/dashboard/revenue`,
93
- method: 'GET',
94
- headers: headerParameters,
95
- query: queryParameters,
96
- }, initOverrides);
97
- return new runtime.JSONApiResponse(response, (jsonValue) => MonthAmountDtoFromJSON(jsonValue));
98
- }
99
- /**
100
- * Returns the revenue report for a given month.
101
- */
102
- async getRevenueByMonth(requestParameters, initOverrides) {
103
- const response = await this.getRevenueByMonthRaw(requestParameters, initOverrides);
104
- return await response.value();
105
- }
106
- }
@@ -1,133 +0,0 @@
1
- /**
2
- * Quantum Platform API
3
- * Part of the OpenAPI specification for the Quantum Platform.
4
- *
5
- * The version of the OpenAPI document: v1
6
- * Contact: info@anaqor.io
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.js';
13
- import type { CreateDataPoolRequest, DataPoolDto, DataSourceDescriptorDto, PageDataPoolDto, UpdateDataPoolRequest } from '../models/index.js';
14
- export interface CreateDataPoolOperationRequest {
15
- createDataPoolRequest: CreateDataPoolRequest;
16
- xOrganizationId?: string;
17
- }
18
- export interface CreateFileDataSourceRequest {
19
- dataPoolId: string;
20
- file: Blob;
21
- xOrganizationId?: string;
22
- }
23
- export interface DeleteDataPoolRequest {
24
- id: string;
25
- xOrganizationId?: string;
26
- }
27
- export interface DeleteDataSourceRequest {
28
- dataPoolId: string;
29
- dataSourceId: string;
30
- xOrganizationId?: string;
31
- }
32
- export interface GetDataPoolRequest {
33
- id: string;
34
- xOrganizationId?: string;
35
- }
36
- export interface GetDataPoolsRequest {
37
- xOrganizationId?: string;
38
- search?: string;
39
- page?: number;
40
- size?: number;
41
- sort?: Array<string>;
42
- }
43
- export interface GetDataSourcesRequest {
44
- dataPoolId: string;
45
- xOrganizationId?: string;
46
- }
47
- export interface GetFileContentRequest {
48
- dataPoolId: string;
49
- dataSourceId: string;
50
- xOrganizationId?: string;
51
- }
52
- export interface UpdateDataPoolOperationRequest {
53
- id: string;
54
- updateDataPoolRequest: UpdateDataPoolRequest;
55
- xOrganizationId?: string;
56
- }
57
- /**
58
- *
59
- */
60
- export declare class ServicePlatformDataPoolsApi extends runtime.BaseAPI {
61
- /**
62
- * Creates a new data pool. The user will be the owner of the data pool.
63
- */
64
- createDataPoolRaw(requestParameters: CreateDataPoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataPoolDto>>;
65
- /**
66
- * Creates a new data pool. The user will be the owner of the data pool.
67
- */
68
- createDataPool(requestParameters: CreateDataPoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataPoolDto>;
69
- /**
70
- * Uploads a file to a data pool. It creates a data source containing one file. The user must have the permission to modify the data pool.
71
- */
72
- createFileDataSourceRaw(requestParameters: CreateFileDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataSourceDescriptorDto>>;
73
- /**
74
- * Uploads a file to a data pool. It creates a data source containing one file. The user must have the permission to modify the data pool.
75
- */
76
- createFileDataSource(requestParameters: CreateFileDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataSourceDescriptorDto>;
77
- /**
78
- * Deletes a data pool by its id. The user must have access to the data pool.
79
- */
80
- deleteDataPoolRaw(requestParameters: DeleteDataPoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
81
- /**
82
- * Deletes a data pool by its id. The user must have access to the data pool.
83
- */
84
- deleteDataPool(requestParameters: DeleteDataPoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
85
- /**
86
- * Deletes a data source. The user must have the permission to delete the data source.
87
- */
88
- deleteDataSourceRaw(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
89
- /**
90
- * Deletes a data source. The user must have the permission to delete the data source.
91
- */
92
- deleteDataSource(requestParameters: DeleteDataSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
93
- /**
94
- * Gets a data pool by its id. The user must have access to the data pool.
95
- */
96
- getDataPoolRaw(requestParameters: GetDataPoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataPoolDto>>;
97
- /**
98
- * Gets a data pool by its id. The user must have access to the data pool.
99
- */
100
- getDataPool(requestParameters: GetDataPoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataPoolDto>;
101
- /**
102
- * Gets a list of all data pools the user has access to. The result is paginated according to the given parameters.
103
- */
104
- getDataPoolsRaw(requestParameters: GetDataPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PageDataPoolDto>>;
105
- /**
106
- * Gets a list of all data pools the user has access to. The result is paginated according to the given parameters.
107
- */
108
- getDataPools(requestParameters?: GetDataPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PageDataPoolDto>;
109
- /**
110
- * Retrieves all data sources of an existing data pool. The user must have the permission to view the data pool.
111
- */
112
- getDataSourcesRaw(requestParameters: GetDataSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<DataSourceDescriptorDto>>>;
113
- /**
114
- * Retrieves all data sources of an existing data pool. The user must have the permission to view the data pool.
115
- */
116
- getDataSources(requestParameters: GetDataSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<DataSourceDescriptorDto>>;
117
- /**
118
- * Returns the file of a data source. The user must have the permission to view the data pool.
119
- */
120
- getFileContentRaw(requestParameters: GetFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
121
- /**
122
- * Returns the file of a data source. The user must have the permission to view the data pool.
123
- */
124
- getFileContent(requestParameters: GetFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
125
- /**
126
- * Updates an existing data pool. The user must have access to the data pool.
127
- */
128
- updateDataPoolRaw(requestParameters: UpdateDataPoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataPoolDto>>;
129
- /**
130
- * Updates an existing data pool. The user must have access to the data pool.
131
- */
132
- updateDataPool(requestParameters: UpdateDataPoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataPoolDto>;
133
- }
@@ -1,373 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Quantum Platform API
5
- * Part of the OpenAPI specification for the Quantum Platform.
6
- *
7
- * The version of the OpenAPI document: v1
8
- * Contact: info@anaqor.io
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import * as runtime from '../runtime.js';
15
- import { CreateDataPoolRequestToJSON, DataPoolDtoFromJSON, DataSourceDescriptorDtoFromJSON, PageDataPoolDtoFromJSON, UpdateDataPoolRequestToJSON, } from '../models/index.js';
16
- /**
17
- *
18
- */
19
- export class ServicePlatformDataPoolsApi extends runtime.BaseAPI {
20
- /**
21
- * Creates a new data pool. The user will be the owner of the data pool.
22
- */
23
- async createDataPoolRaw(requestParameters, initOverrides) {
24
- if (requestParameters['createDataPoolRequest'] == null) {
25
- throw new runtime.RequiredError('createDataPoolRequest', 'Required parameter "createDataPoolRequest" was null or undefined when calling createDataPool().');
26
- }
27
- const queryParameters = {};
28
- const headerParameters = {};
29
- headerParameters['Content-Type'] = 'application/json';
30
- if (requestParameters['xOrganizationId'] != null) {
31
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
32
- }
33
- if (this.configuration && this.configuration.apiKey) {
34
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
35
- }
36
- if (this.configuration && this.configuration.accessToken) {
37
- // oauth required
38
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
39
- }
40
- const response = await this.request({
41
- path: `/data-pools`,
42
- method: 'POST',
43
- headers: headerParameters,
44
- query: queryParameters,
45
- body: CreateDataPoolRequestToJSON(requestParameters['createDataPoolRequest']),
46
- }, initOverrides);
47
- return new runtime.JSONApiResponse(response, (jsonValue) => DataPoolDtoFromJSON(jsonValue));
48
- }
49
- /**
50
- * Creates a new data pool. The user will be the owner of the data pool.
51
- */
52
- async createDataPool(requestParameters, initOverrides) {
53
- const response = await this.createDataPoolRaw(requestParameters, initOverrides);
54
- return await response.value();
55
- }
56
- /**
57
- * Uploads a file to a data pool. It creates a data source containing one file. The user must have the permission to modify the data pool.
58
- */
59
- async createFileDataSourceRaw(requestParameters, initOverrides) {
60
- if (requestParameters['dataPoolId'] == null) {
61
- throw new runtime.RequiredError('dataPoolId', 'Required parameter "dataPoolId" was null or undefined when calling createFileDataSource().');
62
- }
63
- if (requestParameters['file'] == null) {
64
- throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling createFileDataSource().');
65
- }
66
- const queryParameters = {};
67
- const headerParameters = {};
68
- if (requestParameters['xOrganizationId'] != null) {
69
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
70
- }
71
- if (this.configuration && this.configuration.apiKey) {
72
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
73
- }
74
- if (this.configuration && this.configuration.accessToken) {
75
- // oauth required
76
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
77
- }
78
- const consumes = [
79
- { contentType: 'multipart/form-data' },
80
- ];
81
- // @ts-ignore: canConsumeForm may be unused
82
- const canConsumeForm = runtime.canConsumeForm(consumes);
83
- let formParams;
84
- let useForm = false;
85
- // use FormData to transmit files using content-type "multipart/form-data"
86
- useForm = canConsumeForm;
87
- if (useForm) {
88
- formParams = new FormData();
89
- }
90
- else {
91
- formParams = new URLSearchParams();
92
- }
93
- if (requestParameters['file'] != null) {
94
- formParams.append('file', requestParameters['file']);
95
- }
96
- const response = await this.request({
97
- path: `/data-pools/{dataPoolId}/files`.replace(`{${"dataPoolId"}}`, encodeURIComponent(String(requestParameters['dataPoolId']))),
98
- method: 'POST',
99
- headers: headerParameters,
100
- query: queryParameters,
101
- body: formParams,
102
- }, initOverrides);
103
- return new runtime.JSONApiResponse(response, (jsonValue) => DataSourceDescriptorDtoFromJSON(jsonValue));
104
- }
105
- /**
106
- * Uploads a file to a data pool. It creates a data source containing one file. The user must have the permission to modify the data pool.
107
- */
108
- async createFileDataSource(requestParameters, initOverrides) {
109
- const response = await this.createFileDataSourceRaw(requestParameters, initOverrides);
110
- return await response.value();
111
- }
112
- /**
113
- * Deletes a data pool by its id. The user must have access to the data pool.
114
- */
115
- async deleteDataPoolRaw(requestParameters, initOverrides) {
116
- if (requestParameters['id'] == null) {
117
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteDataPool().');
118
- }
119
- const queryParameters = {};
120
- const headerParameters = {};
121
- if (requestParameters['xOrganizationId'] != null) {
122
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
123
- }
124
- if (this.configuration && this.configuration.apiKey) {
125
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
126
- }
127
- if (this.configuration && this.configuration.accessToken) {
128
- // oauth required
129
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
130
- }
131
- const response = await this.request({
132
- path: `/data-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
133
- method: 'DELETE',
134
- headers: headerParameters,
135
- query: queryParameters,
136
- }, initOverrides);
137
- return new runtime.VoidApiResponse(response);
138
- }
139
- /**
140
- * Deletes a data pool by its id. The user must have access to the data pool.
141
- */
142
- async deleteDataPool(requestParameters, initOverrides) {
143
- await this.deleteDataPoolRaw(requestParameters, initOverrides);
144
- }
145
- /**
146
- * Deletes a data source. The user must have the permission to delete the data source.
147
- */
148
- async deleteDataSourceRaw(requestParameters, initOverrides) {
149
- if (requestParameters['dataPoolId'] == null) {
150
- throw new runtime.RequiredError('dataPoolId', 'Required parameter "dataPoolId" was null or undefined when calling deleteDataSource().');
151
- }
152
- if (requestParameters['dataSourceId'] == null) {
153
- throw new runtime.RequiredError('dataSourceId', 'Required parameter "dataSourceId" was null or undefined when calling deleteDataSource().');
154
- }
155
- const queryParameters = {};
156
- const headerParameters = {};
157
- if (requestParameters['xOrganizationId'] != null) {
158
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
159
- }
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: `/data-pools/{dataPoolId}/data-sources/{dataSourceId}`.replace(`{${"dataPoolId"}}`, encodeURIComponent(String(requestParameters['dataPoolId']))).replace(`{${"dataSourceId"}}`, encodeURIComponent(String(requestParameters['dataSourceId']))),
169
- method: 'DELETE',
170
- headers: headerParameters,
171
- query: queryParameters,
172
- }, initOverrides);
173
- return new runtime.VoidApiResponse(response);
174
- }
175
- /**
176
- * Deletes a data source. The user must have the permission to delete the data source.
177
- */
178
- async deleteDataSource(requestParameters, initOverrides) {
179
- await this.deleteDataSourceRaw(requestParameters, initOverrides);
180
- }
181
- /**
182
- * Gets a data pool by its id. The user must have access to the data pool.
183
- */
184
- async getDataPoolRaw(requestParameters, initOverrides) {
185
- if (requestParameters['id'] == null) {
186
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getDataPool().');
187
- }
188
- const queryParameters = {};
189
- const headerParameters = {};
190
- if (requestParameters['xOrganizationId'] != null) {
191
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
192
- }
193
- if (this.configuration && this.configuration.apiKey) {
194
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
195
- }
196
- if (this.configuration && this.configuration.accessToken) {
197
- // oauth required
198
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
199
- }
200
- const response = await this.request({
201
- path: `/data-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
202
- method: 'GET',
203
- headers: headerParameters,
204
- query: queryParameters,
205
- }, initOverrides);
206
- return new runtime.JSONApiResponse(response, (jsonValue) => DataPoolDtoFromJSON(jsonValue));
207
- }
208
- /**
209
- * Gets a data pool by its id. The user must have access to the data pool.
210
- */
211
- async getDataPool(requestParameters, initOverrides) {
212
- const response = await this.getDataPoolRaw(requestParameters, initOverrides);
213
- return await response.value();
214
- }
215
- /**
216
- * Gets a list of all data pools the user has access to. The result is paginated according to the given parameters.
217
- */
218
- async getDataPoolsRaw(requestParameters, initOverrides) {
219
- const queryParameters = {};
220
- if (requestParameters['search'] != null) {
221
- queryParameters['search'] = requestParameters['search'];
222
- }
223
- if (requestParameters['page'] != null) {
224
- queryParameters['page'] = requestParameters['page'];
225
- }
226
- if (requestParameters['size'] != null) {
227
- queryParameters['size'] = requestParameters['size'];
228
- }
229
- if (requestParameters['sort'] != null) {
230
- queryParameters['sort'] = requestParameters['sort'];
231
- }
232
- const headerParameters = {};
233
- if (requestParameters['xOrganizationId'] != null) {
234
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
235
- }
236
- if (this.configuration && this.configuration.apiKey) {
237
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
238
- }
239
- if (this.configuration && this.configuration.accessToken) {
240
- // oauth required
241
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
242
- }
243
- const response = await this.request({
244
- path: `/data-pools`,
245
- method: 'GET',
246
- headers: headerParameters,
247
- query: queryParameters,
248
- }, initOverrides);
249
- return new runtime.JSONApiResponse(response, (jsonValue) => PageDataPoolDtoFromJSON(jsonValue));
250
- }
251
- /**
252
- * Gets a list of all data pools the user has access to. The result is paginated according to the given parameters.
253
- */
254
- async getDataPools(requestParameters = {}, initOverrides) {
255
- const response = await this.getDataPoolsRaw(requestParameters, initOverrides);
256
- return await response.value();
257
- }
258
- /**
259
- * Retrieves all data sources of an existing data pool. The user must have the permission to view the data pool.
260
- */
261
- async getDataSourcesRaw(requestParameters, initOverrides) {
262
- if (requestParameters['dataPoolId'] == null) {
263
- throw new runtime.RequiredError('dataPoolId', 'Required parameter "dataPoolId" was null or undefined when calling getDataSources().');
264
- }
265
- const queryParameters = {};
266
- const headerParameters = {};
267
- if (requestParameters['xOrganizationId'] != null) {
268
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
269
- }
270
- if (this.configuration && this.configuration.apiKey) {
271
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
272
- }
273
- if (this.configuration && this.configuration.accessToken) {
274
- // oauth required
275
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
276
- }
277
- const response = await this.request({
278
- path: `/data-pools/{dataPoolId}/data-sources`.replace(`{${"dataPoolId"}}`, encodeURIComponent(String(requestParameters['dataPoolId']))),
279
- method: 'GET',
280
- headers: headerParameters,
281
- query: queryParameters,
282
- }, initOverrides);
283
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DataSourceDescriptorDtoFromJSON));
284
- }
285
- /**
286
- * Retrieves all data sources of an existing data pool. The user must have the permission to view the data pool.
287
- */
288
- async getDataSources(requestParameters, initOverrides) {
289
- const response = await this.getDataSourcesRaw(requestParameters, initOverrides);
290
- return await response.value();
291
- }
292
- /**
293
- * Returns the file of a data source. The user must have the permission to view the data pool.
294
- */
295
- async getFileContentRaw(requestParameters, initOverrides) {
296
- if (requestParameters['dataPoolId'] == null) {
297
- throw new runtime.RequiredError('dataPoolId', 'Required parameter "dataPoolId" was null or undefined when calling getFileContent().');
298
- }
299
- if (requestParameters['dataSourceId'] == null) {
300
- throw new runtime.RequiredError('dataSourceId', 'Required parameter "dataSourceId" was null or undefined when calling getFileContent().');
301
- }
302
- const queryParameters = {};
303
- const headerParameters = {};
304
- if (requestParameters['xOrganizationId'] != null) {
305
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
306
- }
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: `/data-pools/{dataPoolId}/data-sources/{dataSourceId}/file`.replace(`{${"dataPoolId"}}`, encodeURIComponent(String(requestParameters['dataPoolId']))).replace(`{${"dataSourceId"}}`, encodeURIComponent(String(requestParameters['dataSourceId']))),
316
- method: 'GET',
317
- headers: headerParameters,
318
- query: queryParameters,
319
- }, initOverrides);
320
- if (this.isJsonMime(response.headers.get('content-type'))) {
321
- return new runtime.JSONApiResponse(response);
322
- }
323
- else {
324
- return new runtime.TextApiResponse(response);
325
- }
326
- }
327
- /**
328
- * Returns the file of a data source. The user must have the permission to view the data pool.
329
- */
330
- async getFileContent(requestParameters, initOverrides) {
331
- const response = await this.getFileContentRaw(requestParameters, initOverrides);
332
- return await response.value();
333
- }
334
- /**
335
- * Updates an existing data pool. The user must have access to the data pool.
336
- */
337
- async updateDataPoolRaw(requestParameters, initOverrides) {
338
- if (requestParameters['id'] == null) {
339
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateDataPool().');
340
- }
341
- if (requestParameters['updateDataPoolRequest'] == null) {
342
- throw new runtime.RequiredError('updateDataPoolRequest', 'Required parameter "updateDataPoolRequest" was null or undefined when calling updateDataPool().');
343
- }
344
- const queryParameters = {};
345
- const headerParameters = {};
346
- headerParameters['Content-Type'] = 'application/json';
347
- if (requestParameters['xOrganizationId'] != null) {
348
- headerParameters['X-OrganizationId'] = String(requestParameters['xOrganizationId']);
349
- }
350
- if (this.configuration && this.configuration.apiKey) {
351
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
352
- }
353
- if (this.configuration && this.configuration.accessToken) {
354
- // oauth required
355
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
356
- }
357
- const response = await this.request({
358
- path: `/data-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
359
- method: 'PUT',
360
- headers: headerParameters,
361
- query: queryParameters,
362
- body: UpdateDataPoolRequestToJSON(requestParameters['updateDataPoolRequest']),
363
- }, initOverrides);
364
- return new runtime.JSONApiResponse(response, (jsonValue) => DataPoolDtoFromJSON(jsonValue));
365
- }
366
- /**
367
- * Updates an existing data pool. The user must have access to the data pool.
368
- */
369
- async updateDataPool(requestParameters, initOverrides) {
370
- const response = await this.updateDataPoolRaw(requestParameters, initOverrides);
371
- return await response.value();
372
- }
373
- }