feat(shangwutong): sync classifications and update conversations

This commit is contained in:
2026-09-11 17:08:18 +08:00
parent a06d4f4199
commit 31f157a4f5
28 changed files with 2541 additions and 232 deletions
@@ -0,0 +1,34 @@
/* global axios */
import ApiClient from './ApiClient';
class ShangwutongClassificationsAPI extends ApiClient {
constructor() {
super('inboxes', { accountScoped: true });
this.conversations = new ApiClient('conversations', {
accountScoped: true,
});
}
get(inboxId) {
return axios.get(`${this.url}/${inboxId}/shangwutong/classifications`);
}
sync(inboxId) {
return axios.post(
`${this.url}/${inboxId}/shangwutong/classifications/sync`
);
}
updateConversation(conversationId, payload) {
return axios.patch(
`${this.conversations.url}/${conversationId}/shangwutong-classifications`,
payload
);
}
getConversation(conversationId) {
return axios.get(`${this.conversations.url}/${conversationId}`);
}
}
export default new ShangwutongClassificationsAPI();