From 3197bf92e880a2f9ae0e14c78d0557d555e1aa8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Fri, 24 Jun 2022 10:50:24 +0800 Subject: [PATCH] feat: uni-id-users 1.0.0 --- collection/uni-id-users/collection.json | 174 +++++++++++++++++++++++- collection/uni-id-users/package.json | 2 +- 2 files changed, 169 insertions(+), 7 deletions(-) diff --git a/collection/uni-id-users/collection.json b/collection/uni-id-users/collection.json index 66abaa1..4ead6cc 100644 --- a/collection/uni-id-users/collection.json +++ b/collection/uni-id-users/collection.json @@ -162,13 +162,21 @@ "bsonType": "object", "description": "微信各个平台openid", "properties": { - "app-plus": { + "app": { "bsonType": "string", "description": "app平台微信openid" }, - "mp-weixin": { + "mp": { "bsonType": "string", "description": "微信小程序平台openid" + }, + "h5": { + "bsonType": "string", + "description": "微信公众号平台openid" + }, + "web": { + "bsonType": "string", + "description": "微信网页登录openid" } } }, @@ -191,6 +199,100 @@ "description": "备注", "trim": "both" }, + "third_party" : { + "bsonType": "object", + "description": "缓存用户在三方平台的token等信息", + "properties": { + "mp_weixin": { + "bsonType": "object", + "description": "微信小程序相关信息", + "properties": { + "session_key": { + "bsonType": "string", + "description": "微信小程序session key" + } + } + }, + "app_weixin": { + "bsonType": "object", + "description": "app平台微信相关信息", + "properties": { + "access_token": { + "bsonType": "string", + "description": "app平台微信access token" + }, + "access_token_expired": { + "bsonType": "string", + "description": "app平台微信access token过期时间" + }, + "refresh_token": { + "bsonType": "string", + "description": "app平台微信refresh token" + } + } + }, + "h5_weixin": { + "bsonType": "object", + "description": "微信公众号平台微信相关信息", + "properties": { + "access_token": { + "bsonType": "string", + "description": "微信公众号平台access token" + }, + "access_token_expired": { + "bsonType": "string", + "description": "微信公众号平台access token过期时间" + }, + "refresh_token": { + "bsonType": "string", + "description": "微信公众号平台refresh token" + } + } + }, + "web_weixin": { + "bsonType": "object", + "description": "web平台微信相关信息", + "properties": { + "access_token": { + "bsonType": "string", + "description": "web平台微信access token" + }, + "access_token_expired": { + "bsonType": "string", + "description": "web平台微信access token过期时间" + }, + "refresh_token": { + "bsonType": "string", + "description": "web平台微信refresh token" + } + } + }, + "mp_qq": { + "bsonType": "object", + "description": "QQ小程序相关信息", + "properties": { + "session_key": { + "bsonType": "string", + "description": "QQ小程序session key" + } + } + }, + "app_qq": { + "bsonType": "object", + "description": "app平台QQ相关信息", + "properties": { + "access_token": { + "bsonType": "string", + "description": "app平台QQ access token" + }, + "access_token_expired": { + "bsonType": "string", + "description": "app平台QQ access token过期时间" + } + } + } + } + }, "register_env": { "bsonType": "object", "description": "注册环境信息", @@ -375,11 +477,11 @@ } }, { - "IndexName": "wx_openid.app-plus", + "IndexName": "wx_openid.app", "MgoKeySchema": { "MgoIndexKeys": [ { - "Name": "wx_openid.app-plus", + "Name": "wx_openid.app", "Direction": "1" } ], @@ -387,11 +489,35 @@ } }, { - "IndexName": "wx_openid.mp-weixin", + "IndexName": "wx_openid.mp", "MgoKeySchema": { "MgoIndexKeys": [ { - "Name": "wx_openid.mp-weixin", + "Name": "wx_openid.mp", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "wx_openid.h5", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "wx_openid.h5", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "wx_openid.web", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "wx_openid.web", "Direction": "1" } ], @@ -410,6 +536,42 @@ "MgoIsUnique": false } }, + { + "IndexName": "qq_openid.app", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "qq_openid.app", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "qq_openid.mp", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "qq_openid.mp", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "qq_unionid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "qq_unionid", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, { "IndexName": "ali_openid", "MgoKeySchema": { diff --git a/collection/uni-id-users/package.json b/collection/uni-id-users/package.json index 066c930..6eda3aa 100644 --- a/collection/uni-id-users/package.json +++ b/collection/uni-id-users/package.json @@ -1,6 +1,6 @@ { "name": "@opendb/uni-id-users", - "version": "0.0.1", + "version": "1.0.0", "description": "uni-id-users", "keywords": ["uni-id", "用户管理", "登录", "注册"], "opendb": {