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 { String, Datetime } from "oak-domain/lib/types/DataType"; import { Schema as OauthApplication } from "../OauthApplications"; export type OpSchema = EntityShape & { accessToken: String<256>; refreshToken: String<256>; application: OauthApplication; userId: ForeignKey<"user">; codeId: ForeignKey<"oauthAuthorizationCodes">; accessExpiresAt: Datetime; refreshExpiresAt: Datetime; revokedAt?: Datetime | null; lastUsedAt?: Datetime | 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; accessToken: Q_StringValue; refreshToken: Q_StringValue; application: JsonFilter; userId: Q_StringValue; codeId: Q_StringValue; accessExpiresAt: Q_DateValue; refreshExpiresAt: Q_DateValue; revokedAt: Q_DateValue; lastUsedAt: Q_DateValue; } & ExprOp; export type OpProjection = { "#id"?: NodeId; [k: string]: any; id?: number; $$createAt$$?: number; $$updateAt$$?: number; $$seq$$?: number; accessToken?: number; refreshToken?: number; application?: number | JsonProjection; userId?: number; codeId?: number; accessExpiresAt?: number; refreshExpiresAt?: number; revokedAt?: number; lastUsedAt?: number; } & Partial>; export type OpSortAttr = Partial<{ id: number; $$createAt$$: number; $$seq$$: number; $$updateAt$$: number; accessToken: number; refreshToken: number; application: number; userId: number; codeId: number; accessExpiresAt: number; refreshExpiresAt: number; revokedAt: number; lastUsedAt: number; [k: string]: any; } | ExprOp>; export type OpAction = OakMakeAction; export type OpUpdateAction = "update" | string;