api-contracts.mjs
6.39 KB
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
/**
* @file 分包迁移前后的 API 转发契约。这里只锁定 transport 调用,不推断业务响应。
*/
const freezeContracts = contracts =>
Object.freeze(
contracts.map(contract =>
Object.freeze({
...contract,
extraArgs: Object.freeze([...(contract.extraArgs || [])])
})
)
)
/** AI 页面当前实际使用的 API facade 契约。 */
export const AI_API_CONTRACTS = freezeContracts([
{
id: 'ai.sparring',
source: 'packageEquityAI/services/aiApi.js',
name: 'sparring',
method: '',
extraArgs: [[], '/router/sparring/1.0.0', 'AI', false]
},
{
id: 'ai.objectionSparring',
source: 'packageEquityAI/services/aiApi.js',
name: 'objectionSparring',
method: '',
extraArgs: [[], '/router/objection/sparring/1.0.0', 'AI', false]
},
{
id: 'ai.inspiration',
source: 'packageEquityAI/services/aiApi.js',
name: 'inspiration',
method: '',
extraArgs: [[], '/router/inspiration/1.0.0', 'AI']
},
{
id: 'ai.objectionInspiration',
source: 'packageEquityAI/services/aiApi.js',
name: 'objectionInspiration',
method: '',
extraArgs: [[], '/router/objection/inspiration/1.0.0', 'AI']
},
{
id: 'ai.enhancement',
source: 'packageEquityAI/services/aiApi.js',
name: 'enhancement',
method: '',
extraArgs: [[], '/router/enhancement/1.0.0', 'AI', false]
},
{
id: 'ai.objectionEnhancement',
source: 'packageEquityAI/services/aiApi.js',
name: 'objectionEnhancement',
method: '',
extraArgs: [[], '/router/objection/enhancement/1.0.0', 'AI', false]
},
{
id: 'ai.getSensitive',
source: 'packageEquityAI/services/aiApi.js',
name: 'getSensitive',
method: '',
extraArgs: [[], '/router/is/sensitive/1.0.0', 'AI', false]
},
{
id: 'ai.getPhrases',
source: 'packageEquityAI/services/aiApi.js',
name: 'getPhrases',
method: '',
extraArgs: [[], '/router/similar/phrases/1.0.0', 'AI', false]
},
{
id: 'ai.getVoice',
source: 'packageEquityAI/services/aiApi.js',
name: 'getVoice',
method: '',
extraArgs: [[], '/router/get/voice/to/text/1.0.0', 'AI', false]
},
{
id: 'ai.getVoiceConfig',
source: 'packageEquityAI/services/aiApi.js',
name: 'getVoiceConfig',
method: '',
extraArgs: [[], '/router/get/voice/config/1.0.0', 'AI', false]
},
{
id: 'ai.getSparringPage',
source: 'packageEquityAI/services/aiApi.js',
name: 'getSparringPage',
method: 'dj.api.carboutique.ai.sparring.staff.record.page',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'ai.setSparringVerify',
source: 'packageEquityAI/services/aiApi.js',
name: 'setSparringVerify',
method: 'dj.api.carboutique.ai.sparring.verify',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'ai.getReportDetail',
source: 'packageEquityAI/services/aiApi.js',
name: 'getReportDetail',
method: 'dj.api.carboutique.ai.sparring.report.detail',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'ai.getToken',
source: 'packageEquityAI/services/aiApi.js',
name: 'getToken',
method: 'dj.api.smartcarlife.recepiton.customer.oss.getToken',
acceptsPayload: false
},
{
id: 'car.getInspectionDetail',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'getInspectionDetail',
method: 'dj.api.smartcarlife.app.inspection.conversation.check.detail'
},
{
id: 'car.getSparringPage',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'getSparringPage',
method: 'dj.api.carboutique.ai.sparring.task.page',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'car.getSparringDetail',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'getSparringDetail',
method: 'dj.api.carboutique.ai.sparring.task.staff.detail.page',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'car.getSparringResult',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'getSparringResult',
method: 'dj.api.carboutique.ai.sparring.detail.check.result',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'car.sparringCommit',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'sparringCommit',
method: 'dj.api.carboutique.ai.sparring.detail.commit',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'car.behaviorSave',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'behaviorSave',
method: 'dj.api.carboutique.ai.sparring.staff.behavior.save',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'car.objectionPage',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'objectionPage',
method: 'dj.api.carboutique.ai.sparring.objection.page',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'car.sparringRole',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'sparringRole',
method: 'dj.api.carboutique.ai.sparring.role.info.page',
extraArgs: [[], '/rop-dj-pairexc/router']
},
{
id: 'car.sparringRrain',
source: 'packageEquityAI/services/carLifeApi.js',
name: 'sparringRrain',
method: 'dj.api.carboutique.ai.sparring.start.train',
extraArgs: [[], '/rop-dj-pairexc/router']
}
])
/** 迁入动态表单分包的旧版员工、主管日报 API facade 契约。 */
export const WORK_REPORT_API_CONTRACTS = freezeContracts([
['staffDailyReportSave', 'dj.api.smartcarlife.staff.daily.report.save'],
['staffDailyReportDetail', 'dj.api.smartcarlife.staff.daily.report.detail'],
['staffDailyReportDetailWeeklyList', 'dj.api.smartcarlife.staff.daily.report.weekly.list'],
['staffDailyReportApprove', 'dj.api.smartcarlife.staff.daily.report.approve'],
['querySceneRefByShop', 'dj.api.scenemerchantref.querySceneRefByShop'],
['staffDailyReportMerchantCarBand', 'dj.api.smartcarlife.staff.daily.report.car.brand'],
['getDateRecord', 'dj.api.mindworkplate.app.daily.report.mySubmittedDateRecord'],
['getRecordDetail', 'dj.api.mindworkplate.app.daily.report.myRecordDetail'],
['getWeeklyRecordDetail', 'dj.api.carboutique.assign.month.find.staff.weekly.report.submit'],
['getMonthCalWeek', 'dj.api.carboutique.assign.month.cal.week'],
['getMonthlyRecordDetail', 'dj.api.carboutique.assign.year.find.staff.monthly.report.submit'],
['saveTempReport', 'dj.api.mindworkplate.app.daily.report.save'],
['getStaffList', 'dj.api.mindworkplate.app.daily.report.staffBaseInfo.page'],
['dailyReportCheck', 'dj.api.smartcarlife.staff.daily.report.data.check'],
['userStat', 'dj.api.smartcarlife.user.stat'],
['outputValueStatistics', 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.outputValueStatistics']
].map(([name, method]) => ({
id: `report.${name}`,
source: 'packageDynamicForm/api/legacyWorkReport.js',
name,
method
})))