// import 'package:meta/meta.dart'; import 'package:bytedesk_kefu/http/bytedesk_thread_api.dart'; import 'package:bytedesk_kefu/model/markThread.dart'; // import 'package:bytedesk_kefu/model/requestThread.dart'; import 'package:bytedesk_kefu/model/model.dart'; // import 'package:http/http.dart' as http; class ThreadRepository { // final BytedeskThreadHttpApi bytedeskHttpApi = BytedeskThreadHttpApi(); ThreadRepository(); Future> getThreads() async { return await bytedeskHttpApi.getThreads(); } Future> getHistoryThreads(int? page, int? size) async { return await bytedeskHttpApi.getHistoryThreads(page, size); } Future> getVisitorThreads(int? page, int? size) async { return await bytedeskHttpApi.getVisitorThreads(page, size); } Future> getVisitorThreadsAll() async { return await bytedeskHttpApi.getVisitorThreadsAll(); } Future requestThread( String? wid, String? type, String? aid, bool? isV2Robot) async { if (isV2Robot!) { return await bytedeskHttpApi.requestWorkGroupThreadV2(wid); } return await bytedeskHttpApi.requestThread(wid, type, aid); } Future requestAgent( String? wid, String? type, String? aid) async { return await bytedeskHttpApi.requestAgent(wid, type, aid); } Future requestContactThread(String? cid) async { return await bytedeskHttpApi.requestContactThread(cid); } Future requestGroupThread(String? gid) async { return await bytedeskHttpApi.requestGroupThread(gid); } Future markTop(String? tid) async { return await bytedeskHttpApi.markTop(tid); } Future unmarkTop(String? tid) async { return await bytedeskHttpApi.unmarkTop(tid); } Future markNodisturb(String? tid) async { return await bytedeskHttpApi.markNodisturb(tid); } Future unmarkNodisturb(String? tid) async { return await bytedeskHttpApi.unmarkNodisturb(tid); } Future markUnread(String? tid) async { return await bytedeskHttpApi.markUnread(tid); } Future unmarkUnread(String? tid) async { return await bytedeskHttpApi.unmarkUnread(tid); } Future delete(String? tid) async { return await bytedeskHttpApi.delete(tid); } }