-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ryan Wang <i@ryanc.cc>
- Loading branch information
Showing
8 changed files
with
291 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
165 changes: 165 additions & 0 deletions
165
ui/packages/api-client/src/api/thumbnail-v1alpha1-public-api.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Halo | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* The version of the OpenAPI document: 2.19.0-SNAPSHOT | ||
* | ||
* | ||
* 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'; | ||
/** | ||
* ThumbnailV1alpha1PublicApi - axios parameter creator | ||
* @export | ||
*/ | ||
export const ThumbnailV1alpha1PublicApiAxiosParamCreator = function (configuration?: Configuration) { | ||
return { | ||
/** | ||
* Get thumbnail by URI | ||
* @param {string} uri The URI of the image | ||
* @param {string} width The width of the thumbnail | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getThumbnailByUri: async (uri: string, width: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
// verify required parameter 'uri' is not null or undefined | ||
assertParamExists('getThumbnailByUri', 'uri', uri) | ||
// verify required parameter 'width' is not null or undefined | ||
assertParamExists('getThumbnailByUri', 'width', width) | ||
const localVarPath = `/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri`; | ||
// 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 (uri !== undefined) { | ||
localVarQueryParameter['uri'] = uri; | ||
} | ||
|
||
if (width !== undefined) { | ||
localVarQueryParameter['width'] = width; | ||
} | ||
|
||
|
||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
|
||
return { | ||
url: toPathString(localVarUrlObj), | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
} | ||
}; | ||
|
||
/** | ||
* ThumbnailV1alpha1PublicApi - functional programming interface | ||
* @export | ||
*/ | ||
export const ThumbnailV1alpha1PublicApiFp = function(configuration?: Configuration) { | ||
const localVarAxiosParamCreator = ThumbnailV1alpha1PublicApiAxiosParamCreator(configuration) | ||
return { | ||
/** | ||
* Get thumbnail by URI | ||
* @param {string} uri The URI of the image | ||
* @param {string} width The width of the thumbnail | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async getThumbnailByUri(uri: string, width: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.getThumbnailByUri(uri, width, options); | ||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; | ||
const localVarOperationServerBasePath = operationServerMap['ThumbnailV1alpha1PublicApi.getThumbnailByUri']?.[localVarOperationServerIndex]?.url; | ||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); | ||
}, | ||
} | ||
}; | ||
|
||
/** | ||
* ThumbnailV1alpha1PublicApi - factory interface | ||
* @export | ||
*/ | ||
export const ThumbnailV1alpha1PublicApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { | ||
const localVarFp = ThumbnailV1alpha1PublicApiFp(configuration) | ||
return { | ||
/** | ||
* Get thumbnail by URI | ||
* @param {ThumbnailV1alpha1PublicApiGetThumbnailByUriRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getThumbnailByUri(requestParameters: ThumbnailV1alpha1PublicApiGetThumbnailByUriRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> { | ||
return localVarFp.getThumbnailByUri(requestParameters.uri, requestParameters.width, options).then((request) => request(axios, basePath)); | ||
}, | ||
}; | ||
}; | ||
|
||
/** | ||
* Request parameters for getThumbnailByUri operation in ThumbnailV1alpha1PublicApi. | ||
* @export | ||
* @interface ThumbnailV1alpha1PublicApiGetThumbnailByUriRequest | ||
*/ | ||
export interface ThumbnailV1alpha1PublicApiGetThumbnailByUriRequest { | ||
/** | ||
* The URI of the image | ||
* @type {string} | ||
* @memberof ThumbnailV1alpha1PublicApiGetThumbnailByUri | ||
*/ | ||
readonly uri: string | ||
|
||
/** | ||
* The width of the thumbnail | ||
* @type {string} | ||
* @memberof ThumbnailV1alpha1PublicApiGetThumbnailByUri | ||
*/ | ||
readonly width: string | ||
} | ||
|
||
/** | ||
* ThumbnailV1alpha1PublicApi - object-oriented interface | ||
* @export | ||
* @class ThumbnailV1alpha1PublicApi | ||
* @extends {BaseAPI} | ||
*/ | ||
export class ThumbnailV1alpha1PublicApi extends BaseAPI { | ||
/** | ||
* Get thumbnail by URI | ||
* @param {ThumbnailV1alpha1PublicApiGetThumbnailByUriRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof ThumbnailV1alpha1PublicApi | ||
*/ | ||
public getThumbnailByUri(requestParameters: ThumbnailV1alpha1PublicApiGetThumbnailByUriRequest, options?: RawAxiosRequestConfig) { | ||
return ThumbnailV1alpha1PublicApiFp(this.configuration).getThumbnailByUri(requestParameters.uri, requestParameters.width, options).then((request) => request(this.axios, this.basePath)); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
ui/packages/api-client/src/models/local-thumbnail-status.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Halo | ||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
* | ||
* The version of the OpenAPI document: 2.19.0-SNAPSHOT | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
|
||
|
||
/** | ||
* | ||
* @export | ||
* @interface LocalThumbnailStatus | ||
*/ | ||
export interface LocalThumbnailStatus { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof LocalThumbnailStatus | ||
*/ | ||
'phase'?: LocalThumbnailStatusPhaseEnum; | ||
} | ||
|
||
export const LocalThumbnailStatusPhaseEnum = { | ||
Pending: 'PENDING', | ||
Succeeded: 'SUCCEEDED', | ||
Failed: 'FAILED' | ||
} as const; | ||
|
||
export type LocalThumbnailStatusPhaseEnum = typeof LocalThumbnailStatusPhaseEnum[keyof typeof LocalThumbnailStatusPhaseEnum]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters