mirror of
https://github.com/openziti/zrok.git
synced 2024-11-25 09:33:43 +01:00
update generated api/model files
This commit is contained in:
parent
7f386024e5
commit
07c23ee55b
@ -46,7 +46,7 @@ echo "...generating js client"
|
||||
openapi -s specs/zrok.yml -o ui/src/api -l js
|
||||
|
||||
echo "...generating ts client"
|
||||
openapi-generator-cli generate -i specs/zrok.yml -o sdk/node/sdk/src/zrok/api -g typescript-node
|
||||
openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/zrok/api -g typescript-node
|
||||
|
||||
echo "...generating python client"
|
||||
swagger-codegen generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConfig -l python
|
||||
|
@ -6,10 +6,10 @@ api/apis.ts
|
||||
api/environmentApi.ts
|
||||
api/metadataApi.ts
|
||||
api/shareApi.ts
|
||||
git_push.sh
|
||||
model/accessRequest.ts
|
||||
model/accessResponse.ts
|
||||
model/authUser.ts
|
||||
model/changePasswordRequest.ts
|
||||
model/configuration.ts
|
||||
model/createFrontendRequest.ts
|
||||
model/createFrontendResponse.ts
|
||||
@ -32,10 +32,11 @@ model/overview.ts
|
||||
model/passwordRequirements.ts
|
||||
model/principal.ts
|
||||
model/publicFrontend.ts
|
||||
model/regenerateToken200Response.ts
|
||||
model/regenerateTokenRequest.ts
|
||||
model/registerRequest.ts
|
||||
model/registerResponse.ts
|
||||
model/resetPasswordRequest.ts
|
||||
model/resetPasswordRequestRequest.ts
|
||||
model/share.ts
|
||||
model/shareRequest.ts
|
||||
model/shareResponse.ts
|
||||
|
@ -1 +1 @@
|
||||
7.0.1
|
||||
7.4.0
|
||||
|
@ -15,12 +15,14 @@ import localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ChangePasswordRequest } from '../model/changePasswordRequest';
|
||||
import { InviteRequest } from '../model/inviteRequest';
|
||||
import { LoginRequest } from '../model/loginRequest';
|
||||
import { RegenerateToken200Response } from '../model/regenerateToken200Response';
|
||||
import { RegenerateTokenRequest } from '../model/regenerateTokenRequest';
|
||||
import { RegisterRequest } from '../model/registerRequest';
|
||||
import { RegisterResponse } from '../model/registerResponse';
|
||||
import { ResetPasswordRequest } from '../model/resetPasswordRequest';
|
||||
import { ResetPasswordRequestRequest } from '../model/resetPasswordRequestRequest';
|
||||
import { VerifyRequest } from '../model/verifyRequest';
|
||||
import { VerifyResponse } from '../model/verifyResponse';
|
||||
|
||||
@ -96,6 +98,71 @@ export class AccountApi {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async changePassword (body?: ChangePasswordRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/changePassword';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/zrok.v1+json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "ChangePasswordRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.key.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.key.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
@ -221,6 +288,72 @@ export class AccountApi {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async regenerateToken (body?: RegenerateTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
|
||||
const localVarPath = this.basePath + '/regenerateToken';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/zrok.v1+json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "RegenerateTokenRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.key.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.key.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
@ -350,7 +483,7 @@ export class AccountApi {
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async resetPasswordRequest (body?: ResetPasswordRequestRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
public async resetPasswordRequest (body?: RegenerateTokenRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/resetPasswordRequest';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
@ -367,7 +500,7 @@ export class AccountApi {
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "ResetPasswordRequestRequest")
|
||||
body: ObjectSerializer.serialize(body, "RegenerateTokenRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
|
43
sdk/nodejs/sdk/src/zrok/api/model/changePasswordRequest.ts
Normal file
43
sdk/nodejs/sdk/src/zrok/api/model/changePasswordRequest.ts
Normal file
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 0.3.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 { RequestFile } from './models';
|
||||
|
||||
export class ChangePasswordRequest {
|
||||
'email'?: string;
|
||||
'oldPassword'?: string;
|
||||
'newPassword'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "email",
|
||||
"baseName": "email",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "oldPassword",
|
||||
"baseName": "oldPassword",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "newPassword",
|
||||
"baseName": "newPassword",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ChangePasswordRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import { RequestFile } from './models';
|
||||
|
||||
export class Frontend {
|
||||
'id'?: number;
|
||||
'token'?: string;
|
||||
'shrToken'?: string;
|
||||
'zId'?: string;
|
||||
'createdAt'?: number;
|
||||
@ -27,6 +28,11 @@ export class Frontend {
|
||||
"baseName": "id",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"baseName": "token",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "shrToken",
|
||||
"baseName": "shrToken",
|
||||
|
@ -3,6 +3,7 @@ import localVarRequest from 'request';
|
||||
export * from './accessRequest';
|
||||
export * from './accessResponse';
|
||||
export * from './authUser';
|
||||
export * from './changePasswordRequest';
|
||||
export * from './configuration';
|
||||
export * from './createFrontendRequest';
|
||||
export * from './createFrontendResponse';
|
||||
@ -24,10 +25,11 @@ export * from './overview';
|
||||
export * from './passwordRequirements';
|
||||
export * from './principal';
|
||||
export * from './publicFrontend';
|
||||
export * from './regenerateToken200Response';
|
||||
export * from './regenerateTokenRequest';
|
||||
export * from './registerRequest';
|
||||
export * from './registerResponse';
|
||||
export * from './resetPasswordRequest';
|
||||
export * from './resetPasswordRequestRequest';
|
||||
export * from './share';
|
||||
export * from './shareRequest';
|
||||
export * from './shareResponse';
|
||||
@ -55,6 +57,7 @@ export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile;
|
||||
import { AccessRequest } from './accessRequest';
|
||||
import { AccessResponse } from './accessResponse';
|
||||
import { AuthUser } from './authUser';
|
||||
import { ChangePasswordRequest } from './changePasswordRequest';
|
||||
import { Configuration } from './configuration';
|
||||
import { CreateFrontendRequest } from './createFrontendRequest';
|
||||
import { CreateFrontendResponse } from './createFrontendResponse';
|
||||
@ -76,10 +79,11 @@ import { Overview } from './overview';
|
||||
import { PasswordRequirements } from './passwordRequirements';
|
||||
import { Principal } from './principal';
|
||||
import { PublicFrontend } from './publicFrontend';
|
||||
import { RegenerateToken200Response } from './regenerateToken200Response';
|
||||
import { RegenerateTokenRequest } from './regenerateTokenRequest';
|
||||
import { RegisterRequest } from './registerRequest';
|
||||
import { RegisterResponse } from './registerResponse';
|
||||
import { ResetPasswordRequest } from './resetPasswordRequest';
|
||||
import { ResetPasswordRequestRequest } from './resetPasswordRequestRequest';
|
||||
import { Share } from './share';
|
||||
import { ShareRequest } from './shareRequest';
|
||||
import { ShareResponse } from './shareResponse';
|
||||
@ -107,12 +111,14 @@ let enumsMap: {[index: string]: any} = {
|
||||
"ShareRequest.ShareModeEnum": ShareRequest.ShareModeEnum,
|
||||
"ShareRequest.BackendModeEnum": ShareRequest.BackendModeEnum,
|
||||
"ShareRequest.OauthProviderEnum": ShareRequest.OauthProviderEnum,
|
||||
"ShareRequest.PermissionModeEnum": ShareRequest.PermissionModeEnum,
|
||||
}
|
||||
|
||||
let typeMap: {[index: string]: any} = {
|
||||
"AccessRequest": AccessRequest,
|
||||
"AccessResponse": AccessResponse,
|
||||
"AuthUser": AuthUser,
|
||||
"ChangePasswordRequest": ChangePasswordRequest,
|
||||
"Configuration": Configuration,
|
||||
"CreateFrontendRequest": CreateFrontendRequest,
|
||||
"CreateFrontendResponse": CreateFrontendResponse,
|
||||
@ -134,10 +140,11 @@ let typeMap: {[index: string]: any} = {
|
||||
"PasswordRequirements": PasswordRequirements,
|
||||
"Principal": Principal,
|
||||
"PublicFrontend": PublicFrontend,
|
||||
"RegenerateToken200Response": RegenerateToken200Response,
|
||||
"RegenerateTokenRequest": RegenerateTokenRequest,
|
||||
"RegisterRequest": RegisterRequest,
|
||||
"RegisterResponse": RegisterResponse,
|
||||
"ResetPasswordRequest": ResetPasswordRequest,
|
||||
"ResetPasswordRequestRequest": ResetPasswordRequestRequest,
|
||||
"Share": Share,
|
||||
"ShareRequest": ShareRequest,
|
||||
"ShareResponse": ShareResponse,
|
||||
|
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 0.3.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 { RequestFile } from './models';
|
||||
|
||||
export class RegenerateToken200Response {
|
||||
'token'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "token",
|
||||
"baseName": "token",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return RegenerateToken200Response.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
31
sdk/nodejs/sdk/src/zrok/api/model/regenerateTokenRequest.ts
Normal file
31
sdk/nodejs/sdk/src/zrok/api/model/regenerateTokenRequest.ts
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 0.3.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 { RequestFile } from './models';
|
||||
|
||||
export class RegenerateTokenRequest {
|
||||
'emailAddress'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "emailAddress",
|
||||
"baseName": "emailAddress",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return RegenerateTokenRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ export class ShareRequest {
|
||||
'oauthEmailDomains'?: Array<string>;
|
||||
'oauthAuthorizationCheckInterval'?: string;
|
||||
'reserved'?: boolean;
|
||||
'permissionMode'?: ShareRequest.PermissionModeEnum;
|
||||
'accessGrants'?: Array<string>;
|
||||
'uniqueName'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
@ -83,6 +86,21 @@ export class ShareRequest {
|
||||
"name": "reserved",
|
||||
"baseName": "reserved",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "permissionMode",
|
||||
"baseName": "permissionMode",
|
||||
"type": "ShareRequest.PermissionModeEnum"
|
||||
},
|
||||
{
|
||||
"name": "accessGrants",
|
||||
"baseName": "accessGrants",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "uniqueName",
|
||||
"baseName": "uniqueName",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
@ -100,10 +118,16 @@ export namespace ShareRequest {
|
||||
Web = <any> 'web',
|
||||
TcpTunnel = <any> 'tcpTunnel',
|
||||
UdpTunnel = <any> 'udpTunnel',
|
||||
Caddy = <any> 'caddy'
|
||||
Caddy = <any> 'caddy',
|
||||
Drive = <any> 'drive',
|
||||
Socks = <any> 'socks'
|
||||
}
|
||||
export enum OauthProviderEnum {
|
||||
Github = <any> 'github',
|
||||
Google = <any> 'google'
|
||||
}
|
||||
export enum PermissionModeEnum {
|
||||
Open = <any> 'open',
|
||||
Closed = <any> 'closed'
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,8 @@ import { RequestFile } from './models';
|
||||
export class UpdateShareRequest {
|
||||
'shrToken'?: string;
|
||||
'backendProxyEndpoint'?: string;
|
||||
'addAccessGrants'?: Array<string>;
|
||||
'removeAccessGrants'?: Array<string>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
@ -28,6 +30,16 @@ export class UpdateShareRequest {
|
||||
"name": "backendProxyEndpoint",
|
||||
"baseName": "backendProxyEndpoint",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "addAccessGrants",
|
||||
"baseName": "addAccessGrants",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "removeAccessGrants",
|
||||
"baseName": "removeAccessGrants",
|
||||
"type": "Array<string>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
|
Loading…
Reference in New Issue
Block a user