import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType"; import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, JsonFilter, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand"; import { OneOf } from "oak-domain/lib/types/Polyfill"; import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity"; import { GenericAction } from "oak-domain/lib/actions/action"; import { String, Text } from "oak-domain/lib/types/DataType"; import { Style } from "oak-general-business/lib/types/Style"; import * as System from "../System/Schema"; import * as Domain from "../Domain/Schema"; import * as ExtraFile from "../ExtraFile/Schema"; import * as Notification from "../Notification/Schema"; import * as SessionMessage from "../SessionMessage/Schema"; import * as Token from "../Token/Schema"; import * as WechatMenu from "../WechatMenu/Schema"; import * as WechatPublicAutoReply from "../WechatPublicAutoReply/Schema"; import * as WechatPublicTag from "../WechatPublicTag/Schema"; import * as WechatQrCode from "../WechatQrCode/Schema"; import * as WechatTemplate from "../WechatTemplate/Schema"; import * as WechatUser from "../WechatUser/Schema"; import * as Pay from "../Pay/Schema"; import * as WpProduct from "../WpProduct/Schema"; import * as Session from "../Session/Schema"; export type Passport = "email" | "mobile" | "wechat" | "wechatPublic"; export type AppType = "web" | "wechatMp" | "wechatPublic" | "native"; export type WechatMpConfig = { type: "wechatMp"; appId: string; appSecret: string; originalId?: string; qrCodePrefix?: string; server?: { url?: string; token: string; encodingAESKey: string; mode: "clear" | "compatible" | "safe"; dataFormat: "json" | "xml"; }; passport?: Passport[]; }; export type WebConfig = { type: "web"; wechat?: { appId: string; appSecret: string; domain?: string; enable?: boolean; }; passport?: Passport[]; }; export type WechatPublicTemplateMsgsConfig = Record; export type WechatPublicConfig = { type: "wechatPublic"; isService: boolean; appId: string; appSecret: string; originalId?: string; enable?: boolean; templateMsgs?: WechatPublicTemplateMsgsConfig; server?: { url?: string; token: string; encodingAESKey: string; mode: "clear" | "compatible" | "safe"; }; wechatMp?: { appId: string; originalId: string; }; passport?: Passport[]; }; export type NativeConfig = { type: "native"; passport?: Passport[]; }; export type OpSchema = EntityShape & { name: String<32>; description?: Text | null; type: AppType; systemId: ForeignKey<"system">; config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig; style?: Style | null; domainId?: ForeignKey<"domain"> | null; }; export type OpAttr = keyof OpSchema; export type Schema = EntityShape & { name: String<32>; description?: Text | null; type: AppType; systemId: ForeignKey<"system">; config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig; style?: Style | null; domainId?: ForeignKey<"domain"> | null; system: System.Schema; domain?: Domain.Schema | null; extraFile$application?: Array; extraFile$application$$aggr?: AggregationResult; notification$application?: Array; notification$application$$aggr?: AggregationResult; sessionMessage$application?: Array; sessionMessage$application$$aggr?: AggregationResult; token$application?: Array; token$application$$aggr?: AggregationResult; wechatMenu$application?: Array; wechatMenu$application$$aggr?: AggregationResult; wechatPublicAutoReply$application?: Array; wechatPublicAutoReply$application$$aggr?: AggregationResult; wechatPublicTag$application?: Array; wechatPublicTag$application$$aggr?: AggregationResult; wechatQrCode$application?: Array; wechatQrCode$application$$aggr?: AggregationResult; wechatTemplate$application?: Array; wechatTemplate$application$$aggr?: AggregationResult; wechatUser$application?: Array; wechatUser$application$$aggr?: AggregationResult; pay$application?: Array; pay$application$$aggr?: AggregationResult; wpProduct$application?: Array; wpProduct$application$$aggr?: AggregationResult; session$entity?: Array; session$entity$$aggr?: AggregationResult; } & { [A in ExpressionKey]?: any; }; type AttrFilter = { id: Q_StringValue; $$createAt$$: Q_DateValue; $$seq$$: Q_NumberValue; $$updateAt$$: Q_DateValue; name: Q_StringValue; description: Q_StringValue; type: Q_EnumValue; systemId: Q_StringValue; system: System.Filter; config: JsonFilter; style: JsonFilter