mirror of
https://github.com/openziti/zrok.git
synced 2025-08-17 19:31:12 +02:00
support for 'patch' access (frontend) to update description (for bind address) (#834)
This commit is contained in:
@@ -52,6 +52,7 @@ model/shareResponse.ts
|
||||
model/sparkDataSample.ts
|
||||
model/unaccessRequest.ts
|
||||
model/unshareRequest.ts
|
||||
model/updateAccessRequest.ts
|
||||
model/updateFrontendRequest.ts
|
||||
model/updateShareRequest.ts
|
||||
model/verify200Response.ts
|
||||
|
@@ -21,6 +21,7 @@ import { ShareRequest } from '../model/shareRequest';
|
||||
import { ShareResponse } from '../model/shareResponse';
|
||||
import { UnaccessRequest } from '../model/unaccessRequest';
|
||||
import { UnshareRequest } from '../model/unshareRequest';
|
||||
import { UpdateAccessRequest } from '../model/updateAccessRequest';
|
||||
import { UpdateShareRequest } from '../model/updateShareRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
@@ -350,6 +351,64 @@ export class ShareApi {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async updateAccess (body?: UpdateAccessRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/access';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'PATCH',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "UpdateAccessRequest")
|
||||
};
|
||||
|
||||
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
|
||||
|
@@ -44,6 +44,7 @@ export * from './shareResponse';
|
||||
export * from './sparkDataSample';
|
||||
export * from './unaccessRequest';
|
||||
export * from './unshareRequest';
|
||||
export * from './updateAccessRequest';
|
||||
export * from './updateFrontendRequest';
|
||||
export * from './updateShareRequest';
|
||||
export * from './verify200Response';
|
||||
@@ -106,6 +107,7 @@ import { ShareResponse } from './shareResponse';
|
||||
import { SparkDataSample } from './sparkDataSample';
|
||||
import { UnaccessRequest } from './unaccessRequest';
|
||||
import { UnshareRequest } from './unshareRequest';
|
||||
import { UpdateAccessRequest } from './updateAccessRequest';
|
||||
import { UpdateFrontendRequest } from './updateFrontendRequest';
|
||||
import { UpdateShareRequest } from './updateShareRequest';
|
||||
import { Verify200Response } from './verify200Response';
|
||||
@@ -176,6 +178,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"SparkDataSample": SparkDataSample,
|
||||
"UnaccessRequest": UnaccessRequest,
|
||||
"UnshareRequest": UnshareRequest,
|
||||
"UpdateAccessRequest": UpdateAccessRequest,
|
||||
"UpdateFrontendRequest": UpdateFrontendRequest,
|
||||
"UpdateShareRequest": UpdateShareRequest,
|
||||
"Verify200Response": Verify200Response,
|
||||
|
37
sdk/nodejs/sdk/src/zrok/api/model/updateAccessRequest.ts
Normal file
37
sdk/nodejs/sdk/src/zrok/api/model/updateAccessRequest.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
export class UpdateAccessRequest {
|
||||
'frontendToken'?: string;
|
||||
'description'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "frontendToken",
|
||||
"baseName": "frontendToken",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"baseName": "description",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return UpdateAccessRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user