@lemoncloud/ssocio-stacks-api 0.23.1212 → 0.24.107
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/lib/seats-types.d.ts +237 -0
- package/dist/lib/types.d.ts +1 -0
- package/dist/service/backend-model.d.ts +379 -129
- package/dist/service/backend-types.d.ts +295 -34
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/view/types.d.ts +324 -55
- package/package.json +1 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `lib/seats-types.ts`
|
|
3
|
+
* - types for seat-reservation support
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
7
|
+
* @date 2024-04-18 initial version
|
|
8
|
+
*
|
|
9
|
+
* @copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { User } from '../service/backend-types';
|
|
12
|
+
import { GenericNode } from './types';
|
|
13
|
+
/**
|
|
14
|
+
* defines the possible types
|
|
15
|
+
*/
|
|
16
|
+
export declare const $SeatLUT: {
|
|
17
|
+
/**
|
|
18
|
+
* 좌석 항목의 종류들
|
|
19
|
+
*/
|
|
20
|
+
SeatStereo: {
|
|
21
|
+
/** 기본형 */
|
|
22
|
+
'': string;
|
|
23
|
+
/** 예약그룹 */
|
|
24
|
+
group: string;
|
|
25
|
+
/** 예약단위 */
|
|
26
|
+
unit: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 좌석 유닛의 항목
|
|
30
|
+
*/
|
|
31
|
+
SeatUnitType: {
|
|
32
|
+
'': string;
|
|
33
|
+
/** 스크린골프 */
|
|
34
|
+
golf: string;
|
|
35
|
+
/** 독서실 */
|
|
36
|
+
reading: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 좌석 상태의 항목
|
|
40
|
+
*/
|
|
41
|
+
SeatStateType: {
|
|
42
|
+
/** 선택없음 */
|
|
43
|
+
'': string;
|
|
44
|
+
/** 예약중 */
|
|
45
|
+
reserved: string;
|
|
46
|
+
/** 예약가능 */
|
|
47
|
+
onSale: string;
|
|
48
|
+
/** 점검중 */
|
|
49
|
+
disabled: string;
|
|
50
|
+
/** 이용중 */
|
|
51
|
+
inUse: string;
|
|
52
|
+
/** 이용완료 */
|
|
53
|
+
used: string;
|
|
54
|
+
/** 취소 */
|
|
55
|
+
canceled: string;
|
|
56
|
+
/** 대기중 */
|
|
57
|
+
standBy: string;
|
|
58
|
+
/** 예약불가 */
|
|
59
|
+
unable: string;
|
|
60
|
+
/** 마감 */
|
|
61
|
+
closed: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 좌석 그룹의 타입
|
|
65
|
+
*/
|
|
66
|
+
GroupType: {
|
|
67
|
+
/** 월권 */
|
|
68
|
+
monthly: string;
|
|
69
|
+
/** 일권 */
|
|
70
|
+
daily: string;
|
|
71
|
+
/** 시간권 */
|
|
72
|
+
time: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* stereo-type in seat
|
|
77
|
+
*/
|
|
78
|
+
export declare type SeatStereo = keyof typeof $SeatLUT.SeatStereo;
|
|
79
|
+
/**
|
|
80
|
+
* input type in seat
|
|
81
|
+
*/
|
|
82
|
+
export declare type SeatUnitType = keyof typeof $SeatLUT.SeatUnitType;
|
|
83
|
+
/**
|
|
84
|
+
* status type in seat
|
|
85
|
+
*/
|
|
86
|
+
export declare type SeatStateType = keyof typeof $SeatLUT.SeatStateType;
|
|
87
|
+
/**
|
|
88
|
+
* group-type in seat
|
|
89
|
+
*/
|
|
90
|
+
export declare type GroupType = keyof typeof $SeatLUT.GroupType;
|
|
91
|
+
/**
|
|
92
|
+
* type: `SeatState`
|
|
93
|
+
* - internal state of each seat elements
|
|
94
|
+
*/
|
|
95
|
+
export interface SeatState {
|
|
96
|
+
/**
|
|
97
|
+
* internally invalidated. (like deleted)
|
|
98
|
+
*/
|
|
99
|
+
invalid?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* soldout not for sale. (displayed but soldout)
|
|
102
|
+
*/
|
|
103
|
+
state?: SeatStateType;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* type: `Seat`
|
|
107
|
+
* - common class for seat sub-class
|
|
108
|
+
*/
|
|
109
|
+
export interface Seat<T extends SeatStereo = SeatStereo> extends SeatState {
|
|
110
|
+
/**
|
|
111
|
+
* local id of seat
|
|
112
|
+
*/
|
|
113
|
+
id: string;
|
|
114
|
+
/**
|
|
115
|
+
* stereo types.
|
|
116
|
+
*/
|
|
117
|
+
stereo?: T;
|
|
118
|
+
/** seat-id (which is unique in seat-model) */
|
|
119
|
+
oid?: string;
|
|
120
|
+
/** item-id linked */
|
|
121
|
+
iid?: string;
|
|
122
|
+
/** prod-id linked */
|
|
123
|
+
pid?: string;
|
|
124
|
+
/** 해당 예약 인스턴스의 시작 시각 정보 */
|
|
125
|
+
seatStartTime?: number;
|
|
126
|
+
/** 해당 예약 인스턴스의 종료 시각 정보 */
|
|
127
|
+
seatEndTime?: number;
|
|
128
|
+
/**
|
|
129
|
+
* 해당 예약 인스턴스의 시작 구간 텍스트 타입
|
|
130
|
+
* - ex) "20:00"
|
|
131
|
+
*/
|
|
132
|
+
seatT1?: string;
|
|
133
|
+
/**
|
|
134
|
+
* 해당 예약 인스턴스의 종료 구간 텍스트 타입
|
|
135
|
+
* - ex) "21:00"
|
|
136
|
+
*/
|
|
137
|
+
seatT2?: string;
|
|
138
|
+
/** 해당 날짜의 텍스트 */
|
|
139
|
+
fullDate?: string;
|
|
140
|
+
/** 해당 날짜의 요일 */
|
|
141
|
+
dayOfAWeek?: number;
|
|
142
|
+
/** 설정된 시분할 기준값 (분) */
|
|
143
|
+
duration?: number;
|
|
144
|
+
/** (linked) the target program-id */
|
|
145
|
+
programId?: string;
|
|
146
|
+
/** (linked) the target zone-id */
|
|
147
|
+
zoneId?: string;
|
|
148
|
+
/**
|
|
149
|
+
* (optional) internal last error.
|
|
150
|
+
*/
|
|
151
|
+
error?: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* type: `SeatGroup`
|
|
155
|
+
* --------------
|
|
156
|
+
*/
|
|
157
|
+
export interface SeatGroup extends Seat<'group'> {
|
|
158
|
+
/** name of this instance */
|
|
159
|
+
name?: string;
|
|
160
|
+
/**
|
|
161
|
+
* price of seat
|
|
162
|
+
*/
|
|
163
|
+
price?: number;
|
|
164
|
+
/**
|
|
165
|
+
* list of types
|
|
166
|
+
* - in summary of seats.
|
|
167
|
+
*/
|
|
168
|
+
units?: SeatUnit[];
|
|
169
|
+
/** (optional) 매핑된 상품 단위 */
|
|
170
|
+
prodType?: GroupType;
|
|
171
|
+
/** (optional) 사용 만료 일자 */
|
|
172
|
+
endDate?: string;
|
|
173
|
+
/** (optional) 좌석 할당 시각 */
|
|
174
|
+
assignedAt?: number;
|
|
175
|
+
/** (optional) 좌석 취소 시각 */
|
|
176
|
+
canceledAt?: number;
|
|
177
|
+
/**
|
|
178
|
+
* (optional) 주문자 정보
|
|
179
|
+
*/
|
|
180
|
+
orderer?: User;
|
|
181
|
+
/** (linked) the origin orider-id via `ssocio-orders-api` */
|
|
182
|
+
orderId?: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* type: `seat-unit`
|
|
186
|
+
* - single element which can be selected from seat.
|
|
187
|
+
* - 기본적으로 판메 `재고`를 가지고 있는 단위.
|
|
188
|
+
*/
|
|
189
|
+
export interface SeatUnit extends Seat<'unit'> {
|
|
190
|
+
/**
|
|
191
|
+
* name of this unit
|
|
192
|
+
*/
|
|
193
|
+
name?: string;
|
|
194
|
+
/**
|
|
195
|
+
* parent-id (= id of seat-group)
|
|
196
|
+
*/
|
|
197
|
+
parent?: string;
|
|
198
|
+
/**
|
|
199
|
+
* type of unit
|
|
200
|
+
*/
|
|
201
|
+
unitType?: string;
|
|
202
|
+
/**
|
|
203
|
+
* possible stocks (integer)
|
|
204
|
+
*/
|
|
205
|
+
stock?: number;
|
|
206
|
+
/** 해당 예약 인스턴스의 판매일 여부 */
|
|
207
|
+
isBusinessDay?: boolean;
|
|
208
|
+
/** 해당 예약 인스턴스의 공휴일 여부 */
|
|
209
|
+
isHoliday?: boolean;
|
|
210
|
+
/** 해당 예약 인스턴스의 할인일 여부 */
|
|
211
|
+
isSaleDay?: boolean;
|
|
212
|
+
/** 해당 예약 인스턴스의 예약제한 여부 */
|
|
213
|
+
isDisableDay?: boolean;
|
|
214
|
+
/** (optional) the assignd stock-id */
|
|
215
|
+
stockId?: string;
|
|
216
|
+
/** (optional) the assignd ticket-id */
|
|
217
|
+
ticketId?: string;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* types in seat-root.
|
|
221
|
+
*/
|
|
222
|
+
export declare type SeatRoots = SeatGroup;
|
|
223
|
+
/**
|
|
224
|
+
* seat's hyper modeling
|
|
225
|
+
* - supporting all stereo into single seat data.
|
|
226
|
+
*
|
|
227
|
+
* NOTE
|
|
228
|
+
* - 좌석 생성 설정과 재고 인스턴스를 분리할 필요가 있음. (재고 없으면 인스턴스 생성 할필요 없을듯!!)
|
|
229
|
+
*/
|
|
230
|
+
export interface SeatNode extends GenericNode {
|
|
231
|
+
/** seat id */
|
|
232
|
+
id?: string;
|
|
233
|
+
/** this name */
|
|
234
|
+
name?: string;
|
|
235
|
+
/** single-line option-text */
|
|
236
|
+
option?: string;
|
|
237
|
+
}
|