@rezti/dsh-rez-suite 0.1.49 → 0.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/CHANGELOG.md +13 -2
  2. package/README.md +3 -3
  3. package/README.zh.md +2 -2
  4. package/cordis.patch.yml +1 -1
  5. package/lib/client.d.ts +31 -3
  6. package/lib/client.js +343 -7
  7. package/lib/index.js +244 -15
  8. package/lib/style.css +7 -0
  9. package/package.json +12 -11
  10. package/src/boss/mount.ts +4 -3
  11. package/src/boss/register.ts +1 -1
  12. package/src/boss/seed.ts +34 -0
  13. package/src/changelog.ts +48 -0
  14. package/src/channel-board.ts +55 -0
  15. package/src/client/locales.ts +62 -6
  16. package/src/client/panel/BoardTab.tsx +136 -0
  17. package/src/client/panel/ConfigTab.tsx +2 -2
  18. package/src/client/panel/StatusTab.tsx +31 -0
  19. package/src/client/panel/panel.module.css +7 -0
  20. package/src/client/settings-card.tsx +4 -1
  21. package/src/index.ts +3 -2
  22. package/src/protocol.ts +14 -0
  23. package/src/routes.ts +7 -1
  24. package/src/tools.ts +49 -6
  25. package/src/wecom-cli.ts +125 -0
  26. package/templates/boss/ops/AGENTS.md +2 -0
  27. package/templates/shared/wecom-cli.SOURCE.md +9 -0
  28. package/templates/shared/wecom-office/SKILL.md +32 -0
  29. package/templates/shared/wecomcli-calendar/SKILL.md +303 -0
  30. package/templates/shared/wecomcli-calendar/references/calendar-agenda.md +224 -0
  31. package/templates/shared/wecomcli-calendar/references/calendar-cancel.md +108 -0
  32. package/templates/shared/wecomcli-calendar/references/calendar-create.md +238 -0
  33. package/templates/shared/wecomcli-calendar/references/calendar-freebusy.md +207 -0
  34. package/templates/shared/wecomcli-calendar/references/calendar-meeting-room.md +170 -0
  35. package/templates/shared/wecomcli-calendar/references/calendar-search.md +206 -0
  36. package/templates/shared/wecomcli-calendar/references/calendar-update.md +272 -0
  37. package/templates/shared/wecomcli-contact/SKILL.md +58 -0
  38. package/templates/shared/wecomcli-disk/SKILL.md +389 -0
  39. package/templates/shared/wecomcli-doc/SKILL.md +137 -0
  40. package/templates/shared/wecomcli-doc/references/doc-contents-append.md +20 -0
  41. package/templates/shared/wecomcli-doc/references/doc-contents-overwrite.md +27 -0
  42. package/templates/shared/wecomcli-doc/references/doc-create.md +161 -0
  43. package/templates/shared/wecomcli-doc/scripts/build_docx.py +1375 -0
  44. package/templates/shared/wecomcli-doc-manage/SKILL.md +132 -0
  45. package/templates/shared/wecomcli-doc-manage/references/doc-members-update.md +24 -0
  46. package/templates/shared/wecomcli-doc-manage/references/doc-names-update.md +20 -0
  47. package/templates/shared/wecomcli-doc-manage/references/doc-rules-update.md +22 -0
  48. package/templates/shared/wecomcli-email/SKILL.md +218 -0
  49. package/templates/shared/wecomcli-email/references/forward-mail.md +131 -0
  50. package/templates/shared/wecomcli-email/references/get-mail.md +166 -0
  51. package/templates/shared/wecomcli-email/references/reply-mail.md +138 -0
  52. package/templates/shared/wecomcli-email/references/search-mail.md +111 -0
  53. package/templates/shared/wecomcli-email/references/security.md +53 -0
  54. package/templates/shared/wecomcli-email/references/send-mail.md +186 -0
  55. package/templates/shared/wecomcli-email/references/send-schedule.md +83 -0
  56. package/templates/shared/wecomcli-media/SKILL.md +98 -0
  57. package/templates/shared/wecomcli-meeting/SKILL.md +373 -0
  58. package/templates/shared/wecomcli-meeting/references/meeting-cancel.md +113 -0
  59. package/templates/shared/wecomcli-meeting/references/meeting-create.md +167 -0
  60. package/templates/shared/wecomcli-meeting/references/meeting-list.md +226 -0
  61. package/templates/shared/wecomcli-meeting/references/meeting-original-get.md +98 -0
  62. package/templates/shared/wecomcli-meeting/references/meeting-search.md +173 -0
  63. package/templates/shared/wecomcli-meeting/references/meeting-update.md +217 -0
  64. package/templates/shared/wecomcli-message/SKILL.md +200 -0
  65. package/templates/shared/wecomcli-shared/SKILL.md +73 -0
  66. package/templates/shared/wecomcli-sheet/SKILL.md +172 -0
  67. package/templates/shared/wecomcli-sheet/references/sheet-contents-update.md +47 -0
  68. package/templates/shared/wecomcli-sheet/references/sheet-ranges-get.md +45 -0
  69. package/templates/shared/wecomcli-sheet/references/sheet-rows-append.md +45 -0
  70. package/templates/shared/wecomcli-sheet/references/sheet-subsheets-add.md +26 -0
  71. package/templates/shared/wecomcli-sheet/references/sheet-subsheets-delete.md +20 -0
  72. package/templates/shared/wecomcli-smartpage/SKILL.md +170 -0
  73. package/templates/shared/wecomcli-smartpage/references/data-driven-pages.md +50 -0
  74. package/templates/shared/wecomcli-smartpage/references/formula/arraylist.md +369 -0
  75. package/templates/shared/wecomcli-smartpage/references/formula/datetime.md +283 -0
  76. package/templates/shared/wecomcli-smartpage/references/formula/logic.md +247 -0
  77. package/templates/shared/wecomcli-smartpage/references/formula/math.md +362 -0
  78. package/templates/shared/wecomcli-smartpage/references/formula/operators.md +246 -0
  79. package/templates/shared/wecomcli-smartpage/references/formula/pageblock.md +76 -0
  80. package/templates/shared/wecomcli-smartpage/references/formula/templates.md +410 -0
  81. package/templates/shared/wecomcli-smartpage/references/formula/text.md +377 -0
  82. package/templates/shared/wecomcli-smartpage/references/formula/user.md +22 -0
  83. package/templates/shared/wecomcli-smartpage/references/formula-reference.md +192 -0
  84. package/templates/shared/wecomcli-smartpage/references/mdx-syntax.md +739 -0
  85. package/templates/shared/wecomcli-smartpage/references/smartpage-edit.md +506 -0
  86. package/templates/shared/wecomcli-smartsheet/SKILL.md +154 -0
  87. package/templates/shared/wecomcli-smartsheet/assets/templates/README.md +53 -0
  88. package/templates/shared/wecomcli-smartsheet/assets/templates/ai_efficiency.md +709 -0
  89. package/templates/shared/wecomcli-smartsheet/assets/templates/connect_to_app.md +380 -0
  90. package/templates/shared/wecomcli-smartsheet/assets/templates/financial_accounting.md +369 -0
  91. package/templates/shared/wecomcli-smartsheet/assets/templates/hr_and_administration.md +475 -0
  92. package/templates/shared/wecomcli-smartsheet/assets/templates/ledger_records.md +156 -0
  93. package/templates/shared/wecomcli-smartsheet/assets/templates/manufacturing.md +395 -0
  94. package/templates/shared/wecomcli-smartsheet/assets/templates/marketing.md +186 -0
  95. package/templates/shared/wecomcli-smartsheet/assets/templates/office_essentials.md +299 -0
  96. package/templates/shared/wecomcli-smartsheet/assets/templates/personal_efficiency.md +70 -0
  97. package/templates/shared/wecomcli-smartsheet/assets/templates/procurement_logistics.md +325 -0
  98. package/templates/shared/wecomcli-smartsheet/assets/templates/project_management.md +564 -0
  99. package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_customer.md +222 -0
  100. package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_ops.md +105 -0
  101. package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_project.md +109 -0
  102. package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_research.md +92 -0
  103. package/templates/shared/wecomcli-smartsheet/assets/templates/sales_and_operations.md +446 -0
  104. package/templates/shared/wecomcli-smartsheet/assets/templates/store_management.md +431 -0
  105. package/templates/shared/wecomcli-smartsheet/assets/templates/team_tasks.md +274 -0
  106. package/templates/shared/wecomcli-smartsheet/assets/templates/wechat_customer.md +384 -0
  107. package/templates/shared/wecomcli-smartsheet/assets/templates/work_report.md +100 -0
  108. package/templates/shared/wecomcli-smartsheet/references/common.md +143 -0
  109. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-chart-types.md +95 -0
  110. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-edit.md +589 -0
  111. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-field-types.md +438 -0
  112. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-formula.md +845 -0
  113. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-read.md +391 -0
  114. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-record-values.md +201 -0
  115. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-view-types.md +356 -0
  116. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-webhook-examples.md +176 -0
  117. package/templates/shared/wecomcli-smartsheet/references/smart-sheet-webhook.md +169 -0
  118. package/templates/shared/wecomcli-todo/SKILL.md +76 -0
  119. package/templates/shared/wecomcli-todo/references/todo-create.md +137 -0
  120. package/templates/shared/wecomcli-todo/references/todo-delete.md +63 -0
  121. package/templates/shared/wecomcli-todo/references/todo-finish.md +72 -0
  122. package/templates/shared/wecomcli-todo/references/todo-get.md +66 -0
  123. package/templates/shared/wecomcli-todo/references/todo-list.md +133 -0
  124. package/templates/shared/wecomcli-todo/references/todo-update.md +112 -0
  125. package/templates/staff/design/AGENTS.md +2 -1
  126. package/templates/staff/ecommerce/.agents/skills/ops-ecommerce/SKILL.md +6 -0
  127. package/templates/staff/ecommerce/AGENTS.md +49 -0
  128. package/templates/staff/ecommerce/BOOTSTRAP.md +23 -0
  129. package/templates/staff/ecommerce/IDENTITY.md +8 -0
  130. package/templates/staff/ecommerce/MEMORY.md +9 -0
  131. package/templates/staff/ecommerce/PRIORITIES.md +3 -0
  132. package/templates/staff/ecommerce/SOUL.md +5 -0
  133. package/templates/staff/ecommerce/USER.md +8 -0
  134. package/templates/staff/hr/.agents/skills/staff-onboard-keys/SKILL.md +3 -3
  135. package/templates/staff/publish/.agents/skills/ops-publish/SKILL.md +6 -0
  136. package/templates/staff/publish/AGENTS.md +59 -0
  137. package/templates/staff/publish/BOOTSTRAP.md +23 -0
  138. package/templates/staff/publish/IDENTITY.md +8 -0
  139. package/templates/staff/publish/MEMORY.md +9 -0
  140. package/templates/staff/publish/PRIORITIES.md +3 -0
  141. package/templates/staff/publish/SOUL.md +6 -0
  142. package/templates/staff/publish/USER.md +8 -0
