-
Notifications
You must be signed in to change notification settings - Fork 100
/
sam-wx.yml
224 lines (224 loc) · 7.75 KB
/
sam-wx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
TCBSAMFormatVersion: '2020-10-20'
Name: wx-ext-cms
SpecVersion: v1beta
Version: 2.13.19
License: Apache-2.0
Category: CloudApp
DisplayName: 内容管理(CMS)
Description: 方便开发人员和内容运营者,随时随地管理小程序/Web 等多端云开发内容数据,支持文本、富文本、图片、文件、关联类型等多种内容类型的可视化编辑
Tags:
- 快速使用
- 典型示例
- 内容管理
- 免开发
# 后付费环境才可以开通
# EnvType: PostPay
SourceUrl: https://github.com/TencentCloudBase/cloudbase-extension-cms
ReleaseNotesUrl: https://github.com/TencentCloudBase/cloudbase-extension-cms/releases
IconUrl: https://main.qcloudimg.com/raw/f87b49914efe502722f9aa128f5d8865/hello_world.svg
IntroUrl: https://docs.cloudbase.net/cms/intro.html
# 更新日志
ChangeLog:
- Title: 2.13.19
Content:
- 营销短信发送失败,提示“运营商未公布原因”问题修复
Author:
AuthorName: TCB
Email: cloudbase@tencent.com
Url: https://cloud.tencent.com
Contributors:
- AuthorName: chhpt
Email: cwuyiqing@gmail.com
Url: http://github.com/chhpt
- AuthorName: bookerzhao
Email: being99@qq.com
Url: https://github.com/binggg
Resources:
# API 服务函数
AuthFunction:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-service
CodeUri: extension://281f170d88db4b05b9f3a34b8eaad209.zip
InstallDependency: true
Description: 提供 CMS 管理服务,所有对内容的操作和管理都会经过此函数调用,内容操作会根据用户权限来进行数据库操作
MemorySize: 256
Timeout: 15
HttpPath: /wx-ext-cms-service
Runtime: Nodejs10.15
Handler: index.main
Role: TCB_QcsRole
Environment:
Variables:
WX_MP: 'true'
NODE_ENV: production
CMS_RESOURCE_PREFIX: wx-ext-cms
# 初始化函数
InitFunction:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-init
CodeUri: extension://322df2a2bd7147dcade77c3076886621.zip
InstallDependency: true
Description: 提供初始化应用功能,安装扩展后,会通过该函数来进行静态资源的部署和密码的生成和设置,修改账号密码或者部署路径等扩展参数都会再次执行该函数来进行更新
MemorySize: 256
Timeout: 30
Runtime: Nodejs10.15
Handler: index.main
Role: TCB_QcsRole
Environment:
Variables:
WX_MP: 'true'
CMS_DOC_LINK: 'https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/extensions/cms/introduction.html'
CMS_HELP_LINK: 'https://developers.weixin.qq.com/community/minihome/mixflow/1286298401038155776'
CMS_OFFICIALSITE_LINK: 'https://mp.weixin.qq.com/cgi-bin/wx'
CMS_RESOURCE_PREFIX: wx-ext-cms
CMS_DEPLOY_PATH: '/wx-cms/'
WX_MP_APP_ID: ''
# Restful api 函数
RestfulApiFunction:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-api
CodeUri: extension://dd88fe6113704c9cbc7a4335c8dc4b1a.zip
InstallDependency: true
Description: 提供 CMS RESTful API 访问能力,所有 RESTful API 请求都会经过此函数调用
MemorySize: 256
Timeout: 15
Runtime: Nodejs10.15
Handler: index.main
Role: TCB_QcsRole
Environment:
Variables:
NODE_ENV: production
CMS_RESOURCE_PREFIX: wx-ext-cms
# 短信服务
SMSFunction:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-sms
CodeUri: extension://637a52a70d204d83a867410dd132f113.zip
InstallDependency: true
Description: 提供短信发送、生成 url schema 功能
MemorySize: 256
Timeout: 60
Runtime: Nodejs10.15
Handler: index.main
Role: TCB_QcsRole
Environment:
Variables:
NODE_ENV: production
CMS_RESOURCE_PREFIX: wx-ext-cms
# 微信 OpenAPI 服务
OpenapiFunction:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-openapi
CodeUri: extension://a29c838886f742f59b826ca9eb4034f3.zip
InstallDependency: true
Description: 提供调用微信 Openapi 接口的能力
MemorySize: 2048
Timeout: 60
Runtime: Nodejs10.15
Handler: index.main
Role: TCB_QcsRole
Environment:
Variables:
WX_MP: 'true'
NODE_ENV: production
CMS_RESOURCE_PREFIX: wx-ext-cms
# 营销工具 OpenAPI 服务
OpenapiFxFunction:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-fx-openapi
CodeUri: extension://2a127ac75c8847af8cfdb39fe989bd57.zip
InstallDependency: true
Description: 提供调用微信 Openapi 接口的能力
MemorySize: 1024
Timeout: 60
Runtime: Nodejs10.15
Handler: index.main
Role: TCB_QcsRole
Environment:
Variables:
NODE_ENV: production
CMS_RESOURCE_PREFIX: wx-ext-cms
ProjectDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-projects
Description: CMS 系统项目数据(请不要手动修改)
AclTag: ADMINONLY
# 系统内容数据集合
SchemaDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-schemas
Description: CMS 系统内容模型数据(请不需要手动修改)
AclTag: ADMINONLY
# 系统用户数据集合
UsersDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-users
Description: CMS 系统系统用户数据,存储 CMS 的用户信息,包括管理员账号信息,角色信息等(请不要手动修改)
AclTag: ADMINONLY
# 系统 webhook 数据集合
WebhookDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-webhooks
Description: CMS 系统 webhook 集合,存储 CMS 系统的回调接口配置,CMS 系统数据的变更可以通过回调来进行同步 (请不要手动修改)
AclTag: ADMINONLY
# webhook 执行记录
WebhookLogDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-webhook-log
Description: CMS webhook 执行记录集合(请不要手动修改)
AclTag: ADMINONLY
SettingDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-settings
Description: CMS 系统系统配置集合,存储 CMS 系统的设置(请不要手动修改)
AclTag: ADMINONLY
RoleDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-user-roles
Description: CMS 系统用户角色配置集合,存储 CMS 系统的自定义用户角色信息(请不要手动修改)
AclTag: ADMINONLY
MigrateDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-data-migrate
Description: CMS 导入、导出数据行为、状态记录(请不要手动修改)
AclTag: ADMINONLY
MessageTaskDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-sms-tasks
Description: CMS 短信发送任务记录(请不要手动修改)
AclTag: ADMINONLY
MessageActivityDB:
Type: CloudBase::FlexDB
Properties:
CollectionName: wx-ext-cms-sms-activities
Description: CMS 营销活动记录(请不要手动修改)
AclTag: ADMINONLY
# 开通静态托管
StaticStore:
Type: CloudBase::StaticStore
Properties:
Description: CMS 系统前端界面,基于 React 开发,通过小程序云开发 Web SDK 访问 CMS 的函数、数据库和存储等资源 (请不要手动修改)
# 配置
Config:
# 初始化脚本
InstalledHook:
- FunctionName: wx-ext-cms-init
EntryPoint:
- Label: 默认访问地址(静态网站托管域名 + 部署路径)
EntryType: StaticStore
HttpPath: /wx-cms/