Skip to content

Commit

Permalink
Merge pull request #168 from FinalDoubleTen/dev
Browse files Browse the repository at this point in the history
2차 QA배포
  • Loading branch information
LeHiHo authored Jan 15, 2024
2 parents c4a456e + bf5ca91 commit 0eace91
Show file tree
Hide file tree
Showing 25 changed files with 802 additions and 260 deletions.
1 change: 1 addition & 0 deletions src/@types/auth.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface AuthRequest {

export interface SignupFormValue extends AuthRequest {
passwordCheck: string;
checkbox: boolean;
}

export interface EditPassword {
Expand Down
97 changes: 97 additions & 0 deletions src/@types/service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
export type subInfoRes = {
status: number;
message: string;
data: {
tripId: number;
startDate: string;
endDate: string;
numberOfPeople: number;
tripName: string;
tripStatus: string;
area: string;
subarea: string;
budget: number;
} | null;
};

export type subItemRes = {
status: number;
message: string;
data: {
tripId: number;
visitDate: string;
tripItems: TripItem[];
} | null;
};

export type TripItem = {
tripItemId: number;
tourItemId: number;
name: string;
thumbnailUrl: string;
category: string;
transportation: string;
seqNum: number;
visitDate: string;
price: number;
};

export type subPathRes = {
status: number;
message: string;
data: {
tripId: number;
visitDate: string;
paths: {
fromSeqNum: number;
toSeqNum: number;
fromLongitude: string;
fromLatitude: string;
toLongitude: string;
toLatitude: string;
transportation: string;
pathInfo: {
price: number;
totalDistance: number;
totalTime: number;
};
}[];
} | null;
};

export type subMemberRes = {
status: number;
message: string;
data: {
tripId: number;
connectedMembers: {
memberId: number;
name: string;
thumbnailUrl: string;
}[];
tripMembers: {
memberId: number;
name: string;
thumbnailUrl: string;
}[];
numberOfPeople: number;
} | null;
};
export type subBudgetRes = {
status: number;
message: string;
data: {
tripId: number;
budget: number;
calculatedPrice: number;
} | null;
};

export type SocketContextType = {
tripInfo: subInfoRes | null;
tripItem: subItemRes | null;
tripPath: subPathRes | null;
tripMember: subMemberRes | null;
tripBudget: subBudgetRes | null;
callBackPub: (callback: () => void) => void;
};
130 changes: 130 additions & 0 deletions src/@types/socket.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
interface pubInfo {
startDate: string;
endDate: string;
numberOfPeople: number;
tripName: string;
tripStatus: 'BEFORE' | 'DURING' | 'AFTER';
area: string;
subarea: string;
budget: number;
}

interface pubAddTripItem {
visitDate: string;
newTripItems: {
tourItemId: number;
}[];
}

interface pubUpdateTripItem {
visitDate: string;
tripItemOrder: {
tripItemId: number;
seqNum: number;
}[];
}

interface pubVisitDate {
// visitDate: '2024-01-07',
visitDate: string;
}

interface pubUpdatePrice {
price: number;
}

interface pubUpdateTransportation {
transportation: 'CAR' | 'PUBLIC_TRANSPORTATION';
}

interface pubMember {
memberId: number;
}

type subInfoMessage = (message: {
status: number;
message: string;
data: {
tripId: number;
startDate: string;
endDate: string;
numberOfPeople: number;
tripName: string;
tripStatus: string;
area: string;
subarea: string;
budget: number;
} | null;
}) => void;

type subItemMessage = (response: {
status: number;
message: string;
data: {
tripId: number;
visitDate: string;
tripItems: {
tripItemId: number;
tourItemId: number;
name: string;
thumbnailUrl: string;
category: string;
transportation: string;
seqNum: number;
visitDate: string;
price: number;
}[];
};
}) => void;

type subPathMessage = (response: {
status: number;
message: string;
data: {
tripId: number;
visitDate: string;
paths: {
fromSeqNum: number;
toSeqNum: number;
fromLongitude: string;
fromLatitude: string;
toLongitude: string;
toLatitude: string;
transportation: string;
pathInfo: {
price: number;
totalDistance: number;
totalTime: number;
};
}[];
};
}) => void;

type subMemberMessage = (response: {
status: number;
message: string;
data: {
tripId: number;
connectedMembers: {
memberId: number;
name: string;
thumbnailUrl: string;
}[];
tripMembers: {
memberId: number;
name: string;
thumbnailUrl: string;
}[];
numberOfPeople: number;
};
}) => void;

type subBudgetMessage = (response: {
status: number;
message: string;
data: {
tripId: number;
budget: number;
calculatedPrice: number;
};
}) => void;
8 changes: 4 additions & 4 deletions src/@types/trips.types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
interface TripRequest {
tripName: string;
numberOfPeople: number;
startDate: string;
endDate: string;
area: string;
subarea: string;
startDate: string | null;
endDate: string | null;
area: string | null;
subarea: string | null;
}

interface MyTripType {
Expand Down
2 changes: 1 addition & 1 deletion src/api/member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const deleteMember = async () => {
};

// 나의 여정 조회
export const getMemberTrips = async (page?: number, size?: number) => {
export const getMemberTrips = async (page = 0, size = 10) => {
try {
const res = await authClient.get(`trips?&page=${page}&size=${size}`);
return res.data;
Expand Down
Loading

0 comments on commit 0eace91

Please sign in to comment.