mirror of
https://github.com/openziti/zrok.git
synced 2025-08-23 13:40:44 +02:00
clean up; /agent/ping (#967)
This commit is contained in:
@@ -10,8 +10,6 @@ index.ts
|
||||
models/Access201Response.ts
|
||||
models/AccessRequest.ts
|
||||
models/AddOrganizationMemberRequest.ts
|
||||
models/AgentStatus200Response.ts
|
||||
models/AgentStatusRequest.ts
|
||||
models/AuthUser.ts
|
||||
models/ChangePasswordRequest.ts
|
||||
models/ClientVersionCheckRequest.ts
|
||||
@@ -42,6 +40,8 @@ models/Metrics.ts
|
||||
models/MetricsSample.ts
|
||||
models/ModelConfiguration.ts
|
||||
models/Overview.ts
|
||||
models/Ping200Response.ts
|
||||
models/PingRequest.ts
|
||||
models/Principal.ts
|
||||
models/RegenerateAccountToken200Response.ts
|
||||
models/RegenerateAccountTokenRequest.ts
|
||||
|
@@ -15,18 +15,18 @@
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
AgentStatus200Response,
|
||||
AgentStatusRequest,
|
||||
Ping200Response,
|
||||
PingRequest,
|
||||
} from '../models/index';
|
||||
import {
|
||||
AgentStatus200ResponseFromJSON,
|
||||
AgentStatus200ResponseToJSON,
|
||||
AgentStatusRequestFromJSON,
|
||||
AgentStatusRequestToJSON,
|
||||
Ping200ResponseFromJSON,
|
||||
Ping200ResponseToJSON,
|
||||
PingRequestFromJSON,
|
||||
PingRequestToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface AgentStatusOperationRequest {
|
||||
body?: AgentStatusRequest;
|
||||
export interface PingOperationRequest {
|
||||
body?: PingRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ export class AgentApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
*/
|
||||
async agentStatusRaw(requestParameters: AgentStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentStatus200Response>> {
|
||||
async pingRaw(requestParameters: PingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Ping200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -48,20 +48,20 @@ export class AgentApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/agent/status`,
|
||||
path: `/agent/ping`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: AgentStatusRequestToJSON(requestParameters['body']),
|
||||
body: PingRequestToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => AgentStatus200ResponseFromJSON(jsonValue));
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => Ping200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async agentStatus(requestParameters: AgentStatusOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus200Response> {
|
||||
const response = await this.agentStatusRaw(requestParameters, initOverrides);
|
||||
async ping(requestParameters: PingOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ping200Response> {
|
||||
const response = await this.pingRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
|
@@ -1,81 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { Share } from './Share';
|
||||
import {
|
||||
ShareFromJSON,
|
||||
ShareFromJSONTyped,
|
||||
ShareToJSON,
|
||||
ShareToJSONTyped,
|
||||
} from './Share';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AgentStatus200Response
|
||||
*/
|
||||
export interface AgentStatus200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AgentStatus200Response
|
||||
*/
|
||||
version?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Share>}
|
||||
* @memberof AgentStatus200Response
|
||||
*/
|
||||
shares?: Array<Share>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AgentStatus200Response interface.
|
||||
*/
|
||||
export function instanceOfAgentStatus200Response(value: object): value is AgentStatus200Response {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AgentStatus200ResponseFromJSON(json: any): AgentStatus200Response {
|
||||
return AgentStatus200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AgentStatus200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentStatus200Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'shares': json['shares'] == null ? undefined : ((json['shares'] as Array<any>).map(ShareFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function AgentStatus200ResponseToJSON(json: any): AgentStatus200Response {
|
||||
return AgentStatus200ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AgentStatus200ResponseToJSONTyped(value?: AgentStatus200Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'version': value['version'],
|
||||
'shares': value['shares'] == null ? undefined : ((value['shares'] as Array<any>).map(ShareToJSON)),
|
||||
};
|
||||
}
|
||||
|
@@ -1,65 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AgentStatusRequest
|
||||
*/
|
||||
export interface AgentStatusRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AgentStatusRequest
|
||||
*/
|
||||
envZId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AgentStatusRequest interface.
|
||||
*/
|
||||
export function instanceOfAgentStatusRequest(value: object): value is AgentStatusRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AgentStatusRequestFromJSON(json: any): AgentStatusRequest {
|
||||
return AgentStatusRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AgentStatusRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentStatusRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'envZId': json['envZId'] == null ? undefined : json['envZId'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AgentStatusRequestToJSON(json: any): AgentStatusRequest {
|
||||
return AgentStatusRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AgentStatusRequestToJSONTyped(value?: AgentStatusRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'envZId': value['envZId'],
|
||||
};
|
||||
}
|
||||
|
65
sdk/nodejs/sdk/src/api/models/Ping200Response.ts
Normal file
65
sdk/nodejs/sdk/src/api/models/Ping200Response.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Ping200Response
|
||||
*/
|
||||
export interface Ping200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Ping200Response
|
||||
*/
|
||||
version?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the Ping200Response interface.
|
||||
*/
|
||||
export function instanceOfPing200Response(value: object): value is Ping200Response {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function Ping200ResponseFromJSON(json: any): Ping200Response {
|
||||
return Ping200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function Ping200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ping200Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
};
|
||||
}
|
||||
|
||||
export function Ping200ResponseToJSON(json: any): Ping200Response {
|
||||
return Ping200ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function Ping200ResponseToJSONTyped(value?: Ping200Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'version': value['version'],
|
||||
};
|
||||
}
|
||||
|
65
sdk/nodejs/sdk/src/api/models/PingRequest.ts
Normal file
65
sdk/nodejs/sdk/src/api/models/PingRequest.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PingRequest
|
||||
*/
|
||||
export interface PingRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PingRequest
|
||||
*/
|
||||
envZId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PingRequest interface.
|
||||
*/
|
||||
export function instanceOfPingRequest(value: object): value is PingRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PingRequestFromJSON(json: any): PingRequest {
|
||||
return PingRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PingRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'envZId': json['envZId'] == null ? undefined : json['envZId'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PingRequestToJSON(json: any): PingRequest {
|
||||
return PingRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PingRequestToJSONTyped(value?: PingRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'envZId': value['envZId'],
|
||||
};
|
||||
}
|
||||
|
@@ -3,8 +3,6 @@
|
||||
export * from './Access201Response';
|
||||
export * from './AccessRequest';
|
||||
export * from './AddOrganizationMemberRequest';
|
||||
export * from './AgentStatus200Response';
|
||||
export * from './AgentStatusRequest';
|
||||
export * from './AuthUser';
|
||||
export * from './ChangePasswordRequest';
|
||||
export * from './ClientVersionCheckRequest';
|
||||
@@ -35,6 +33,8 @@ export * from './Metrics';
|
||||
export * from './MetricsSample';
|
||||
export * from './ModelConfiguration';
|
||||
export * from './Overview';
|
||||
export * from './Ping200Response';
|
||||
export * from './PingRequest';
|
||||
export * from './Principal';
|
||||
export * from './RegenerateAccountToken200Response';
|
||||
export * from './RegenerateAccountTokenRequest';
|
||||
|
Reference in New Issue
Block a user