diff --git a/es/components/article/editor/index.js b/es/components/article/editor/index.js index 2e3a65074..58615062e 100644 --- a/es/components/article/editor/index.js +++ b/es/components/article/editor/index.js @@ -26,11 +26,11 @@ export default OakComponent({ properties: { articleMenuId: '', changeIsEdit: () => undefined, - tocPosition: 'none', //目录显示位置,none为不显示目录 - highlightBgColor: 'none', //点击目录时标题高亮背景色,none为不显示高亮背景色 - onArticlePreview: (content, title) => undefined, //预览文章 - origin: null, // 默认为空,由系统决定 - scrollId: '', // 滚动条所在容器id,不传默认页面编辑器容器id + tocPosition: 'none', + highlightBgColor: 'none', + onArticlePreview: (content, title) => undefined, + origin: null, + scrollId: '', height: 600, activeColor: undefined, }, diff --git a/es/components/article/treeList/index.d.ts b/es/components/article/treeList/index.d.ts index 6f4290f52..531bb39b4 100644 --- a/es/components/article/treeList/index.d.ts +++ b/es/components/article/treeList/index.d.ts @@ -1,7 +1,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; - show: "preview" | "doc" | "edit"; + show: "edit" | "doc" | "preview"; getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void; breadcrumbItems: string[]; drawerOpen: boolean; diff --git a/es/components/article/upsert/index.js b/es/components/article/upsert/index.js index 7f73c8da0..3d4cf795f 100644 --- a/es/components/article/upsert/index.js +++ b/es/components/article/upsert/index.js @@ -25,11 +25,11 @@ export default OakComponent({ properties: { articleMenuId: '', changeIsEdit: () => undefined, - tocPosition: 'none', //目录显示位置,none为不显示目录 - highlightBgColor: 'none', //点击目录时标题高亮背景色,none为不显示高亮背景色 - onArticlePreview: (content, title) => undefined, //预览文章 - origin: null, // 默认为七牛云 - scrollId: '', // 滚动条所在容器id,不传默认页面编辑器容器id + tocPosition: 'none', + highlightBgColor: 'none', + onArticlePreview: (content, title) => undefined, + origin: null, + scrollId: '', height: 600, activeColor: undefined, }, diff --git a/es/components/articleMenu/treeCell/index.d.ts b/es/components/articleMenu/treeCell/index.d.ts index cf2f68008..49d465e99 100644 --- a/es/components/articleMenu/treeCell/index.d.ts +++ b/es/components/articleMenu/treeCell/index.d.ts @@ -3,7 +3,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps< onRemove: () => void; onUpdateName: (name: string) => Promise; onChildEditArticleChange: (data: string) => void; - show: "preview" | "doc" | "edit"; + show: "edit" | "doc" | "preview"; getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void; breadItems: string[]; drawerOpen: boolean; diff --git a/es/components/articleMenu/treeList/index.d.ts b/es/components/articleMenu/treeList/index.d.ts index c2bb66915..68671e4b6 100644 --- a/es/components/articleMenu/treeList/index.d.ts +++ b/es/components/articleMenu/treeList/index.d.ts @@ -4,7 +4,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps< entityId: string; parentId: string | undefined; onGrandChildEditArticleChange: (data: string) => void; - show: "preview" | "doc" | "edit"; + show: "edit" | "doc" | "preview"; articleMenuId: string; articleId: string; getBreadcrumbItems: (breadcrumbItems: string[]) => void; diff --git a/es/components/articleMenu/treeManager/index.d.ts b/es/components/articleMenu/treeManager/index.d.ts index 5cfce96f5..6fe2ea063 100644 --- a/es/components/articleMenu/treeManager/index.d.ts +++ b/es/components/articleMenu/treeManager/index.d.ts @@ -2,7 +2,7 @@ import { EntityDict } from "../../../oak-app-domain/EntityDict"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; diff --git a/es/components/extraFile/commit/index.d.ts b/es/components/extraFile/commit/index.d.ts index a3f711a38..ceae5cef6 100644 --- a/es/components/extraFile/commit/index.d.ts +++ b/es/components/extraFile/commit/index.d.ts @@ -15,7 +15,7 @@ declare const _default: undefined, digit: 4, //验证码位数 }, diff --git a/es/components/user/login/password/index.js b/es/components/user/login/password/index.js index 5b025a2d9..a4e1a9e03 100644 --- a/es/components/user/login/password/index.js +++ b/es/components/user/login/password/index.js @@ -19,12 +19,12 @@ export default OakComponent({ }, properties: { disabled: '', - redirectUri: '', // 微信登录后的redirectUri,要指向wechatUser/login去处理 - url: '', // 登录系统之后要返回的页面 - callback: undefined, // 登录成功回调,排除微信登录方式 + redirectUri: '', + url: '', + callback: undefined, allowSms: false, allowEmail: false, - allowWechatMp: false, //小程序切换授权登录 + allowWechatMp: false, setLoginMode: (value) => undefined, pwdMode: 'all', //密码明文密文存储模式 }, diff --git a/es/components/user/login/sms/index.js b/es/components/user/login/sms/index.js index aa98691ba..ce3cbbaac 100644 --- a/es/components/user/login/sms/index.js +++ b/es/components/user/login/sms/index.js @@ -21,10 +21,10 @@ export default OakComponent({ }, properties: { disabled: '', - url: '', // 登录系统之后要返回的页面 - callback: undefined, // 登录成功回调,排除微信登录方式 - allowPassword: false, //小程序切换密码登录 - allowWechatMp: false, //小程序切换授权登录 + url: '', + callback: undefined, + allowPassword: false, + allowWechatMp: false, setLoginMode: (value) => undefined, digit: 4 //验证码位数, }, diff --git a/es/components/userEntityGrant/claim/ubPicker/index.d.ts b/es/components/userEntityGrant/claim/ubPicker/index.d.ts index baeab2b34..3ff190b84 100644 --- a/es/components/userEntityGrant/claim/ubPicker/index.d.ts +++ b/es/components/userEntityGrant/claim/ubPicker/index.d.ts @@ -4,8 +4,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps< entity: keyof EntityDict; entityFilter: any; relationIds: string[]; - rule: "all" | "single" | "free"; - ruleOnRow: "all" | "single" | "free"; + rule: "single" | "all" | "free"; + ruleOnRow: "single" | "all" | "free"; onPickRelations: (ids: string[]) => void; onPickRows: (ids: string[]) => void; pickedRowIds: string[] | undefined; diff --git a/es/components/userEntityGrant/upsert/index.d.ts b/es/components/userEntityGrant/upsert/index.d.ts index e2f62ec19..0268e541f 100644 --- a/es/components/userEntityGrant/upsert/index.d.ts +++ b/es/components/userEntityGrant/upsert/index.d.ts @@ -11,7 +11,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps< claimUrl: string; qrCodeType: QrCodeType; multiple: boolean; - rule: "all" | "single" | "free"; - ruleOnRow: "all" | "single" | "free"; + rule: "single" | "all" | "free"; + ruleOnRow: "single" | "all" | "free"; }>) => React.ReactElement; export default _default; diff --git a/es/entities/Test.d.ts b/es/entities/Test.d.ts new file mode 100644 index 000000000..706b1f2f6 --- /dev/null +++ b/es/entities/Test.d.ts @@ -0,0 +1,28 @@ +import { String, Text, Datetime, Boolean } from 'oak-domain/lib/types/DataType'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; +import { QrCodeType } from '../types/Config'; +import { EntityDesc } from 'oak-domain/lib/types/EntityDesc'; +export type WechatQrCodeProps = { + pathname: string; + props?: Record; + state?: Record; + isTabBar?: boolean; +}; +export interface Schema extends EntityShape { + entity: String<32>; + entityId: String<64>; + type: QrCodeType; + allowShare: Boolean; + tag?: String<32>; + tag2?: String<64>; + expiresAt?: Datetime; + expired?: Boolean; + ticket?: Text; + url?: String<256>; + permanent?: Boolean; + buffer?: Text; + props: WechatQrCodeProps; +} +export declare const entityDesc: EntityDesc; diff --git a/es/entities/Test.js b/es/entities/Test.js new file mode 100644 index 000000000..8d7a3657f --- /dev/null +++ b/es/entities/Test.js @@ -0,0 +1,77 @@ +export const entityDesc = { + locales: { + zh_CN: { + name: '微信识别码', + attr: { + entity: '关联对象', + entityId: '关联对象id', + type: '类型', + allowShare: '允许分享', + tag: 'tag', + tag2: 'tag2', + ticket: 'ticket', + url: 'url', + permanent: '是否永久码', + buffer: '小程序码数据(动态)', + expired: '是否过期', + expiresAt: '过期时间', + props: '属性', + }, + v: { + type: { + webForWechatPublic: '网站引流到公众号', + wechatMpDomainUrl: '小程序普通链接二维码', + wechatMpWxaCode: '小程序码', + wechatPublic: '公众号关注码', + wechatPublicForMp: '公众号回复小程序码', + }, + }, + }, + }, + indexes: [ + { + name: 'index_entity_entityId_tag', + attributes: [ + { + name: 'entity', + }, + { + name: 'entityId', + }, + { + name: 'tag', + }, + ], + }, + { + name: 'index_expired_expiresAt', + attributes: [ + { + name: 'expired', + }, + { + name: 'expiresAt', + }, + ], + }, + { + name: 'index_url', + attributes: [ + { + name: 'url', + }, + ], + }, + ], + style: { + color: { + type: { + webForWechatPublic: '#00FF7F', + wechatMpDomainUrl: '#008000', + wechatMpWxaCode: '#32CD32', + wechatPublic: '#90EE90', + wechatPublicForMp: '#9ACD32', + } + } + } +}; diff --git a/es/oak-app-domain/Test/Schema.d.ts b/es/oak-app-domain/Test/Schema.d.ts new file mode 100644 index 000000000..86015d4d0 --- /dev/null +++ b/es/oak-app-domain/Test/Schema.d.ts @@ -0,0 +1,19 @@ +export * from "./_baseSchema"; +import { Test } from "../EntityDict"; +export type Schema = Test["Schema"]; +export type Action = Test["Action"]; +export type Projection = Test["Projection"]; +export type Filter = Test["Filter"]; +export type SortNode = Test["SortNode"]; +export type Sorter = Test["Sorter"]; +export type Selection = Test["Selection"]; +export type Aggregation = Test["Aggregation"]; +export type CreateOperationData = Test["CreateOperationData"]; +export type CreateSingle = Test["CreateSingle"]; +export type CreateMulti = Test["CreateMulti"]; +export type Create = Test["Create"]; +export type UpdateOperationData = Test["UpdateOperationData"]; +export type Update = Test["Update"]; +export type RemoveOperationData = Test["RemoveOperationData"]; +export type Remove = Test["Remove"]; +export type Operation = Test["Operation"]; diff --git a/es/oak-app-domain/Test/Schema.js b/es/oak-app-domain/Test/Schema.js new file mode 100644 index 000000000..6a83e4bac --- /dev/null +++ b/es/oak-app-domain/Test/Schema.js @@ -0,0 +1 @@ +export * from "./_baseSchema"; diff --git a/es/oak-app-domain/Test/Storage.d.ts b/es/oak-app-domain/Test/Storage.d.ts new file mode 100644 index 000000000..a3f0fbbb0 --- /dev/null +++ b/es/oak-app-domain/Test/Storage.d.ts @@ -0,0 +1,3 @@ +import { StorageDesc } from "oak-domain/lib/types/Storage"; +import { OpSchema } from "./Schema"; +export declare const desc: StorageDesc; diff --git a/es/oak-app-domain/Test/Storage.js b/es/oak-app-domain/Test/Storage.js new file mode 100644 index 000000000..0235fb780 --- /dev/null +++ b/es/oak-app-domain/Test/Storage.js @@ -0,0 +1,102 @@ +import { genericActions as actions } from "oak-domain/lib/actions/action"; +export const desc = { + attributes: { + entity: { + notNull: true, + type: "varchar", + params: { + length: 32 + } + }, + entityId: { + notNull: true, + type: "varchar", + params: { + length: 64 + } + }, + type: { + notNull: true, + type: "enum", + enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"] + }, + allowShare: { + notNull: true, + type: "boolean" + }, + tag: { + type: "varchar", + params: { + length: 32 + } + }, + tag2: { + type: "varchar", + params: { + length: 64 + } + }, + expiresAt: { + type: "datetime" + }, + expired: { + type: "boolean" + }, + ticket: { + type: "text" + }, + url: { + type: "varchar", + params: { + length: 256 + } + }, + permanent: { + type: "boolean" + }, + buffer: { + type: "text" + }, + props: { + notNull: true, + type: "object" + } + }, + actionType: "crud", + actions, + indexes: [ + { + name: 'index_entity_entityId_tag', + attributes: [ + { + name: 'entity', + }, + { + name: 'entityId', + }, + { + name: 'tag', + }, + ], + }, + { + name: 'index_expired_expiresAt', + attributes: [ + { + name: 'expired', + }, + { + name: 'expiresAt', + }, + ], + }, + { + name: 'index_url', + attributes: [ + { + name: 'url', + }, + ], + } + ] +}; diff --git a/es/oak-app-domain/Test/Style.d.ts b/es/oak-app-domain/Test/Style.d.ts new file mode 100644 index 000000000..24c9a5eae --- /dev/null +++ b/es/oak-app-domain/Test/Style.d.ts @@ -0,0 +1,3 @@ +import { Action, OpSchema } from "./Schema"; +import { StyleDef } from "oak-domain/lib/types/Style"; +export declare const style: StyleDef; diff --git a/es/oak-app-domain/Test/Style.js b/es/oak-app-domain/Test/Style.js new file mode 100644 index 000000000..d16d98b07 --- /dev/null +++ b/es/oak-app-domain/Test/Style.js @@ -0,0 +1,11 @@ +export const style = { + color: { + type: { + webForWechatPublic: '#00FF7F', + wechatMpDomainUrl: '#008000', + wechatMpWxaCode: '#32CD32', + wechatPublic: '#90EE90', + wechatPublicForMp: '#9ACD32', + } + } +}; diff --git a/es/oak-app-domain/Test/_baseSchema.d.ts b/es/oak-app-domain/Test/_baseSchema.d.ts new file mode 100644 index 000000000..a4aa3eafc --- /dev/null +++ b/es/oak-app-domain/Test/_baseSchema.d.ts @@ -0,0 +1,92 @@ +import { JsonProjection } from "oak-domain/lib/types/DataType"; +import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, 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, Boolean, Datetime, Text } from "oak-domain/lib/types/DataType"; +import { QrCodeType } from "../../types/Config"; +export type WechatQrCodeProps = { + pathname: string; + props?: Record; + state?: Record; + isTabBar?: boolean; +}; +export type OpSchema = EntityShape & { + entity: String<32>; + entityId: String<64>; + type: QrCodeType; + allowShare: Boolean; + tag?: String<32> | null; + tag2?: String<64> | null; + expiresAt?: Datetime | null; + expired?: Boolean | null; + ticket?: Text | null; + url?: String<256> | null; + permanent?: Boolean | null; + buffer?: Text | null; + props: WechatQrCodeProps; +} & { + [A in ExpressionKey]?: any; +}; +export type OpAttr = keyof OpSchema; +export type OpFilter = { + id: Q_StringValue; + $$createAt$$: Q_DateValue; + $$seq$$: Q_NumberValue; + $$updateAt$$: Q_DateValue; + entity: Q_StringValue; + entityId: Q_StringValue; + type: Q_EnumValue; + allowShare: Q_BooleanValue; + tag: Q_StringValue; + tag2: Q_StringValue; + expiresAt: Q_DateValue; + expired: Q_BooleanValue; + ticket: Q_StringValue; + url: Q_StringValue; + permanent: Q_BooleanValue; + buffer: Q_StringValue; + props: JsonFilter; +} & ExprOp; +export type OpProjection = { + "#id"?: NodeId; + [k: string]: any; + id?: number; + $$createAt$$?: number; + $$updateAt$$?: number; + $$seq$$?: number; + entity?: number; + entityId?: number; + type?: number; + allowShare?: number; + tag?: number; + tag2?: number; + expiresAt?: number; + expired?: number; + ticket?: number; + url?: number; + permanent?: number; + buffer?: number; + props?: number | JsonProjection; +} & Partial>; +export type OpSortAttr = Partial<{ + id: number; + $$createAt$$: number; + $$seq$$: number; + $$updateAt$$: number; + entity: number; + entityId: number; + type: number; + allowShare: number; + tag: number; + tag2: number; + expiresAt: number; + expired: number; + ticket: number; + url: number; + permanent: number; + buffer: number; + props: number; + [k: string]: any; +} | ExprOp>; +export type OpAction = OakMakeAction; +export type OpUpdateAction = "update" | string; diff --git a/es/oak-app-domain/Test/_baseSchema.js b/es/oak-app-domain/Test/_baseSchema.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/es/oak-app-domain/Test/_baseSchema.js @@ -0,0 +1 @@ +export {}; diff --git a/es/oak-app-domain/Test/locales/zh_CN.json b/es/oak-app-domain/Test/locales/zh_CN.json new file mode 100644 index 000000000..f4f9080d6 --- /dev/null +++ b/es/oak-app-domain/Test/locales/zh_CN.json @@ -0,0 +1,27 @@ +{ + "name": "微信识别码", + "attr": { + "entity": "关联对象", + "entityId": "关联对象id", + "type": "类型", + "allowShare": "允许分享", + "tag": "tag", + "tag2": "tag2", + "ticket": "ticket", + "url": "url", + "permanent": "是否永久码", + "buffer": "小程序码数据(动态)", + "expired": "是否过期", + "expiresAt": "过期时间", + "props": "属性" + }, + "v": { + "type": { + "webForWechatPublic": "网站引流到公众号", + "wechatMpDomainUrl": "小程序普通链接二维码", + "wechatMpWxaCode": "小程序码", + "wechatPublic": "公众号关注码", + "wechatPublicForMp": "公众号回复小程序码" + } + } +} diff --git a/es/triggers/index.d.ts b/es/triggers/index.d.ts index dd93fc5b9..bf8963c38 100644 --- a/es/triggers/index.d.ts +++ b/es/triggers/index.d.ts @@ -1,2 +1,2 @@ -declare const _default: (import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger>)[]; +declare const _default: (import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger>)[]; export default _default; diff --git a/lib/aspects/user.js b/lib/aspects/user.js index 9931a2774..e5bcf40ba 100644 --- a/lib/aspects/user.js +++ b/lib/aspects/user.js @@ -1,8 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeUser = mergeUser; -exports.getChangePasswordChannels = getChangePasswordChannels; -exports.updateUserPassword = updateUserPassword; +exports.updateUserPassword = exports.getChangePasswordChannels = exports.mergeUser = void 0; const tslib_1 = require("tslib"); const types_1 = require("oak-domain/lib/types"); const uuid_1 = require("oak-domain/lib/utils/uuid"); @@ -142,6 +140,7 @@ async function mergeUser(params, context, innerLogic) { }, { dontCollect: true }); } } +exports.mergeUser = mergeUser; async function getChangePasswordChannels(params, context, innerLogic) { const { userId } = params; const mobileList = await context.select('mobile', { @@ -178,6 +177,7 @@ async function getChangePasswordChannels(params, context, innerLogic) { } return result; } +exports.getChangePasswordChannels = getChangePasswordChannels; async function updateUserPassword(params, context, innerLogic) { const { userId, prevPassword, captcha, mobile, newPassword } = params; const systemId = context.getSystemId(); @@ -434,3 +434,4 @@ async function updateUserPassword(params, context, innerLogic) { throw err; } } +exports.updateUserPassword = updateUserPassword; diff --git a/lib/endpoints/wechat.js b/lib/endpoints/wechat.js index 838260ed7..2c1a7db52 100644 --- a/lib/endpoints/wechat.js +++ b/lib/endpoints/wechat.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.registerWeChatPublicEventCallback = registerWeChatPublicEventCallback; +exports.registerWeChatPublicEventCallback = void 0; const tslib_1 = require("tslib"); const assert_1 = require("oak-domain/lib/utils/assert"); const url_1 = tslib_1.__importDefault(require("url")); @@ -30,6 +30,7 @@ function registerWeChatPublicEventCallback(appId, callback) { (0, assert_1.assert)(!CALLBACK.hasOwnProperty(appId)); CALLBACK[appId] = callback; } +exports.registerWeChatPublicEventCallback = registerWeChatPublicEventCallback; /** * 用户取关事件,注意要容wechatUser不存在的情况 * @param openId diff --git a/lib/entities/Test.d.ts b/lib/entities/Test.d.ts new file mode 100644 index 000000000..706b1f2f6 --- /dev/null +++ b/lib/entities/Test.d.ts @@ -0,0 +1,28 @@ +import { String, Text, Datetime, Boolean } from 'oak-domain/lib/types/DataType'; +import { EntityShape } from 'oak-domain/lib/types/Entity'; +import { QrCodeType } from '../types/Config'; +import { EntityDesc } from 'oak-domain/lib/types/EntityDesc'; +export type WechatQrCodeProps = { + pathname: string; + props?: Record; + state?: Record; + isTabBar?: boolean; +}; +export interface Schema extends EntityShape { + entity: String<32>; + entityId: String<64>; + type: QrCodeType; + allowShare: Boolean; + tag?: String<32>; + tag2?: String<64>; + expiresAt?: Datetime; + expired?: Boolean; + ticket?: Text; + url?: String<256>; + permanent?: Boolean; + buffer?: Text; + props: WechatQrCodeProps; +} +export declare const entityDesc: EntityDesc; diff --git a/lib/entities/Test.js b/lib/entities/Test.js new file mode 100644 index 000000000..4e80bf03c --- /dev/null +++ b/lib/entities/Test.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.entityDesc = void 0; +exports.entityDesc = { + locales: { + zh_CN: { + name: '微信识别码', + attr: { + entity: '关联对象', + entityId: '关联对象id', + type: '类型', + allowShare: '允许分享', + tag: 'tag', + tag2: 'tag2', + ticket: 'ticket', + url: 'url', + permanent: '是否永久码', + buffer: '小程序码数据(动态)', + expired: '是否过期', + expiresAt: '过期时间', + props: '属性', + }, + v: { + type: { + webForWechatPublic: '网站引流到公众号', + wechatMpDomainUrl: '小程序普通链接二维码', + wechatMpWxaCode: '小程序码', + wechatPublic: '公众号关注码', + wechatPublicForMp: '公众号回复小程序码', + }, + }, + }, + }, + indexes: [ + { + name: 'index_entity_entityId_tag', + attributes: [ + { + name: 'entity', + }, + { + name: 'entityId', + }, + { + name: 'tag', + }, + ], + }, + { + name: 'index_expired_expiresAt', + attributes: [ + { + name: 'expired', + }, + { + name: 'expiresAt', + }, + ], + }, + { + name: 'index_url', + attributes: [ + { + name: 'url', + }, + ], + }, + ], + style: { + color: { + type: { + webForWechatPublic: '#00FF7F', + wechatMpDomainUrl: '#008000', + wechatMpWxaCode: '#32CD32', + wechatPublic: '#90EE90', + wechatPublicForMp: '#9ACD32', + } + } + } +}; diff --git a/lib/oak-app-domain/Test/Schema.d.ts b/lib/oak-app-domain/Test/Schema.d.ts new file mode 100644 index 000000000..86015d4d0 --- /dev/null +++ b/lib/oak-app-domain/Test/Schema.d.ts @@ -0,0 +1,19 @@ +export * from "./_baseSchema"; +import { Test } from "../EntityDict"; +export type Schema = Test["Schema"]; +export type Action = Test["Action"]; +export type Projection = Test["Projection"]; +export type Filter = Test["Filter"]; +export type SortNode = Test["SortNode"]; +export type Sorter = Test["Sorter"]; +export type Selection = Test["Selection"]; +export type Aggregation = Test["Aggregation"]; +export type CreateOperationData = Test["CreateOperationData"]; +export type CreateSingle = Test["CreateSingle"]; +export type CreateMulti = Test["CreateMulti"]; +export type Create = Test["Create"]; +export type UpdateOperationData = Test["UpdateOperationData"]; +export type Update = Test["Update"]; +export type RemoveOperationData = Test["RemoveOperationData"]; +export type Remove = Test["Remove"]; +export type Operation = Test["Operation"]; diff --git a/lib/oak-app-domain/Test/Schema.js b/lib/oak-app-domain/Test/Schema.js new file mode 100644 index 000000000..63a4184a6 --- /dev/null +++ b/lib/oak-app-domain/Test/Schema.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./_baseSchema"), exports); diff --git a/lib/oak-app-domain/Test/Storage.d.ts b/lib/oak-app-domain/Test/Storage.d.ts new file mode 100644 index 000000000..a3f0fbbb0 --- /dev/null +++ b/lib/oak-app-domain/Test/Storage.d.ts @@ -0,0 +1,3 @@ +import { StorageDesc } from "oak-domain/lib/types/Storage"; +import { OpSchema } from "./Schema"; +export declare const desc: StorageDesc; diff --git a/lib/oak-app-domain/Test/Storage.js b/lib/oak-app-domain/Test/Storage.js new file mode 100644 index 000000000..102722e97 --- /dev/null +++ b/lib/oak-app-domain/Test/Storage.js @@ -0,0 +1,105 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.desc = void 0; +const action_1 = require("oak-domain/lib/actions/action"); +exports.desc = { + attributes: { + entity: { + notNull: true, + type: "varchar", + params: { + length: 32 + } + }, + entityId: { + notNull: true, + type: "varchar", + params: { + length: 64 + } + }, + type: { + notNull: true, + type: "enum", + enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"] + }, + allowShare: { + notNull: true, + type: "boolean" + }, + tag: { + type: "varchar", + params: { + length: 32 + } + }, + tag2: { + type: "varchar", + params: { + length: 64 + } + }, + expiresAt: { + type: "datetime" + }, + expired: { + type: "boolean" + }, + ticket: { + type: "text" + }, + url: { + type: "varchar", + params: { + length: 256 + } + }, + permanent: { + type: "boolean" + }, + buffer: { + type: "text" + }, + props: { + notNull: true, + type: "object" + } + }, + actionType: "crud", + actions: action_1.genericActions, + indexes: [ + { + name: 'index_entity_entityId_tag', + attributes: [ + { + name: 'entity', + }, + { + name: 'entityId', + }, + { + name: 'tag', + }, + ], + }, + { + name: 'index_expired_expiresAt', + attributes: [ + { + name: 'expired', + }, + { + name: 'expiresAt', + }, + ], + }, + { + name: 'index_url', + attributes: [ + { + name: 'url', + }, + ], + } + ] +}; diff --git a/lib/oak-app-domain/Test/Style.d.ts b/lib/oak-app-domain/Test/Style.d.ts new file mode 100644 index 000000000..24c9a5eae --- /dev/null +++ b/lib/oak-app-domain/Test/Style.d.ts @@ -0,0 +1,3 @@ +import { Action, OpSchema } from "./Schema"; +import { StyleDef } from "oak-domain/lib/types/Style"; +export declare const style: StyleDef; diff --git a/lib/oak-app-domain/Test/Style.js b/lib/oak-app-domain/Test/Style.js new file mode 100644 index 000000000..efce9e358 --- /dev/null +++ b/lib/oak-app-domain/Test/Style.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.style = void 0; +exports.style = { + color: { + type: { + webForWechatPublic: '#00FF7F', + wechatMpDomainUrl: '#008000', + wechatMpWxaCode: '#32CD32', + wechatPublic: '#90EE90', + wechatPublicForMp: '#9ACD32', + } + } +}; diff --git a/lib/oak-app-domain/Test/_baseSchema.d.ts b/lib/oak-app-domain/Test/_baseSchema.d.ts new file mode 100644 index 000000000..a4aa3eafc --- /dev/null +++ b/lib/oak-app-domain/Test/_baseSchema.d.ts @@ -0,0 +1,92 @@ +import { JsonProjection } from "oak-domain/lib/types/DataType"; +import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, 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, Boolean, Datetime, Text } from "oak-domain/lib/types/DataType"; +import { QrCodeType } from "../../types/Config"; +export type WechatQrCodeProps = { + pathname: string; + props?: Record; + state?: Record; + isTabBar?: boolean; +}; +export type OpSchema = EntityShape & { + entity: String<32>; + entityId: String<64>; + type: QrCodeType; + allowShare: Boolean; + tag?: String<32> | null; + tag2?: String<64> | null; + expiresAt?: Datetime | null; + expired?: Boolean | null; + ticket?: Text | null; + url?: String<256> | null; + permanent?: Boolean | null; + buffer?: Text | null; + props: WechatQrCodeProps; +} & { + [A in ExpressionKey]?: any; +}; +export type OpAttr = keyof OpSchema; +export type OpFilter = { + id: Q_StringValue; + $$createAt$$: Q_DateValue; + $$seq$$: Q_NumberValue; + $$updateAt$$: Q_DateValue; + entity: Q_StringValue; + entityId: Q_StringValue; + type: Q_EnumValue; + allowShare: Q_BooleanValue; + tag: Q_StringValue; + tag2: Q_StringValue; + expiresAt: Q_DateValue; + expired: Q_BooleanValue; + ticket: Q_StringValue; + url: Q_StringValue; + permanent: Q_BooleanValue; + buffer: Q_StringValue; + props: JsonFilter; +} & ExprOp; +export type OpProjection = { + "#id"?: NodeId; + [k: string]: any; + id?: number; + $$createAt$$?: number; + $$updateAt$$?: number; + $$seq$$?: number; + entity?: number; + entityId?: number; + type?: number; + allowShare?: number; + tag?: number; + tag2?: number; + expiresAt?: number; + expired?: number; + ticket?: number; + url?: number; + permanent?: number; + buffer?: number; + props?: number | JsonProjection; +} & Partial>; +export type OpSortAttr = Partial<{ + id: number; + $$createAt$$: number; + $$seq$$: number; + $$updateAt$$: number; + entity: number; + entityId: number; + type: number; + allowShare: number; + tag: number; + tag2: number; + expiresAt: number; + expired: number; + ticket: number; + url: number; + permanent: number; + buffer: number; + props: number; + [k: string]: any; +} | ExprOp>; +export type OpAction = OakMakeAction; +export type OpUpdateAction = "update" | string; diff --git a/lib/oak-app-domain/Test/_baseSchema.js b/lib/oak-app-domain/Test/_baseSchema.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/lib/oak-app-domain/Test/_baseSchema.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/oak-app-domain/Test/locales/zh_CN.json b/lib/oak-app-domain/Test/locales/zh_CN.json new file mode 100644 index 000000000..f4f9080d6 --- /dev/null +++ b/lib/oak-app-domain/Test/locales/zh_CN.json @@ -0,0 +1,27 @@ +{ + "name": "微信识别码", + "attr": { + "entity": "关联对象", + "entityId": "关联对象id", + "type": "类型", + "allowShare": "允许分享", + "tag": "tag", + "tag2": "tag2", + "ticket": "ticket", + "url": "url", + "permanent": "是否永久码", + "buffer": "小程序码数据(动态)", + "expired": "是否过期", + "expiresAt": "过期时间", + "props": "属性" + }, + "v": { + "type": { + "webForWechatPublic": "网站引流到公众号", + "wechatMpDomainUrl": "小程序普通链接二维码", + "wechatMpWxaCode": "小程序码", + "wechatPublic": "公众号关注码", + "wechatPublicForMp": "公众号回复小程序码" + } + } +} diff --git a/lib/triggers/index.d.ts b/lib/triggers/index.d.ts index dd93fc5b9..bf8963c38 100644 --- a/lib/triggers/index.d.ts +++ b/lib/triggers/index.d.ts @@ -1,2 +1,2 @@ -declare const _default: (import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger>)[]; +declare const _default: (import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger>)[]; export default _default;