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

75 lines
2.4 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 { String, Datetime } from "oak-domain/lib/types/DataType";
import { StringListJson } from "../../types/datatype";
export type OpSchema = EntityShape & {
code: String<128>;
applicationId: ForeignKey<"application">;
oauthAppId: ForeignKey<"oauthApplication">;
userId: ForeignKey<"user">;
redirectUri: String<512>;
scope: StringListJson;
codeChallenge?: String<128> | null;
codeChallengeMethod?: String<10> | null;
expiresAt: Datetime;
usedAt?: 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;
code: Q_StringValue;
applicationId: Q_StringValue;
oauthAppId: Q_StringValue;
userId: Q_StringValue;
redirectUri: Q_StringValue;
scope: JsonFilter<StringListJson>;
codeChallenge: Q_StringValue;
codeChallengeMethod: Q_StringValue;
expiresAt: Q_DateValue;
usedAt: Q_DateValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
code?: number;
applicationId?: number;
oauthAppId?: number;
userId?: number;
redirectUri?: number;
scope?: number | JsonProjection<StringListJson>;
codeChallenge?: number;
codeChallengeMethod?: number;
expiresAt?: number;
usedAt?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
code: number;
applicationId: number;
oauthAppId: number;
userId: number;
redirectUri: number;
scope: number;
codeChallenge: number;
codeChallengeMethod: number;
expiresAt: number;
usedAt: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;
export type OpUpdateAction = "update" | string;