@@ -0,0 +1,438 @@
1
+ # 字段类型(FieldType)完整参考
2
+
3
+ ## 字段类型枚举
4
+
5
+ | 参数值 | 说明 | 对应属性(property) |
6
+ | --- | --- | --- |
7
+ | `text` | 文本 | 无额外属性 |
8
+ | `number` | 数字 | `property_number` |
9
+ | `checkbox` | 复选框 | `property_checkbox` |
10
+ | `date_time` | 日期 | `property_date_time` |
11
+ | `image` | 图片 | 无额外属性 |
12
+ | `attachment` | 文件 | `property_attachment` |
13
+ | `user` | 成员 | `property_user` |
14
+ | `url` | 超链接 | `property_url` |
15
+ | `select` | 多选 | `property_select` |
16
+ | `created_user` | 创建人 | 系统字段,无额外属性 |
17
+ | `modified_user` | 最后编辑人 | 系统字段,无额外属性 |
18
+ | `created_time` | 创建时间 | `property_created_time` |
19
+ | `modified_time` | 最后编辑时间 | `property_modified_time` |
20
+ | `progress` | 进度 | `property_progress` |
21
+ | `phone_number` | 电话 | 无额外属性 |
22
+ | `email` | 邮箱 | 无额外属性 |
23
+ | `single_select` | 单选 | `property_single_select` |
24
+ | `reference` | 关联 | `property_reference` |
25
+ | `location` | 地理位置 | `property_location` |
26
+ | `formula` | 公式 | `property_formula` |
27
+ | `lookup` | 查找引用 | `property_lookup` |
28
+ | `two_way_link_records` | 双向关联 | `property_two_way_link_records` |
29
+ | `currency` | 货币 | `property_currency` |
30
+ | `wwgroup` | 群 | `property_ww_group` |
31
+ | `autonumber` | 自动编号 | `property_auto_number` |
32
+ | `percentage` | 百分数 | `property_percentage` |
33
+ | `barcode` | 条码 | `property_barcode` |
34
+
35
+ ### 模板中的字段类型
36
+
37
+ `assets/templates/` 使用 `FIELD_TYPE_*` 常量描述字段类型。调用 `wecom-cli smartsheet sheets add`、`fields add` 或 `fields update` 时,以本节上方“字段类型枚举”表为唯一依据,将模板常量转换为表中的 `参数值`,不能把 `FIELD_TYPE_*` 原样传给接口。
38
+
39
+ 转换规则:去掉 `FIELD_TYPE_` 前缀,将剩余部分转为小写并保留下划线。例如,`FIELD_TYPE_TEXT` 转为 `text`,`FIELD_TYPE_DATE_TIME` 转为 `date_time`,`FIELD_TYPE_TWOWAYLINKRECORDS` 转为 `two_way_link_records`。转换后仍需按枚举表的“对应属性(property)”列补齐相应的 `property_xxx`。
40
+
41
+ > **暂不支持插入 AI 字段**:相关接口暂不支持创建,若命中此类需求时,告知用户手动创建。
42
+
43
+ ---
44
+
45
+ ## 各字段属性(property)详细参数
46
+
47
+ ### property_number(数字)
48
+
49
+ | 参数 | 类型 | 说明 |
50
+ | --- | --- | --- |
51
+ | `decimal_places` | int (DecimalPlaces) | 小数位数,参考 DecimalPlaces 定义 |
52
+ | `use_separate` | bool | 是否千分位分隔(如 1,000) |
53
+
54
+ ### property_checkbox(复选框)
55
+
56
+ | 参数 | 类型 | 说明 |
57
+ | --- | --- | --- |
58
+ | `checked` | bool | 新增时是否默认勾选 |
59
+
60
+ ### property_date_time(日期)
61
+
62
+ | 参数 | 类型 | 说明 |
63
+ | --- | --- | --- |
64
+ | `format` | string (Format) | 日期格式,取值参考 Format 定义 |
65
+ | `auto_fill` | bool | 新建记录时是否自动填充时间 |
66
+
67
+ ### property_attachment(文件)
68
+
69
+ | 参数 | 类型 | 说明 |
70
+ | --- | --- | --- |
71
+ | `display_mode` | string (DisplayMode) | 展示样式,参考 DisplayMode 定义 |
72
+
73
+ ### property_user(成员)
74
+
75
+ | 参数 | 类型 | 说明 |
76
+ | --- | --- | --- |
77
+ | `is_multiple` | bool | 允许添加多个人员 |
78
+ | `is_notified` | bool | 添加人员时通知用户 |
79
+
80
+ ### property_url(超链接)
81
+
82
+ | 参数 | 类型 | 说明 |
83
+ | --- | --- | --- |
84
+ | `type` | string (LinkType) | 超链接展示样式,参考 LinkType 定义 |
85
+
86
+ ### property_select(多选)
87
+
88
+ | 参数 | 类型 | 说明 |
89
+ | --- | --- | --- |
90
+ | `is_quick_add` | bool | 是否允许填写时新增选项 |
91
+ | `options` | Option[] | 选项列表(见下方 Option 结构) |
92
+
93
+ ### property_single_select(单选)
94
+
95
+ | 参数 | 类型 | 说明 |
96
+ | --- | --- | --- |
97
+ | `is_quick_add` | bool | 是否允许填写时新增选项 |
98
+ | `options` | Option[] | 选项列表(见下方 Option 结构) |
99
+
100
+ ### property_created_time(创建时间)
101
+
102
+ | 参数 | 类型 | 说明 |
103
+ | --- | --- | --- |
104
+ | `format` | string (Format) | 日期格式,取值参考 Format 定义 |
105
+
106
+ ### property_modified_time(最后编辑时间)
107
+
108
+ | 参数 | 类型 | 说明 |
109
+ | --- | --- | --- |
110
+ | `format` | string (Format) | 日期格式,取值参考 Format 定义 |
111
+
112
+ ### property_progress(进度)
113
+
114
+ | 参数 | 类型 | 说明 |
115
+ | --- | --- | --- |
116
+ | `decimal_places` | int (DecimalPlaces) | 小数位数,参考 DecimalPlaces 定义 |
117
+
118
+ ### property_reference(关联)
119
+
120
+ | 参数 | 类型 | 说明 |
121
+ | --- | --- | --- |
122
+ | `sub_title` | string | 关联的子表名称,不传=关联本子表 |
123
+ | `field_title` | string | 关联的字段名称 |
124
+ | `is_multiple` | bool | 是否允许多选 |
125
+ | `view_id` | string | 视图 id |
126
+
127
+ ### property_location(地理位置)
128
+
129
+ | 参数 | 类型 | 说明 |
130
+ | --- | --- | --- |
131
+ | `input_type` | string (LOCATION_INPUT_TYPE) | 位置输入类型,参考 LOCATION_INPUT_TYPE 定义 |
132
+
133
+ ### property_auto_number(自动编号)
134
+
135
+ | 参数 | 类型 | 说明 |
136
+ | --- | --- | --- |
137
+ | `type` | string (NUMBER_TYPE) | 自动编号类型,参考 NUMBER_TYPE 枚举定义 |
138
+ | `rules` | NumberRule[] | 自定义规则,参考 NumberRule 定义 |
139
+ | `reformat_existing_record` | bool | 是否应用于已有编号 |
140
+
141
+ ### property_currency(货币)
142
+
143
+ | 参数 | 类型 | 说明 |
144
+ | --- | --- | --- |
145
+ | `currency_type` | string | 货币类型,取值参考 CURRENCY_TYPE 枚举定义 |
146
+ | `decimal_places` | int (DecimalPlaces) | 小数位数,参考 DecimalPlaces 定义 |
147
+ | `use_separate` | bool | 是否千分位分隔 |
148
+
149
+ ### property_ww_group(群)
150
+
151
+ | 参数 | 类型 | 说明 |
152
+ | --- | --- | --- |
153
+ | `allow_multiple` | bool | 是否允许多个群聊 |
154
+
155
+ ### property_percentage(百分比)
156
+
157
+ | 参数 | 类型 | 说明 |
158
+ | --- | --- | --- |
159
+ | `decimal_places` | int (DecimalPlaces) | 小数位数,参考 DecimalPlaces 定义 |
160
+ | `use_separate` | bool | 是否千分位分隔 |
161
+
162
+ ### property_barcode(条码)
163
+
164
+ | 参数 | 类型 | 说明 |
165
+ | --- | --- | --- |
166
+ | `mobile_scan_only` | bool | 仅限手机扫描录入 |
167
+
168
+ ### property_lookup(查找引用)
169
+
170
+ > 说明:当前仅支持按条件查找模式,`lookup_field_title`、`lookup_sub_title`、`filter`(至少一条 condition)均为必填。
171
+
172
+ | 参数 | 类型 | 说明 |
173
+ | --- | --- | --- |
174
+ | `lookup_field_title` | string | 引用列查找的字段名称(必填) |
175
+ | `rollup_type` | string (RollupType) | 统计类型,参考 RollupType 定义 |
176
+ | `lookup_sub_title` | string | 引用的子表名称(必填) |
177
+ | `filter` | LookupFilter | 筛选条件(必填,`conditions` 至少一条) |
178
+
179
+ ### LookupFilter(查找筛选)
180
+
181
+ | 参数 | 类型 | 说明 |
182
+ | --- | --- | --- |
183
+ | `conjunction` | string (Conjunction) | 组合方式,参考 Conjunction 定义 |
184
+ | `conditions` | LookupCondition[] | 查找条件列表 |
185
+
186
+ ### LookupCondition(查找条件)
187
+
188
+ | 参数 | 类型 | 说明 |
189
+ | --- | --- | --- |
190
+ | `conditionId` | string | 条件 ID(可选) |
191
+ | `field_title` | string | 列名称(必填) |
192
+ | `fieldType` | string (FieldType) | 列类型(字段类型枚举值) |
193
+ | `operator` | string (Operator) | 操作符,见下方 Operator 枚举 |
194
+ | `matchValue` | LookupConditionMatchValue | 匹配值(`operator` 非空判断时必填) |
195
+
196
+ ### LookupConditionMatchValue(条件匹配值)
197
+
198
+ | 参数 | 类型 | 说明 |
199
+ | --- | --- | --- |
200
+ | `valueType` | string (LookupConditionValueType) | 匹配方式:`"0"`(和具体值比较) / `"1"`(和列比较) |
201
+ | `field_title` | string | 当 `valueType`=`"1"` 时,引用的列名称 |
202
+ | `value` | ConditionValue | 当 `valueType`=`"0"` 时,具体匹配值 |
203
+ | `computedKeyType` | string (FieldType) | 计算类型(公式等场景) |
204
+
205
+ ### ConditionValue(条件值)
206
+
207
+ > 此处传值的格式请参考 `references/smart-sheet-record-values.md`。
208
+
209
+ | 参数 | 类型 | 说明 |
210
+ | --- | --- | --- |
211
+ | `valueText` | StringValue | 文本值 |
212
+ | `valueNumber` | NumberValue | 数字值 |
213
+ | `valueCheckbox` | BoolValue | 布尔值 |
214
+ | `valueDateTime` | FilterDateTimeValue | 日期时间值 |
215
+ | `valueUsers` | ListValue | 成员值 |
216
+ | `valueSelects` | ListValue | 多选值 |
217
+ | `valueSingleSelect` | ListValue | 单选值 |
218
+ | `valuePhoneNumber` | StringValue | 电话号码 |
219
+ | `valueEmail` | StringValue | 邮箱 |
220
+ | `valueReference` | StringValue | 关联引用值 |
221
+ | `valueTwoWayLinkRecords` | StringValue | 双向关联值 |
222
+ | `valueBarcode` | StringValue | 条形码值 |
223
+ | `valuePercentage` | NumberValue | 百分比值 |
224
+
225
+ ### property_lookup 校验规则
226
+
227
+ | 校验项 | 规则 |
228
+ | --- | --- |
229
+ | `property_lookup` | 不能为空 |
230
+ | `lookup_field_title` | 必填,不能为空字符串 |
231
+ | `lookup_sub_title` | 必填,不能为空字符串 |
232
+ | `filter.conditions` | 必填,至少包含一条有效条件 |
233
+
234
+ 每条 `LookupCondition` 的校验规则:
235
+
236
+ | 校验项 | 规则 |
237
+ | --- | --- |
238
+ | `field_title` | 必填,不能为空 |
239
+ | `operator` 是 `is_empty` / `is_not_empty` | 直接通过,不要求 `matchValue` |
240
+ | 其他 `operator` | `matchValue` 必须非空:若 `valueType="1"`,则 `field_title` 不能为空;若 `valueType="0"`,则 `value` 至少一个字段非空 |
241
+
242
+ ### property_two_way_link_records(双向关联)
243
+
244
+ | 参数 | 类型 | 说明 |
245
+ | --- | --- | --- |
246
+ | `pad_id` | string | 关联的文档 ID,为空表示当前文档 |
247
+ | `sub_title` | string | 关联的子表名称,不传表示本子表 |
248
+ | `field_title` | string | 关联的字段名称 |
249
+ | `is_multiple` | bool | 是否允许多选 |
250
+ | `view_id` | string | 视图 ID |
251
+ | `back_field_title` | string | 双向关联的对应列名称 |
252
+
253
+ ### property_formula(公式)
254
+
255
+ | 参数 | 类型 | 说明 |
256
+ | --- | --- | --- |
257
+ | `formulaModel` | FormulaItem[] | 公式表达式模型 |
258
+ | `formatter` | Formatter | 展示格式配置 |
259
+
260
+ `FormulaItem` 和 `Formatter` 的定义和用法请参考 `references/smart-sheet-formula.md`
261
+
262
+ ---
263
+
264
+ ## 通用枚举值
265
+
266
+ ### DecimalPlaces(小数位数)
267
+
268
+ | 值 | 说明 |
269
+ | --- | --- |
270
+ | -1 | 显示原值 |
271
+ | 0 | 整数 |
272
+ | 1~4 | 精确到小数点后 1~4 位 |
273
+
274
+ ### Format(日期格式)
275
+
276
+ > **重要**:格式中的汉字必须用英文双引号 `"` 包裹,如 `yyyy"年"m"月"d"日"`,**不能**写成 `yyyy年m月d日`
277
+
278
+ | 格式字符串 | 显示效果 | 说明 |
279
+ | --- | --- | --- |
280
+ | `yyyy"年"m"月"d"日"` | 2018年4月20日 | 汉字必须用 `"` 包裹 |
281
+ | `yyyy"年"m"月"d"日" dddd` | 2018年4月20日 星期五 | 汉字必须用 `"` 包裹 |
282
+ | `yyyy"年"m"月"d"日" hh:mm` | 2018年4月20日 14:30 | 汉字必须用 `"` 包裹 |
283
+ | `yyyy-mm-dd` | 2018-04-20 | 纯符号无需引号 |
284
+ | `yyyy-mm-dd hh:mm` | 2018-04-20 14:30 | 纯符号无需引号 |
285
+ | `yyyy/m/d` | 2018/4/20 | 纯符号无需引号 |
286
+ | `m/d/yyyy` | 4/20/2018 | 纯符号无需引号 |
287
+ | `d/m/yyyy` | 20/4/2018 | 纯符号无需引号 |
288
+ | `m"月"d"日"` | 4月20日 | 汉字必须用 `"` 包裹 |
289
+
290
+ > 日期格式只是日期字段值在智能表格中的显示格式,日期值读写的统一格式为 `"YYYY-MM-DD HH:mm:ss"` 标准时间格式。尽管所有显示格式都不显示秒,但是写入日期字段值时,严禁忽略秒。
291
+
292
+ **正确示例**:
293
+
294
+ ```json
295
+ { "format": "yyyy\"年\"m\"月\"d\"日\"", "auto_fill": false }
296
+ ```
297
+
298
+ **错误示例**(汉字没用引号包裹,会导致格式无效):
299
+
300
+ ```json
301
+ { "format": "yyyy年m月d日", "auto_fill": false }
302
+ ```
303
+
304
+ ### DisplayMode(展示样式)
305
+
306
+ | 参数值 | 说明 |
307
+ | --- | --- |
308
+ | `list` | 列表模式 |
309
+ | `grid` | 网格模式 |
310
+
311
+ ### LinkType(超链接展示样式)
312
+
313
+ | 参数值 | 说明 |
314
+ | --- | --- |
315
+ | `pure_text` | 文字 |
316
+ | `icon_text` | 图标文字 |
317
+
318
+ ### Option(选项结构)
319
+
320
+ ```json
321
+ { "id": "选项ID", "text": "选项文本", "style": 样式编号 }
322
+ ```
323
+
324
+ | 参数 | 类型 | 说明 |
325
+ | --- | --- | --- |
326
+ | `id` | string | 选项 ID(由服务端返回,选已有选项时使用) |
327
+ | `text` | string | 选项文本(新增选项时必填) |
328
+ | `style` | int (Style) | 颜色 ID 1-27(可选,默认 1) |
329
+
330
+ style 颜色对照:1=浅红1, 2=浅橙1, 3=浅天蓝1, 4=浅绿1, 5=浅紫1, 6=浅粉1, 7=浅灰1, 8=白, 9=灰, 10=浅蓝1, 11=浅蓝2, 12=蓝, 13=浅天蓝2, 14=天蓝, 15=浅绿2, 16=绿, 17=浅红2, 18=红, 19=浅橙2, 20=橙, 21=浅黄1, 22=浅黄2, 23=黄, 24=浅紫2, 25=紫, 26=浅粉2, 27=粉
331
+
332
+ ### CURRENCY_TYPE(货币类型)
333
+
334
+ | 参数值 | 说明 |
335
+ | --- | --- |
336
+ | `cny` | 人民币 |
337
+ | `usd` | 美元 |
338
+ | `eur` | 欧元 |
339
+ | `gbp` | 英镑 |
340
+ | `jpy` | 日元 |
341
+ | `krw` | 韩元 |
342
+ | `hkd` | 港元 |
343
+ | `mop` | 澳门元 |
344
+ | `twd` | 新台币 |
345
+ | `aed` | 阿联酋迪拉姆 |
346
+ | `aud` | 澳大利亚元 |
347
+ | `brl` | 巴西雷亚尔 |
348
+ | `cad` | 加拿大元 |
349
+ | `chf` | 瑞士法郎 |
350
+ | `idr` | 印尼卢比 |
351
+ | `inr` | 印度卢比 |
352
+ | `mxn` | 墨西哥比索 |
353
+ | `myr` | 马来西亚林吉特 |
354
+ | `php` | 菲律宾比索 |
355
+ | `pln` | 波兰兹罗提 |
356
+ | `rub` | 俄罗斯卢布 |
357
+ | `sgd` | 新加坡元 |
358
+ | `thb` | 泰国铢 |
359
+ | `try` | 土耳其里拉 |
360
+ | `vnd` | 越南盾 |
361
+
362
+ ### LOCATION_INPUT_TYPE(位置输入类型)
363
+
364
+ | 参数值 | 说明 |
365
+ | --- | --- |
366
+ | `manual` | 手动输入 |
367
+ | `auto` | 自动定位,不可手动更新 |
368
+
369
+ ### NUMBER_TYPE(自动编号类型)
370
+
371
+ | 参数值 | 说明 |
372
+ | --- | --- |
373
+ | `incr` | 自增 |
374
+ | `custom` | 自定义 |
375
+
376
+ ### NumberRule(自动编号规则)
377
+
378
+ | 参数 | 类型 | 说明 |
379
+ | --- | --- | --- |
380
+ | `type` | string | `incr`(自增) / `fixed_char`(固定字符) / `time`(创建时间) |
381
+ | `value` | string | 自增=位数,固定字符=字符串,时间=CreateTimeFormat(见下表) |
382
+
383
+ ### CreateTimeFormat(创建时间格式,用于自动编号)
384
+
385
+ | 参数值 | 输出示例 |
386
+ | --- | --- |
387
+ | `YYYYMMDD` | 20260301 |
388
+ | `YYYYMM` | 202603 |
389
+ | `MMDD` | 0301 |
390
+ | `YYYY` | 2026 |
391
+ | `MM` | 03 |
392
+ | `DD` | 01 |
393
+
394
+ ### RollupType(统计类型)
395
+
396
+ | 参数值 | 说明 |
397
+ | --- | --- |
398
+ | `original` | 原样引用,默认值 |
399
+ | `unique` | 去重引用 |
400
+ | `sum` | 求和 |
401
+ | `count` | 计数 |
402
+ | `count_unique` | 去重计数 |
403
+ | `average` | 平均值 |
404
+ | `max` | 最大值 |
405
+ | `min` | 最小值 |
406
+
407
+ ### Conjunction(条件组合)
408
+
409
+ | 参数值 | 说明 |
410
+ | --- | --- |
411
+ | `and` | 条件与 |
412
+ | `or` | 条件或 |
413
+
414
+ ### Operator(查找条件操作符)
415
+
416
+ | 参数值 | 说明 |
417
+ | --- | --- |
418
+ | `is` | 等于 |
419
+ | `is_not` | 不等于 |
420
+ | `contains` | 包含 |
421
+ | `does_not_contain` | 不包含 |
422
+ | `is_greater` | 大于 |
423
+ | `is_greater_or_equal` | 大于或等于 |
424
+ | `is_less` | 小于 |
425
+ | `is_less_or_equal` | 小于或等于 |
426
+ | `is_empty` | 为空 |
427
+ | `is_not_empty` | 不为空 |
428
+
429
+ ### LookupConditionValueType(查找条件匹配方式)
430
+
431
+ | 参数值 | 说明 |
432
+ | --- | --- |
433
+ | `"0"` | 与具体值比较 |
434
+ | `"1"` | 与列比较 |
435
+
436
+ ---
437
+
438
+ > **添加/更新字段时必须带属性**:日期、超链接、人员、单选、多选、数字等字段类型,**必须带上对应的 `property_xxx` 属性**,否则会报 `调用失败, ret=-1`。只有纯文本(`text`)等简单类型不需要额外属性。