oak-general-business/lib/oak-app-domain/OauthProviderConfigs/_baseSchema.d.ts

92 lines
3.2 KiB
TypeScript

import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction } from "./Action";
import { AbleState } from "oak-domain/lib/actions/action";
import { String } from "oak-domain/lib/types/DataType";
import { StringListJson } from "../../types/datatype";
export type OpSchema = EntityShape & {
systemId: ForeignKey<"system">;
name: String<64>;
type: "oak" | "gitea" | "github" | "google" | "facebook" | "twitter" | "linkedin" | "custom" | "gitlab" | "microsoft" | "apple" | "tencent" | "weixin" | "weibo" | "dingtalk";
logo?: String<256> | null;
authorizationEndpoint: String<256>;
tokenEndpoint: String<256>;
userInfoEndpoint?: String<256> | null;
revokeEndpoint?: String<256> | null;
clientId: String<128>;
clientSecret: String<128>;
redirectUri: String<256>;
scopes?: StringListJson | null;
autoRegister: Boolean;
ableState?: AbleState | null;
} & {
[A in ExpressionKey]?: any;
};
export type OpAttr = keyof OpSchema;
export type OpFilter = {
id: Q_StringValue;
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
systemId: Q_StringValue;
name: Q_StringValue;
type: Q_EnumValue<"oak" | "gitea" | "github" | "google" | "facebook" | "twitter" | "linkedin" | "custom" | "gitlab" | "microsoft" | "apple" | "tencent" | "weixin" | "weibo" | "dingtalk">;
logo: Q_StringValue;
authorizationEndpoint: Q_StringValue;
tokenEndpoint: Q_StringValue;
userInfoEndpoint: Q_StringValue;
revokeEndpoint: Q_StringValue;
clientId: Q_StringValue;
clientSecret: Q_StringValue;
redirectUri: Q_StringValue;
scopes: JsonFilter<StringListJson>;
autoRegister: Q_BooleanValue;
ableState: Q_EnumValue<AbleState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
systemId?: number;
name?: number;
type?: number;
logo?: number;
authorizationEndpoint?: number;
tokenEndpoint?: number;
userInfoEndpoint?: number;
revokeEndpoint?: number;
clientId?: number;
clientSecret?: number;
redirectUri?: number;
scopes?: number | JsonProjection<StringListJson>;
autoRegister?: number;
ableState?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
systemId: number;
name: number;
type: number;
logo: number;
authorizationEndpoint: number;
tokenEndpoint: number;
userInfoEndpoint: number;
revokeEndpoint: number;
clientId: number;
clientSecret: number;
redirectUri: number;
scopes: number;
autoRegister: number;
ableState: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;