mirror of https://github.com/halo-dev/halo
1232 lines
62 KiB
TypeScript
1232 lines
62 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Halo Next API
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 2.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 type { Configuration } from '../configuration';
|
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
import globalAxios from 'axios';
|
|
// Some imports not used depending on template conditions
|
|
// @ts-ignore
|
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
// @ts-ignore
|
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
// @ts-ignore
|
|
import { Content } from '../models';
|
|
// @ts-ignore
|
|
import { ContentWrapper } from '../models';
|
|
// @ts-ignore
|
|
import { ListedSinglePageList } from '../models';
|
|
// @ts-ignore
|
|
import { ListedSnapshotDto } from '../models';
|
|
// @ts-ignore
|
|
import { Post } from '../models';
|
|
// @ts-ignore
|
|
import { RevertSnapshotForSingleParam } from '../models';
|
|
// @ts-ignore
|
|
import { SinglePage } from '../models';
|
|
// @ts-ignore
|
|
import { SinglePageRequest } from '../models';
|
|
/**
|
|
* ApiConsoleHaloRunV1alpha1SinglePageApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const ApiConsoleHaloRunV1alpha1SinglePageApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Delete a content for post.
|
|
* @param {string} name
|
|
* @param {string} snapshotName
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deleteSinglePageContent: async (name: string, snapshotName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('deleteSinglePageContent', 'name', name)
|
|
// verify required parameter 'snapshotName' is not null or undefined
|
|
assertParamExists('deleteSinglePageContent', 'snapshotName', snapshotName)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/content`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
if (snapshotName !== undefined) {
|
|
localVarQueryParameter['snapshotName'] = snapshotName;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Draft a single page.
|
|
* @param {SinglePageRequest} singlePageRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
draftSinglePage: async (singlePageRequest: SinglePageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'singlePageRequest' is not null or undefined
|
|
assertParamExists('draftSinglePage', 'singlePageRequest', singlePageRequest)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
localVarRequestOptions.data = serializeDataIfNeeded(singlePageRequest, localVarRequestOptions, configuration)
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Fetch content of single page.
|
|
* @param {string} name
|
|
* @param {string} snapshotName
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
fetchSinglePageContent: async (name: string, snapshotName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('fetchSinglePageContent', 'name', name)
|
|
// verify required parameter 'snapshotName' is not null or undefined
|
|
assertParamExists('fetchSinglePageContent', 'snapshotName', snapshotName)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/content`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
if (snapshotName !== undefined) {
|
|
localVarQueryParameter['snapshotName'] = snapshotName;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Fetch head content of single page.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
fetchSinglePageHeadContent: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('fetchSinglePageHeadContent', 'name', name)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/head-content`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Fetch release content of single page.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
fetchSinglePageReleaseContent: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('fetchSinglePageReleaseContent', 'name', name)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/release-content`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* List all snapshots for single page content.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
listSinglePageSnapshots: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('listSinglePageSnapshots', 'name', name)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/snapshot`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* List single pages.
|
|
* @param {number} [page] Page number. Default is 0.
|
|
* @param {number} [size] Size number. Default is 0.
|
|
* @param {Array<string>} [labelSelector] Label selector. e.g.: hidden!=true
|
|
* @param {Array<string>} [fieldSelector] Field selector. e.g.: metadata.name==halo
|
|
* @param {Array<string>} [sort] Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
|
|
* @param {Array<string>} [contributor] SinglePages filtered by contributor.
|
|
* @param {ListSinglePagesPublishPhaseEnum} [publishPhase] SinglePages filtered by publish phase.
|
|
* @param {ListSinglePagesVisibleEnum} [visible] SinglePages filtered by visibility.
|
|
* @param {string} [keyword] SinglePages filtered by keyword.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
listSinglePages: async (page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, contributor?: Array<string>, publishPhase?: ListSinglePagesPublishPhaseEnum, visible?: ListSinglePagesVisibleEnum, keyword?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages`;
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
if (page !== undefined) {
|
|
localVarQueryParameter['page'] = page;
|
|
}
|
|
|
|
if (size !== undefined) {
|
|
localVarQueryParameter['size'] = size;
|
|
}
|
|
|
|
if (labelSelector) {
|
|
localVarQueryParameter['labelSelector'] = labelSelector;
|
|
}
|
|
|
|
if (fieldSelector) {
|
|
localVarQueryParameter['fieldSelector'] = fieldSelector;
|
|
}
|
|
|
|
if (sort) {
|
|
localVarQueryParameter['sort'] = sort;
|
|
}
|
|
|
|
if (contributor) {
|
|
localVarQueryParameter['contributor'] = contributor;
|
|
}
|
|
|
|
if (publishPhase !== undefined) {
|
|
localVarQueryParameter['publishPhase'] = publishPhase;
|
|
}
|
|
|
|
if (visible !== undefined) {
|
|
localVarQueryParameter['visible'] = visible;
|
|
}
|
|
|
|
if (keyword !== undefined) {
|
|
localVarQueryParameter['keyword'] = keyword;
|
|
}
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Publish a single page.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
publishSinglePage: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('publishSinglePage', 'name', name)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/publish`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Revert to specified snapshot for single page content.
|
|
* @param {string} name
|
|
* @param {RevertSnapshotForSingleParam} revertSnapshotForSingleParam
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
revertToSpecifiedSnapshotForSinglePage: async (name: string, revertSnapshotForSingleParam: RevertSnapshotForSingleParam, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('revertToSpecifiedSnapshotForSinglePage', 'name', name)
|
|
// verify required parameter 'revertSnapshotForSingleParam' is not null or undefined
|
|
assertParamExists('revertToSpecifiedSnapshotForSinglePage', 'revertSnapshotForSingleParam', revertSnapshotForSingleParam)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/revert-content`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
localVarRequestOptions.data = serializeDataIfNeeded(revertSnapshotForSingleParam, localVarRequestOptions, configuration)
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Update a single page.
|
|
* @param {string} name
|
|
* @param {SinglePageRequest} singlePageRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
updateDraftSinglePage: async (name: string, singlePageRequest: SinglePageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('updateDraftSinglePage', 'name', name)
|
|
// verify required parameter 'singlePageRequest' is not null or undefined
|
|
assertParamExists('updateDraftSinglePage', 'singlePageRequest', singlePageRequest)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
localVarRequestOptions.data = serializeDataIfNeeded(singlePageRequest, localVarRequestOptions, configuration)
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Update a single page\'s content.
|
|
* @param {string} name
|
|
* @param {Content} content
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
updateSinglePageContent: async (name: string, content: Content, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'name' is not null or undefined
|
|
assertParamExists('updateSinglePageContent', 'name', name)
|
|
// verify required parameter 'content' is not null or undefined
|
|
assertParamExists('updateSinglePageContent', 'content', content)
|
|
const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/content`
|
|
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
let baseOptions;
|
|
if (configuration) {
|
|
baseOptions = configuration.baseOptions;
|
|
}
|
|
|
|
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
const localVarHeaderParameter = {} as any;
|
|
const localVarQueryParameter = {} as any;
|
|
|
|
// authentication BasicAuth required
|
|
// http basic authentication required
|
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
|
|
|
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
localVarRequestOptions.data = serializeDataIfNeeded(content, localVarRequestOptions, configuration)
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ApiConsoleHaloRunV1alpha1SinglePageApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const ApiConsoleHaloRunV1alpha1SinglePageApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1SinglePageApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Delete a content for post.
|
|
* @param {string} name
|
|
* @param {string} snapshotName
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async deleteSinglePageContent(name: string, snapshotName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContentWrapper>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSinglePageContent(name, snapshotName, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.deleteSinglePageContent']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Draft a single page.
|
|
* @param {SinglePageRequest} singlePageRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async draftSinglePage(singlePageRequest: SinglePageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SinglePage>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.draftSinglePage(singlePageRequest, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.draftSinglePage']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Fetch content of single page.
|
|
* @param {string} name
|
|
* @param {string} snapshotName
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async fetchSinglePageContent(name: string, snapshotName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContentWrapper>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSinglePageContent(name, snapshotName, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.fetchSinglePageContent']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Fetch head content of single page.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async fetchSinglePageHeadContent(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContentWrapper>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSinglePageHeadContent(name, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.fetchSinglePageHeadContent']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Fetch release content of single page.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async fetchSinglePageReleaseContent(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContentWrapper>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSinglePageReleaseContent(name, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.fetchSinglePageReleaseContent']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* List all snapshots for single page content.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async listSinglePageSnapshots(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ListedSnapshotDto>>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listSinglePageSnapshots(name, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.listSinglePageSnapshots']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* List single pages.
|
|
* @param {number} [page] Page number. Default is 0.
|
|
* @param {number} [size] Size number. Default is 0.
|
|
* @param {Array<string>} [labelSelector] Label selector. e.g.: hidden!=true
|
|
* @param {Array<string>} [fieldSelector] Field selector. e.g.: metadata.name==halo
|
|
* @param {Array<string>} [sort] Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
|
|
* @param {Array<string>} [contributor] SinglePages filtered by contributor.
|
|
* @param {ListSinglePagesPublishPhaseEnum} [publishPhase] SinglePages filtered by publish phase.
|
|
* @param {ListSinglePagesVisibleEnum} [visible] SinglePages filtered by visibility.
|
|
* @param {string} [keyword] SinglePages filtered by keyword.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async listSinglePages(page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, contributor?: Array<string>, publishPhase?: ListSinglePagesPublishPhaseEnum, visible?: ListSinglePagesVisibleEnum, keyword?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListedSinglePageList>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listSinglePages(page, size, labelSelector, fieldSelector, sort, contributor, publishPhase, visible, keyword, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.listSinglePages']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Publish a single page.
|
|
* @param {string} name
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async publishSinglePage(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SinglePage>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.publishSinglePage(name, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.publishSinglePage']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Revert to specified snapshot for single page content.
|
|
* @param {string} name
|
|
* @param {RevertSnapshotForSingleParam} revertSnapshotForSingleParam
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async revertToSpecifiedSnapshotForSinglePage(name: string, revertSnapshotForSingleParam: RevertSnapshotForSingleParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Post>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.revertToSpecifiedSnapshotForSinglePage(name, revertSnapshotForSingleParam, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.revertToSpecifiedSnapshotForSinglePage']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Update a single page.
|
|
* @param {string} name
|
|
* @param {SinglePageRequest} singlePageRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async updateDraftSinglePage(name: string, singlePageRequest: SinglePageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SinglePage>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateDraftSinglePage(name, singlePageRequest, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.updateDraftSinglePage']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Update a single page\'s content.
|
|
* @param {string} name
|
|
* @param {Content} content
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async updateSinglePageContent(name: string, content: Content, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Post>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateSinglePageContent(name, content, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['ApiConsoleHaloRunV1alpha1SinglePageApi.updateSinglePageContent']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* ApiConsoleHaloRunV1alpha1SinglePageApi - factory interface
|
|
* @export
|
|
*/
|
|
export const ApiConsoleHaloRunV1alpha1SinglePageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = ApiConsoleHaloRunV1alpha1SinglePageApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Delete a content for post.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deleteSinglePageContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ContentWrapper> {
|
|
return localVarFp.deleteSinglePageContent(requestParameters.name, requestParameters.snapshotName, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Draft a single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
draftSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest, options?: RawAxiosRequestConfig): AxiosPromise<SinglePage> {
|
|
return localVarFp.draftSinglePage(requestParameters.singlePageRequest, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Fetch content of single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
fetchSinglePageContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ContentWrapper> {
|
|
return localVarFp.fetchSinglePageContent(requestParameters.name, requestParameters.snapshotName, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Fetch head content of single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
fetchSinglePageHeadContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ContentWrapper> {
|
|
return localVarFp.fetchSinglePageHeadContent(requestParameters.name, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Fetch release content of single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
fetchSinglePageReleaseContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ContentWrapper> {
|
|
return localVarFp.fetchSinglePageReleaseContent(requestParameters.name, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* List all snapshots for single page content.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePageSnapshotsRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
listSinglePageSnapshots(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePageSnapshotsRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ListedSnapshotDto>> {
|
|
return localVarFp.listSinglePageSnapshots(requestParameters.name, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* List single pages.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
listSinglePages(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<ListedSinglePageList> {
|
|
return localVarFp.listSinglePages(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, requestParameters.contributor, requestParameters.publishPhase, requestParameters.visible, requestParameters.keyword, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Publish a single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
publishSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest, options?: RawAxiosRequestConfig): AxiosPromise<SinglePage> {
|
|
return localVarFp.publishSinglePage(requestParameters.name, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Revert to specified snapshot for single page content.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
revertToSpecifiedSnapshotForSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Post> {
|
|
return localVarFp.revertToSpecifiedSnapshotForSinglePage(requestParameters.name, requestParameters.revertSnapshotForSingleParam, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Update a single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
updateDraftSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest, options?: RawAxiosRequestConfig): AxiosPromise<SinglePage> {
|
|
return localVarFp.updateDraftSinglePage(requestParameters.name, requestParameters.singlePageRequest, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Update a single page\'s content.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
updateSinglePageContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest, options?: RawAxiosRequestConfig): AxiosPromise<Post> {
|
|
return localVarFp.updateSinglePageContent(requestParameters.name, requestParameters.content, options).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Request parameters for deleteSinglePageContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContentRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContentRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContent
|
|
*/
|
|
readonly name: string
|
|
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContent
|
|
*/
|
|
readonly snapshotName: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for draftSinglePage operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest {
|
|
/**
|
|
*
|
|
* @type {SinglePageRequest}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePage
|
|
*/
|
|
readonly singlePageRequest: SinglePageRequest
|
|
}
|
|
|
|
/**
|
|
* Request parameters for fetchSinglePageContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContentRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContentRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContent
|
|
*/
|
|
readonly name: string
|
|
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContent
|
|
*/
|
|
readonly snapshotName: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for fetchSinglePageHeadContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContent
|
|
*/
|
|
readonly name: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for fetchSinglePageReleaseContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContent
|
|
*/
|
|
readonly name: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for listSinglePageSnapshots operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePageSnapshotsRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePageSnapshotsRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePageSnapshots
|
|
*/
|
|
readonly name: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for listSinglePages operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest {
|
|
/**
|
|
* Page number. Default is 0.
|
|
* @type {number}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly page?: number
|
|
|
|
/**
|
|
* Size number. Default is 0.
|
|
* @type {number}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly size?: number
|
|
|
|
/**
|
|
* Label selector. e.g.: hidden!=true
|
|
* @type {Array<string>}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly labelSelector?: Array<string>
|
|
|
|
/**
|
|
* Field selector. e.g.: metadata.name==halo
|
|
* @type {Array<string>}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly fieldSelector?: Array<string>
|
|
|
|
/**
|
|
* Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
|
|
* @type {Array<string>}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly sort?: Array<string>
|
|
|
|
/**
|
|
* SinglePages filtered by contributor.
|
|
* @type {Array<string>}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly contributor?: Array<string>
|
|
|
|
/**
|
|
* SinglePages filtered by publish phase.
|
|
* @type {'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED'}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly publishPhase?: ListSinglePagesPublishPhaseEnum
|
|
|
|
/**
|
|
* SinglePages filtered by visibility.
|
|
* @type {'PUBLIC' | 'INTERNAL' | 'PRIVATE'}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly visible?: ListSinglePagesVisibleEnum
|
|
|
|
/**
|
|
* SinglePages filtered by keyword.
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages
|
|
*/
|
|
readonly keyword?: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for publishSinglePage operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePage
|
|
*/
|
|
readonly name: string
|
|
}
|
|
|
|
/**
|
|
* Request parameters for revertToSpecifiedSnapshotForSinglePage operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePageRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePageRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePage
|
|
*/
|
|
readonly name: string
|
|
|
|
/**
|
|
*
|
|
* @type {RevertSnapshotForSingleParam}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePage
|
|
*/
|
|
readonly revertSnapshotForSingleParam: RevertSnapshotForSingleParam
|
|
}
|
|
|
|
/**
|
|
* Request parameters for updateDraftSinglePage operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePage
|
|
*/
|
|
readonly name: string
|
|
|
|
/**
|
|
*
|
|
* @type {SinglePageRequest}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePage
|
|
*/
|
|
readonly singlePageRequest: SinglePageRequest
|
|
}
|
|
|
|
/**
|
|
* Request parameters for updateSinglePageContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi.
|
|
* @export
|
|
* @interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest
|
|
*/
|
|
export interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContent
|
|
*/
|
|
readonly name: string
|
|
|
|
/**
|
|
*
|
|
* @type {Content}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContent
|
|
*/
|
|
readonly content: Content
|
|
}
|
|
|
|
/**
|
|
* ApiConsoleHaloRunV1alpha1SinglePageApi - object-oriented interface
|
|
* @export
|
|
* @class ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class ApiConsoleHaloRunV1alpha1SinglePageApi extends BaseAPI {
|
|
/**
|
|
* Delete a content for post.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public deleteSinglePageContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiDeleteSinglePageContentRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).deleteSinglePageContent(requestParameters.name, requestParameters.snapshotName, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Draft a single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public draftSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).draftSinglePage(requestParameters.singlePageRequest, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Fetch content of single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public fetchSinglePageContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageContentRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).fetchSinglePageContent(requestParameters.name, requestParameters.snapshotName, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Fetch head content of single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public fetchSinglePageHeadContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).fetchSinglePageHeadContent(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Fetch release content of single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public fetchSinglePageReleaseContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).fetchSinglePageReleaseContent(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* List all snapshots for single page content.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePageSnapshotsRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public listSinglePageSnapshots(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePageSnapshotsRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).listSinglePageSnapshots(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* List single pages.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public listSinglePages(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest = {}, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).listSinglePages(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, requestParameters.contributor, requestParameters.publishPhase, requestParameters.visible, requestParameters.keyword, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Publish a single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public publishSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).publishSinglePage(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Revert to specified snapshot for single page content.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public revertToSpecifiedSnapshotForSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiRevertToSpecifiedSnapshotForSinglePageRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).revertToSpecifiedSnapshotForSinglePage(requestParameters.name, requestParameters.revertSnapshotForSingleParam, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Update a single page.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public updateDraftSinglePage(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).updateDraftSinglePage(requestParameters.name, requestParameters.singlePageRequest, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Update a single page\'s content.
|
|
* @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest} requestParameters Request parameters.
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof ApiConsoleHaloRunV1alpha1SinglePageApi
|
|
*/
|
|
public updateSinglePageContent(requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest, options?: RawAxiosRequestConfig) {
|
|
return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration).updateSinglePageContent(requestParameters.name, requestParameters.content, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @export
|
|
*/
|
|
export const ListSinglePagesPublishPhaseEnum = {
|
|
Draft: 'DRAFT',
|
|
PendingApproval: 'PENDING_APPROVAL',
|
|
Published: 'PUBLISHED',
|
|
Failed: 'FAILED'
|
|
} as const;
|
|
export type ListSinglePagesPublishPhaseEnum = typeof ListSinglePagesPublishPhaseEnum[keyof typeof ListSinglePagesPublishPhaseEnum];
|
|
/**
|
|
* @export
|
|
*/
|
|
export const ListSinglePagesVisibleEnum = {
|
|
Public: 'PUBLIC',
|
|
Internal: 'INTERNAL',
|
|
Private: 'PRIVATE'
|
|
} as const;
|
|
export type ListSinglePagesVisibleEnum = typeof ListSinglePagesVisibleEnum[keyof typeof ListSinglePagesVisibleEnum];
|