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

51 lines
1.7 KiB
TypeScript

import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import { Schema as OauthApplication } from "../OauthApplications";
import { Datetime } from "oak-domain/lib/types/DataType";
export type OpSchema = EntityShape & {
userId: ForeignKey<"user">;
application: OauthApplication;
authorizedAt: Datetime;
tokenId: ForeignKey<"oauthTokens">;
} & {
[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;
application: JsonFilter<OauthApplication>;
authorizedAt: Q_DateValue;
tokenId: Q_StringValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
userId?: number;
application?: number | JsonProjection<OauthApplication>;
authorizedAt?: number;
tokenId?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
userId: number;
application: number;
authorizedAt: number;
tokenId: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;
export type OpUpdateAction = "update" | string;