1.2.2原版
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
||||
dist
|
||||
@@ -0,0 +1 @@
|
||||
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
|
||||
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1,30 @@
|
||||
.gitignore
|
||||
.npmignore
|
||||
.openapi-generator-ignore
|
||||
api.ts
|
||||
api/api-douban-moony-la-v1alpha1-douban-movie-api.ts
|
||||
api/cron-douban-v1alpha1-api.ts
|
||||
api/douban-movie-v1alpha1-api.ts
|
||||
base.ts
|
||||
common.ts
|
||||
configuration.ts
|
||||
git_push.sh
|
||||
index.ts
|
||||
models/add-operation.ts
|
||||
models/copy-operation.ts
|
||||
models/cron-douban-list.ts
|
||||
models/cron-douban.ts
|
||||
models/douban-movie-faves.ts
|
||||
models/douban-movie-list.ts
|
||||
models/douban-movie-spec.ts
|
||||
models/douban-movie-vo.ts
|
||||
models/douban-movie.ts
|
||||
models/index.ts
|
||||
models/json-patch-inner.ts
|
||||
models/metadata.ts
|
||||
models/move-operation.ts
|
||||
models/remove-operation.ts
|
||||
models/replace-operation.ts
|
||||
models/spec.ts
|
||||
models/status.ts
|
||||
models/test-operation.ts
|
||||
@@ -0,0 +1 @@
|
||||
7.7.0
|
||||
@@ -0,0 +1,20 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export * from './api/api-douban-moony-la-v1alpha1-douban-movie-api';
|
||||
export * from './api/cron-douban-v1alpha1-api';
|
||||
export * from './api/douban-movie-v1alpha1-api';
|
||||
|
||||
@@ -0,0 +1,445 @@
|
||||
/* 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.20.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, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { DoubanMovieList } from '../models';
|
||||
// @ts-ignore
|
||||
import type { DoubanMovieVo } from '../models';
|
||||
/**
|
||||
* ApiDoubanMoonyLaV1alpha1DoubanMovieApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const ApiDoubanMoonyLaV1alpha1DoubanMovieApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* getDoubanDetail.
|
||||
* @param {string} [url] doubanmovie url to query
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getDoubanDetail: async (url?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/api.douban.moony.la/v1alpha1/doubanmovies/-/getDoubanDetail`;
|
||||
// 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 (url !== undefined) {
|
||||
localVarQueryParameter['url'] = url;
|
||||
}
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* List doubanMovie.
|
||||
* @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 {string} [keyword] DoubanMovies filtered by keyword.
|
||||
* @param {string} [status] DoubanMovies filtered by status.
|
||||
* @param {string} [type] DoubanMovies filtered by type.
|
||||
* @param {string} [dataType] DoubanMovies filtered by dataType.
|
||||
* @param {Array<string>} [genre] DoubanMovies filtered by genre.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listDoubanMovie: async (page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, keyword?: string, status?: string, type?: string, dataType?: string, genre?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/api.douban.moony.la/v1alpha1/doubanmovies`;
|
||||
// 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 (keyword !== undefined) {
|
||||
localVarQueryParameter['keyword'] = keyword;
|
||||
}
|
||||
|
||||
if (status !== undefined) {
|
||||
localVarQueryParameter['status'] = status;
|
||||
}
|
||||
|
||||
if (type !== undefined) {
|
||||
localVarQueryParameter['type'] = type;
|
||||
}
|
||||
|
||||
if (dataType !== undefined) {
|
||||
localVarQueryParameter['dataType'] = dataType;
|
||||
}
|
||||
|
||||
if (genre) {
|
||||
localVarQueryParameter['genre'] = genre;
|
||||
}
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* List all douban genres.
|
||||
* @param {string} [type] Genres type to query
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listGenres: async (type?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/api.douban.moony.la/v1alpha1/doubanmovies/-/genres`;
|
||||
// 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 (type !== undefined) {
|
||||
localVarQueryParameter['type'] = type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiDoubanMoonyLaV1alpha1DoubanMovieApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiDoubanMoonyLaV1alpha1DoubanMovieApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = ApiDoubanMoonyLaV1alpha1DoubanMovieApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
* getDoubanDetail.
|
||||
* @param {string} [url] doubanmovie url to query
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getDoubanDetail(url?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DoubanMovieVo>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getDoubanDetail(url, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ApiDoubanMoonyLaV1alpha1DoubanMovieApi.getDoubanDetail']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* List doubanMovie.
|
||||
* @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 {string} [keyword] DoubanMovies filtered by keyword.
|
||||
* @param {string} [status] DoubanMovies filtered by status.
|
||||
* @param {string} [type] DoubanMovies filtered by type.
|
||||
* @param {string} [dataType] DoubanMovies filtered by dataType.
|
||||
* @param {Array<string>} [genre] DoubanMovies filtered by genre.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listDoubanMovie(page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, keyword?: string, status?: string, type?: string, dataType?: string, genre?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DoubanMovieList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listDoubanMovie(page, size, labelSelector, fieldSelector, sort, keyword, status, type, dataType, genre, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ApiDoubanMoonyLaV1alpha1DoubanMovieApi.listDoubanMovie']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* List all douban genres.
|
||||
* @param {string} [type] Genres type to query
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listGenres(type?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listGenres(type, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ApiDoubanMoonyLaV1alpha1DoubanMovieApi.listGenres']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiDoubanMoonyLaV1alpha1DoubanMovieApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiDoubanMoonyLaV1alpha1DoubanMovieApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = ApiDoubanMoonyLaV1alpha1DoubanMovieApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
* getDoubanDetail.
|
||||
* @param {ApiDoubanMoonyLaV1alpha1DoubanMovieApiGetDoubanDetailRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getDoubanDetail(requestParameters: ApiDoubanMoonyLaV1alpha1DoubanMovieApiGetDoubanDetailRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<DoubanMovieVo> {
|
||||
return localVarFp.getDoubanDetail(requestParameters.url, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List doubanMovie.
|
||||
* @param {ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listDoubanMovie(requestParameters: ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovieRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<DoubanMovieList> {
|
||||
return localVarFp.listDoubanMovie(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, requestParameters.keyword, requestParameters.status, requestParameters.type, requestParameters.dataType, requestParameters.genre, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List all douban genres.
|
||||
* @param {ApiDoubanMoonyLaV1alpha1DoubanMovieApiListGenresRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listGenres(requestParameters: ApiDoubanMoonyLaV1alpha1DoubanMovieApiListGenresRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<string> {
|
||||
return localVarFp.listGenres(requestParameters.type, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for getDoubanDetail operation in ApiDoubanMoonyLaV1alpha1DoubanMovieApi.
|
||||
* @export
|
||||
* @interface ApiDoubanMoonyLaV1alpha1DoubanMovieApiGetDoubanDetailRequest
|
||||
*/
|
||||
export interface ApiDoubanMoonyLaV1alpha1DoubanMovieApiGetDoubanDetailRequest {
|
||||
/**
|
||||
* doubanmovie url to query
|
||||
* @type {string}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiGetDoubanDetail
|
||||
*/
|
||||
readonly url?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listDoubanMovie operation in ApiDoubanMoonyLaV1alpha1DoubanMovieApi.
|
||||
* @export
|
||||
* @interface ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovieRequest
|
||||
*/
|
||||
export interface ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovieRequest {
|
||||
/**
|
||||
* Page number. Default is 0.
|
||||
* @type {number}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly page?: number
|
||||
|
||||
/**
|
||||
* Size number. Default is 0.
|
||||
* @type {number}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly size?: number
|
||||
|
||||
/**
|
||||
* Label selector. e.g.: hidden!=true
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly labelSelector?: Array<string>
|
||||
|
||||
/**
|
||||
* Field selector. e.g.: metadata.name==halo
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
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 ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly sort?: Array<string>
|
||||
|
||||
/**
|
||||
* DoubanMovies filtered by keyword.
|
||||
* @type {string}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly keyword?: string
|
||||
|
||||
/**
|
||||
* DoubanMovies filtered by status.
|
||||
* @type {string}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly status?: string
|
||||
|
||||
/**
|
||||
* DoubanMovies filtered by type.
|
||||
* @type {string}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly type?: string
|
||||
|
||||
/**
|
||||
* DoubanMovies filtered by dataType.
|
||||
* @type {string}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly dataType?: string
|
||||
|
||||
/**
|
||||
* DoubanMovies filtered by genre.
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovie
|
||||
*/
|
||||
readonly genre?: Array<string>
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listGenres operation in ApiDoubanMoonyLaV1alpha1DoubanMovieApi.
|
||||
* @export
|
||||
* @interface ApiDoubanMoonyLaV1alpha1DoubanMovieApiListGenresRequest
|
||||
*/
|
||||
export interface ApiDoubanMoonyLaV1alpha1DoubanMovieApiListGenresRequest {
|
||||
/**
|
||||
* Genres type to query
|
||||
* @type {string}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApiListGenres
|
||||
*/
|
||||
readonly type?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* ApiDoubanMoonyLaV1alpha1DoubanMovieApi - object-oriented interface
|
||||
* @export
|
||||
* @class ApiDoubanMoonyLaV1alpha1DoubanMovieApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class ApiDoubanMoonyLaV1alpha1DoubanMovieApi extends BaseAPI {
|
||||
/**
|
||||
* getDoubanDetail.
|
||||
* @param {ApiDoubanMoonyLaV1alpha1DoubanMovieApiGetDoubanDetailRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApi
|
||||
*/
|
||||
public getDoubanDetail(requestParameters: ApiDoubanMoonyLaV1alpha1DoubanMovieApiGetDoubanDetailRequest = {}, options?: RawAxiosRequestConfig) {
|
||||
return ApiDoubanMoonyLaV1alpha1DoubanMovieApiFp(this.configuration).getDoubanDetail(requestParameters.url, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List doubanMovie.
|
||||
* @param {ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApi
|
||||
*/
|
||||
public listDoubanMovie(requestParameters: ApiDoubanMoonyLaV1alpha1DoubanMovieApiListDoubanMovieRequest = {}, options?: RawAxiosRequestConfig) {
|
||||
return ApiDoubanMoonyLaV1alpha1DoubanMovieApiFp(this.configuration).listDoubanMovie(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, requestParameters.keyword, requestParameters.status, requestParameters.type, requestParameters.dataType, requestParameters.genre, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List all douban genres.
|
||||
* @param {ApiDoubanMoonyLaV1alpha1DoubanMovieApiListGenresRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiDoubanMoonyLaV1alpha1DoubanMovieApi
|
||||
*/
|
||||
public listGenres(requestParameters: ApiDoubanMoonyLaV1alpha1DoubanMovieApiListGenresRequest = {}, options?: RawAxiosRequestConfig) {
|
||||
return ApiDoubanMoonyLaV1alpha1DoubanMovieApiFp(this.configuration).listGenres(requestParameters.type, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,665 @@
|
||||
/* 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.20.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, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { CronDouban } from '../models';
|
||||
// @ts-ignore
|
||||
import type { CronDoubanList } from '../models';
|
||||
// @ts-ignore
|
||||
import type { JsonPatchInner } from '../models';
|
||||
/**
|
||||
* CronDoubanV1alpha1Api - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const CronDoubanV1alpha1ApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Create CronDouban
|
||||
* @param {CronDouban} [cronDouban] Fresh crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createCronDouban: async (cronDouban?: CronDouban, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/crondoubans`;
|
||||
// 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(cronDouban, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteCronDouban: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('deleteCronDouban', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/crondoubans/{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: '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)
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Get CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getCronDouban: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('getCronDouban', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/crondoubans/{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: '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 CronDouban
|
||||
* @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 {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listCronDouban: async (page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/crondoubans`;
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Patch CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {Array<JsonPatchInner>} [jsonPatchInner]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
patchCronDouban: async (name: string, jsonPatchInner?: Array<JsonPatchInner>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('patchCronDouban', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/crondoubans/{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: 'PATCH', ...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-patch+json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(jsonPatchInner, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {CronDouban} [cronDouban] Updated crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateCronDouban: async (name: string, cronDouban?: CronDouban, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('updateCronDouban', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/crondoubans/{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(cronDouban, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* CronDoubanV1alpha1Api - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const CronDoubanV1alpha1ApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = CronDoubanV1alpha1ApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
* Create CronDouban
|
||||
* @param {CronDouban} [cronDouban] Fresh crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createCronDouban(cronDouban?: CronDouban, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CronDouban>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createCronDouban(cronDouban, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CronDoubanV1alpha1Api.createCronDouban']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Delete CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteCronDouban(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCronDouban(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CronDoubanV1alpha1Api.deleteCronDouban']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Get CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getCronDouban(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CronDouban>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getCronDouban(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CronDoubanV1alpha1Api.getCronDouban']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* List CronDouban
|
||||
* @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 {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listCronDouban(page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CronDoubanList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listCronDouban(page, size, labelSelector, fieldSelector, sort, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CronDoubanV1alpha1Api.listCronDouban']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Patch CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {Array<JsonPatchInner>} [jsonPatchInner]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async patchCronDouban(name: string, jsonPatchInner?: Array<JsonPatchInner>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CronDouban>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.patchCronDouban(name, jsonPatchInner, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CronDoubanV1alpha1Api.patchCronDouban']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Update CronDouban
|
||||
* @param {string} name Name of crondouban
|
||||
* @param {CronDouban} [cronDouban] Updated crondouban
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateCronDouban(name: string, cronDouban?: CronDouban, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CronDouban>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCronDouban(name, cronDouban, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['CronDoubanV1alpha1Api.updateCronDouban']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* CronDoubanV1alpha1Api - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const CronDoubanV1alpha1ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = CronDoubanV1alpha1ApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
* Create CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiCreateCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createCronDouban(requestParameters: CronDoubanV1alpha1ApiCreateCronDoubanRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<CronDouban> {
|
||||
return localVarFp.createCronDouban(requestParameters.cronDouban, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiDeleteCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteCronDouban(requestParameters: CronDoubanV1alpha1ApiDeleteCronDoubanRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.deleteCronDouban(requestParameters.name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiGetCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getCronDouban(requestParameters: CronDoubanV1alpha1ApiGetCronDoubanRequest, options?: RawAxiosRequestConfig): AxiosPromise<CronDouban> {
|
||||
return localVarFp.getCronDouban(requestParameters.name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiListCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listCronDouban(requestParameters: CronDoubanV1alpha1ApiListCronDoubanRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<CronDoubanList> {
|
||||
return localVarFp.listCronDouban(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Patch CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiPatchCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
patchCronDouban(requestParameters: CronDoubanV1alpha1ApiPatchCronDoubanRequest, options?: RawAxiosRequestConfig): AxiosPromise<CronDouban> {
|
||||
return localVarFp.patchCronDouban(requestParameters.name, requestParameters.jsonPatchInner, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiUpdateCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateCronDouban(requestParameters: CronDoubanV1alpha1ApiUpdateCronDoubanRequest, options?: RawAxiosRequestConfig): AxiosPromise<CronDouban> {
|
||||
return localVarFp.updateCronDouban(requestParameters.name, requestParameters.cronDouban, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createCronDouban operation in CronDoubanV1alpha1Api.
|
||||
* @export
|
||||
* @interface CronDoubanV1alpha1ApiCreateCronDoubanRequest
|
||||
*/
|
||||
export interface CronDoubanV1alpha1ApiCreateCronDoubanRequest {
|
||||
/**
|
||||
* Fresh crondouban
|
||||
* @type {CronDouban}
|
||||
* @memberof CronDoubanV1alpha1ApiCreateCronDouban
|
||||
*/
|
||||
readonly cronDouban?: CronDouban
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deleteCronDouban operation in CronDoubanV1alpha1Api.
|
||||
* @export
|
||||
* @interface CronDoubanV1alpha1ApiDeleteCronDoubanRequest
|
||||
*/
|
||||
export interface CronDoubanV1alpha1ApiDeleteCronDoubanRequest {
|
||||
/**
|
||||
* Name of crondouban
|
||||
* @type {string}
|
||||
* @memberof CronDoubanV1alpha1ApiDeleteCronDouban
|
||||
*/
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getCronDouban operation in CronDoubanV1alpha1Api.
|
||||
* @export
|
||||
* @interface CronDoubanV1alpha1ApiGetCronDoubanRequest
|
||||
*/
|
||||
export interface CronDoubanV1alpha1ApiGetCronDoubanRequest {
|
||||
/**
|
||||
* Name of crondouban
|
||||
* @type {string}
|
||||
* @memberof CronDoubanV1alpha1ApiGetCronDouban
|
||||
*/
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listCronDouban operation in CronDoubanV1alpha1Api.
|
||||
* @export
|
||||
* @interface CronDoubanV1alpha1ApiListCronDoubanRequest
|
||||
*/
|
||||
export interface CronDoubanV1alpha1ApiListCronDoubanRequest {
|
||||
/**
|
||||
* Page number. Default is 0.
|
||||
* @type {number}
|
||||
* @memberof CronDoubanV1alpha1ApiListCronDouban
|
||||
*/
|
||||
readonly page?: number
|
||||
|
||||
/**
|
||||
* Size number. Default is 0.
|
||||
* @type {number}
|
||||
* @memberof CronDoubanV1alpha1ApiListCronDouban
|
||||
*/
|
||||
readonly size?: number
|
||||
|
||||
/**
|
||||
* Label selector. e.g.: hidden!=true
|
||||
* @type {Array<string>}
|
||||
* @memberof CronDoubanV1alpha1ApiListCronDouban
|
||||
*/
|
||||
readonly labelSelector?: Array<string>
|
||||
|
||||
/**
|
||||
* Field selector. e.g.: metadata.name==halo
|
||||
* @type {Array<string>}
|
||||
* @memberof CronDoubanV1alpha1ApiListCronDouban
|
||||
*/
|
||||
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 CronDoubanV1alpha1ApiListCronDouban
|
||||
*/
|
||||
readonly sort?: Array<string>
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for patchCronDouban operation in CronDoubanV1alpha1Api.
|
||||
* @export
|
||||
* @interface CronDoubanV1alpha1ApiPatchCronDoubanRequest
|
||||
*/
|
||||
export interface CronDoubanV1alpha1ApiPatchCronDoubanRequest {
|
||||
/**
|
||||
* Name of crondouban
|
||||
* @type {string}
|
||||
* @memberof CronDoubanV1alpha1ApiPatchCronDouban
|
||||
*/
|
||||
readonly name: string
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {Array<JsonPatchInner>}
|
||||
* @memberof CronDoubanV1alpha1ApiPatchCronDouban
|
||||
*/
|
||||
readonly jsonPatchInner?: Array<JsonPatchInner>
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updateCronDouban operation in CronDoubanV1alpha1Api.
|
||||
* @export
|
||||
* @interface CronDoubanV1alpha1ApiUpdateCronDoubanRequest
|
||||
*/
|
||||
export interface CronDoubanV1alpha1ApiUpdateCronDoubanRequest {
|
||||
/**
|
||||
* Name of crondouban
|
||||
* @type {string}
|
||||
* @memberof CronDoubanV1alpha1ApiUpdateCronDouban
|
||||
*/
|
||||
readonly name: string
|
||||
|
||||
/**
|
||||
* Updated crondouban
|
||||
* @type {CronDouban}
|
||||
* @memberof CronDoubanV1alpha1ApiUpdateCronDouban
|
||||
*/
|
||||
readonly cronDouban?: CronDouban
|
||||
}
|
||||
|
||||
/**
|
||||
* CronDoubanV1alpha1Api - object-oriented interface
|
||||
* @export
|
||||
* @class CronDoubanV1alpha1Api
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class CronDoubanV1alpha1Api extends BaseAPI {
|
||||
/**
|
||||
* Create CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiCreateCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof CronDoubanV1alpha1Api
|
||||
*/
|
||||
public createCronDouban(requestParameters: CronDoubanV1alpha1ApiCreateCronDoubanRequest = {}, options?: RawAxiosRequestConfig) {
|
||||
return CronDoubanV1alpha1ApiFp(this.configuration).createCronDouban(requestParameters.cronDouban, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiDeleteCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof CronDoubanV1alpha1Api
|
||||
*/
|
||||
public deleteCronDouban(requestParameters: CronDoubanV1alpha1ApiDeleteCronDoubanRequest, options?: RawAxiosRequestConfig) {
|
||||
return CronDoubanV1alpha1ApiFp(this.configuration).deleteCronDouban(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiGetCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof CronDoubanV1alpha1Api
|
||||
*/
|
||||
public getCronDouban(requestParameters: CronDoubanV1alpha1ApiGetCronDoubanRequest, options?: RawAxiosRequestConfig) {
|
||||
return CronDoubanV1alpha1ApiFp(this.configuration).getCronDouban(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiListCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof CronDoubanV1alpha1Api
|
||||
*/
|
||||
public listCronDouban(requestParameters: CronDoubanV1alpha1ApiListCronDoubanRequest = {}, options?: RawAxiosRequestConfig) {
|
||||
return CronDoubanV1alpha1ApiFp(this.configuration).listCronDouban(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiPatchCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof CronDoubanV1alpha1Api
|
||||
*/
|
||||
public patchCronDouban(requestParameters: CronDoubanV1alpha1ApiPatchCronDoubanRequest, options?: RawAxiosRequestConfig) {
|
||||
return CronDoubanV1alpha1ApiFp(this.configuration).patchCronDouban(requestParameters.name, requestParameters.jsonPatchInner, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update CronDouban
|
||||
* @param {CronDoubanV1alpha1ApiUpdateCronDoubanRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof CronDoubanV1alpha1Api
|
||||
*/
|
||||
public updateCronDouban(requestParameters: CronDoubanV1alpha1ApiUpdateCronDoubanRequest, options?: RawAxiosRequestConfig) {
|
||||
return CronDoubanV1alpha1ApiFp(this.configuration).updateCronDouban(requestParameters.name, requestParameters.cronDouban, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,665 @@
|
||||
/* 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.20.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, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { DoubanMovie } from '../models';
|
||||
// @ts-ignore
|
||||
import type { DoubanMovieList } from '../models';
|
||||
// @ts-ignore
|
||||
import type { JsonPatchInner } from '../models';
|
||||
/**
|
||||
* DoubanMovieV1alpha1Api - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const DoubanMovieV1alpha1ApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Create DoubanMovie
|
||||
* @param {DoubanMovie} [doubanMovie] Fresh doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createDoubanMovie: async (doubanMovie?: DoubanMovie, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/doubanmovies`;
|
||||
// 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(doubanMovie, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteDoubanMovie: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('deleteDoubanMovie', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/doubanmovies/{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: '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)
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Get DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getDoubanMovie: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('getDoubanMovie', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/doubanmovies/{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: '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 DoubanMovie
|
||||
* @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 {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listDoubanMovie1: async (page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/doubanmovies`;
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Patch DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {Array<JsonPatchInner>} [jsonPatchInner]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
patchDoubanMovie: async (name: string, jsonPatchInner?: Array<JsonPatchInner>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('patchDoubanMovie', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/doubanmovies/{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: 'PATCH', ...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-patch+json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(jsonPatchInner, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {DoubanMovie} [doubanMovie] Updated doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateDoubanMovie: async (name: string, doubanMovie?: DoubanMovie, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('updateDoubanMovie', 'name', name)
|
||||
const localVarPath = `/apis/douban.moony.la/v1alpha1/doubanmovies/{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(doubanMovie, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* DoubanMovieV1alpha1Api - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const DoubanMovieV1alpha1ApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = DoubanMovieV1alpha1ApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
* Create DoubanMovie
|
||||
* @param {DoubanMovie} [doubanMovie] Fresh doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createDoubanMovie(doubanMovie?: DoubanMovie, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DoubanMovie>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createDoubanMovie(doubanMovie, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['DoubanMovieV1alpha1Api.createDoubanMovie']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Delete DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteDoubanMovie(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDoubanMovie(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['DoubanMovieV1alpha1Api.deleteDoubanMovie']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Get DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getDoubanMovie(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DoubanMovie>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getDoubanMovie(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['DoubanMovieV1alpha1Api.getDoubanMovie']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* List DoubanMovie
|
||||
* @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 {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listDoubanMovie1(page?: number, size?: number, labelSelector?: Array<string>, fieldSelector?: Array<string>, sort?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DoubanMovieList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listDoubanMovie1(page, size, labelSelector, fieldSelector, sort, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['DoubanMovieV1alpha1Api.listDoubanMovie1']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Patch DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {Array<JsonPatchInner>} [jsonPatchInner]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async patchDoubanMovie(name: string, jsonPatchInner?: Array<JsonPatchInner>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DoubanMovie>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.patchDoubanMovie(name, jsonPatchInner, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['DoubanMovieV1alpha1Api.patchDoubanMovie']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Update DoubanMovie
|
||||
* @param {string} name Name of doubanmovie
|
||||
* @param {DoubanMovie} [doubanMovie] Updated doubanmovie
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateDoubanMovie(name: string, doubanMovie?: DoubanMovie, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DoubanMovie>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateDoubanMovie(name, doubanMovie, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['DoubanMovieV1alpha1Api.updateDoubanMovie']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* DoubanMovieV1alpha1Api - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const DoubanMovieV1alpha1ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = DoubanMovieV1alpha1ApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
* Create DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiCreateDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiCreateDoubanMovieRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<DoubanMovie> {
|
||||
return localVarFp.createDoubanMovie(requestParameters.doubanMovie, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiDeleteDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiDeleteDoubanMovieRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.deleteDoubanMovie(requestParameters.name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiGetDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiGetDoubanMovieRequest, options?: RawAxiosRequestConfig): AxiosPromise<DoubanMovie> {
|
||||
return localVarFp.getDoubanMovie(requestParameters.name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiListDoubanMovie1Request} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listDoubanMovie1(requestParameters: DoubanMovieV1alpha1ApiListDoubanMovie1Request = {}, options?: RawAxiosRequestConfig): AxiosPromise<DoubanMovieList> {
|
||||
return localVarFp.listDoubanMovie1(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Patch DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiPatchDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
patchDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiPatchDoubanMovieRequest, options?: RawAxiosRequestConfig): AxiosPromise<DoubanMovie> {
|
||||
return localVarFp.patchDoubanMovie(requestParameters.name, requestParameters.jsonPatchInner, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiUpdateDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiUpdateDoubanMovieRequest, options?: RawAxiosRequestConfig): AxiosPromise<DoubanMovie> {
|
||||
return localVarFp.updateDoubanMovie(requestParameters.name, requestParameters.doubanMovie, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createDoubanMovie operation in DoubanMovieV1alpha1Api.
|
||||
* @export
|
||||
* @interface DoubanMovieV1alpha1ApiCreateDoubanMovieRequest
|
||||
*/
|
||||
export interface DoubanMovieV1alpha1ApiCreateDoubanMovieRequest {
|
||||
/**
|
||||
* Fresh doubanmovie
|
||||
* @type {DoubanMovie}
|
||||
* @memberof DoubanMovieV1alpha1ApiCreateDoubanMovie
|
||||
*/
|
||||
readonly doubanMovie?: DoubanMovie
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deleteDoubanMovie operation in DoubanMovieV1alpha1Api.
|
||||
* @export
|
||||
* @interface DoubanMovieV1alpha1ApiDeleteDoubanMovieRequest
|
||||
*/
|
||||
export interface DoubanMovieV1alpha1ApiDeleteDoubanMovieRequest {
|
||||
/**
|
||||
* Name of doubanmovie
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieV1alpha1ApiDeleteDoubanMovie
|
||||
*/
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getDoubanMovie operation in DoubanMovieV1alpha1Api.
|
||||
* @export
|
||||
* @interface DoubanMovieV1alpha1ApiGetDoubanMovieRequest
|
||||
*/
|
||||
export interface DoubanMovieV1alpha1ApiGetDoubanMovieRequest {
|
||||
/**
|
||||
* Name of doubanmovie
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieV1alpha1ApiGetDoubanMovie
|
||||
*/
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listDoubanMovie1 operation in DoubanMovieV1alpha1Api.
|
||||
* @export
|
||||
* @interface DoubanMovieV1alpha1ApiListDoubanMovie1Request
|
||||
*/
|
||||
export interface DoubanMovieV1alpha1ApiListDoubanMovie1Request {
|
||||
/**
|
||||
* Page number. Default is 0.
|
||||
* @type {number}
|
||||
* @memberof DoubanMovieV1alpha1ApiListDoubanMovie1
|
||||
*/
|
||||
readonly page?: number
|
||||
|
||||
/**
|
||||
* Size number. Default is 0.
|
||||
* @type {number}
|
||||
* @memberof DoubanMovieV1alpha1ApiListDoubanMovie1
|
||||
*/
|
||||
readonly size?: number
|
||||
|
||||
/**
|
||||
* Label selector. e.g.: hidden!=true
|
||||
* @type {Array<string>}
|
||||
* @memberof DoubanMovieV1alpha1ApiListDoubanMovie1
|
||||
*/
|
||||
readonly labelSelector?: Array<string>
|
||||
|
||||
/**
|
||||
* Field selector. e.g.: metadata.name==halo
|
||||
* @type {Array<string>}
|
||||
* @memberof DoubanMovieV1alpha1ApiListDoubanMovie1
|
||||
*/
|
||||
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 DoubanMovieV1alpha1ApiListDoubanMovie1
|
||||
*/
|
||||
readonly sort?: Array<string>
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for patchDoubanMovie operation in DoubanMovieV1alpha1Api.
|
||||
* @export
|
||||
* @interface DoubanMovieV1alpha1ApiPatchDoubanMovieRequest
|
||||
*/
|
||||
export interface DoubanMovieV1alpha1ApiPatchDoubanMovieRequest {
|
||||
/**
|
||||
* Name of doubanmovie
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieV1alpha1ApiPatchDoubanMovie
|
||||
*/
|
||||
readonly name: string
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {Array<JsonPatchInner>}
|
||||
* @memberof DoubanMovieV1alpha1ApiPatchDoubanMovie
|
||||
*/
|
||||
readonly jsonPatchInner?: Array<JsonPatchInner>
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updateDoubanMovie operation in DoubanMovieV1alpha1Api.
|
||||
* @export
|
||||
* @interface DoubanMovieV1alpha1ApiUpdateDoubanMovieRequest
|
||||
*/
|
||||
export interface DoubanMovieV1alpha1ApiUpdateDoubanMovieRequest {
|
||||
/**
|
||||
* Name of doubanmovie
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieV1alpha1ApiUpdateDoubanMovie
|
||||
*/
|
||||
readonly name: string
|
||||
|
||||
/**
|
||||
* Updated doubanmovie
|
||||
* @type {DoubanMovie}
|
||||
* @memberof DoubanMovieV1alpha1ApiUpdateDoubanMovie
|
||||
*/
|
||||
readonly doubanMovie?: DoubanMovie
|
||||
}
|
||||
|
||||
/**
|
||||
* DoubanMovieV1alpha1Api - object-oriented interface
|
||||
* @export
|
||||
* @class DoubanMovieV1alpha1Api
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class DoubanMovieV1alpha1Api extends BaseAPI {
|
||||
/**
|
||||
* Create DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiCreateDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DoubanMovieV1alpha1Api
|
||||
*/
|
||||
public createDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiCreateDoubanMovieRequest = {}, options?: RawAxiosRequestConfig) {
|
||||
return DoubanMovieV1alpha1ApiFp(this.configuration).createDoubanMovie(requestParameters.doubanMovie, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiDeleteDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DoubanMovieV1alpha1Api
|
||||
*/
|
||||
public deleteDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiDeleteDoubanMovieRequest, options?: RawAxiosRequestConfig) {
|
||||
return DoubanMovieV1alpha1ApiFp(this.configuration).deleteDoubanMovie(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiGetDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DoubanMovieV1alpha1Api
|
||||
*/
|
||||
public getDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiGetDoubanMovieRequest, options?: RawAxiosRequestConfig) {
|
||||
return DoubanMovieV1alpha1ApiFp(this.configuration).getDoubanMovie(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiListDoubanMovie1Request} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DoubanMovieV1alpha1Api
|
||||
*/
|
||||
public listDoubanMovie1(requestParameters: DoubanMovieV1alpha1ApiListDoubanMovie1Request = {}, options?: RawAxiosRequestConfig) {
|
||||
return DoubanMovieV1alpha1ApiFp(this.configuration).listDoubanMovie1(requestParameters.page, requestParameters.size, requestParameters.labelSelector, requestParameters.fieldSelector, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiPatchDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DoubanMovieV1alpha1Api
|
||||
*/
|
||||
public patchDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiPatchDoubanMovieRequest, options?: RawAxiosRequestConfig) {
|
||||
return DoubanMovieV1alpha1ApiFp(this.configuration).patchDoubanMovie(requestParameters.name, requestParameters.jsonPatchInner, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update DoubanMovie
|
||||
* @param {DoubanMovieV1alpha1ApiUpdateDoubanMovieRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DoubanMovieV1alpha1Api
|
||||
*/
|
||||
public updateDoubanMovie(requestParameters: DoubanMovieV1alpha1ApiUpdateDoubanMovieRequest, options?: RawAxiosRequestConfig) {
|
||||
return DoubanMovieV1alpha1ApiFp(this.configuration).updateDoubanMovie(requestParameters.name, requestParameters.doubanMovie, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* 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.20.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';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://localhost:49992".replace(/\/+$/, "");
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface RequestArgs
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: RawAxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration | undefined;
|
||||
|
||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath ?? basePath;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
this.name = "RequiredError"
|
||||
}
|
||||
}
|
||||
|
||||
interface ServerMap {
|
||||
[key: string]: {
|
||||
url: string,
|
||||
description: string,
|
||||
}[];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const operationServerMap: ServerMap = {
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
/* 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.20.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 { RequestArgs } from "./base";
|
||||
import type { AxiosInstance, AxiosResponse } from 'axios';
|
||||
import { RequiredError } from "./base";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const DUMMY_BASE_URL = 'https://example.com'
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws {RequiredError}
|
||||
* @export
|
||||
*/
|
||||
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
||||
if (paramValue === null || paramValue === undefined) {
|
||||
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? await configuration.apiKey(keyParamName)
|
||||
: await configuration.apiKey;
|
||||
object[keyParamName] = localVarApiKeyValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
||||
if (configuration && (configuration.username || configuration.password)) {
|
||||
object["auth"] = { username: configuration.username, password: configuration.password };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken(name, scopes)
|
||||
: await configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||
}
|
||||
}
|
||||
|
||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||
if (parameter == null) return;
|
||||
if (typeof parameter === "object") {
|
||||
if (Array.isArray(parameter)) {
|
||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||
}
|
||||
else {
|
||||
Object.keys(parameter).forEach(currentKey =>
|
||||
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (urlSearchParams.has(key)) {
|
||||
urlSearchParams.append(key, parameter);
|
||||
}
|
||||
else {
|
||||
urlSearchParams.set(key, parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
||||
const searchParams = new URLSearchParams(url.search);
|
||||
setFlattenedQueryParams(searchParams, objects);
|
||||
url.search = searchParams.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
||||
const nonString = typeof value !== 'string';
|
||||
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
||||
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
||||
: nonString;
|
||||
return needsSerialization
|
||||
? JSON.stringify(value !== undefined ? value : {})
|
||||
: (value || "");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const toPathString = function (url: URL) {
|
||||
return url.pathname + url.search + url.hash
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
||||
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
||||
return axios.request<T, R>(axiosRequestArgs);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 ConfigurationParameters {
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
basePath?: string;
|
||||
serverIndex?: number;
|
||||
baseOptions?: any;
|
||||
formDataCtor?: new () => any;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* override server index
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
serverIndex?: number;
|
||||
/**
|
||||
* base options for axios calls
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
baseOptions?: any;
|
||||
/**
|
||||
* The FormData constructor that will be used to create multipart form data
|
||||
* requests. You can inject this here so that execution environments that
|
||||
* do not support the FormData class can still run the generated client.
|
||||
*
|
||||
* @type {new () => FormData}
|
||||
*/
|
||||
formDataCtor?: new () => any;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
this.serverIndex = param.serverIndex;
|
||||
this.baseOptions = param.baseOptions;
|
||||
this.formDataCtor = param.formDataCtor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
@@ -0,0 +1,18 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export * from "./api";
|
||||
export * from "./configuration";
|
||||
export * from "./models";
|
||||
@@ -0,0 +1,49 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 AddOperation
|
||||
*/
|
||||
export interface AddOperation {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddOperation
|
||||
*/
|
||||
'op': AddOperationOpEnum;
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof AddOperation
|
||||
*/
|
||||
'path': string;
|
||||
/**
|
||||
* Value can be any JSON value
|
||||
* @type {any}
|
||||
* @memberof AddOperation
|
||||
*/
|
||||
'value': any;
|
||||
}
|
||||
|
||||
export const AddOperationOpEnum = {
|
||||
Add: 'add'
|
||||
} as const;
|
||||
|
||||
export type AddOperationOpEnum = typeof AddOperationOpEnum[keyof typeof AddOperationOpEnum];
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 CopyOperation
|
||||
*/
|
||||
export interface CopyOperation {
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof CopyOperation
|
||||
*/
|
||||
'from': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CopyOperation
|
||||
*/
|
||||
'op': CopyOperationOpEnum;
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof CopyOperation
|
||||
*/
|
||||
'path': string;
|
||||
}
|
||||
|
||||
export const CopyOperationOpEnum = {
|
||||
Copy: 'copy'
|
||||
} as const;
|
||||
|
||||
export type CopyOperationOpEnum = typeof CopyOperationOpEnum[keyof typeof CopyOperationOpEnum];
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { CronDouban } from './cron-douban';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CronDoubanList
|
||||
*/
|
||||
export interface CronDoubanList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'first': boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'hasNext': boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'hasPrevious': boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<CronDouban>}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'items': Array<CronDouban>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'last': boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'page': number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'size': number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'total': number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof CronDoubanList
|
||||
*/
|
||||
'totalPages': number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { Metadata } from './metadata';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { Spec } from './spec';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { Status } from './status';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CronDouban
|
||||
*/
|
||||
export interface CronDouban {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CronDouban
|
||||
*/
|
||||
'apiVersion': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CronDouban
|
||||
*/
|
||||
'kind': string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof CronDouban
|
||||
*/
|
||||
'metadata': Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {Spec}
|
||||
* @memberof CronDouban
|
||||
*/
|
||||
'spec'?: Spec;
|
||||
/**
|
||||
*
|
||||
* @type {Status}
|
||||
* @memberof CronDouban
|
||||
*/
|
||||
'status'?: Status;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 DoubanMovieFaves
|
||||
*/
|
||||
export interface DoubanMovieFaves {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieFaves
|
||||
*/
|
||||
'createTime'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieFaves
|
||||
*/
|
||||
'remark'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieFaves
|
||||
*/
|
||||
'score'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieFaves
|
||||
*/
|
||||
'status'?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { DoubanMovie } from './douban-movie';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DoubanMovieList
|
||||
*/
|
||||
export interface DoubanMovieList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'first': boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'hasNext': boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'hasPrevious': boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<DoubanMovie>}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'items': Array<DoubanMovie>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'last': boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'page': number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'size': number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'total': number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof DoubanMovieList
|
||||
*/
|
||||
'totalPages': number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 DoubanMovieSpec
|
||||
*/
|
||||
export interface DoubanMovieSpec {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'cardSubtitle'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'dataType'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'genres'?: Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'id'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'link'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'name'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'poster'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'pubdate'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'score'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovieSpec
|
||||
*/
|
||||
'year'?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { DoubanMovieFaves } from './douban-movie-faves';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { DoubanMovieSpec } from './douban-movie-spec';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { Metadata } from './metadata';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DoubanMovieVo
|
||||
*/
|
||||
export interface DoubanMovieVo {
|
||||
/**
|
||||
*
|
||||
* @type {DoubanMovieFaves}
|
||||
* @memberof DoubanMovieVo
|
||||
*/
|
||||
'faves'?: DoubanMovieFaves;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof DoubanMovieVo
|
||||
*/
|
||||
'metadata'?: Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {DoubanMovieSpec}
|
||||
* @memberof DoubanMovieVo
|
||||
*/
|
||||
'spec'?: DoubanMovieSpec;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { DoubanMovieFaves } from './douban-movie-faves';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { DoubanMovieSpec } from './douban-movie-spec';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { Metadata } from './metadata';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DoubanMovie
|
||||
*/
|
||||
export interface DoubanMovie {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovie
|
||||
*/
|
||||
'apiVersion': string;
|
||||
/**
|
||||
*
|
||||
* @type {DoubanMovieFaves}
|
||||
* @memberof DoubanMovie
|
||||
*/
|
||||
'faves': DoubanMovieFaves;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DoubanMovie
|
||||
*/
|
||||
'kind': string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof DoubanMovie
|
||||
*/
|
||||
'metadata': Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {DoubanMovieSpec}
|
||||
* @memberof DoubanMovie
|
||||
*/
|
||||
'spec': DoubanMovieSpec;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
export * from './add-operation';
|
||||
export * from './copy-operation';
|
||||
export * from './cron-douban';
|
||||
export * from './cron-douban-list';
|
||||
export * from './douban-movie';
|
||||
export * from './douban-movie-faves';
|
||||
export * from './douban-movie-list';
|
||||
export * from './douban-movie-spec';
|
||||
export * from './douban-movie-vo';
|
||||
export * from './json-patch-inner';
|
||||
export * from './metadata';
|
||||
export * from './move-operation';
|
||||
export * from './remove-operation';
|
||||
export * from './replace-operation';
|
||||
export * from './spec';
|
||||
export * from './status';
|
||||
export * from './test-operation';
|
||||
@@ -0,0 +1,41 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { AddOperation } from './add-operation';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { CopyOperation } from './copy-operation';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { MoveOperation } from './move-operation';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { RemoveOperation } from './remove-operation';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ReplaceOperation } from './replace-operation';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { TestOperation } from './test-operation';
|
||||
|
||||
/**
|
||||
* @type JsonPatchInner
|
||||
* @export
|
||||
*/
|
||||
export type JsonPatchInner = AddOperation | CopyOperation | MoveOperation | RemoveOperation | ReplaceOperation | TestOperation;
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 Metadata
|
||||
*/
|
||||
export interface Metadata {
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: string; }}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'annotations'?: { [key: string]: string; };
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'creationTimestamp'?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'deletionTimestamp'?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'finalizers'?: Array<string> | null;
|
||||
/**
|
||||
* The name field will be generated automatically according to the given generateName field
|
||||
* @type {string}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'generateName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: string; }}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'labels'?: { [key: string]: string; };
|
||||
/**
|
||||
* Metadata name
|
||||
* @type {string}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Metadata
|
||||
*/
|
||||
'version'?: number | null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 MoveOperation
|
||||
*/
|
||||
export interface MoveOperation {
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof MoveOperation
|
||||
*/
|
||||
'from': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MoveOperation
|
||||
*/
|
||||
'op': MoveOperationOpEnum;
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof MoveOperation
|
||||
*/
|
||||
'path': string;
|
||||
}
|
||||
|
||||
export const MoveOperationOpEnum = {
|
||||
Move: 'move'
|
||||
} as const;
|
||||
|
||||
export type MoveOperationOpEnum = typeof MoveOperationOpEnum[keyof typeof MoveOperationOpEnum];
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 RemoveOperation
|
||||
*/
|
||||
export interface RemoveOperation {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RemoveOperation
|
||||
*/
|
||||
'op': RemoveOperationOpEnum;
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof RemoveOperation
|
||||
*/
|
||||
'path': string;
|
||||
}
|
||||
|
||||
export const RemoveOperationOpEnum = {
|
||||
Remove: 'remove'
|
||||
} as const;
|
||||
|
||||
export type RemoveOperationOpEnum = typeof RemoveOperationOpEnum[keyof typeof RemoveOperationOpEnum];
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 ReplaceOperation
|
||||
*/
|
||||
export interface ReplaceOperation {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReplaceOperation
|
||||
*/
|
||||
'op': ReplaceOperationOpEnum;
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof ReplaceOperation
|
||||
*/
|
||||
'path': string;
|
||||
/**
|
||||
* Value can be any JSON value
|
||||
* @type {any}
|
||||
* @memberof ReplaceOperation
|
||||
*/
|
||||
'value': any;
|
||||
}
|
||||
|
||||
export const ReplaceOperationOpEnum = {
|
||||
Replace: 'replace'
|
||||
} as const;
|
||||
|
||||
export type ReplaceOperationOpEnum = typeof ReplaceOperationOpEnum[keyof typeof ReplaceOperationOpEnum];
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 Spec
|
||||
*/
|
||||
export interface Spec {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Spec
|
||||
*/
|
||||
'cron'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Spec
|
||||
*/
|
||||
'suspend'?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Spec
|
||||
*/
|
||||
'timezone'?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 Status
|
||||
*/
|
||||
export interface Status {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Status
|
||||
*/
|
||||
'lastScheduledTimestamp'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Status
|
||||
*/
|
||||
'nextSchedulingTimestamp'?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* 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.20.0
|
||||
*
|
||||
*
|
||||
* 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 TestOperation
|
||||
*/
|
||||
export interface TestOperation {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TestOperation
|
||||
*/
|
||||
'op': TestOperationOpEnum;
|
||||
/**
|
||||
* A JSON Pointer path pointing to the location to move/copy from.
|
||||
* @type {string}
|
||||
* @memberof TestOperation
|
||||
*/
|
||||
'path': string;
|
||||
/**
|
||||
* Value can be any JSON value
|
||||
* @type {any}
|
||||
* @memberof TestOperation
|
||||
*/
|
||||
'value': any;
|
||||
}
|
||||
|
||||
export const TestOperationOpEnum = {
|
||||
Test: 'test'
|
||||
} as const;
|
||||
|
||||
export type TestOperationOpEnum = typeof TestOperationOpEnum[keyof typeof TestOperationOpEnum];
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { axiosInstance } from "@halo-dev/api-client";
|
||||
import { ApiDoubanMoonyLaV1alpha1DoubanMovieApi, DoubanMovieV1alpha1Api, CronDoubanV1alpha1Api } from "./generated";
|
||||
|
||||
const doubanCoreApiClient = {
|
||||
doubanMovie: new DoubanMovieV1alpha1Api(undefined, "", axiosInstance),
|
||||
cronDouban: new CronDoubanV1alpha1Api(undefined, "", axiosInstance),
|
||||
};
|
||||
|
||||
const doubanApiClient = {
|
||||
doubanMovie: new ApiDoubanMoonyLaV1alpha1DoubanMovieApi(undefined, "", axiosInstance),
|
||||
};
|
||||
|
||||
|
||||
export { doubanCoreApiClient, doubanApiClient };
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,335 @@
|
||||
<script lang="ts" setup>
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import { ref, computed, nextTick, watch} from "vue";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import {doubanCoreApiClient} from "@/api";
|
||||
import type { DoubanMovie } from "@/api/generated";
|
||||
import {toDatetimeLocal, toISOString} from "@/utils/date";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
visible: boolean;
|
||||
doubanMovie?: DoubanMovie;
|
||||
}>(),
|
||||
{
|
||||
visible: false,
|
||||
doubanMovie: undefined,
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: "update:visible", value: boolean): void;
|
||||
(event: "close"): void;
|
||||
}>();
|
||||
|
||||
const initialFormState: DoubanMovie = {
|
||||
metadata: {
|
||||
name: "",
|
||||
generateName: "douban-movie-",
|
||||
},
|
||||
faves:{
|
||||
remark :"",
|
||||
createTime: undefined,
|
||||
score: "",
|
||||
status: "done"
|
||||
},
|
||||
spec: {
|
||||
name: "",
|
||||
poster: "",
|
||||
link: "",
|
||||
id: "",
|
||||
score: "",
|
||||
year: "",
|
||||
type: "",
|
||||
pubdate: "",
|
||||
cardSubtitle: "",
|
||||
dataType: "halo",
|
||||
genres: []
|
||||
},
|
||||
kind: "DoubanMovie",
|
||||
apiVersion: "douban.moony.la/v1alpha1",
|
||||
};
|
||||
|
||||
const formState = ref<DoubanMovie>(cloneDeep(initialFormState));
|
||||
const saving = ref<boolean>(false);
|
||||
const formVisible = ref(false);
|
||||
const createTime = ref<string | undefined>(undefined);
|
||||
|
||||
|
||||
const isUpdateMode = computed(() => {
|
||||
return !!formState.value.metadata.creationTimestamp;
|
||||
});
|
||||
|
||||
const modalTitle = computed(() => {
|
||||
return isUpdateMode.value ? "编辑条目" : "新建条目";
|
||||
});
|
||||
|
||||
const onVisibleChange = (visible: boolean) => {
|
||||
emit("update:visible", visible);
|
||||
if (!visible) {
|
||||
emit("close");
|
||||
}
|
||||
};
|
||||
|
||||
const handleResetForm = () => {
|
||||
formState.value = cloneDeep(initialFormState);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.visible,
|
||||
(visible) => {
|
||||
if (visible) {
|
||||
formVisible.value = true;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
formVisible.value = false;
|
||||
handleResetForm();
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.doubanMovie,
|
||||
(doubanMovie) => {
|
||||
if (doubanMovie) {
|
||||
formState.value = cloneDeep(doubanMovie);
|
||||
createTime.value = toDatetimeLocal(formState.value.faves.createTime);
|
||||
}else {
|
||||
createTime.value = undefined;
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => createTime.value,
|
||||
(value) => {
|
||||
formState.value.faves.createTime = value ? toISOString(value) : undefined;
|
||||
}
|
||||
);
|
||||
const annotationsFormRef = ref();
|
||||
|
||||
const handleSaveFriend = async () => {
|
||||
annotationsFormRef.value?.handleSubmit();
|
||||
await nextTick();
|
||||
|
||||
const { customAnnotations, annotations, customFormInvalid, specFormInvalid } =
|
||||
annotationsFormRef.value || {};
|
||||
if (customFormInvalid || specFormInvalid) {
|
||||
return;
|
||||
}
|
||||
|
||||
formState.value.metadata.annotations = {
|
||||
...annotations,
|
||||
...customAnnotations,
|
||||
};
|
||||
|
||||
try {
|
||||
saving.value = true;
|
||||
if (isUpdateMode.value) {
|
||||
await doubanCoreApiClient.doubanMovie.updateDoubanMovie({
|
||||
name: formState.value.metadata.name,
|
||||
doubanMovie: formState.value
|
||||
});
|
||||
} else {
|
||||
await doubanCoreApiClient.doubanMovie.createDoubanMovie(
|
||||
{
|
||||
doubanMovie: formState.value
|
||||
});
|
||||
}
|
||||
|
||||
Toast.success("保存成功");
|
||||
|
||||
onVisibleChange(false);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
saving.value = false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VModal
|
||||
:title="modalTitle"
|
||||
:visible="visible"
|
||||
:width="650"
|
||||
@update:visible="onVisibleChange"
|
||||
>
|
||||
<template #actions>
|
||||
<slot name="append-actions" />
|
||||
</template>
|
||||
|
||||
<FormKit
|
||||
v-if="formVisible"
|
||||
id="doubanMovie-form"
|
||||
name="doubanMovie-form"
|
||||
type="form"
|
||||
:config="{ validationVisibility: 'submit' }"
|
||||
@submit="handleSaveFriend"
|
||||
>
|
||||
<div class="md:grid md:grid-cols-4 md:gap-6">
|
||||
<div class="md:col-span-1">
|
||||
<div class="sticky top-0">
|
||||
<span class="text-base font-medium text-gray-900"> 常规 </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 divide-y divide-gray-100 md:col-span-3 md:mt-0">
|
||||
<td v-if="isUpdateMode">
|
||||
<p><img :src="formState.spec.poster" width="100"></p>
|
||||
<p>{{formState.spec.name}} <span class="db--titletag">{{formState.spec.dataType == 'db' ? '豆瓣' : formState.spec.dataType == 'tmdb' ? 'TMDB' : '手动添加'}}</span>
|
||||
</p>
|
||||
<p>{{formState.spec.cardSubtitle}}</p>
|
||||
</td>
|
||||
<FormKit
|
||||
v-if="formState.spec.dataType=='halo'"
|
||||
type="attachment"
|
||||
v-model="formState.spec.poster"
|
||||
name="poster"
|
||||
validation="required"
|
||||
label="封面"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
v-if="formState.spec.dataType=='halo'"
|
||||
type="text"
|
||||
v-model="formState.spec.name"
|
||||
name="name"
|
||||
validation="required"
|
||||
label="标题"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
type="text"
|
||||
v-model="formState.spec.link"
|
||||
name="link"
|
||||
validation="required"
|
||||
label="链接"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
v-if="formState.spec.dataType=='halo'"
|
||||
type="number"
|
||||
v-model="formState.spec.score"
|
||||
name="score"
|
||||
validation="required"
|
||||
label="评分"
|
||||
max="10"
|
||||
min="0"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
v-if="formState.spec.dataType=='halo'"
|
||||
:options="[
|
||||
{
|
||||
label: '电影',
|
||||
value: 'movie',
|
||||
},
|
||||
{
|
||||
label: '图书',
|
||||
value: 'book',
|
||||
},
|
||||
{
|
||||
label: '音乐',
|
||||
value: 'music',
|
||||
},
|
||||
{
|
||||
label: '游戏',
|
||||
value: 'game',
|
||||
},
|
||||
{
|
||||
label: '舞台剧',
|
||||
value: 'drama',
|
||||
},
|
||||
]"
|
||||
label="类型"
|
||||
v-model="formState.spec.type"
|
||||
name="type"
|
||||
type="select"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
v-if="formState.spec.dataType=='halo'"
|
||||
type="textarea"
|
||||
v-model="formState.spec.cardSubtitle"
|
||||
name="cardSubtitle"
|
||||
label="描述"
|
||||
:rows="4"
|
||||
validation="required|length:0,300"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
type="datetime-local"
|
||||
min="0000-01-01T00:00"
|
||||
max="9999-12-31T23:59"
|
||||
v-model="createTime"
|
||||
name="createTime"
|
||||
validation="required"
|
||||
label="观看时间"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
:options="[
|
||||
{ label: '已看', value: 'done' },
|
||||
{ label: '想看', value: 'mark' },
|
||||
{ label: '在看', value: 'doing' },
|
||||
]"
|
||||
label="状态"
|
||||
v-model="formState.faves.status"
|
||||
name="status"
|
||||
type="select"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
type="textarea"
|
||||
v-model="formState.faves.remark"
|
||||
name="remark"
|
||||
label="我的短评"
|
||||
:rows="4"
|
||||
validation="length:0,300"
|
||||
></FormKit>
|
||||
<FormKit
|
||||
type="number"
|
||||
v-model="formState.faves.score"
|
||||
name="score"
|
||||
label="我的评分"
|
||||
max="5"
|
||||
min="0"
|
||||
></FormKit>
|
||||
</div>
|
||||
</div>
|
||||
</FormKit>
|
||||
|
||||
<template #footer>
|
||||
<VSpace>
|
||||
<VButton
|
||||
:loading="saving"
|
||||
type="secondary"
|
||||
@click="$formkit.submit('doubanMovie-form')"
|
||||
>
|
||||
提交
|
||||
</VButton>
|
||||
<VButton @click="onVisibleChange(false)">取消</VButton>
|
||||
</VSpace>
|
||||
</template>
|
||||
</VModal>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.db--titletag {
|
||||
font-size: 13px;
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
background-color: green;
|
||||
border-radius: 2px;
|
||||
line-height: 1;
|
||||
padding: 2px 3px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
divide-y td {
|
||||
margin-bottom: 9px;
|
||||
line-height: 1.3;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.divide-y td p {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div class="editor-block__actions-separator"></div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.editor-block__actions-separator {
|
||||
@apply h-5 bg-slate-200 mx-1.5;
|
||||
width: 1px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,36 @@
|
||||
<script lang="ts" setup>
|
||||
import type { Editor } from "@halo-dev/richtext-editor";
|
||||
import { computed, type Component } from "vue";
|
||||
import Douban from "./douban-edited";
|
||||
|
||||
const props = defineProps<{
|
||||
editor: Editor;
|
||||
isActive: ({ editor }: { editor: Editor }) => boolean;
|
||||
visible?: ({ editor }: { editor: Editor }) => boolean;
|
||||
icon?: Component;
|
||||
title?: string;
|
||||
action?: ({ editor }: { editor: Editor }) => void;
|
||||
}>();
|
||||
|
||||
const src = computed({
|
||||
get: () => {
|
||||
return props.editor.getAttributes(Douban.name)?.src;
|
||||
},
|
||||
set: (src: string) => {
|
||||
props.editor
|
||||
.chain()
|
||||
.updateAttributes(Douban.name, { src: src })
|
||||
.setNodeSelection(props.editor.state.selection.from)
|
||||
.focus()
|
||||
.run();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input
|
||||
v-model.lazy="src"
|
||||
placeholder="输入链接,按回车确定"
|
||||
class="bg-gray-50 rounded-md hover:bg-gray-100 block px-2 w-full py-1.5 text-sm text-gray-900 border border-gray-300 focus:ring-blue-500 focus:border-blue-500"
|
||||
/>
|
||||
</template>
|
||||
@@ -0,0 +1,267 @@
|
||||
<script lang="ts" setup>
|
||||
import type { PMNode } from "@halo-dev/richtext-editor";
|
||||
import type { Editor, Node } from "@halo-dev/richtext-editor";
|
||||
import { NodeViewWrapper } from "@halo-dev/richtext-editor";
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import {formatDatetime} from "@/utils/date";
|
||||
import { VButton,VSpace,VDropdown} from "@halo-dev/components";
|
||||
import {doubanApiClient} from "@/api";
|
||||
import type { DoubanMovie } from "@/api/generated";
|
||||
|
||||
const selecteDoubanMovie = ref<DoubanMovie | undefined>();
|
||||
|
||||
const props = defineProps<{
|
||||
editor: Editor;
|
||||
node: PMNode;
|
||||
selected: boolean;
|
||||
extension: Node<any, any>;
|
||||
getPos: () => number;
|
||||
updateAttributes: (attributes: Record<string, any>) => void;
|
||||
deleteNode: () => void;
|
||||
}>();
|
||||
|
||||
const src = computed({
|
||||
get: () => {
|
||||
return props.node?.attrs.src;
|
||||
},
|
||||
set: (src: string) => {
|
||||
props.updateAttributes({ src: src });
|
||||
},
|
||||
});
|
||||
|
||||
function handleSetFocus() {
|
||||
props.editor.commands.setNodeSelection(props.getPos());
|
||||
}
|
||||
|
||||
const editorLinkObtain = ref();
|
||||
|
||||
onMounted(() => {
|
||||
if (!src.value) {
|
||||
}else {
|
||||
handleCheckAllChange();
|
||||
}
|
||||
});
|
||||
|
||||
const handleCheckAllChange = async () => {
|
||||
const { data: data } = await doubanApiClient.doubanMovie.getDoubanDetail({
|
||||
url: src.value
|
||||
});
|
||||
selecteDoubanMovie.value = data
|
||||
};
|
||||
|
||||
const handleEnterSetExternalLink = () => {
|
||||
if (!editorLinkObtain.value) {
|
||||
return;
|
||||
}
|
||||
props.updateAttributes({
|
||||
src: editorLinkObtain.value,
|
||||
});
|
||||
};
|
||||
|
||||
const handleResetInit = () => {
|
||||
props.updateAttributes({src: ""});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<node-view-wrapper as="div" class="inline-block-box inline-block">
|
||||
<div
|
||||
class="inline-block overflow-hidden transition-all text-center relative h-full w-full rounded-md"
|
||||
:class="{
|
||||
'rounded ring-2': selected,
|
||||
}"
|
||||
>
|
||||
<div v-if="!src || selecteDoubanMovie?.spec==undefined" class="relative">
|
||||
<div class="flex h-64 w-full items-center justify-center" style="height: 180px;">
|
||||
<div
|
||||
class="flex h-full w-full cursor-pointer flex-col items-center justify-center border-2 border-dashed border-gray-300 bg-gray-50"
|
||||
>
|
||||
<div
|
||||
class="flex flex-col items-center justify-center space-y-7 pb-6 pt-5 editor-link-obtain"
|
||||
>
|
||||
<VSpace>
|
||||
<VDropdown>
|
||||
<div class="flex h-14 w-14 items-center justify-center rounded-full bg-primary/20" style="margin: 0.8em 1.5em;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" style="font-size: 1.6rem;">
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 20h16M5 4h14M8 8h8a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2m8 6l-2 6m-6-3l1 3">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
<VButton>输入链接</VButton>
|
||||
<template #popper>
|
||||
<input
|
||||
v-model="editorLinkObtain"
|
||||
class="block w-full rounded-md border border-gray-300 bg-gray-50 px-2 py-1.5 text-sm text-gray-900 hover:bg-gray-100"
|
||||
placeholder="输入链接,按回车确定"
|
||||
@keydown.enter="handleEnterSetExternalLink"
|
||||
@change="handleCheckAllChange"
|
||||
/>
|
||||
</template>
|
||||
</VDropdown>
|
||||
</VSpace>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="group relative">
|
||||
<div class="doulist-item">
|
||||
<div class="doulist-subject">
|
||||
<div class="doulist-post"><img decoding="async" referrerpolicy="no-referrer"
|
||||
:src="selecteDoubanMovie?.spec.poster" class="fade-before fade-after"></div>
|
||||
<div class="db--viewTime JiEun">Marked {{formatDatetime(selecteDoubanMovie?.faves.createTime)}}</div>
|
||||
<div class="doulist-content">
|
||||
<div class="doulist-title"><a :href="selecteDoubanMovie?.spec.link" class="cute" target="_blank"
|
||||
rel="external nofollow">{{selecteDoubanMovie?.spec.name}}</a></div>
|
||||
<div class="rating"><span class="allstardark"><span class="allstarlight" :style="'width:'+selecteDoubanMovie?.spec.score * 10+'%'"></span></span><span
|
||||
class="rating_nums"> {{selecteDoubanMovie?.spec.score}} </span></div>
|
||||
<div class="abstract">
|
||||
{{selecteDoubanMovie?.faves.remark !=null && selecteDoubanMovie?.faves.remark !='' ? selecteDoubanMovie?.faves.remark : selecteDoubanMovie?.spec.cardSubtitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="src"
|
||||
class="absolute left-0 top-0 hidden h-1/4 w-full cursor-pointer justify-end bg-gradient-to-b from-gray-300 to-transparent p-2 ease-in-out group-hover:flex"
|
||||
>
|
||||
<VButton size="sm" type="secondary" @click="handleResetInit">
|
||||
替换
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</node-view-wrapper>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
||||
:root {
|
||||
--db--text-color-light: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.inline-block-box {
|
||||
width: calc(100% - 1px);
|
||||
}
|
||||
|
||||
.doulist-item {
|
||||
margin: 5px 0;
|
||||
color: var(--db--text-color-light);
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px
|
||||
}
|
||||
|
||||
.doulist-item:hover {
|
||||
box-shadow: 0 3px 12px rgba(0,0,0,.05)
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
line-height: 1.6;
|
||||
padding: 12px;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .db--viewTime {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
background: #f5c518;
|
||||
color: #000;
|
||||
border-radius: 4px 4px 0 4px;
|
||||
line-height: 1;
|
||||
padding: 3px 5px 3px 10px;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
margin-bottom: 2px;
|
||||
font-weight: 900
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .db--viewTime:after {
|
||||
content: "";
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin-left: -.2rem;
|
||||
border-radius: 0 4px 4px 4px;
|
||||
background: inherit;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
width: .75rem;
|
||||
transform: skewX(20deg)
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .doulist-content {
|
||||
flex: 1 1 auto
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .doulist-post {
|
||||
width: 96px;
|
||||
margin-right: 15px;
|
||||
display: flex;
|
||||
flex: 0 0 auto
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .doulist-title {
|
||||
margin-bottom: 5px;
|
||||
font-size: 18px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .doulist-title a {
|
||||
text-decoration: none!important
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .rating {
|
||||
margin: 0 0 5px;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .rating .allstardark {
|
||||
position: relative;
|
||||
color: #f99b01;
|
||||
height: 16px;
|
||||
width: 80px;
|
||||
background-repeat: repeat;
|
||||
background-image: url(/plugins/plugin-douban/assets/static/img/star.svg);
|
||||
background-size: auto 100%;
|
||||
margin-right: 5px
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .rating .allstarlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: #f99b01;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
background-repeat: repeat;
|
||||
background-image: url(/plugins/plugin-douban/assets/static/img/star-fill.svg);
|
||||
background-size: auto 100%
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject .abstract {
|
||||
font-size: 14px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.6;
|
||||
max-height: 3.2em;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.doulist-item .doulist-subject img {
|
||||
width: 96px!important;
|
||||
height: 96px!important;
|
||||
border-radius: 4px;
|
||||
object-fit: cover
|
||||
}
|
||||
.editor-link-obtain .v-popper--theme-dropdown {
|
||||
margin-top: -10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,186 @@
|
||||
import {
|
||||
type Editor,
|
||||
isActive,
|
||||
mergeAttributes,
|
||||
Node,
|
||||
nodeInputRule,
|
||||
type Range,
|
||||
VueNodeViewRenderer,
|
||||
type EditorState,
|
||||
} from "@halo-dev/richtext-editor";
|
||||
import DoubanView from "./DoubanView.vue";
|
||||
import { markRaw } from "vue";
|
||||
import { ToolboxItem } from "@halo-dev/richtext-editor";
|
||||
import MdiShare from "~icons/mdi/share";
|
||||
import BlockActionSeparator from "./BlockActionSeparator.vue";
|
||||
import MdiDeleteForeverOutline from "~icons/mdi/delete-forever-outline?color=red";
|
||||
import TablerBrandDouban from '~icons/tabler/brand-douban';
|
||||
import { deleteNode } from "../utils/delete-node";
|
||||
declare module "@halo-dev/richtext-editor" {
|
||||
interface Commands<ReturnType> {
|
||||
douban: {
|
||||
setDouban: (options: { src: string }) => ReturnType;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const Douban = Node.create({
|
||||
name: "douban",
|
||||
|
||||
inline() {
|
||||
return true;
|
||||
},
|
||||
|
||||
group() {
|
||||
return "inline";
|
||||
},
|
||||
|
||||
addAttributes() {
|
||||
return {
|
||||
...this.parent?.(),
|
||||
src: {
|
||||
default: null,
|
||||
parseHTML: (element) => {
|
||||
return element.getAttribute("src");
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
parseHTML() {
|
||||
return [
|
||||
{
|
||||
tag: "douban",
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ["douban", mergeAttributes(HTMLAttributes)];
|
||||
},
|
||||
|
||||
addCommands() {
|
||||
return {
|
||||
setDouban:
|
||||
(options) =>
|
||||
({ commands }) => {
|
||||
return commands.insertContent({
|
||||
type: this.name,
|
||||
attrs: options,
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
addInputRules() {
|
||||
return [
|
||||
nodeInputRule({
|
||||
find: /^\$douban\$$/,
|
||||
type: this.type,
|
||||
getAttributes: () => {
|
||||
return { width: "100%" };
|
||||
},
|
||||
}),
|
||||
];
|
||||
},
|
||||
|
||||
addNodeView() {
|
||||
return VueNodeViewRenderer(DoubanView);
|
||||
},
|
||||
|
||||
addOptions() {
|
||||
return {
|
||||
getCommandMenuItems() {
|
||||
return {
|
||||
priority: 2e2,
|
||||
icon: markRaw(TablerBrandDouban),
|
||||
title: "豆瓣展示",
|
||||
keywords: ["douban", "豆瓣展示"],
|
||||
command: ({ editor, range }: { editor: Editor; range: Range }) => {
|
||||
editor
|
||||
.chain()
|
||||
.focus()
|
||||
.deleteRange(range)
|
||||
.insertContent([
|
||||
{ type: "douban", attrs: { src: "" } },
|
||||
{ type: "paragraph", content: "" },
|
||||
])
|
||||
.run();
|
||||
},
|
||||
};
|
||||
},
|
||||
getToolboxItems({ editor }: { editor: Editor }) {
|
||||
return {
|
||||
priority: 59,
|
||||
component: markRaw(ToolboxItem),
|
||||
props: {
|
||||
editor,
|
||||
icon: markRaw(TablerBrandDouban),
|
||||
title: "豆瓣展示",
|
||||
action: () => {
|
||||
editor
|
||||
.chain()
|
||||
.focus()
|
||||
.insertContent([{ type: "douban", attrs: { src: "" } }])
|
||||
.run();
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
getBubbleMenu({ editor }: { editor: Editor }) {
|
||||
return {
|
||||
pluginKey: "doubanBubbleMenu",
|
||||
shouldShow: ({ state }: { state: EditorState }) => {
|
||||
return isActive(state, Douban.name);
|
||||
},
|
||||
items: [
|
||||
{
|
||||
priority: 50,
|
||||
props: {
|
||||
icon: markRaw(MdiShare),
|
||||
title: "打开链接",
|
||||
action: () => {
|
||||
window.open(editor.getAttributes(Douban.name).src, "_blank");
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
priority: 60,
|
||||
component: markRaw(BlockActionSeparator),
|
||||
},
|
||||
{
|
||||
priority: 70,
|
||||
props: {
|
||||
icon: markRaw(MdiDeleteForeverOutline),
|
||||
title: "删除",
|
||||
action: ({ editor }: { editor: Editor }) => {
|
||||
deleteNode(Douban.name, editor);
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
getDraggable() {
|
||||
return {
|
||||
getRenderContainer({ dom }: { dom: HTMLElement }) {
|
||||
let container = dom;
|
||||
while (
|
||||
container &&
|
||||
!container.hasAttribute("data-node-view-wrapper")
|
||||
) {
|
||||
container = container.parentElement as HTMLElement;
|
||||
}
|
||||
return {
|
||||
el: container,
|
||||
};
|
||||
},
|
||||
allowPropagationDownward: true,
|
||||
};
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
export default Douban;
|
||||
@@ -0,0 +1 @@
|
||||
export { default as DoubanExtension } from "./douban-edited";
|
||||
@@ -0,0 +1,53 @@
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import Douban from "./views/Douban.vue";
|
||||
import Cron from "./views/Cron.vue";
|
||||
import TablerBrandDouban from '~icons/tabler/brand-douban';
|
||||
import { markRaw } from "vue";
|
||||
import { DoubanExtension } from "./editor";
|
||||
|
||||
export default definePlugin({
|
||||
name: "plugin-douban",
|
||||
components: {},
|
||||
routes: [
|
||||
{
|
||||
parentName: "Root",
|
||||
route: {
|
||||
path: "/douban",
|
||||
name: "DoubanRoot",
|
||||
meta: {
|
||||
title: "豆瓣",
|
||||
searchable: true,
|
||||
permissions: ["plugin:douban:view"],
|
||||
menu: {
|
||||
name: "豆瓣",
|
||||
group: "content",
|
||||
icon: markRaw(TablerBrandDouban),
|
||||
priority: 20,
|
||||
},
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "Douban",
|
||||
component: Douban,
|
||||
},
|
||||
{
|
||||
path: "cron",
|
||||
name: "DoubanCron",
|
||||
component: Cron,
|
||||
meta: {
|
||||
title: "豆瓣任务",
|
||||
searchable: true,
|
||||
permissions: ["plugin:douban:view"],
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
},
|
||||
],
|
||||
extensionPoints: {
|
||||
"default:editor:extension:create": () => {
|
||||
return [DoubanExtension];
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,56 @@
|
||||
import dayjs from "dayjs";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import timezone from "dayjs/plugin/timezone";
|
||||
import TimeAgo from "javascript-time-ago";
|
||||
import utc from "dayjs/plugin/utc";
|
||||
import zh from "javascript-time-ago/locale/zh";
|
||||
|
||||
dayjs.extend(timezone);
|
||||
dayjs.extend(utc);
|
||||
dayjs.locale("zh-cn");
|
||||
|
||||
TimeAgo.addDefaultLocale(zh);
|
||||
|
||||
export function formatDatetime(date: string | Date | undefined | null): string {
|
||||
if (!date) {
|
||||
return "";
|
||||
}
|
||||
return dayjs(date).format("YYYY-MM-DD HH:mm");
|
||||
}
|
||||
|
||||
export function timeAgo(
|
||||
date: string | Date | number | undefined | null
|
||||
): string {
|
||||
if (!date) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const currentDate = new Date();
|
||||
const inputDate = new Date(date);
|
||||
|
||||
// 365天 * 24小时 * 60分钟 * 60秒 * 1000毫秒
|
||||
const oneYearInMilliseconds = 365 * 24 * 60 * 60 * 1000;
|
||||
|
||||
if (currentDate.getTime() - inputDate.getTime() > oneYearInMilliseconds) {
|
||||
return dayjs(date).format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
const timeAgo = new TimeAgo("zh");
|
||||
|
||||
return timeAgo.format(new Date(date));
|
||||
}
|
||||
|
||||
export function toDatetimeLocal(date: string | Date | undefined | null): string {
|
||||
if (!date) {
|
||||
return "";
|
||||
}
|
||||
return dayjs(date).format("YYYY-MM-DDTHH:mm");
|
||||
}
|
||||
|
||||
export function toISOString(date: string | Date | undefined | null): string {
|
||||
if (!date) {
|
||||
return "";
|
||||
}
|
||||
return dayjs(date).utc(false).toISOString();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import type { Editor } from "@halo-dev/richtext-editor";
|
||||
|
||||
export const deleteNode = (nodeType: string, editor: Editor) => {
|
||||
const { state } = editor;
|
||||
const $pos = state.selection.$anchor;
|
||||
let done = false;
|
||||
|
||||
if ($pos.depth) {
|
||||
for (let d = $pos.depth; d > 0; d--) {
|
||||
const node = $pos.node(d);
|
||||
if (node.type.name === nodeType) {
|
||||
// @ts-ignore
|
||||
if (editor.dispatchTransaction)
|
||||
// @ts-ignore
|
||||
editor.dispatchTransaction(
|
||||
state.tr.delete($pos.before(d), $pos.after(d)).scrollIntoView()
|
||||
);
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// @ts-ignore
|
||||
const node = state.selection.node;
|
||||
if (node && node.type.name === nodeType) {
|
||||
editor.chain().deleteSelection().run();
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!done) {
|
||||
const pos = $pos.pos;
|
||||
|
||||
if (pos) {
|
||||
const node = state.tr.doc.nodeAt(pos);
|
||||
|
||||
if (node && node.type.name === nodeType) {
|
||||
// @ts-ignore
|
||||
if (editor.dispatchTransaction)
|
||||
// @ts-ignore
|
||||
editor.dispatchTransaction(state.tr.delete(pos, pos + node.nodeSize));
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return done;
|
||||
};
|
||||
@@ -0,0 +1,157 @@
|
||||
<script lang="ts" setup>
|
||||
import {Toast, VButton, VCard, VPageHeader} from "@halo-dev/components";
|
||||
import {ref} from "vue";
|
||||
import type { CronDouban } from "@/api/generated";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import {doubanCoreApiClient} from "@/api";
|
||||
import {useMutation, useQuery} from "@tanstack/vue-query";
|
||||
|
||||
const Se = "cron-douban-default"
|
||||
|
||||
const initialFormState: CronDouban = {
|
||||
metadata: {
|
||||
name: Se,
|
||||
creationTimestamp: ""
|
||||
},
|
||||
spec: {
|
||||
cron: "@daily",
|
||||
timezone:"Asia/Shanghai",
|
||||
suspend: false,
|
||||
},
|
||||
kind: "CronDouban",
|
||||
apiVersion: "douban.moony.la/v1alpha1",
|
||||
};
|
||||
|
||||
const formState = ref<CronDouban>(cloneDeep(initialFormState));
|
||||
|
||||
const {isLoading: cronIsLoading, isFetching: cronIsFetching} = useQuery({
|
||||
queryKey: ["cron-douban"],
|
||||
queryFn: async () => {
|
||||
const {data} = await doubanCoreApiClient.cronDouban.getCronDouban({
|
||||
name: Se
|
||||
},{
|
||||
mute: true
|
||||
});
|
||||
return data;
|
||||
},
|
||||
onSuccess(data) {
|
||||
formState.value = data
|
||||
},
|
||||
retry: false
|
||||
})
|
||||
|
||||
const { mutate:save, isLoading:saveIsLoading } = useMutation({
|
||||
mutationKey: ["cron-douban-save"],
|
||||
mutationFn: async () => {
|
||||
if (formState.value.metadata.creationTimestamp) {
|
||||
const { data: data } = await doubanCoreApiClient.cronDouban.getCronDouban({
|
||||
name: Se
|
||||
});
|
||||
formState.value = {
|
||||
...formState.value,
|
||||
status: data.status,
|
||||
metadata: data.metadata
|
||||
};
|
||||
return await doubanCoreApiClient.cronDouban.updateCronDouban({
|
||||
name: Se,
|
||||
cronDouban: formState.value
|
||||
});
|
||||
}else {
|
||||
return await doubanCoreApiClient.cronDouban.createCronDouban({
|
||||
cronDouban: formState.value
|
||||
});
|
||||
}
|
||||
},
|
||||
onSuccess(data) {
|
||||
formState.value = data.data
|
||||
Toast.success("保存成功");
|
||||
}
|
||||
});
|
||||
|
||||
const cronOptions = [{
|
||||
label: "每月(每月 1 号 0 点)",
|
||||
value: "@monthly"
|
||||
}, {
|
||||
label: "每周(每周第一天 的 0 点)",
|
||||
value: "@weekly"
|
||||
}, {
|
||||
label: "每天(每天的 0 点)",
|
||||
value: "@daily"
|
||||
}, {
|
||||
label: "每小时",
|
||||
value: "@hourly"
|
||||
}]
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VPageHeader title="豆瓣任务">
|
||||
<template #actions>
|
||||
<VSpace>
|
||||
<VButton :route="{ name: 'Douban' }" size="sm">
|
||||
返回
|
||||
</VButton>
|
||||
</VSpace>
|
||||
</template>
|
||||
</VPageHeader>
|
||||
<div class="m-0 md:m-4">
|
||||
<VCard :body-class="['!p-0']">
|
||||
<Transition mode="out-in" name="fade">
|
||||
<div class="bg-white p-4">
|
||||
<div>
|
||||
<FormKit
|
||||
id="cron-setting"
|
||||
v-model="formState.spec"
|
||||
name="cron-setting"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
:disabled="cronIsFetching"
|
||||
@submit="save"
|
||||
>
|
||||
<FormKit
|
||||
type="checkbox"
|
||||
name="suspend"
|
||||
label="是否启用"
|
||||
value="false"
|
||||
/>
|
||||
<FormKit
|
||||
type="select"
|
||||
name="cron"
|
||||
label="定时表达式"
|
||||
allow-create
|
||||
searchable
|
||||
validatio="required"
|
||||
:options="cronOptions"
|
||||
help="定时表达式规则请参考:https://docs.spring.io/spring-framework/reference/integration/scheduling.html#scheduling-cron-expression"
|
||||
/>
|
||||
<FormKit
|
||||
type="select"
|
||||
name="timezone"
|
||||
label="时区"
|
||||
:options="[
|
||||
{
|
||||
value: 'Asia/Shanghai',
|
||||
label: 'Asia/Shanghai (GMT+08:00)'
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</FormKit>
|
||||
</div>
|
||||
<div v-permission="['plugin:douban:manage']" class="pt-5">
|
||||
<div class="flex justify-start">
|
||||
<VButton
|
||||
:loading="saveIsLoading"
|
||||
:cronIsLoading="cronIsLoading"
|
||||
type="secondary"
|
||||
@click="$formkit.submit('cron-setting')"
|
||||
>
|
||||
保存
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</VCard>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@@ -0,0 +1,501 @@
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
VCard,
|
||||
IconRefreshLine,
|
||||
Dialog,
|
||||
VButton,
|
||||
VEmpty,
|
||||
VLoading,
|
||||
VPagination,
|
||||
VPageHeader,
|
||||
VDropdownItem,
|
||||
Toast,
|
||||
VSpace,
|
||||
IconAddCircle,
|
||||
IconCloseCircle} from "@halo-dev/components";
|
||||
import {useQuery, useQueryClient} from "@tanstack/vue-query";
|
||||
import {computed, ref, watch} from "vue";
|
||||
import { axiosInstance } from "@halo-dev/api-client";
|
||||
import {formatDatetime} from "@/utils/date";
|
||||
|
||||
import {useRouteQuery} from "@vueuse/router";
|
||||
import DoubanMovieEditingModal from "../components/DoubanMovieEditingModal.vue";
|
||||
import { doubanApiClient, doubanCoreApiClient } from "@/api";
|
||||
import type { DoubanMovie } from "@/api/generated";
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const selecteDoubanMovie = ref<DoubanMovie | undefined>();
|
||||
const selecteDoubanMovies = ref<string[]>([]);
|
||||
const checkedAll = ref(false);
|
||||
const selectedSort = useRouteQuery<string | undefined>("sort");
|
||||
const selectedStatus = useRouteQuery<string | undefined>("status");
|
||||
const selectedDataType = useRouteQuery<string | undefined>("dataType");
|
||||
const selectedType = useRouteQuery<string | undefined>("type");
|
||||
|
||||
|
||||
const page = ref(1);
|
||||
const size = ref(20);
|
||||
const keyword = ref("");
|
||||
const searchText = ref("");
|
||||
const total = ref(0);
|
||||
const editingModal = ref(false);
|
||||
|
||||
|
||||
watch(
|
||||
() => [
|
||||
selectedSort.value,
|
||||
selectedStatus.value,
|
||||
selectedDataType.value,
|
||||
selectedType.value,
|
||||
keyword.value,
|
||||
],
|
||||
() => {
|
||||
page.value = 1;
|
||||
}
|
||||
);
|
||||
|
||||
function handleClearFilters() {
|
||||
selectedSort.value = undefined;
|
||||
selectedStatus.value = undefined;
|
||||
selectedType.value = undefined;
|
||||
selectedDataType.value = undefined;
|
||||
}
|
||||
|
||||
const hasFilters = computed(() => {
|
||||
return (
|
||||
selectedSort.value ||
|
||||
selectedStatus.value ||
|
||||
selectedType.value ||
|
||||
selectedDataType.value
|
||||
);
|
||||
});
|
||||
|
||||
const {
|
||||
data: doubanMovies,
|
||||
isLoading,
|
||||
isFetching,
|
||||
refetch,
|
||||
} = useQuery({
|
||||
queryKey: ["doubanMovies", page, size,selectedSort,selectedDataType,selectedStatus,selectedType,keyword],
|
||||
queryFn: async () => {
|
||||
|
||||
const { data } = await doubanApiClient.doubanMovie.listDoubanMovie(
|
||||
{
|
||||
page: page.value,
|
||||
size: size.value,
|
||||
sort: [selectedSort.value].filter(Boolean) as string[],
|
||||
dataType: selectedDataType.value,
|
||||
status: selectedStatus.value,
|
||||
type : selectedType.value,
|
||||
keyword: keyword?.value
|
||||
}
|
||||
);
|
||||
total.value = data.total;
|
||||
return data.items;
|
||||
},
|
||||
refetchInterval: (data) => {
|
||||
const deletingFriend = data?.filter( (douban) => {
|
||||
return douban.metadata.deletionTimestamp;
|
||||
});
|
||||
return deletingFriend?.length ? 500 : false;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
const handleCheckAllChange = (e: Event) => {
|
||||
const { checked } = e.target as HTMLInputElement;
|
||||
checkedAll.value = checked;
|
||||
if (checkedAll.value) {
|
||||
selecteDoubanMovies.value =
|
||||
doubanMovies.value?.map((doubanMovie) => {
|
||||
return doubanMovie.metadata.name;
|
||||
}) || [];
|
||||
} else {
|
||||
selecteDoubanMovies.value.length = 0;
|
||||
}
|
||||
};
|
||||
|
||||
const handleDeleteInBatch = () => {
|
||||
Dialog.warning({
|
||||
title: "是否确认删除所选的条目?",
|
||||
description: "删除之后将无法恢复。",
|
||||
confirmType: "danger",
|
||||
onConfirm: async () => {
|
||||
try {
|
||||
const promises = selecteDoubanMovies.value.map((doubanMovie) => {
|
||||
return doubanCoreApiClient.doubanMovie.deleteDoubanMovie(
|
||||
{
|
||||
name: doubanMovie
|
||||
}
|
||||
);
|
||||
});
|
||||
if (promises) {
|
||||
await Promise.all(promises);
|
||||
}
|
||||
selecteDoubanMovies.value.length = 0;
|
||||
checkedAll.value = false;
|
||||
|
||||
Toast.success("删除成功");
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await refetch();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
function handleReset() {
|
||||
keyword.value = "";
|
||||
searchText.value = "";
|
||||
}
|
||||
function onKeywordChange() {
|
||||
keyword.value = searchText.value;
|
||||
}
|
||||
|
||||
const synchronization = () => {
|
||||
Dialog.warning({
|
||||
title: "同步豆瓣数据",
|
||||
description: "确定要同步豆瓣数据吗,此操作可能会持续较长时间。 ",
|
||||
confirmType: "danger",
|
||||
confirmText: "确定",
|
||||
cancelText: "取消",
|
||||
onConfirm: async () => {
|
||||
try {
|
||||
await axiosInstance.post("/apis/api.plugin.halo.run/v1alpha1/plugins/plugin-douban/douban/synchronizationDouban")
|
||||
.then((res: any) => {
|
||||
Toast.success("已请求同步豆瓣数据");
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("", e);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const getStatusText = (status: String) => {
|
||||
if (status == 'done'){
|
||||
return '已看';
|
||||
}else if (status == 'mark'){
|
||||
return '想看';
|
||||
}else if (status == 'doing'){
|
||||
return '在看';
|
||||
}
|
||||
};
|
||||
|
||||
function handleClear() {
|
||||
Dialog.warning({
|
||||
title: "清空记录",
|
||||
description: "确定要清空所有推送记录吗?此操作不可恢复。",
|
||||
async onConfirm() {
|
||||
try {
|
||||
await axiosInstance.delete("/apis/api.plugin.halo.run/v1alpha1/plugins/plugin-douban/douban/clear")
|
||||
.then((res: any) => {
|
||||
Toast.success("清空成功");
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("", e);
|
||||
}
|
||||
refetch();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const handleOpenCreateModal = (doubanMovie: DoubanMovie) => {
|
||||
selecteDoubanMovie.value = doubanMovie;
|
||||
editingModal.value = true;
|
||||
};
|
||||
|
||||
const onEditingModalClose = async () => {
|
||||
selecteDoubanMovie.value = undefined;
|
||||
refetch();
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DoubanMovieEditingModal
|
||||
v-model:visible="editingModal"
|
||||
:douban-movie="selecteDoubanMovie"
|
||||
@close="onEditingModalClose"
|
||||
>
|
||||
</DoubanMovieEditingModal>
|
||||
<VPageHeader title="豆瓣">
|
||||
<template #actions>
|
||||
<VSpace v-permission="['plugin:douban:manage']">
|
||||
<VButton :route="{ name: 'DoubanCron' }" size="sm">
|
||||
任务
|
||||
</VButton>
|
||||
<VButton
|
||||
type="secondary"
|
||||
@click="editingModal = true"
|
||||
>
|
||||
<template #icon>
|
||||
<IconAddCircle class="h-full w-full" />
|
||||
</template>
|
||||
新建
|
||||
</VButton>
|
||||
<VButton type="secondary" @click="synchronization">
|
||||
同步数据
|
||||
</VButton>
|
||||
<VButton type="danger" @click="handleClear()"> 清空 </VButton>
|
||||
</VSpace>
|
||||
</template>
|
||||
|
||||
</VPageHeader>
|
||||
<div class="m-0 md:m-4">
|
||||
<VCard :body-class="['!p-0']">
|
||||
<template #header>
|
||||
<div class="block w-full bg-gray-50 px-4 py-3">
|
||||
<div class="relative flex flex-col flex-wrap items-start gap-4 sm:flex-row sm:items-center" >
|
||||
<div
|
||||
v-permission="['plugin:douban:manage']"
|
||||
class="hidden items-center sm:flex" >
|
||||
<input
|
||||
v-model="checkedAll"
|
||||
type="checkbox"
|
||||
@change="handleCheckAllChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex w-full flex-1 items-center sm:w-auto" >
|
||||
<FormKit
|
||||
v-if="!selecteDoubanMovies.length"
|
||||
v-model="searchText"
|
||||
placeholder="输入关键词搜索"
|
||||
type="text"
|
||||
outer-class="!moments-p-0 moments-mr-2"
|
||||
@keyup.enter="onKeywordChange"
|
||||
>
|
||||
<template v-if="keyword" #suffix>
|
||||
<div
|
||||
class="group flex h-full cursor-pointer items-center bg-white px-2 transition-all hover:bg-gray-50"
|
||||
@click="handleReset"
|
||||
>
|
||||
<IconCloseCircle
|
||||
class="h-4 w-4 text-gray-500 group-hover:text-gray-700"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</FormKit>
|
||||
<VSpace v-else v-permission="['plugin:douban:manage']">
|
||||
<VButton type="danger" @click="handleDeleteInBatch">
|
||||
删除
|
||||
</VButton>
|
||||
</VSpace>
|
||||
</div>
|
||||
<VSpace spacing="lg" class="flex-wrap">
|
||||
<FilterCleanButton
|
||||
v-if="hasFilters"
|
||||
@click="handleClearFilters"
|
||||
/>
|
||||
<FilterDropdown
|
||||
v-model="selectedDataType"
|
||||
label="数据类型"
|
||||
:items="[
|
||||
{
|
||||
label: '全部',
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
label: '豆瓣',
|
||||
value: 'db',
|
||||
},
|
||||
{
|
||||
label: 'TMDB',
|
||||
value: 'tmdb',
|
||||
},
|
||||
{
|
||||
label: '手动添加',
|
||||
value: 'halo',
|
||||
},
|
||||
]"
|
||||
/>
|
||||
<FilterDropdown
|
||||
v-model="selectedStatus"
|
||||
label="状态"
|
||||
:items="[
|
||||
{
|
||||
label: '全部',
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
label: '已看',
|
||||
value: 'done',
|
||||
},
|
||||
{
|
||||
label: '想看',
|
||||
value: 'mark',
|
||||
},
|
||||
{
|
||||
label: '在看',
|
||||
value: 'doing',
|
||||
},
|
||||
]"
|
||||
/>
|
||||
<FilterDropdown
|
||||
v-model="selectedType"
|
||||
label="类型"
|
||||
:items="[
|
||||
{
|
||||
label: '全部',
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
label: '电影',
|
||||
value: 'movie',
|
||||
},
|
||||
{
|
||||
label: '图书',
|
||||
value: 'book',
|
||||
},
|
||||
{
|
||||
label: '音乐',
|
||||
value: 'music',
|
||||
},
|
||||
{
|
||||
label: '游戏',
|
||||
value: 'game',
|
||||
},
|
||||
{
|
||||
label: '舞台剧',
|
||||
value: 'drama',
|
||||
},
|
||||
]"
|
||||
/>
|
||||
<FilterDropdown
|
||||
v-model="selectedSort"
|
||||
label="排序"
|
||||
:items="[
|
||||
{
|
||||
label: '默认',
|
||||
},
|
||||
{
|
||||
label: '较近创建',
|
||||
value: 'faves.createTime,desc',
|
||||
},
|
||||
{
|
||||
label: '较早创建',
|
||||
value: 'faves.createTime,asc',
|
||||
},
|
||||
]"
|
||||
/>
|
||||
<div class="flex flex-row gap-2">
|
||||
<div
|
||||
class="group cursor-pointer rounded p-1 hover:bg-gray-200"
|
||||
@click="refetch()"
|
||||
>
|
||||
<IconRefreshLine
|
||||
v-tooltip="'刷新'"
|
||||
:class="{ 'animate-spin text-gray-900': isFetching }"
|
||||
class="h-4 w-4 text-gray-600 group-hover:text-gray-900"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</VSpace>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<VLoading v-if="isLoading" />
|
||||
|
||||
<Transition v-else-if="!doubanMovies?.length" appear name="fade">
|
||||
<VEmpty
|
||||
message="暂无订阅文章记录"
|
||||
title="暂无订阅文章记录"
|
||||
>
|
||||
<template #actions>
|
||||
<VSpace>
|
||||
<VButton @click="refetch()"> 刷新 </VButton>
|
||||
</VSpace>
|
||||
</template>
|
||||
</VEmpty>
|
||||
</Transition>
|
||||
|
||||
<Transition v-else appear name="fade">
|
||||
<div class="w-full relative overflow-x-auto">
|
||||
<table class="w-full text-sm text-left text-gray-500 widefat ">
|
||||
<thead class="text-xs text-gray-700 uppercase bg-gray-50">
|
||||
<tr>
|
||||
<th v-permission="['plugin:douban:manage']"
|
||||
scope="col" class="px-4 py-3"><div class="w-max flex items-center"> </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">标题 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">封面 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">来源 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">评分 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">描述 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">时间 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">状态 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">我的短评 </div></th>
|
||||
<th scope="col" class="px-4 py-3"><div class="w-max flex items-center">我的评分 </div></th>
|
||||
<th v-permission="['plugin:douban:manage']"
|
||||
scope="col" class="px-4 py-3"><div class="w-max flex items-center"> </div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="doubanMovie in doubanMovies" class="border-b last:border-none hover:bg-gray-100">
|
||||
<td class="px-4 py-4 " v-permission="['plugin:douban:manage']">
|
||||
<input
|
||||
v-model="selecteDoubanMovies"
|
||||
:value="doubanMovie.metadata.name"
|
||||
class="h-4 w-4 rounded border-gray-300 text-indigo-600"
|
||||
name="post-checkbox"
|
||||
type="checkbox"
|
||||
/>
|
||||
</td>
|
||||
<td class="px-4 py-4">{{doubanMovie.spec.name}}</td>
|
||||
<td class="px-4 py-4 poster">
|
||||
<img :src="doubanMovie.spec.poster" referrerpolicy="no-referrer">
|
||||
</td>
|
||||
<td class="px-4 py-4 table-td">{{doubanMovie.spec.dataType == 'db' ? '豆瓣' : doubanMovie.spec.dataType == 'tmdb' ? 'TMDB' : '手动添加'}}</td>
|
||||
<td class="px-4 py-4 table-td">{{doubanMovie.spec.score}}</td>
|
||||
<td class="px-4 py-4">{{doubanMovie.spec.cardSubtitle}}</td>
|
||||
<td class="px-4 py-4 table-td">{{formatDatetime(doubanMovie.faves.createTime)}}</td>
|
||||
<td class="px-4 py-4 table-td">{{getStatusText(doubanMovie.faves.status)}}</td>
|
||||
<td class="px-4 py-4">{{doubanMovie.faves.remark}}</td>
|
||||
<td class="px-4 py-4">{{doubanMovie.faves.score}}</td>
|
||||
<td class="px-4 py-4 table-td" v-permission="['plugin:douban:manage']">
|
||||
<VDropdownItem @click="handleOpenCreateModal(doubanMovie)">
|
||||
编辑
|
||||
</VDropdownItem>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</Transition>
|
||||
|
||||
<template #footer>
|
||||
<VPagination
|
||||
v-model:page="page"
|
||||
v-model:size="size"
|
||||
:total="total"
|
||||
:size-options="[20, 30, 50, 100]"
|
||||
/>
|
||||
</template>
|
||||
</VCard>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.widefat * {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.widefat td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.widefat .poster{
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.table-td {
|
||||
text-align: left !important;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user