2024-06-05 10:06:41 +02:00
|
|
|
/* tslint:disable */
|
|
|
|
|
/* eslint-disable */
|
|
|
|
|
/**
|
|
|
|
|
* Signal Cli REST API
|
|
|
|
|
* This is the Signal Cli REST API documentation.
|
|
|
|
|
*
|
|
|
|
|
* The version of the OpenAPI document: 1.0
|
2024-06-28 07:49:39 +02:00
|
|
|
*
|
2024-06-05 10:06:41 +02:00
|
|
|
*
|
|
|
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
|
|
|
* https://openapi-generator.tech
|
|
|
|
|
* Do not edit the class manually.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
import * as runtime from "../runtime.js";
|
2024-06-05 10:06:41 +02:00
|
|
|
import type {
|
|
|
|
|
ApiConfiguration,
|
|
|
|
|
ApiError,
|
|
|
|
|
ApiTrustModeRequest,
|
|
|
|
|
ApiTrustModeResponse,
|
|
|
|
|
ClientAbout,
|
2024-06-28 07:49:39 +02:00
|
|
|
} from "../models/index.js";
|
2024-06-05 10:06:41 +02:00
|
|
|
import {
|
2024-06-28 07:49:39 +02:00
|
|
|
ApiConfigurationFromJSON,
|
|
|
|
|
ApiConfigurationToJSON,
|
|
|
|
|
ApiErrorFromJSON,
|
|
|
|
|
ApiErrorToJSON,
|
|
|
|
|
ApiTrustModeRequestFromJSON,
|
|
|
|
|
ApiTrustModeRequestToJSON,
|
|
|
|
|
ApiTrustModeResponseFromJSON,
|
|
|
|
|
ApiTrustModeResponseToJSON,
|
|
|
|
|
ClientAboutFromJSON,
|
|
|
|
|
ClientAboutToJSON,
|
|
|
|
|
} from "../models/index.js";
|
2024-06-05 10:06:41 +02:00
|
|
|
|
|
|
|
|
export interface V1ConfigurationNumberSettingsGetRequest {
|
2024-06-28 07:49:39 +02:00
|
|
|
number: string;
|
|
|
|
|
data: ApiTrustModeResponse;
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface V1ConfigurationNumberSettingsPostRequest {
|
2024-06-28 07:49:39 +02:00
|
|
|
number: string;
|
|
|
|
|
data: ApiTrustModeRequest;
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface V1ConfigurationPostRequest {
|
2024-06-28 07:49:39 +02:00
|
|
|
data: ApiConfiguration;
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2024-06-28 07:49:39 +02:00
|
|
|
*
|
2024-06-05 10:06:41 +02:00
|
|
|
*/
|
|
|
|
|
export class GeneralApi extends runtime.BaseAPI {
|
2024-06-28 07:49:39 +02:00
|
|
|
/**
|
|
|
|
|
* Returns the supported API versions and the internal build nr
|
|
|
|
|
* Lists general information about the API
|
|
|
|
|
*/
|
|
|
|
|
async v1AboutGetRaw(
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<runtime.ApiResponse<ClientAbout>> {
|
|
|
|
|
const queryParameters: any = {};
|
|
|
|
|
|
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
|
|
|
|
|
|
const response = await this.request(
|
|
|
|
|
{
|
|
|
|
|
path: `/v1/about`,
|
|
|
|
|
method: "GET",
|
|
|
|
|
headers: headerParameters,
|
|
|
|
|
query: queryParameters,
|
|
|
|
|
},
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
|
|
|
ClientAboutFromJSON(jsonValue),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the supported API versions and the internal build nr
|
|
|
|
|
* Lists general information about the API
|
|
|
|
|
*/
|
|
|
|
|
async v1AboutGet(
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<ClientAbout> {
|
|
|
|
|
const response = await this.v1AboutGetRaw(initOverrides);
|
|
|
|
|
return await response.value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List the REST API configuration.
|
|
|
|
|
* List the REST API configuration.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationGetRaw(
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<runtime.ApiResponse<ApiConfiguration>> {
|
|
|
|
|
const queryParameters: any = {};
|
|
|
|
|
|
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
|
|
|
|
|
|
const response = await this.request(
|
|
|
|
|
{
|
|
|
|
|
path: `/v1/configuration`,
|
|
|
|
|
method: "GET",
|
|
|
|
|
headers: headerParameters,
|
|
|
|
|
query: queryParameters,
|
|
|
|
|
},
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
|
|
|
ApiConfigurationFromJSON(jsonValue),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List the REST API configuration.
|
|
|
|
|
* List the REST API configuration.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationGet(
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<ApiConfiguration> {
|
|
|
|
|
const response = await this.v1ConfigurationGetRaw(initOverrides);
|
|
|
|
|
return await response.value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List account specific settings.
|
|
|
|
|
* List account specific settings.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationNumberSettingsGetRaw(
|
|
|
|
|
requestParameters: V1ConfigurationNumberSettingsGetRequest,
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<runtime.ApiResponse<void>> {
|
|
|
|
|
if (requestParameters["number"] == null) {
|
|
|
|
|
throw new runtime.RequiredError(
|
|
|
|
|
"number",
|
|
|
|
|
'Required parameter "number" was null or undefined when calling v1ConfigurationNumberSettingsGet().',
|
|
|
|
|
);
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
if (requestParameters["data"] == null) {
|
|
|
|
|
throw new runtime.RequiredError(
|
|
|
|
|
"data",
|
|
|
|
|
'Required parameter "data" was null or undefined when calling v1ConfigurationNumberSettingsGet().',
|
|
|
|
|
);
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
const queryParameters: any = {};
|
|
|
|
|
|
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
|
|
|
|
|
|
headerParameters["Content-Type"] = "application/json";
|
|
|
|
|
|
|
|
|
|
const response = await this.request(
|
|
|
|
|
{
|
|
|
|
|
path: `/v1/configuration/{number}/settings`.replace(
|
|
|
|
|
`{${"number"}}`,
|
|
|
|
|
encodeURIComponent(String(requestParameters["number"])),
|
|
|
|
|
),
|
|
|
|
|
method: "GET",
|
|
|
|
|
headers: headerParameters,
|
|
|
|
|
query: queryParameters,
|
|
|
|
|
body: ApiTrustModeResponseToJSON(requestParameters["data"]),
|
|
|
|
|
},
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List account specific settings.
|
|
|
|
|
* List account specific settings.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationNumberSettingsGet(
|
|
|
|
|
requestParameters: V1ConfigurationNumberSettingsGetRequest,
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<void> {
|
|
|
|
|
await this.v1ConfigurationNumberSettingsGetRaw(
|
|
|
|
|
requestParameters,
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set account specific settings.
|
|
|
|
|
* Set account specific settings.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationNumberSettingsPostRaw(
|
|
|
|
|
requestParameters: V1ConfigurationNumberSettingsPostRequest,
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<runtime.ApiResponse<void>> {
|
|
|
|
|
if (requestParameters["number"] == null) {
|
|
|
|
|
throw new runtime.RequiredError(
|
|
|
|
|
"number",
|
|
|
|
|
'Required parameter "number" was null or undefined when calling v1ConfigurationNumberSettingsPost().',
|
|
|
|
|
);
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
if (requestParameters["data"] == null) {
|
|
|
|
|
throw new runtime.RequiredError(
|
|
|
|
|
"data",
|
|
|
|
|
'Required parameter "data" was null or undefined when calling v1ConfigurationNumberSettingsPost().',
|
|
|
|
|
);
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
const queryParameters: any = {};
|
|
|
|
|
|
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
|
|
|
|
|
|
headerParameters["Content-Type"] = "application/json";
|
|
|
|
|
|
|
|
|
|
const response = await this.request(
|
|
|
|
|
{
|
|
|
|
|
path: `/v1/configuration/{number}/settings`.replace(
|
|
|
|
|
`{${"number"}}`,
|
|
|
|
|
encodeURIComponent(String(requestParameters["number"])),
|
|
|
|
|
),
|
|
|
|
|
method: "POST",
|
|
|
|
|
headers: headerParameters,
|
|
|
|
|
query: queryParameters,
|
|
|
|
|
body: ApiTrustModeRequestToJSON(requestParameters["data"]),
|
|
|
|
|
},
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set account specific settings.
|
|
|
|
|
* Set account specific settings.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationNumberSettingsPost(
|
|
|
|
|
requestParameters: V1ConfigurationNumberSettingsPostRequest,
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<void> {
|
|
|
|
|
await this.v1ConfigurationNumberSettingsPostRaw(
|
|
|
|
|
requestParameters,
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the REST API configuration.
|
|
|
|
|
* Set the REST API configuration.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationPostRaw(
|
|
|
|
|
requestParameters: V1ConfigurationPostRequest,
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<runtime.ApiResponse<string>> {
|
|
|
|
|
if (requestParameters["data"] == null) {
|
|
|
|
|
throw new runtime.RequiredError(
|
|
|
|
|
"data",
|
|
|
|
|
'Required parameter "data" was null or undefined when calling v1ConfigurationPost().',
|
|
|
|
|
);
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
|
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
const queryParameters: any = {};
|
2024-06-05 10:06:41 +02:00
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
2024-06-05 10:06:41 +02:00
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
headerParameters["Content-Type"] = "application/json";
|
2024-06-05 10:06:41 +02:00
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
const response = await this.request(
|
|
|
|
|
{
|
|
|
|
|
path: `/v1/configuration`,
|
|
|
|
|
method: "POST",
|
|
|
|
|
headers: headerParameters,
|
|
|
|
|
query: queryParameters,
|
|
|
|
|
body: ApiConfigurationToJSON(requestParameters["data"]),
|
|
|
|
|
},
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
2024-06-05 10:06:41 +02:00
|
|
|
|
2024-06-28 07:49:39 +02:00
|
|
|
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
|
|
|
return new runtime.JSONApiResponse<string>(response);
|
|
|
|
|
} else {
|
|
|
|
|
return new runtime.TextApiResponse(response) as any;
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
2024-06-28 07:49:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the REST API configuration.
|
|
|
|
|
* Set the REST API configuration.
|
|
|
|
|
*/
|
|
|
|
|
async v1ConfigurationPost(
|
|
|
|
|
requestParameters: V1ConfigurationPostRequest,
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<string> {
|
|
|
|
|
const response = await this.v1ConfigurationPostRaw(
|
|
|
|
|
requestParameters,
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
return await response.value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Internally used by the docker container to perform the health check.
|
|
|
|
|
* API Health Check
|
|
|
|
|
*/
|
|
|
|
|
async v1HealthGetRaw(
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<runtime.ApiResponse<string>> {
|
|
|
|
|
const queryParameters: any = {};
|
|
|
|
|
|
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
|
|
|
|
|
|
const response = await this.request(
|
|
|
|
|
{
|
|
|
|
|
path: `/v1/health`,
|
|
|
|
|
method: "GET",
|
|
|
|
|
headers: headerParameters,
|
|
|
|
|
query: queryParameters,
|
|
|
|
|
},
|
|
|
|
|
initOverrides,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
|
|
|
return new runtime.JSONApiResponse<string>(response);
|
|
|
|
|
} else {
|
|
|
|
|
return new runtime.TextApiResponse(response) as any;
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|
2024-06-28 07:49:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Internally used by the docker container to perform the health check.
|
|
|
|
|
* API Health Check
|
|
|
|
|
*/
|
|
|
|
|
async v1HealthGet(
|
|
|
|
|
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
|
|
|
|
): Promise<string> {
|
|
|
|
|
const response = await this.v1HealthGetRaw(initOverrides);
|
|
|
|
|
return await response.value();
|
|
|
|
|
}
|
2024-06-05 10:06:41 +02:00
|
|
|
}
|