@indexea/sdk
Version:
Indexea JavaScript SDK (indexea.com)
170 lines (160 loc) • 4.67 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Indexea OpenAPI
* 这是 Indexea 搜索服务平台的 OpenAPI,用于描述平台的所有接口信息,你可以通过这个页面来了解和在线验证平台的所有接口信息。 ### Errors 本 API 使用标准的 HTTP 状态码来指示操作成功或者失败,如果失败将会在 body 中以 JSON 格式提供详细的错误信息,如下所示: ``` { \"error\": 404, \"message\": \"page not found\" } ```
*
* The version of the OpenAPI document: 1.0.0
* Contact: indexea.com@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
/**
* 第三方应用详情
* @export
* @interface OauthAppBean
*/
export interface OauthAppBean {
/**
*
* @type {number}
* @memberof OauthAppBean
*/
id?: number;
/**
*
* @type {number}
* @memberof OauthAppBean
*/
account?: number;
/**
*
* @type {number}
* @memberof OauthAppBean
*/
app?: number;
/**
* 三方应用标识 client id
* @type {string}
* @memberof OauthAppBean
*/
ident?: string;
/**
*
* @type {string}
* @memberof OauthAppBean
*/
name?: string;
/**
*
* @type {string}
* @memberof OauthAppBean
*/
intro?: string;
/**
*
* @type {string}
* @memberof OauthAppBean
*/
logo?: string;
/**
* 应用地址
* @type {string}
* @memberof OauthAppBean
*/
url?: string;
/**
* 第三方应用密钥, 该值仅在创建和重置密钥时返回
* @type {string}
* @memberof OauthAppBean
*/
secret?: string;
/**
* 回调地址
* @type {string}
* @memberof OauthAppBean
*/
callback?: string;
/**
* 授权范围
* @type {string}
* @memberof OauthAppBean
*/
scopes?: string;
/**
*
* @type {Date}
* @memberof OauthAppBean
*/
createdAt?: Date;
/**
*
* @type {Date}
* @memberof OauthAppBean
*/
updatedAt?: Date;
/**
*
* @type {number}
* @memberof OauthAppBean
*/
status?: number;
}
/**
* Check if a given object implements the OauthAppBean interface.
*/
export function instanceOfOauthAppBean(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function OauthAppBeanFromJSON(json: any): OauthAppBean {
return OauthAppBeanFromJSONTyped(json, false);
}
export function OauthAppBeanFromJSONTyped(json: any, ignoreDiscriminator: boolean): OauthAppBean {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'account': !exists(json, 'account') ? undefined : json['account'],
'app': !exists(json, 'app') ? undefined : json['app'],
'ident': !exists(json, 'ident') ? undefined : json['ident'],
'name': !exists(json, 'name') ? undefined : json['name'],
'intro': !exists(json, 'intro') ? undefined : json['intro'],
'logo': !exists(json, 'logo') ? undefined : json['logo'],
'url': !exists(json, 'url') ? undefined : json['url'],
'secret': !exists(json, 'secret') ? undefined : json['secret'],
'callback': !exists(json, 'callback') ? undefined : json['callback'],
'scopes': !exists(json, 'scopes') ? undefined : json['scopes'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
'status': !exists(json, 'status') ? undefined : json['status'],
};
}
export function OauthAppBeanToJSON(value?: OauthAppBean | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'account': value.account,
'app': value.app,
'ident': value.ident,
'name': value.name,
'intro': value.intro,
'logo': value.logo,
'url': value.url,
'secret': value.secret,
'callback': value.callback,
'scopes': value.scopes,
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
'status': value.status,
};
}