Skip to content

Commit

Permalink
Merge pull request #466 from dolittle/strict-configuration-validation
Browse files Browse the repository at this point in the history
Add 'Strict certificate validation' to connector settings
  • Loading branch information
pavsaund authored Sep 1, 2023
2 parents 076060d + be12896 commit 498dad1
Show file tree
Hide file tree
Showing 97 changed files with 202 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useQuery, useMutation } from '@tanstack/react-query';
import { API_CONFIGURATION } from './api';
import { CACHE_KEYS } from './CacheKeys';
import { ConnectionConfigurationApi, ConnectionsIdConfigurationBasicPostRequest, ConnectionsIdConfigurationExporterCronPostRequest, ConnectionsIdConfigurationIonPostRequest, ConnectionsIdConfigurationMdpPostRequest } from './generated';
import { ConnectionConfigurationApi, ConnectionsIdConfigurationBasicPostRequest, ConnectionsIdConfigurationExporterCronPostRequest, ConnectionsIdConfigurationExporterStrictCertificateValidationPostRequest, ConnectionsIdConfigurationIonPostRequest, ConnectionsIdConfigurationMdpPostRequest } from './generated';

let apiInstance: ConnectionConfigurationApi | undefined;

Expand Down Expand Up @@ -41,3 +41,10 @@ export const useConnectionsIdConfigurationExporterCronPost = () => {
mutationFn: (params: ConnectionsIdConfigurationExporterCronPostRequest) => api.connectionsIdConfigurationExporterCronPost(params),
});
};

export const useConnectionsIdConfigurationExporterStrictCertificateValidationPost = () => {
const api = getOrCreateApi();
return useMutation({
mutationFn: (params: ConnectionsIdConfigurationExporterStrictCertificateValidationPostRequest) => api.connectionsIdConfigurationExporterStrictCertificateValidationPost(params),
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -60,6 +60,11 @@ export interface ConnectionsIdConfigurationExporterCronPostRequest {
cronExpression?: string;
}

export interface ConnectionsIdConfigurationExporterStrictCertificateValidationPostRequest {
id: string;
enable?: boolean;
}

export interface ConnectionsIdConfigurationGetRequest {
id: string;
}
Expand Down Expand Up @@ -240,6 +245,51 @@ export class ConnectionConfigurationApi extends runtime.BaseAPI {
await this.connectionsIdConfigurationExporterCronPostRaw(requestParameters, initOverrides);
}

/**
* POST to this resource to configure when the exporter should check for new data
*/
async connectionsIdConfigurationExporterStrictCertificateValidationPostRaw(requestParameters: ConnectionsIdConfigurationExporterStrictCertificateValidationPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling connectionsIdConfigurationExporterStrictCertificateValidationPost.');
}

const queryParameters: any = {};

if (requestParameters.enable !== undefined) {
queryParameters['enable'] = requestParameters.enable;
}

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Organization-Id"] = this.configuration.apiKey("X-Organization-Id"); // X-Organization-Id authentication
}

if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);

if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/connections/{id}/configuration/exporter/strict-certificate-validation`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.VoidApiResponse(response);
}

/**
* POST to this resource to configure when the exporter should check for new data
*/
async connectionsIdConfigurationExporterStrictCertificateValidationPost(requestParameters: ConnectionsIdConfigurationExporterStrictCertificateValidationPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.connectionsIdConfigurationExporterStrictCertificateValidationPostRaw(requestParameters, initOverrides);
}

/**
* GET the configuration for a connection. Will include configurations of different kinds that together make up the whole connection to M3.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -74,6 +74,12 @@ export interface ConnectionModel {
* @memberof ConnectionModel
*/
cronExportTrigger?: string | null;
/**
*
* @type {boolean}
* @memberof ConnectionModel
*/
strictCertificateValidation?: boolean;
/**
*
* @type {EnvironmentType}
Expand Down Expand Up @@ -139,6 +145,7 @@ export function ConnectionModelFromJSONTyped(json: any, ignoreDiscriminator: boo
'name': json['name'],
'description': json['description'],
'cronExportTrigger': !exists(json, 'cronExportTrigger') ? undefined : json['cronExportTrigger'],
'strictCertificateValidation': !exists(json, 'strictCertificateValidation') ? undefined : json['strictCertificateValidation'],
'chosenEnvironment': EnvironmentTypeFromJSON(json['chosenEnvironment']),
'_configuration': ConnectionConfigurationFromJSON(json['configuration']),
'status': ConnectionStatusFromJSON(json['status']),
Expand All @@ -161,6 +168,7 @@ export function ConnectionModelToJSON(value?: ConnectionModel | null): any {
'name': value.name,
'description': value.description,
'cronExportTrigger': value.cronExportTrigger,
'strictCertificateValidation': value.strictCertificateValidation,
'chosenEnvironment': EnvironmentTypeToJSON(value.chosenEnvironment),
'configuration': ConnectionConfigurationToJSON(value._configuration),
'status': ConnectionStatusToJSON(value.status),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Aigonix.Bridge.M3
* Bridge API - made for Aigonix Studio
*
* The version of the OpenAPI document: 0.0.1.320
* The version of the OpenAPI document: 0.0.1.333
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading

0 comments on commit 498dad1

Please sign in to comment.