oak-pay-business/es/oak-app-domain/OauthUser/_baseSchema.d.ts

77 lines
2.5 KiB
TypeScript

import { ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, LoadState } from "./Action";
import { String, Datetime } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
userId?: ForeignKey<"user"> | null;
applicationId: ForeignKey<"application">;
providerConfigId: ForeignKey<"oauthProvider">;
providerUserId: String<256>;
rawUserInfo: Object;
accessToken: String<1024>;
refreshToken?: String<1024> | null;
accessExpiresAt: Datetime;
refreshExpiresAt?: Datetime | null;
stateId: ForeignKey<"oauthState">;
loadState?: LoadState | 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;
userId: Q_StringValue;
applicationId: Q_StringValue;
providerConfigId: Q_StringValue;
providerUserId: Q_StringValue;
rawUserInfo: Object;
accessToken: Q_StringValue;
refreshToken: Q_StringValue;
accessExpiresAt: Q_DateValue;
refreshExpiresAt: Q_DateValue;
stateId: Q_StringValue;
loadState: Q_EnumValue<LoadState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
userId?: number;
applicationId?: number;
providerConfigId?: number;
providerUserId?: number;
rawUserInfo?: number | Object;
accessToken?: number;
refreshToken?: number;
accessExpiresAt?: number;
refreshExpiresAt?: number;
stateId?: number;
loadState?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
userId: number;
applicationId: number;
providerConfigId: number;
providerUserId: number;
accessToken: number;
refreshToken: number;
accessExpiresAt: number;
refreshExpiresAt: number;
stateId: number;
loadState: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;