@carsayo/types 1.1.891765 → 1.1.891767
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.
- package/dist/types/modules/accidentReport/interface.d.ts +7 -0
- package/dist/types/modules/chat/index.d.ts +4 -0
- package/dist/types/modules/chat/index.js +20 -0
- package/dist/types/modules/chat/type.d.ts +103 -0
- package/dist/types/modules/chat/type.js +7 -0
- package/dist/types/modules/chat/type.opponent.additionalInfo.d.ts +7 -0
- package/dist/types/modules/chat/type.opponent.additionalInfo.js +2 -0
- package/dist/types/modules/chat/type.room.additionalInfo.d.ts +14 -0
- package/dist/types/modules/chat/type.room.additionalInfo.js +2 -0
- package/dist/types/modules/chat/type.socket.d.ts +44 -0
- package/dist/types/modules/chat/type.socket.js +2 -0
- package/dist/types/modules/index.d.ts +1 -0
- package/dist/types/modules/index.js +1 -0
- package/dist/types/modules/repair/interface.d.ts +0 -2
- package/package.json +1 -1
|
@@ -80,6 +80,13 @@ export type RepairShop = {
|
|
|
80
80
|
latitude: number | null;
|
|
81
81
|
longitude: number | null;
|
|
82
82
|
};
|
|
83
|
+
/** 리뷰 정보 */
|
|
84
|
+
review: {
|
|
85
|
+
/** 평균 점수 */
|
|
86
|
+
rating: number;
|
|
87
|
+
/** 리뷰 개수 */
|
|
88
|
+
count: number;
|
|
89
|
+
};
|
|
83
90
|
/** 정비 항목
|
|
84
91
|
* @example [{id: 1, name: "사고 수리", isVisiting: true, isAllCategory2: true, category_2: [{id: 1, name: "사고 차량 전체 수리"}]}]
|
|
85
92
|
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./type.room.additionalInfo"), exports);
|
|
18
|
+
__exportStar(require("./type.opponent.additionalInfo"), exports);
|
|
19
|
+
__exportStar(require("./type.socket"), exports);
|
|
20
|
+
__exportStar(require("./type"), exports);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ChatOpponentAdditionalInfo } from "./type.opponent.additionalInfo";
|
|
2
|
+
import { ChatRoomAdditionalInfo } from "./type.room.additionalInfo";
|
|
3
|
+
export type ChatOpponent = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
profileImage: string | null;
|
|
7
|
+
/** 입맛대로 저장하는 추가 정보 */
|
|
8
|
+
additionalInfo?: ChatOpponentAdditionalInfo;
|
|
9
|
+
/** 차단 여부 */
|
|
10
|
+
isBlocked: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type ChatRoomType = "repair_service" | "repair_direct";
|
|
13
|
+
export type ChatCreateRoomInfo = {
|
|
14
|
+
roomId: string;
|
|
15
|
+
carsayoId: string;
|
|
16
|
+
partnerId: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
additionalInfo?: ChatRoomAdditionalInfo;
|
|
19
|
+
type: ChatRoomType;
|
|
20
|
+
};
|
|
21
|
+
export type ChatOpponentAdditionalInfo_Repair = {
|
|
22
|
+
location?: {
|
|
23
|
+
address: string;
|
|
24
|
+
latitude: number;
|
|
25
|
+
longitude: number;
|
|
26
|
+
};
|
|
27
|
+
review?: {
|
|
28
|
+
count: number;
|
|
29
|
+
average: number;
|
|
30
|
+
};
|
|
31
|
+
/** 단순 문장
|
|
32
|
+
* @example "예상 수리 기간: 1일"
|
|
33
|
+
*/
|
|
34
|
+
estimateFixTermText?: string;
|
|
35
|
+
};
|
|
36
|
+
export type ChatRoom = {
|
|
37
|
+
id: string;
|
|
38
|
+
type: ChatRoomType;
|
|
39
|
+
opponent: ChatOpponent;
|
|
40
|
+
tag: string[];
|
|
41
|
+
lastChat: {
|
|
42
|
+
content: string;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
isRead: boolean;
|
|
45
|
+
} | null;
|
|
46
|
+
option: {
|
|
47
|
+
isAlert: boolean;
|
|
48
|
+
isExited: boolean;
|
|
49
|
+
};
|
|
50
|
+
/** Create OR Update 시간 */
|
|
51
|
+
updatedAt: Date;
|
|
52
|
+
};
|
|
53
|
+
export type ChatMessage = {
|
|
54
|
+
id: string;
|
|
55
|
+
type: "txt" | "file";
|
|
56
|
+
/** 첨부파일 */
|
|
57
|
+
files: ChatFile[] | null;
|
|
58
|
+
/** 메시지 내용 */
|
|
59
|
+
content: string | null;
|
|
60
|
+
createdAt: Date;
|
|
61
|
+
/** 발송중 여부, 메시지 조회 성공 시 false처리 */
|
|
62
|
+
isSending: boolean;
|
|
63
|
+
isMyChat: boolean;
|
|
64
|
+
isDeleted: boolean;
|
|
65
|
+
};
|
|
66
|
+
export type ChatBlockMember = {
|
|
67
|
+
/** 차단한 사람 id */
|
|
68
|
+
blockerId: string;
|
|
69
|
+
/** 차단당한 사람 id */
|
|
70
|
+
blockedId: string;
|
|
71
|
+
blockedAt: Date;
|
|
72
|
+
};
|
|
73
|
+
export type ChatFile = {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
size: string;
|
|
77
|
+
contentType: string;
|
|
78
|
+
extension: string;
|
|
79
|
+
url: string;
|
|
80
|
+
};
|
|
81
|
+
export interface SendChatMessageResponse {
|
|
82
|
+
/** 상대방에게 푸시 알림 보낼지 여부
|
|
83
|
+
* @note true일 경우 상대방에게 푸시 알림 보냄 (API 요청 발송)
|
|
84
|
+
*/
|
|
85
|
+
shouldNotifyRecipient: boolean;
|
|
86
|
+
}
|
|
87
|
+
export declare const TargetApp: {
|
|
88
|
+
readonly carsayo: "카사요";
|
|
89
|
+
readonly partners: "파트너스";
|
|
90
|
+
};
|
|
91
|
+
export type TargetApp = keyof typeof TargetApp;
|
|
92
|
+
export interface SendChatPushDTO {
|
|
93
|
+
/** 푸시 수신 대상 멤버 id */
|
|
94
|
+
memberId: string;
|
|
95
|
+
/** 푸시 수신 대상 앱 */
|
|
96
|
+
targetApp: TargetApp;
|
|
97
|
+
/** 푸시 제목 */
|
|
98
|
+
title: string;
|
|
99
|
+
/** 푸시 내용 */
|
|
100
|
+
content: string;
|
|
101
|
+
/** 푸시 클릭 시 이동할 페이지 */
|
|
102
|
+
redirectUrl?: string;
|
|
103
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RepairShop } from "../accidentReport";
|
|
2
|
+
import { MemberShort } from "../member";
|
|
3
|
+
export type ChatOpponentAdditionalInfo = ChatOpponentAdditionalInfo_Repair;
|
|
4
|
+
export type ChatOpponentAdditionalInfo_Repair = {
|
|
5
|
+
repairShop: RepairShop | null;
|
|
6
|
+
customer: MemberShort | null;
|
|
7
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RepairEstimate } from "../repair";
|
|
2
|
+
export type ChatRoomAdditionalInfo = ChatRoomAdditionalInfo_Repair;
|
|
3
|
+
export type ChatRoomAdditionalInfo_Repair = {
|
|
4
|
+
/** 견적 요청 ID */
|
|
5
|
+
repairId: string;
|
|
6
|
+
/** 견적서 Id */
|
|
7
|
+
repairBidId: string;
|
|
8
|
+
/** 공업사 Id */
|
|
9
|
+
repairShopId: string;
|
|
10
|
+
/** 고객 Id */
|
|
11
|
+
customerId: string;
|
|
12
|
+
/** 예상 수리일 */
|
|
13
|
+
estimatedPeriod: RepairEstimate["estimatedPeriod"];
|
|
14
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ChatFile, ChatRoomType } from "./type";
|
|
2
|
+
export interface SocketChatRoomMeta {
|
|
3
|
+
type: ChatRoomType;
|
|
4
|
+
carsayoId?: string;
|
|
5
|
+
partnerId?: string;
|
|
6
|
+
tags: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface SocketChatRoomItem extends SocketChatRoomMeta {
|
|
9
|
+
roomId: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
creatorId: string;
|
|
12
|
+
carsayo: {
|
|
13
|
+
isNotiEnabled: boolean;
|
|
14
|
+
lastReadAt: string;
|
|
15
|
+
leaveAt?: string;
|
|
16
|
+
};
|
|
17
|
+
partner: {
|
|
18
|
+
isNotiEnabled: boolean;
|
|
19
|
+
lastReadAt: string;
|
|
20
|
+
leaveAt?: string;
|
|
21
|
+
};
|
|
22
|
+
lastInfo: {
|
|
23
|
+
lastMsgId?: string;
|
|
24
|
+
lastMsgContent: {
|
|
25
|
+
type?: string;
|
|
26
|
+
msg?: string;
|
|
27
|
+
};
|
|
28
|
+
lastSenderId?: string;
|
|
29
|
+
lastSentAt?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface SocketChatContent {
|
|
33
|
+
type: "file" | "txt";
|
|
34
|
+
msg: string;
|
|
35
|
+
fileInfos?: ChatFile[];
|
|
36
|
+
}
|
|
37
|
+
export interface SocketChatMessageItem {
|
|
38
|
+
messageId: string;
|
|
39
|
+
content: SocketChatContent;
|
|
40
|
+
sentAt: string;
|
|
41
|
+
isDelete: boolean;
|
|
42
|
+
roomId: string;
|
|
43
|
+
senderId: string;
|
|
44
|
+
}
|