build
This commit is contained in:
parent
e2f9a49d76
commit
cd1bf2ce21
|
|
@ -103,7 +103,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'image',
|
||||
tag1: 'image',
|
||||
objectId: await generateNewIdAsync(),
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -128,7 +128,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'video',
|
||||
tag1: 'video',
|
||||
objectId: await generateNewIdAsync(),
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -150,7 +150,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'audio',
|
||||
tag1: 'audio',
|
||||
objectId: await generateNewIdAsync(),
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ export async function createWechatQrCode(options, context) {
|
|||
permanent,
|
||||
url,
|
||||
expired: false,
|
||||
expiresAt: Date.now() + 2592000 * 1000,
|
||||
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大,由上层关联对象来主动过期(by Xc, 20230131)
|
||||
props,
|
||||
};
|
||||
// 直接创建
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export default OakComponent({
|
|||
entity: '',
|
||||
entityId: '',
|
||||
title: '',
|
||||
origin: null,
|
||||
origin: null, // cos origin默认由系统决定
|
||||
menuEmpty: undefined,
|
||||
articleEmpty: undefined,
|
||||
generateUrl: ((mode, type, id) => { }), //构造文章显示路由
|
||||
|
|
@ -20,7 +20,7 @@ export default OakComponent({
|
|||
showAddArticle: false,
|
||||
showAddMenu: true,
|
||||
parentId: '',
|
||||
articleMenuId: '',
|
||||
articleMenuId: '', //非空时展示atricle表格
|
||||
unsub: undefined,
|
||||
},
|
||||
listeners: {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export default OakComponent({
|
|||
onRemove: () => undefined,
|
||||
onUpdateName: async (name) => undefined,
|
||||
onChildEditArticleChange: (data) => undefined,
|
||||
show: 'edit',
|
||||
show: 'edit', // edit为编辑,doc为查看,preview为预览
|
||||
getBreadcrumbItemsByParent: (breadcrumbItems) => undefined,
|
||||
breadItems: [],
|
||||
drawerOpen: false,
|
||||
|
|
|
|||
|
|
@ -14,19 +14,19 @@ export default OakComponent({
|
|||
properties: {
|
||||
entity: '',
|
||||
entityId: '',
|
||||
show: 'edit',
|
||||
articleMenuId: '',
|
||||
articleId: '',
|
||||
tocPosition: 'none',
|
||||
highlightBgColor: 'none',
|
||||
onMenuView: () => undefined,
|
||||
onMenuViewById: (articleMenuId) => undefined,
|
||||
onArticleView: (articleId) => undefined,
|
||||
onArticlePreview: (content, title) => undefined,
|
||||
onArticleEdit: (articleId) => undefined,
|
||||
show: 'edit', // edit为编辑,doc为查看,preview为预览
|
||||
articleMenuId: '', // 菜单id
|
||||
articleId: '', //文章id
|
||||
tocPosition: 'none', //文章目录显示位置,none为不显示目录
|
||||
highlightBgColor: 'none', //点击文章目录时标题高亮背景色,none为不显示高亮背景色
|
||||
onMenuView: () => undefined, //查看全部菜单
|
||||
onMenuViewById: (articleMenuId) => undefined, //查看指定id菜单
|
||||
onArticleView: (articleId) => undefined, //查看文章
|
||||
onArticlePreview: (content, title) => undefined, //预览文章
|
||||
onArticleEdit: (articleId) => undefined, //编辑文章
|
||||
setCopyArticleUrl: (articleId) => '',
|
||||
origin: null,
|
||||
scrollId: '',
|
||||
origin: null, // cos origin默认由系统决定
|
||||
scrollId: '', // 滚动条所在容器id,不传默认页面编辑器容器id
|
||||
activeColor: undefined, //目录高亮颜色
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default OakComponent({
|
|||
code: '',
|
||||
title: '',
|
||||
desc: '',
|
||||
icon: '',
|
||||
icon: '', //web独有
|
||||
imagePath: '', //小程序独有
|
||||
},
|
||||
lifetimes: {
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ export default OakComponent({
|
|||
return;
|
||||
}
|
||||
const qrCodeURL = qrcode.drawImg(url, {
|
||||
typeNumber: 4,
|
||||
errorCorrectLevel: 'L',
|
||||
size: size,
|
||||
typeNumber: 4, // 密度
|
||||
errorCorrectLevel: 'L', // 纠错等级
|
||||
size: size, // 白色边框
|
||||
color,
|
||||
bgColor
|
||||
});
|
||||
|
|
@ -77,8 +77,8 @@ export default OakComponent({
|
|||
// 注意:写入前需确保Base64数据已经去掉了数据URL前缀(如"data:image/png;base64,")
|
||||
fs.writeFile({
|
||||
filePath: filePath,
|
||||
data: base64Data,
|
||||
encoding: 'base64',
|
||||
data: base64Data, // 传入纯Base64字符串
|
||||
encoding: 'base64', // 指定编码格式
|
||||
success(res) {
|
||||
// 文件写入成功后,检查并保存到相册
|
||||
that.checkAuthAndSave(filePath);
|
||||
|
|
|
|||
|
|
@ -47,19 +47,19 @@ export default OakComponent({
|
|||
bucket: '',
|
||||
autoUpload: false,
|
||||
maxNumber: 20,
|
||||
extension: [],
|
||||
selectCount: 1,
|
||||
sourceType: ['album', 'camera'],
|
||||
mediaType: ['image'],
|
||||
mode: 'aspectFit',
|
||||
size: 3,
|
||||
showUploadList: true,
|
||||
showUploadProgress: false,
|
||||
accept: 'image/*',
|
||||
disablePreview: false,
|
||||
disableDelete: false,
|
||||
disableAdd: false,
|
||||
disableDownload: false,
|
||||
extension: [], //小程序独有 chooseMessageFile
|
||||
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有
|
||||
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia
|
||||
mediaType: ['image'], // 小程序独有 chooseMedia
|
||||
mode: 'aspectFit', // 图片显示模式
|
||||
size: 3, // 每行可显示的个数 小程序独有
|
||||
showUploadList: true, //web独有
|
||||
showUploadProgress: false, // web独有
|
||||
accept: 'image/*', // web独有
|
||||
disablePreview: false, // 图片是否可预览
|
||||
disableDelete: false, // 图片是否可删除
|
||||
disableAdd: false, // 上传按钮隐藏
|
||||
disableDownload: false, // 下载按钮隐藏
|
||||
type: 'image',
|
||||
origin: null,
|
||||
tag1: '',
|
||||
|
|
@ -67,40 +67,40 @@ export default OakComponent({
|
|||
entity: '',
|
||||
entityId: '',
|
||||
theme: 'image',
|
||||
enableCrop: false,
|
||||
enableCompross: false,
|
||||
enableCrop: false, //启用裁剪
|
||||
enableCompross: false, //启用压缩
|
||||
//图片裁剪
|
||||
cropQuality: 1,
|
||||
showRest: false,
|
||||
showGrid: false,
|
||||
fillColor: 'white',
|
||||
rotationSlider: false,
|
||||
aspectSlider: false,
|
||||
zoomSlider: true,
|
||||
resetText: '重置',
|
||||
aspect: 1 / 1,
|
||||
minZoom: 1,
|
||||
maxZoom: 3,
|
||||
cropShape: 'rect',
|
||||
cropperProps: {},
|
||||
modalTitle: '编辑图片',
|
||||
modalWidth: '40vw',
|
||||
modalOk: '确定',
|
||||
modalCancel: '取消',
|
||||
cropQuality: 1, //图片裁剪质量,范围:0 ~ 1
|
||||
showRest: false, //显示重置按钮,重置缩放及旋转
|
||||
showGrid: false, //显示裁切区域网格(九宫格)
|
||||
fillColor: 'white', //裁切图像填充色
|
||||
rotationSlider: false, //图片旋转控制
|
||||
aspectSlider: false, //裁切比率控制
|
||||
zoomSlider: true, //图片缩放控制
|
||||
resetText: '重置', //重置按钮文字
|
||||
aspect: 1 / 1, //裁切区域宽高比,width / height
|
||||
minZoom: 1, //最小缩放倍数
|
||||
maxZoom: 3, //最大缩放倍数
|
||||
cropShape: 'rect', //裁切区域形状,'rect' 或 'round'
|
||||
cropperProps: {}, //recat-easy-crop的props
|
||||
modalTitle: '编辑图片', //弹窗标题
|
||||
modalWidth: '40vw', //弹窗宽度
|
||||
modalOk: '确定', //确定按钮文字
|
||||
modalCancel: '取消', //取消按钮的文字
|
||||
//图片压缩
|
||||
strict: true,
|
||||
checkOrientation: true,
|
||||
retainExif: false,
|
||||
maxWidth: Infinity,
|
||||
maxHeight: Infinity,
|
||||
minWidth: 0,
|
||||
minHeight: 0,
|
||||
compressWidth: undefined,
|
||||
compressHeight: undefined,
|
||||
resize: 'none',
|
||||
compressQuality: 0.8,
|
||||
mimeType: 'auto',
|
||||
convertTypes: ['image/png'],
|
||||
strict: true, //当压缩后的图片尺寸大于原图尺寸时输出原图
|
||||
checkOrientation: true, //读取图像的Exif方向值并自动旋转或翻转图像(仅限 JPEG 图像)
|
||||
retainExif: false, //压缩后保留图片的Exif信息
|
||||
maxWidth: Infinity, //输出图片的最大宽度,值需大于0
|
||||
maxHeight: Infinity, //输出图片的最大高度,值需大于0
|
||||
minWidth: 0, //输出图片的最小宽度,值需大于0且不应大于maxWidth
|
||||
minHeight: 0, //输出图片的最小高度。值需大于0且不应大于maxHeight
|
||||
compressWidth: undefined, //输出图像的宽度。如果未指定,则将使用原始图像的宽度,若设置了height,则宽度将根据自然纵横比自动计算。
|
||||
compressHeight: undefined, //输出图像的高度。如果未指定,则将使用原始图像的高度,若设置了width,则高度将根据自然纵横比自动计算。
|
||||
resize: 'none', //仅在同时指定了width和height时生效
|
||||
compressQuality: 0.8, //输出图像的质量。范围:0 ~ 1
|
||||
mimeType: 'auto', //输出图片的 MIME 类型。默认情况下,将使用源图片文件的原始 MIME 类型。
|
||||
convertTypes: ['image/png'], //文件类型包含在其中且文件大小超过该convertSize值的文件将被转换为 JPEG。
|
||||
convertSize: Infinity, //文件类型包含在convertTypes中且文件大小超过此值的文件将转换为 JPEG,Infinity表示禁用该功能
|
||||
},
|
||||
features: ['extraFile'],
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ export default OakComponent({
|
|||
data: {
|
||||
isModalOpen: false,
|
||||
isModalOpen1: false,
|
||||
renderImgs: [],
|
||||
renderImgs: [], // 读取的原文图片,在modal使用
|
||||
methodsType: '',
|
||||
bridgeUrl: '',
|
||||
bridgeUrl: '', // 通过桥接方式获得的url
|
||||
selectedId: -1,
|
||||
},
|
||||
properties: {
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ export default OakComponent({
|
|||
},
|
||||
],
|
||||
properties: {
|
||||
mode: 'aspectFit',
|
||||
size: 3,
|
||||
disablePreview: false,
|
||||
disableDownload: false,
|
||||
mode: 'aspectFit', // 图片显示模式
|
||||
size: 3, // 每行可显示的个数 小程序独有
|
||||
disablePreview: false, // 图片是否可预览
|
||||
disableDownload: false, // 下载按钮隐藏
|
||||
tag1: '',
|
||||
tag2: '',
|
||||
entity: '',
|
||||
|
|
|
|||
|
|
@ -50,19 +50,19 @@ export default OakComponent({
|
|||
bucket: '',
|
||||
autoUpload: false,
|
||||
maxNumber: 20,
|
||||
extension: [],
|
||||
selectCount: 1,
|
||||
sourceType: ['album', 'camera'],
|
||||
mediaType: ['image'],
|
||||
mode: 'aspectFit',
|
||||
size: 3,
|
||||
showUploadList: true,
|
||||
showUploadProgress: false,
|
||||
accept: 'image/*',
|
||||
disablePreview: false,
|
||||
disableDelete: false,
|
||||
disableAdd: false,
|
||||
disableDownload: false,
|
||||
extension: [], //小程序独有 chooseMessageFile
|
||||
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有
|
||||
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia
|
||||
mediaType: ['image'], // 小程序独有 chooseMedia
|
||||
mode: 'aspectFit', // 图片显示模式
|
||||
size: 3, // 每行可显示的个数 小程序独有
|
||||
showUploadList: true, //web独有
|
||||
showUploadProgress: false, // web独有
|
||||
accept: 'image/*', // web独有
|
||||
disablePreview: false, // 图片是否可预览
|
||||
disableDelete: false, // 图片是否可删除
|
||||
disableAdd: false, // 上传按钮隐藏
|
||||
disableDownload: false, // 下载按钮隐藏
|
||||
type: 'image',
|
||||
origin: null,
|
||||
tag1: '',
|
||||
|
|
@ -147,7 +147,7 @@ export default OakComponent({
|
|||
type,
|
||||
tag1,
|
||||
tag2,
|
||||
objectId: generateNewId(),
|
||||
objectId: generateNewId(), // 这个域用来标识唯一性
|
||||
entity,
|
||||
filename,
|
||||
size,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ export default OakComponent({
|
|||
name: 1,
|
||||
description: 1,
|
||||
redirectUris: 1,
|
||||
logo: 1,
|
||||
logo: 1, // string
|
||||
isConfidential: 1,
|
||||
scopes: 1,
|
||||
scopes: 1, // string[]
|
||||
ableState: 1,
|
||||
requirePKCE: 1,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export default OakComponent({
|
|||
dialog: false,
|
||||
entity: '',
|
||||
entityId: '',
|
||||
entityDisplay: (data) => [],
|
||||
entityDisplay: (data) => [], // user端,指示如何显示entity对象名称
|
||||
entityProjection: null, // user端,指示需要取哪些entity的属性来显示entityDisplay
|
||||
},
|
||||
filters: [
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export default OakComponent({
|
|||
id: 1,
|
||||
entity: 1,
|
||||
entityId: 1,
|
||||
type: 1,
|
||||
type: 1, //类型
|
||||
ticket: 1,
|
||||
url: 1,
|
||||
expired: 1,
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ export const entityDesc = {
|
|||
zh_CN: {
|
||||
name: '直播流',
|
||||
attr: {
|
||||
title: '名称',
|
||||
title: '名称', // 用户定义直播间名称,
|
||||
streamTitle: '直播流名称',
|
||||
liveonly: '活跃状态',
|
||||
hub: '直播空间名称',
|
||||
hub: '直播空间名称', // 所属直播空间名称
|
||||
entity: '所属实体',
|
||||
entityId: '所属实体id',
|
||||
rtmpPushUrl: '推流地址',
|
||||
|
|
|
|||
|
|
@ -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<string, any>;
|
||||
state?: Record<string, any>;
|
||||
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<Schema, '', '', {
|
||||
type: QrCodeType;
|
||||
}>;
|
||||
|
|
@ -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',
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -12,6 +12,7 @@ export type WechatMpConfig = {
|
|||
appSecret: string;
|
||||
originalId?: string;
|
||||
qrCodePrefix?: string;
|
||||
getPhone?: boolean;
|
||||
server?: {
|
||||
url?: string;
|
||||
token: string;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
module: String<64>;
|
||||
position: String<188>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { Action, ParticularAction } from "./Action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { Action, ParticularAction, IState } from "./Action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
targetEntity: String<32>;
|
||||
entity: String<32>;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { AppendOnlyAction } from "oak-domain/lib/actions/action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
modiId: ForeignKey<"modi">;
|
||||
entity: String<32>;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { Action, ParticularAction, IState } from "./Action";
|
||||
import { String, Datetime } from "oak-domain/lib/types/DataType";
|
||||
import { String, Datetime } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
action: String<24>;
|
||||
data: Object;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { AppendOnlyAction } from "oak-domain/lib/actions/action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
operId: ForeignKey<"oper">;
|
||||
entity: String<32>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String, Boolean } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
destEntity: String<32>;
|
||||
value: String<256>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
entity: "platform" | "session" | "toDo" | string;
|
||||
entityId?: String<64> | null;
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
|
|
@ -0,0 +1 @@
|
|||
export * from "./_baseSchema";
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
import { StorageDesc } from "oak-domain/lib/types/Storage";
|
||||
import { OpSchema } from "./Schema";
|
||||
export declare const desc: StorageDesc<OpSchema>;
|
||||
|
|
@ -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',
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
import { Action, OpSchema } from "./Schema";
|
||||
import { StyleDef } from "oak-domain/lib/types/Style";
|
||||
export declare const style: StyleDef<OpSchema, Action>;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
export const style = {
|
||||
color: {
|
||||
type: {
|
||||
webForWechatPublic: '#00FF7F',
|
||||
wechatMpDomainUrl: '#008000',
|
||||
wechatMpWxaCode: '#32CD32',
|
||||
wechatPublic: '#90EE90',
|
||||
wechatPublicForMp: '#9ACD32',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -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<string, any>;
|
||||
state?: Record<string, any>;
|
||||
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<QrCodeType>;
|
||||
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<WechatQrCodeProps>;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
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<WechatQrCodeProps>;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
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<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
export type OpUpdateAction = "update" | string;
|
||||
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
|
|
@ -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": "公众号回复小程序码"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
uegId: ForeignKey<"userEntityGrant">;
|
||||
userId: ForeignKey<"user">;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
relationId: ForeignKey<"relation">;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "mobile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "system", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "passport", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthApplication", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthProvider", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUser", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUserAuthorization", import("../context/BackendRuntimeContext").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "mobile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUser", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthProvider", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthApplication", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "passport", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "system", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUserAuthorization", import("../context/BackendRuntimeContext").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ async function sendNotification(notification, context) {
|
|||
await instance.sendSubscribedMessage({
|
||||
templateId: templateId,
|
||||
data: data,
|
||||
openId: data1.openId,
|
||||
openId: data1.openId, // 在notification创建时就赋值了
|
||||
page,
|
||||
state: StateDict[process.env.NODE_ENV],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export declare function createToDo<ED extends EntityDict & BaseEntityDict, T ext
|
|||
redirectTo: EntityDict['toDo']['OpSchema']['redirectTo'];
|
||||
entity: any;
|
||||
entityId: string;
|
||||
}, userIds?: string[]): Promise<0 | 1>;
|
||||
}, userIds?: string[]): Promise<1 | 0>;
|
||||
/**
|
||||
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
||||
* 必须在entity的action的后trigger中调用
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.batchGetMaterialList = exports.getArticle = exports.batchGetArticle = exports.deleteMaterial = exports.getMaterial = exports.uploadWechatMedia = exports.signatureJsSDK = exports.getApplication = void 0;
|
||||
exports.getApplication = getApplication;
|
||||
exports.signatureJsSDK = signatureJsSDK;
|
||||
exports.uploadWechatMedia = uploadWechatMedia;
|
||||
exports.getMaterial = getMaterial;
|
||||
exports.deleteMaterial = deleteMaterial;
|
||||
exports.batchGetArticle = batchGetArticle;
|
||||
exports.getArticle = getArticle;
|
||||
exports.batchGetMaterialList = batchGetMaterialList;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const Projection_1 = require("../types/Projection");
|
||||
|
|
@ -114,7 +121,6 @@ async function getApplication(params, context) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.getApplication = getApplication;
|
||||
async function signatureJsSDK({ url, env }, context) {
|
||||
const application = context.getApplication();
|
||||
const { type, config } = application;
|
||||
|
|
@ -125,7 +131,6 @@ async function signatureJsSDK({ url, env }, context) {
|
|||
const result = await wechatInstance.signatureJsSDK({ url });
|
||||
return result;
|
||||
}
|
||||
exports.signatureJsSDK = signatureJsSDK;
|
||||
async function uploadWechatMedia(params, // FormData表单提交 isPermanent 变成 'true' | 'false'
|
||||
context) {
|
||||
const { applicationId, file, type: mediaType, description, extraFileId, } = params;
|
||||
|
|
@ -206,7 +211,6 @@ context) {
|
|||
mediaId,
|
||||
};
|
||||
}
|
||||
exports.uploadWechatMedia = uploadWechatMedia;
|
||||
async function getMaterial(params, context) {
|
||||
const { mediaId, applicationId, isPermanent = false } = params;
|
||||
(0, assert_1.assert)(applicationId);
|
||||
|
|
@ -251,7 +255,6 @@ async function getMaterial(params, context) {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
exports.getMaterial = getMaterial;
|
||||
async function deleteMaterial(params, context) {
|
||||
const { mediaId, applicationId } = params;
|
||||
(0, assert_1.assert)(applicationId);
|
||||
|
|
@ -275,7 +278,6 @@ async function deleteMaterial(params, context) {
|
|||
});
|
||||
return result;
|
||||
}
|
||||
exports.deleteMaterial = deleteMaterial;
|
||||
async function batchGetArticle(params, context) {
|
||||
const { applicationId, offset, count, noContent } = params;
|
||||
(0, assert_1.assert)(applicationId);
|
||||
|
|
@ -302,7 +304,6 @@ async function batchGetArticle(params, context) {
|
|||
});
|
||||
return result;
|
||||
}
|
||||
exports.batchGetArticle = batchGetArticle;
|
||||
async function getArticle(params, context) {
|
||||
const { applicationId, articleId } = params;
|
||||
(0, assert_1.assert)(applicationId);
|
||||
|
|
@ -327,7 +328,6 @@ async function getArticle(params, context) {
|
|||
});
|
||||
return result;
|
||||
}
|
||||
exports.getArticle = getArticle;
|
||||
async function batchGetMaterialList(params, context) {
|
||||
const { applicationId } = params;
|
||||
(0, assert_1.assert)(applicationId);
|
||||
|
|
@ -355,4 +355,3 @@ async function batchGetMaterialList(params, context) {
|
|||
});
|
||||
return result;
|
||||
}
|
||||
exports.batchGetMaterialList = batchGetMaterialList;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.removeApplicationPassportsByPIds = exports.getApplicationPassports = void 0;
|
||||
exports.getApplicationPassports = getApplicationPassports;
|
||||
exports.removeApplicationPassportsByPIds = removeApplicationPassportsByPIds;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
async function getApplicationPassports(params, context) {
|
||||
const { applicationId } = params;
|
||||
|
|
@ -23,7 +24,6 @@ async function getApplicationPassports(params, context) {
|
|||
closeRoot();
|
||||
return applicationPassports;
|
||||
}
|
||||
exports.getApplicationPassports = getApplicationPassports;
|
||||
async function removeApplicationPassportsByPIds(params, context) {
|
||||
const { passportIds } = params;
|
||||
const applicationPassports = await context.select('applicationPassport', {
|
||||
|
|
@ -51,4 +51,3 @@ async function removeApplicationPassportsByPIds(params, context) {
|
|||
}, {});
|
||||
}
|
||||
}
|
||||
exports.removeApplicationPassportsByPIds = removeApplicationPassportsByPIds;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.updateStyle = exports.updateApplicationConfig = exports.updateConfig = void 0;
|
||||
exports.updateConfig = updateConfig;
|
||||
exports.updateApplicationConfig = updateApplicationConfig;
|
||||
exports.updateStyle = updateStyle;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
async function updateConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
|
|
@ -15,7 +17,6 @@ async function updateConfig(params, context) {
|
|||
}
|
||||
}, {});
|
||||
}
|
||||
exports.updateConfig = updateConfig;
|
||||
async function updateApplicationConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
await context.operate(entity, {
|
||||
|
|
@ -29,7 +30,6 @@ async function updateApplicationConfig(params, context) {
|
|||
},
|
||||
}, {});
|
||||
}
|
||||
exports.updateApplicationConfig = updateApplicationConfig;
|
||||
async function updateStyle(params, context) {
|
||||
const { entity, entityId, style } = params;
|
||||
await context.operate(entity, {
|
||||
|
|
@ -43,4 +43,3 @@ async function updateStyle(params, context) {
|
|||
},
|
||||
}, {});
|
||||
}
|
||||
exports.updateStyle = updateStyle;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.uploadExtraFile = exports.getInfoByUrl = void 0;
|
||||
exports.getInfoByUrl = getInfoByUrl;
|
||||
exports.uploadExtraFile = uploadExtraFile;
|
||||
const tslib_1 = require("tslib");
|
||||
const WechatSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/WechatSDK"));
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
|
|
@ -13,7 +14,6 @@ async function getInfoByUrl(params) {
|
|||
const { url } = params;
|
||||
return await WechatSDK_1.default.analyzePublicArticle(url);
|
||||
}
|
||||
exports.getInfoByUrl = getInfoByUrl;
|
||||
async function uploadExtraFile(params, // FormData表单提交
|
||||
context) {
|
||||
const { applicationId, file, extraFileId, } = params;
|
||||
|
|
@ -54,4 +54,3 @@ context) {
|
|||
success: true,
|
||||
};
|
||||
}
|
||||
exports.uploadExtraFile = uploadExtraFile;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createSession = void 0;
|
||||
exports.createSession = createSession;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
async function createSession(params, context) {
|
||||
|
|
@ -106,7 +106,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'image',
|
||||
tag1: 'image',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -131,7 +131,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'video',
|
||||
tag1: 'video',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -153,7 +153,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'audio',
|
||||
tag1: 'audio',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -222,4 +222,3 @@ async function createSession(params, context) {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
exports.createSession = createSession;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.syncSmsTemplate = void 0;
|
||||
exports.syncSmsTemplate = syncSmsTemplate;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const index_1 = require("../utils/sms/index");
|
||||
async function syncSmsTemplate(params, context) {
|
||||
|
|
@ -83,4 +83,3 @@ async function syncSmsTemplate(params, context) {
|
|||
// );
|
||||
// }
|
||||
}
|
||||
exports.syncSmsTemplate = syncSmsTemplate;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.syncMessageTemplate = exports.getMessageType = exports.registerMessageType = void 0;
|
||||
exports.registerMessageType = registerMessageType;
|
||||
exports.getMessageType = getMessageType;
|
||||
exports.syncMessageTemplate = syncMessageTemplate;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
|
|
@ -11,11 +13,9 @@ function registerMessageType(messageType) {
|
|||
let messageTypes2 = messageTypes.concat(messageType);
|
||||
messageTypes = (0, lodash_1.uniq)(messageTypes2);
|
||||
}
|
||||
exports.registerMessageType = registerMessageType;
|
||||
async function getMessageType() {
|
||||
return messageTypes;
|
||||
}
|
||||
exports.getMessageType = getMessageType;
|
||||
function analyseContent(content) {
|
||||
let content2 = content;
|
||||
let result = {};
|
||||
|
|
@ -129,4 +129,3 @@ async function syncMessageTemplate(params, context) {
|
|||
}
|
||||
return template_list;
|
||||
}
|
||||
exports.syncMessageTemplate = syncMessageTemplate;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.syncToWechat = exports.syncToLocale = exports.tagging = exports.getSubscribedUserInfo = exports.getUsers = exports.getUserTags = exports.batchuntagging = exports.batchtagging = exports.getTagUsers = void 0;
|
||||
exports.getTagUsers = getTagUsers;
|
||||
exports.batchtagging = batchtagging;
|
||||
exports.batchuntagging = batchuntagging;
|
||||
exports.getUserTags = getUserTags;
|
||||
exports.getUsers = getUsers;
|
||||
exports.getSubscribedUserInfo = getSubscribedUserInfo;
|
||||
exports.tagging = tagging;
|
||||
exports.syncToLocale = syncToLocale;
|
||||
exports.syncToWechat = syncToWechat;
|
||||
const tslib_1 = require("tslib");
|
||||
const WechatSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/WechatSDK"));
|
||||
const wechatPublicException_1 = require("../utils/wechatPublicException");
|
||||
|
|
@ -146,7 +154,6 @@ async function getTagUsers(params, context) {
|
|||
throw new types_1.OakPreConditionUnsetException(`${(0, wechatPublicException_1.handleException)(e)}`);
|
||||
}
|
||||
}
|
||||
exports.getTagUsers = getTagUsers;
|
||||
async function batchtagging(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -160,7 +167,6 @@ async function batchtagging(params, context) {
|
|||
const result = await wechatInstance.batchtagging(params.openIdList, params.tagId);
|
||||
return result;
|
||||
}
|
||||
exports.batchtagging = batchtagging;
|
||||
async function batchuntagging(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -174,7 +180,6 @@ async function batchuntagging(params, context) {
|
|||
const result = await wechatInstance.batchuntagging(params.openIdList, params.tagId);
|
||||
return result;
|
||||
}
|
||||
exports.batchuntagging = batchuntagging;
|
||||
async function getUserTags(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -193,7 +198,6 @@ async function getUserTags(params, context) {
|
|||
throw new types_1.OakPreConditionUnsetException(`${(0, wechatPublicException_1.handleException)(e)}`);
|
||||
}
|
||||
}
|
||||
exports.getUserTags = getUserTags;
|
||||
async function getUsers(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -212,7 +216,6 @@ async function getUsers(params, context) {
|
|||
throw new types_1.OakPreConditionUnsetException(`${(0, wechatPublicException_1.handleException)(e)}`);
|
||||
}
|
||||
}
|
||||
exports.getUsers = getUsers;
|
||||
async function getSubscribedUserInfo(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -231,7 +234,6 @@ async function getSubscribedUserInfo(params, context) {
|
|||
throw new types_1.OakPreConditionUnsetException(`${(0, wechatPublicException_1.handleException)(e)}`);
|
||||
}
|
||||
}
|
||||
exports.getSubscribedUserInfo = getSubscribedUserInfo;
|
||||
async function tagging(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -310,7 +312,6 @@ async function tagging(params, context) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.tagging = tagging;
|
||||
async function syncToLocale(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -390,7 +391,6 @@ async function syncToLocale(params, context) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.syncToLocale = syncToLocale;
|
||||
async function syncToWechat(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -454,4 +454,3 @@ async function syncToWechat(params, context) {
|
|||
}, {});
|
||||
}
|
||||
}
|
||||
exports.syncToWechat = syncToWechat;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createWechatLogin = void 0;
|
||||
exports.createWechatLogin = createWechatLogin;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
async function createWechatLogin(params, context) {
|
||||
const { type, interval } = params;
|
||||
|
|
@ -44,4 +44,3 @@ async function createWechatLogin(params, context) {
|
|||
}
|
||||
return id;
|
||||
}
|
||||
exports.createWechatLogin = createWechatLogin;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.deleteMenu = exports.deleteConditionalMenu = exports.createConditionalMenu = exports.createMenu = exports.getMenu = exports.getCurrentMenu = void 0;
|
||||
exports.getCurrentMenu = getCurrentMenu;
|
||||
exports.getMenu = getMenu;
|
||||
exports.createMenu = createMenu;
|
||||
exports.createConditionalMenu = createConditionalMenu;
|
||||
exports.deleteConditionalMenu = deleteConditionalMenu;
|
||||
exports.deleteMenu = deleteMenu;
|
||||
const tslib_1 = require("tslib");
|
||||
const WechatSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/WechatSDK"));
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
|
|
@ -39,7 +44,6 @@ async function getCurrentMenu(params, context) {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
exports.getCurrentMenu = getCurrentMenu;
|
||||
async function getMenu(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -66,7 +70,6 @@ async function getMenu(params, context) {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
exports.getMenu = getMenu;
|
||||
async function createMenu(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -104,7 +107,6 @@ async function createMenu(params, context) {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
exports.createMenu = createMenu;
|
||||
async function createConditionalMenu(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -143,7 +145,6 @@ async function createConditionalMenu(params, context) {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
exports.createConditionalMenu = createConditionalMenu;
|
||||
async function deleteConditionalMenu(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -157,7 +158,6 @@ async function deleteConditionalMenu(params, context) {
|
|||
const result = await wechatInstance.deleteConditionalMenu(params.menuId);
|
||||
return result;
|
||||
}
|
||||
exports.deleteConditionalMenu = deleteConditionalMenu;
|
||||
async function deleteMenu(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -171,4 +171,3 @@ async function deleteMenu(params, context) {
|
|||
const result = await wechatInstance.deleteMenu();
|
||||
return result;
|
||||
}
|
||||
exports.deleteMenu = deleteMenu;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.wechatMpJump = void 0;
|
||||
exports.wechatMpJump = wechatMpJump;
|
||||
const tslib_1 = require("tslib");
|
||||
const lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
const Projection_1 = require("../types/Projection");
|
||||
|
|
@ -51,4 +51,3 @@ async function wechatMpJump(params, context) {
|
|||
const result = await wechatInstance.getURLScheme({ jump_wxa, expireType, expiresAt, expireInterval });
|
||||
return result;
|
||||
}
|
||||
exports.wechatMpJump = wechatMpJump;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.oneKeySync = exports.syncTag = exports.deleteTag = exports.editTag = exports.getTags = exports.createTag = void 0;
|
||||
exports.createTag = createTag;
|
||||
exports.getTags = getTags;
|
||||
exports.editTag = editTag;
|
||||
exports.deleteTag = deleteTag;
|
||||
exports.syncTag = syncTag;
|
||||
exports.oneKeySync = oneKeySync;
|
||||
const tslib_1 = require("tslib");
|
||||
const WechatSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/WechatSDK"));
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
|
|
@ -67,7 +72,6 @@ async function createTag(params, context) {
|
|||
const result = await wechatInstance.createTag({ name: params.name });
|
||||
return result;
|
||||
}
|
||||
exports.createTag = createTag;
|
||||
async function getTags(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -81,7 +85,6 @@ async function getTags(params, context) {
|
|||
const result = await wechatInstance.getTags();
|
||||
return result;
|
||||
}
|
||||
exports.getTags = getTags;
|
||||
async function editTag(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -98,7 +101,6 @@ async function editTag(params, context) {
|
|||
});
|
||||
return result;
|
||||
}
|
||||
exports.editTag = editTag;
|
||||
async function deleteTag(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -112,7 +114,6 @@ async function deleteTag(params, context) {
|
|||
const result = await wechatInstance.deleteTag({ id: params.wechatId });
|
||||
return result;
|
||||
}
|
||||
exports.deleteTag = deleteTag;
|
||||
async function syncTag(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -197,7 +198,6 @@ async function syncTag(params, context) {
|
|||
throw new types_1.OakPreConditionUnsetException(`${(0, wechatPublicException_1.handleException)(e)}`);
|
||||
}
|
||||
}
|
||||
exports.syncTag = syncTag;
|
||||
async function oneKeySync(params, context) {
|
||||
const application = await getWechatPublicConfig(params.applicationId, context);
|
||||
(0, assert_1.assert)(application);
|
||||
|
|
@ -279,4 +279,3 @@ async function oneKeySync(params, context) {
|
|||
throw new types_1.OakPreConditionUnsetException(`${(0, wechatPublicException_1.handleException)(e)}`);
|
||||
}
|
||||
}
|
||||
exports.oneKeySync = oneKeySync;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getMpUnlimitWxaCode = exports.createWechatQrCode = void 0;
|
||||
exports.createWechatQrCode = createWechatQrCode;
|
||||
exports.getMpUnlimitWxaCode = getMpUnlimitWxaCode;
|
||||
const tslib_1 = require("tslib");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
|
|
@ -166,7 +167,7 @@ async function createWechatQrCode(options, context) {
|
|||
permanent,
|
||||
url,
|
||||
expired: false,
|
||||
expiresAt: Date.now() + 2592000 * 1000,
|
||||
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大,由上层关联对象来主动过期(by Xc, 20230131)
|
||||
props,
|
||||
};
|
||||
// 直接创建
|
||||
|
|
@ -218,7 +219,6 @@ async function createWechatQrCode(options, context) {
|
|||
data,
|
||||
}, {});
|
||||
}
|
||||
exports.createWechatQrCode = createWechatQrCode;
|
||||
async function getMpUnlimitWxaCode(wechatQrCodeId, context) {
|
||||
const [wechatQrCode] = await context.select('wechatQrCode', {
|
||||
data: {
|
||||
|
|
@ -257,4 +257,3 @@ async function getMpUnlimitWxaCode(wechatQrCodeId, context) {
|
|||
return str;
|
||||
}
|
||||
}
|
||||
exports.getMpUnlimitWxaCode = getMpUnlimitWxaCode;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.unbindingWechat = void 0;
|
||||
exports.unbindingWechat = unbindingWechat;
|
||||
const types_1 = require("oak-domain/lib/types");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
|
|
@ -67,4 +67,3 @@ async function unbindingWechat(params, context) {
|
|||
fn();
|
||||
}
|
||||
}
|
||||
exports.unbindingWechat = unbindingWechat;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DATA_SUBSCRIBER_KEYS = exports.LOCAL_STORAGE_KEYS = exports.getWechatPublicTags = exports.registerWechatPublicTags = exports.WechatPublicTags = void 0;
|
||||
exports.DATA_SUBSCRIBER_KEYS = exports.LOCAL_STORAGE_KEYS = exports.WechatPublicTags = void 0;
|
||||
exports.registerWechatPublicTags = registerWechatPublicTags;
|
||||
exports.getWechatPublicTags = getWechatPublicTags;
|
||||
exports.WechatPublicTags = {};
|
||||
function registerWechatPublicTags(_WechatPublicTags) {
|
||||
exports.WechatPublicTags = _WechatPublicTags;
|
||||
}
|
||||
exports.registerWechatPublicTags = registerWechatPublicTags;
|
||||
function getWechatPublicTags() {
|
||||
return exports.WechatPublicTags;
|
||||
}
|
||||
exports.getWechatPublicTags = getWechatPublicTags;
|
||||
exports.LOCAL_STORAGE_KEYS = {
|
||||
captchaSendAt: 'ogb:c-changePassword-byMobile-captchaSendAt',
|
||||
loginMode: 'ogb:c-user-login-loginMode',
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ exports.entityDesc = {
|
|||
zh_CN: {
|
||||
name: '直播流',
|
||||
attr: {
|
||||
title: '名称',
|
||||
title: '名称', // 用户定义直播间名称,
|
||||
streamTitle: '直播流名称',
|
||||
liveonly: '活跃状态',
|
||||
hub: '直播空间名称',
|
||||
hub: '直播空间名称', // 所属直播空间名称
|
||||
entity: '所属实体',
|
||||
entityId: '所属实体id',
|
||||
rtmpPushUrl: '推流地址',
|
||||
|
|
|
|||
|
|
@ -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<string, any>;
|
||||
state?: Record<string, any>;
|
||||
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<Schema, '', '', {
|
||||
type: QrCodeType;
|
||||
}>;
|
||||
|
|
@ -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',
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.initialize = exports.create = void 0;
|
||||
exports.create = create;
|
||||
exports.initialize = initialize;
|
||||
const tslib_1 = require("tslib");
|
||||
const token_1 = require("./token");
|
||||
const extraFile_1 = require("./extraFile");
|
||||
|
|
@ -37,7 +38,6 @@ function create(basicFeatures) {
|
|||
userWechatPublicTag,
|
||||
};
|
||||
}
|
||||
exports.create = create;
|
||||
const selectionRewriter_1 = require("../utils/selectionRewriter");
|
||||
async function initialize(features, access, config, clazzes) {
|
||||
features.cache.registerSelectionRewriter(selectionRewriter_1.rewriteSelection);
|
||||
|
|
@ -56,4 +56,3 @@ async function initialize(features, access, config, clazzes) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.initialize = initialize;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = useFeatures;
|
||||
const features_1 = require("oak-frontend-base/es/platforms/web/features");
|
||||
// react 独有
|
||||
function useFeatures() {
|
||||
return (0, features_1.useFeatures)();
|
||||
}
|
||||
exports.default = useFeatures;
|
||||
;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = useMyInfo;
|
||||
const tslib_1 = require("tslib");
|
||||
const react_1 = require("react");
|
||||
const useFeatures_1 = tslib_1.__importDefault(require("./useFeatures"));
|
||||
|
|
@ -54,4 +55,3 @@ function useMyInfo() {
|
|||
mobile,
|
||||
};
|
||||
}
|
||||
exports.default = useMyInfo;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export type WechatMpConfig = {
|
|||
appSecret: string;
|
||||
originalId?: string;
|
||||
qrCodePrefix?: string;
|
||||
getPhone?: boolean;
|
||||
server?: {
|
||||
url?: string;
|
||||
token: string;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
module: String<64>;
|
||||
position: String<188>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { Action, ParticularAction } from "./Action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { Action, ParticularAction, IState } from "./Action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
targetEntity: String<32>;
|
||||
entity: String<32>;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { AppendOnlyAction } from "oak-domain/lib/actions/action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
modiId: ForeignKey<"modi">;
|
||||
entity: String<32>;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { Action, ParticularAction, IState } from "./Action";
|
||||
import { String, Datetime } from "oak-domain/lib/types/DataType";
|
||||
import { String, Datetime } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
action: String<24>;
|
||||
data: Object;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { AppendOnlyAction } from "oak-domain/lib/actions/action";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
operId: ForeignKey<"oper">;
|
||||
entity: String<32>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String, Boolean } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
destEntity: String<32>;
|
||||
value: String<256>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
entity: "platform" | "session" | "toDo" | string;
|
||||
entityId?: String<64> | null;
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./_baseSchema"), exports);
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
import { StorageDesc } from "oak-domain/lib/types/Storage";
|
||||
import { OpSchema } from "./Schema";
|
||||
export declare const desc: StorageDesc<OpSchema>;
|
||||
|
|
@ -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',
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
import { Action, OpSchema } from "./Schema";
|
||||
import { StyleDef } from "oak-domain/lib/types/Style";
|
||||
export declare const style: StyleDef<OpSchema, Action>;
|
||||
|
|
@ -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',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -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<string, any>;
|
||||
state?: Record<string, any>;
|
||||
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<QrCodeType>;
|
||||
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<WechatQrCodeProps>;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
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<WechatQrCodeProps>;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
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<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
export type OpUpdateAction = "update" | string;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
|
|
@ -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": "公众号回复小程序码"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
uegId: ForeignKey<"userEntityGrant">;
|
||||
userId: ForeignKey<"user">;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } 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 } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "../../../node_modules/oak-domain/src/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
relationId: ForeignKey<"relation">;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "mobile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "system", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "passport", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthApplication", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthProvider", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUser", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUserAuthorization", import("../context/BackendRuntimeContext").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "mobile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUser", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthProvider", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthApplication", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "passport", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "system", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUserAuthorization", import("../context/BackendRuntimeContext").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.tryMakeEmailNotification = exports.tryMakeSmsNotification = exports.registerMessageNotificationConverters = void 0;
|
||||
exports.registerMessageNotificationConverters = registerMessageNotificationConverters;
|
||||
exports.tryMakeSmsNotification = tryMakeSmsNotification;
|
||||
exports.tryMakeEmailNotification = tryMakeEmailNotification;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
|
|
@ -11,7 +13,6 @@ function registerMessageNotificationConverters(converters) {
|
|||
ConverterDict[ele.type] = ele;
|
||||
});
|
||||
}
|
||||
exports.registerMessageNotificationConverters = registerMessageNotificationConverters;
|
||||
const InitialChannelByWeightMatrix = {
|
||||
high: ['wechatMp', 'wechatPublic', 'sms', 'email'],
|
||||
medium: ['wechatMp', 'wechatPublic', 'email'],
|
||||
|
|
@ -46,7 +47,6 @@ async function tryMakeSmsNotification(message, context) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.tryMakeSmsNotification = tryMakeSmsNotification;
|
||||
async function tryMakeEmailNotification(message, context) {
|
||||
const { userId, type, entity, entityId, router } = message;
|
||||
const converter = ConverterDict[type] && ConverterDict[type].toEmail;
|
||||
|
|
@ -61,7 +61,6 @@ async function tryMakeEmailNotification(message, context) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.tryMakeEmailNotification = tryMakeEmailNotification;
|
||||
async function createNotification(message, context) {
|
||||
const { restriction, userId, weight, type, entity, entityId, platformId, channels } = message;
|
||||
(0, assert_1.assert)(userId);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ async function sendNotification(notification, context) {
|
|||
await instance.sendSubscribedMessage({
|
||||
templateId: templateId,
|
||||
data: data,
|
||||
openId: data1.openId,
|
||||
openId: data1.openId, // 在notification创建时就赋值了
|
||||
page,
|
||||
state: StateDict[process.env.NODE_ENV],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export declare function createToDo<ED extends EntityDict & BaseEntityDict, T ext
|
|||
redirectTo: EntityDict['toDo']['OpSchema']['redirectTo'];
|
||||
entity: any;
|
||||
entityId: string;
|
||||
}, userIds?: string[]): Promise<0 | 1>;
|
||||
}, userIds?: string[]): Promise<1 | 0>;
|
||||
/**
|
||||
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
||||
* 必须在entity的action的后trigger中调用
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.completeToDo = exports.createToDo = void 0;
|
||||
exports.createToDo = createToDo;
|
||||
exports.completeToDo = completeToDo;
|
||||
const tslib_1 = require("tslib");
|
||||
const lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
const RelationAuth_1 = require("oak-domain/lib/store/RelationAuth");
|
||||
|
|
@ -73,7 +74,6 @@ async function createToDo(entity, filter, action, context, data, userIds) {
|
|||
}, { dontCollect: true });
|
||||
return 1;
|
||||
}
|
||||
exports.createToDo = createToDo;
|
||||
/**
|
||||
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
||||
* 必须在entity的action的后trigger中调用
|
||||
|
|
@ -120,4 +120,3 @@ async function completeToDo(entity, filter, action, context) {
|
|||
}
|
||||
return completed;
|
||||
}
|
||||
exports.completeToDo = completeToDo;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.makeException = exports.OakIncompleteConfig = exports.OakCantChangeVerifiedUser = exports.OakHasToVerifyPassword = exports.OakPasswordUnset = exports.OakUploadException = exports.OakApplicationLoadingException = exports.OakUserInfoLoadingException = exports.OakMpHaveToSubscribeMessage = exports.OakTokenExpiredException = exports.OakUserDisabledException = exports.OakUserInfoUncompletedException = exports.OakAuthenticationException = exports.OakMobileUnsetException = exports.OakChangeLoginWayException = exports.OakDistinguishUserException = void 0;
|
||||
exports.OakIncompleteConfig = exports.OakCantChangeVerifiedUser = exports.OakHasToVerifyPassword = exports.OakPasswordUnset = exports.OakUploadException = exports.OakApplicationLoadingException = exports.OakUserInfoLoadingException = exports.OakMpHaveToSubscribeMessage = exports.OakTokenExpiredException = exports.OakUserDisabledException = exports.OakUserInfoUncompletedException = exports.OakAuthenticationException = exports.OakMobileUnsetException = exports.OakChangeLoginWayException = exports.OakDistinguishUserException = void 0;
|
||||
exports.makeException = makeException;
|
||||
const types_1 = require("oak-domain/lib/types");
|
||||
class OakDistinguishUserException extends types_1.OakUserException {
|
||||
userId;
|
||||
|
|
@ -211,4 +212,3 @@ function makeException(data) {
|
|||
return e;
|
||||
}
|
||||
}
|
||||
exports.makeException = makeException;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.oakGetPackageJsonVersion = void 0;
|
||||
exports.oakGetPackageJsonVersion = oakGetPackageJsonVersion;
|
||||
// 命名为这个函数,将在编译时被注入项目根目录的package.json中的version
|
||||
function oakGetPackageJsonVersion() {
|
||||
return '1.0.0';
|
||||
}
|
||||
exports.oakGetPackageJsonVersion = oakGetPackageJsonVersion;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.composeLocationUrl = void 0;
|
||||
exports.composeLocationUrl = composeLocationUrl;
|
||||
function composeLocationUrl(location, url, props) {
|
||||
const { port, protocol, hostname } = location;
|
||||
let Url = `${protocol}//${hostname}`;
|
||||
|
|
@ -21,4 +21,3 @@ function composeLocationUrl(location, url, props) {
|
|||
}
|
||||
return Url;
|
||||
}
|
||||
exports.composeLocationUrl = composeLocationUrl;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.makeAreaDecendantFilter = exports.makeAreaAncestorFilter = void 0;
|
||||
exports.makeAreaAncestorFilter = makeAreaAncestorFilter;
|
||||
exports.makeAreaDecendantFilter = makeAreaDecendantFilter;
|
||||
const filter_1 = require("oak-domain/lib/store/filter");
|
||||
function makeAreaAncestorFilter(filter, level = 1, includeAll, includeSelf) {
|
||||
return (0, filter_1.makeTreeAncestorFilter)('area', 'parentId', filter, level, includeAll, includeSelf);
|
||||
}
|
||||
exports.makeAreaAncestorFilter = makeAreaAncestorFilter;
|
||||
function makeAreaDecendantFilter(filter, level = 1, includeAll, includeSelf) {
|
||||
return (0, filter_1.makeTreeDescendantFilter)('area', 'parentId', filter, level, includeAll, includeSelf);
|
||||
}
|
||||
exports.makeAreaDecendantFilter = makeAreaDecendantFilter;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.composeFileUrl = exports.getCosBackend = exports.registerCosBackend = void 0;
|
||||
exports.registerCosBackend = registerCosBackend;
|
||||
exports.getCosBackend = getCosBackend;
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const ctyun_backend_1 = tslib_1.__importDefault(require("./ctyun.backend"));
|
||||
|
|
@ -27,15 +29,12 @@ function registerCosBackend(clazz) {
|
|||
const instance = new clazz();
|
||||
CosBackendDict[instance.name] = instance;
|
||||
}
|
||||
exports.registerCosBackend = registerCosBackend;
|
||||
function getCosBackend(origin) {
|
||||
(0, assert_1.assert)(CosBackendDict.hasOwnProperty(origin));
|
||||
return CosBackendDict[origin];
|
||||
}
|
||||
exports.getCosBackend = getCosBackend;
|
||||
function composeFileUrl(application, extraFile, style) {
|
||||
const { origin } = extraFile;
|
||||
const cos = CosBackendDict[origin];
|
||||
return cos.composeFileUrl(application, extraFile, style);
|
||||
}
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.composeFileUrl = exports.getCos = exports.registerCos = void 0;
|
||||
exports.registerCos = registerCos;
|
||||
exports.getCos = getCos;
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const unknown_1 = tslib_1.__importDefault(require("./unknown"));
|
||||
|
|
@ -15,15 +17,12 @@ function registerCos(clazz) {
|
|||
const instance = new clazz();
|
||||
CosDict[instance.name] = instance;
|
||||
}
|
||||
exports.registerCos = registerCos;
|
||||
function getCos(origin) {
|
||||
(0, assert_1.assert)(CosDict.hasOwnProperty(origin));
|
||||
return CosDict[origin];
|
||||
}
|
||||
exports.getCos = getCos;
|
||||
function composeFileUrl(application, extraFile, style) {
|
||||
const { origin } = extraFile;
|
||||
const cos = CosDict[origin];
|
||||
return cos.composeFileUrl(application, extraFile, style);
|
||||
}
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.composeServerUrl = exports.composeDomainUrl = void 0;
|
||||
exports.composeDomainUrl = composeDomainUrl;
|
||||
exports.composeServerUrl = composeServerUrl;
|
||||
function composeDomainUrl(domain, url, props) {
|
||||
const { port, protocol, apiPath, url: domainUrl } = domain;
|
||||
let Url = `${protocol}//${domainUrl}`;
|
||||
|
|
@ -21,7 +22,6 @@ function composeDomainUrl(domain, url, props) {
|
|||
}
|
||||
return Url;
|
||||
}
|
||||
exports.composeDomainUrl = composeDomainUrl;
|
||||
function composeServerUrl(domain, url, props) {
|
||||
const { port, protocol, apiPath, url: domainUrl } = domain;
|
||||
let Url = `${protocol}//${domainUrl}`;
|
||||
|
|
@ -45,4 +45,3 @@ function composeServerUrl(domain, url, props) {
|
|||
}
|
||||
return Url;
|
||||
}
|
||||
exports.composeServerUrl = composeServerUrl;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.sendEmail = void 0;
|
||||
exports.sendEmail = sendEmail;
|
||||
async function sendEmail(options, context) {
|
||||
const { text, html } = options;
|
||||
console.log('邮件内容:', html || text);
|
||||
}
|
||||
exports.sendEmail = sendEmail;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.sendEmail = exports.getOrigin = exports.getEmail = exports.registerEmail = void 0;
|
||||
exports.registerEmail = registerEmail;
|
||||
exports.getEmail = getEmail;
|
||||
exports.getOrigin = getOrigin;
|
||||
exports.sendEmail = sendEmail;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const node_mailer_1 = tslib_1.__importDefault(require("./node-mailer"));
|
||||
|
|
@ -15,16 +18,13 @@ function registerEmail(clazz) {
|
|||
const instance = new clazz();
|
||||
EmailDict[instance.name] = instance;
|
||||
}
|
||||
exports.registerEmail = registerEmail;
|
||||
function getEmail(origin) {
|
||||
(0, assert_1.assert)(EmailDict.hasOwnProperty(origin));
|
||||
return EmailDict[origin];
|
||||
}
|
||||
exports.getEmail = getEmail;
|
||||
function getOrigin() {
|
||||
return Object.keys(EmailDict);
|
||||
}
|
||||
exports.getOrigin = getOrigin;
|
||||
async function sendEmail(options, context) {
|
||||
try {
|
||||
const instance = getEmail('nodemailer');
|
||||
|
|
@ -38,4 +38,3 @@ async function sendEmail(options, context) {
|
|||
};
|
||||
}
|
||||
}
|
||||
exports.sendEmail = sendEmail;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.bytesToSize = exports.getFileURL = void 0;
|
||||
exports.getFileURL = getFileURL;
|
||||
exports.bytesToSize = bytesToSize;
|
||||
//获取file文件url
|
||||
function getFileURL(file) {
|
||||
let getUrl = '';
|
||||
|
|
@ -20,7 +21,6 @@ function getFileURL(file) {
|
|||
}
|
||||
return getUrl;
|
||||
}
|
||||
exports.getFileURL = getFileURL;
|
||||
function bytesToSize(size) {
|
||||
let data = '';
|
||||
if (size < 0.1 * 1024) {
|
||||
|
|
@ -50,4 +50,3 @@ function bytesToSize(size) {
|
|||
return sizeStr.substring(0, index) + sizeStr.substring(index + 3, 2);
|
||||
return sizeStr;
|
||||
}
|
||||
exports.bytesToSize = bytesToSize;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getConfig = void 0;
|
||||
exports.getConfig = getConfig;
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const Exception_1 = require("oak-domain/lib/types/Exception");
|
||||
const oak_external_sdk_1 = require("oak-external-sdk");
|
||||
|
|
@ -84,4 +84,3 @@ function getConfig(systemConfig, service, origin) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.getConfig = getConfig;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getPlayBackUrl = exports.getStreamObj = exports.getLivestream = void 0;
|
||||
exports.getLivestream = getLivestream;
|
||||
exports.getStreamObj = getStreamObj;
|
||||
exports.getPlayBackUrl = getPlayBackUrl;
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const getContextConfig_1 = require("./getContextConfig");
|
||||
/**
|
||||
|
|
@ -27,7 +29,6 @@ async function getLivestream(params, context) {
|
|||
expireAt,
|
||||
};
|
||||
}
|
||||
exports.getLivestream = getLivestream;
|
||||
// 获取推拉流地址
|
||||
/**
|
||||
* 直播流已存在的情况下,获取推拉流地址
|
||||
|
|
@ -52,7 +53,6 @@ async function getStreamObj(params, context) {
|
|||
expireAt,
|
||||
};
|
||||
}
|
||||
exports.getStreamObj = getStreamObj;
|
||||
// 生成直播回放
|
||||
async function getPlayBackUrl(params, context) {
|
||||
const { streamTitle, start, end, origin } = params;
|
||||
|
|
@ -61,4 +61,3 @@ async function getPlayBackUrl(params, context) {
|
|||
const { hub, playBackDomain, liveHost } = config;
|
||||
return instance.getPlayBackUrl(hub, playBackDomain, streamTitle, start, end, 'POST', liveHost);
|
||||
}
|
||||
exports.getPlayBackUrl = getPlayBackUrl;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.checkOauthTokenAvaliable = exports.processUserInfo = exports.registerUserinfoHandler = void 0;
|
||||
exports.processUserInfo = exports.registerUserinfoHandler = void 0;
|
||||
exports.checkOauthTokenAvaliable = checkOauthTokenAvaliable;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const Projection_1 = require("../../types/Projection");
|
||||
const handler_1 = require("./handler");
|
||||
|
|
@ -101,4 +102,3 @@ async function checkOauthTokenAvaliable(context, token) {
|
|||
}, {});
|
||||
return { error: null, tokenRecord };
|
||||
}
|
||||
exports.checkOauthTokenAvaliable = checkOauthTokenAvaliable;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getAndCheckPassportByEmail = void 0;
|
||||
exports.getAndCheckPassportByEmail = getAndCheckPassportByEmail;
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const types_1 = require("oak-domain/lib/types");
|
||||
async function getAndCheckPassportByEmail(context, email) {
|
||||
|
|
@ -49,4 +49,3 @@ async function getAndCheckPassportByEmail(context, email) {
|
|||
config
|
||||
};
|
||||
}
|
||||
exports.getAndCheckPassportByEmail = getAndCheckPassportByEmail;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue