@lemoncloud/ssocio-kiosk-api 0.25.423
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/README.md +4 -0
- package/dist/cores/types.d.ts +116 -0
- package/dist/lib/types.d.ts +36 -0
- package/dist/modules/cart/model.d.ts +125 -0
- package/dist/modules/cart/types.d.ts +35 -0
- package/dist/modules/cart/views.d.ts +53 -0
- package/dist/modules/category/categories-types.d.ts +33 -0
- package/dist/modules/category/model.d.ts +85 -0
- package/dist/modules/category/types.d.ts +47 -0
- package/dist/modules/category/views.d.ts +32 -0
- package/dist/modules/goods/model.d.ts +635 -0
- package/dist/modules/goods/types.d.ts +331 -0
- package/dist/modules/goods/views.d.ts +210 -0
- package/dist/modules/mock/model.d.ts +97 -0
- package/dist/modules/mock/types.d.ts +39 -0
- package/dist/modules/mock/views.d.ts +50 -0
- package/dist/modules/option/model.d.ts +185 -0
- package/dist/modules/option/options-types.d.ts +364 -0
- package/dist/modules/option/types.d.ts +112 -0
- package/dist/modules/shipping/model.d.ts +54 -0
- package/dist/modules/shipping/types.d.ts +26 -0
- package/dist/modules/shipping/views.d.ts +28 -0
- package/dist/modules/stock/model.d.ts +85 -0
- package/dist/modules/stock/stocks-types.d.ts +90 -0
- package/dist/modules/stock/types.d.ts +45 -0
- package/dist/modules/stock/views.d.ts +40 -0
- package/dist/service/backend-types.d.ts +65 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/view/types.d.ts +16 -0
- package/package.json +24 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `goods/types.ts`
|
|
3
|
+
* - types used in `backed-proxy`
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-08-29 initial version.
|
|
7
|
+
*
|
|
8
|
+
* Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
import { SimpleSet } from 'lemon-model';
|
|
11
|
+
import { PaginateParam } from '../../cores/types';
|
|
12
|
+
export { SimpleSet };
|
|
13
|
+
/**
|
|
14
|
+
* type: `PriceInfo`
|
|
15
|
+
* - 가격 정보를 위한 인터페이스
|
|
16
|
+
*/
|
|
17
|
+
export interface PriceInfo {
|
|
18
|
+
/** type of currency code (ex: USD) */
|
|
19
|
+
currency: CurrencyType;
|
|
20
|
+
/** price in milli (:= price * 1000) */
|
|
21
|
+
millis: number;
|
|
22
|
+
/** double value */
|
|
23
|
+
double?: number;
|
|
24
|
+
/**
|
|
25
|
+
* price format
|
|
26
|
+
* - like `#.##0.00` (check the excel formatter)
|
|
27
|
+
*/
|
|
28
|
+
format?: string;
|
|
29
|
+
/**
|
|
30
|
+
* formatted string
|
|
31
|
+
*/
|
|
32
|
+
formatted?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Lookup Table
|
|
36
|
+
*
|
|
37
|
+
* WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
|
|
38
|
+
*/
|
|
39
|
+
export declare const $LUT: {
|
|
40
|
+
/**
|
|
41
|
+
* Possible type of model.
|
|
42
|
+
*/
|
|
43
|
+
ModelType: {
|
|
44
|
+
/** product model */
|
|
45
|
+
product: string;
|
|
46
|
+
/** sales model */
|
|
47
|
+
sales: string;
|
|
48
|
+
/** notice model */
|
|
49
|
+
notice: string;
|
|
50
|
+
/** guide model */
|
|
51
|
+
guide: string;
|
|
52
|
+
/** agreed model */
|
|
53
|
+
agreed: string;
|
|
54
|
+
/** delivery model */
|
|
55
|
+
delivery: string;
|
|
56
|
+
/** policy model */
|
|
57
|
+
policy: string;
|
|
58
|
+
/** display model */
|
|
59
|
+
display: string;
|
|
60
|
+
/** catalog model */
|
|
61
|
+
catalog: string;
|
|
62
|
+
/** brand model */
|
|
63
|
+
brand: string;
|
|
64
|
+
/** cancel model */
|
|
65
|
+
cancel: string;
|
|
66
|
+
};
|
|
67
|
+
/** 상품의 종류 */
|
|
68
|
+
ProdStereo: {
|
|
69
|
+
'': string;
|
|
70
|
+
/** 배송형 */
|
|
71
|
+
delivery: string;
|
|
72
|
+
/** 방문형 */
|
|
73
|
+
visit: string;
|
|
74
|
+
/** 매장형 */
|
|
75
|
+
store: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* CurrencyType
|
|
79
|
+
* - 화폐의 종류
|
|
80
|
+
*/
|
|
81
|
+
CurrencyType: {
|
|
82
|
+
/** 달러 */
|
|
83
|
+
USD: string;
|
|
84
|
+
/** 원화 */
|
|
85
|
+
KRW: string;
|
|
86
|
+
/** 유로 */
|
|
87
|
+
EUR: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* CurrencyFormatType
|
|
91
|
+
* - 화폐 양식 타입
|
|
92
|
+
*/
|
|
93
|
+
CurrencyFormatType: {
|
|
94
|
+
USD: string;
|
|
95
|
+
KRW: string;
|
|
96
|
+
EUR: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* NoticeStereo
|
|
100
|
+
*/
|
|
101
|
+
NoticeStereo: {
|
|
102
|
+
'': string;
|
|
103
|
+
product: string;
|
|
104
|
+
};
|
|
105
|
+
InputType: {
|
|
106
|
+
'': string;
|
|
107
|
+
text: string;
|
|
108
|
+
textarea: string;
|
|
109
|
+
};
|
|
110
|
+
/** 약관종류 */
|
|
111
|
+
AgreedType: {
|
|
112
|
+
/** no selection */
|
|
113
|
+
'': string;
|
|
114
|
+
/** 필수 약관 */
|
|
115
|
+
required: string;
|
|
116
|
+
/** 선택 약관 */
|
|
117
|
+
optional: string;
|
|
118
|
+
};
|
|
119
|
+
PolicyStereo: {
|
|
120
|
+
'': string;
|
|
121
|
+
delivery: string;
|
|
122
|
+
exchange: string;
|
|
123
|
+
};
|
|
124
|
+
DeliveryStereo: {
|
|
125
|
+
'': string;
|
|
126
|
+
method: string;
|
|
127
|
+
company: string;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* 상품 기간/시간 예약 설정 타입
|
|
131
|
+
*/
|
|
132
|
+
ReserveStartType: {
|
|
133
|
+
/** 기간 설정 */
|
|
134
|
+
period: string;
|
|
135
|
+
/** 오늘 기준 */
|
|
136
|
+
today: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* 배송 방법 타입
|
|
140
|
+
*/
|
|
141
|
+
DeliveryMethod: {
|
|
142
|
+
/** 방문수령 */
|
|
143
|
+
visit: string;
|
|
144
|
+
/** 퀵서비스 */
|
|
145
|
+
quick: string;
|
|
146
|
+
/** 택배 */
|
|
147
|
+
parcel: string;
|
|
148
|
+
/** 직접배송 */
|
|
149
|
+
direct: string;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* 배송비 타입
|
|
153
|
+
*/
|
|
154
|
+
DeliveryFeeType: {
|
|
155
|
+
/** 무료배송 */
|
|
156
|
+
free: string;
|
|
157
|
+
/** 유료배송 */
|
|
158
|
+
paid: string;
|
|
159
|
+
/** 조건부무료배송 */
|
|
160
|
+
coditional: string;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* 상품 상태 구분
|
|
164
|
+
*/
|
|
165
|
+
ProductStatus: {
|
|
166
|
+
'': string;
|
|
167
|
+
/** 판매 */
|
|
168
|
+
sale: string;
|
|
169
|
+
/** 품절 */
|
|
170
|
+
soldout: string;
|
|
171
|
+
/** 숨김 */
|
|
172
|
+
hidden: string;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* 할인방식
|
|
176
|
+
*/
|
|
177
|
+
DiscountMethod: {
|
|
178
|
+
/** 금액 할인 */
|
|
179
|
+
price: string;
|
|
180
|
+
/** 할인율 */
|
|
181
|
+
percent: string;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* 요일 (WeekDay)의 number 타입
|
|
185
|
+
* - Date 객체와 호환을 위함.
|
|
186
|
+
* */
|
|
187
|
+
WeekDayNumType: {
|
|
188
|
+
/** sun (Sunday): 0 */
|
|
189
|
+
sun: number;
|
|
190
|
+
/** mon (Monday): 1 */
|
|
191
|
+
mon: number;
|
|
192
|
+
/** tue (Tuesday): 2 */
|
|
193
|
+
tue: number;
|
|
194
|
+
/** wed (Wednesday): 3 */
|
|
195
|
+
wed: number;
|
|
196
|
+
/** thu (Thursday): 4 */
|
|
197
|
+
thu: number;
|
|
198
|
+
/** fri (Friday): 5 */
|
|
199
|
+
fri: number;
|
|
200
|
+
/** sat (Saturday): 6 */
|
|
201
|
+
sat: number;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* 요일 (WeekDay)의 한국어 타입
|
|
205
|
+
* */
|
|
206
|
+
WeekDayKorType: {
|
|
207
|
+
/** 일요일 */
|
|
208
|
+
sun: string;
|
|
209
|
+
/** 월요일 */
|
|
210
|
+
mon: string;
|
|
211
|
+
/** 화요일 */
|
|
212
|
+
tue: string;
|
|
213
|
+
/** 수요일 */
|
|
214
|
+
wed: string;
|
|
215
|
+
/** 목요일 */
|
|
216
|
+
thu: string;
|
|
217
|
+
/** 금요일 */
|
|
218
|
+
fri: string;
|
|
219
|
+
/** 토요일 */
|
|
220
|
+
sat: string;
|
|
221
|
+
};
|
|
222
|
+
/** 상품 노출 뱃지 타입 */
|
|
223
|
+
ShowBadgeType: {
|
|
224
|
+
/** A type */
|
|
225
|
+
A: string;
|
|
226
|
+
/** B type */
|
|
227
|
+
B: string;
|
|
228
|
+
/** C type */
|
|
229
|
+
C: string;
|
|
230
|
+
/** D type */
|
|
231
|
+
D: string;
|
|
232
|
+
/** E type */
|
|
233
|
+
E: string;
|
|
234
|
+
};
|
|
235
|
+
/** 취소 조건 타입 */
|
|
236
|
+
CancelConditionType: {
|
|
237
|
+
/** 조건없음 */
|
|
238
|
+
'': string;
|
|
239
|
+
/** 상품 준비 전까지 취소 가능 */
|
|
240
|
+
beforePrepare: string;
|
|
241
|
+
/** 배송 전까지 취소 가능 */
|
|
242
|
+
beforeDelivery: string;
|
|
243
|
+
/** 취소기간내 */
|
|
244
|
+
inPeriod: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* type: `AgreedType`
|
|
249
|
+
*/
|
|
250
|
+
export declare type AgreedType = keyof typeof $LUT.AgreedType;
|
|
251
|
+
/**
|
|
252
|
+
* type: `InputType`
|
|
253
|
+
*/
|
|
254
|
+
export declare type InputType = keyof typeof $LUT.InputType;
|
|
255
|
+
export declare type ReserveStartType = keyof typeof $LUT.ReserveStartType;
|
|
256
|
+
/**
|
|
257
|
+
* type: DeliveryMethodType
|
|
258
|
+
*/
|
|
259
|
+
export declare type DeliveryMethodType = keyof typeof $LUT.DeliveryMethod;
|
|
260
|
+
/**
|
|
261
|
+
* type: DeliveryFeeType
|
|
262
|
+
*/
|
|
263
|
+
export declare type DeliveryFeeType = keyof typeof $LUT.DeliveryFeeType;
|
|
264
|
+
/**
|
|
265
|
+
* type: ProductStatusType
|
|
266
|
+
*/
|
|
267
|
+
export declare type ProductStatusType = keyof typeof $LUT.ProductStatus;
|
|
268
|
+
/**
|
|
269
|
+
* type: DiscountMethod
|
|
270
|
+
*/
|
|
271
|
+
export declare type DiscountMethod = keyof typeof $LUT.DiscountMethod;
|
|
272
|
+
/**
|
|
273
|
+
* stereo-type of notice (상품고시)
|
|
274
|
+
*/
|
|
275
|
+
export declare type NoticeStereo = keyof typeof $LUT.NoticeStereo;
|
|
276
|
+
/**
|
|
277
|
+
* stereo-type of policy
|
|
278
|
+
*/
|
|
279
|
+
export declare type PolicyStereo = keyof typeof $LUT.PolicyStereo;
|
|
280
|
+
/**
|
|
281
|
+
* stereo-type of delivery
|
|
282
|
+
*/
|
|
283
|
+
export declare type DeliveryStereo = keyof typeof $LUT.DeliveryStereo;
|
|
284
|
+
/**
|
|
285
|
+
* type: `WeekDayNumType`
|
|
286
|
+
*/
|
|
287
|
+
export declare type WeekDayNumType = keyof typeof $LUT.WeekDayNumType;
|
|
288
|
+
/**
|
|
289
|
+
* type: `WeekDayKorType`
|
|
290
|
+
*/
|
|
291
|
+
export declare type WeekDayKorType = keyof typeof $LUT.WeekDayKorType;
|
|
292
|
+
/**
|
|
293
|
+
* type: `ProdStereo`
|
|
294
|
+
*/
|
|
295
|
+
export declare type ProdStereo = keyof typeof $LUT.ProdStereo;
|
|
296
|
+
/**
|
|
297
|
+
* type: `CurrencyType`
|
|
298
|
+
*/
|
|
299
|
+
export declare type CurrencyType = keyof typeof $LUT.CurrencyType;
|
|
300
|
+
/**
|
|
301
|
+
* type: `CurrencyFormatType`
|
|
302
|
+
*/
|
|
303
|
+
export declare type CurrencyFormatType = keyof typeof $LUT.CurrencyFormatType;
|
|
304
|
+
/**
|
|
305
|
+
* type:`ShowBadgeType`
|
|
306
|
+
*/
|
|
307
|
+
export declare type ShowBadgeType = keyof typeof $LUT.ShowBadgeType;
|
|
308
|
+
/**
|
|
309
|
+
* type:`CancelConditionType`
|
|
310
|
+
*/
|
|
311
|
+
export declare type CancelConditionType = keyof typeof $LUT.CancelConditionType;
|
|
312
|
+
/**
|
|
313
|
+
* query param for prods-list
|
|
314
|
+
*/
|
|
315
|
+
export interface ProdListParam extends PaginateParam {
|
|
316
|
+
/** sort selection (default latest) */
|
|
317
|
+
sort?: 'latest' | 'popular' | 'lowPrice' | 'highPrice' | 'ranking';
|
|
318
|
+
/** filter by category-id */
|
|
319
|
+
categoryId?: string;
|
|
320
|
+
/** filter `isDisplay` condition (default true) */
|
|
321
|
+
display?: boolean | '' | 'true' | 'false';
|
|
322
|
+
/**
|
|
323
|
+
* where to view
|
|
324
|
+
* - main에서는 `priceSale`이 `isSale`과 상관없이 최종 구매가로 설정되도록 (false일때 `price`와 동일)
|
|
325
|
+
*/
|
|
326
|
+
view?: '' | 'main';
|
|
327
|
+
/** show the detail infor (default false) */
|
|
328
|
+
detail?: boolean | string;
|
|
329
|
+
}
|
|
330
|
+
/** must export $LUT as default */
|
|
331
|
+
export default $LUT;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `goods/views.ts`
|
|
3
|
+
* - type of views used in `backend-proxy`
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-08-29 initial version.
|
|
7
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
8
|
+
* @date 2025-03-18 refactoring for goods service.
|
|
9
|
+
* @Copyright (C) 2025 LemonCloud Co Ltd. - All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { View, Body } from 'lemon-model';
|
|
12
|
+
import { AgreedModel, BrandModel, CancelModel, CatalogModel, DeliveryModel, DisplayModel, InputElement, NoticeModel, PolicyModel, ProductModel, SalesModel, UsageGuideModel } from './model';
|
|
13
|
+
import { CategoryView } from '../category/views';
|
|
14
|
+
import { StockView } from '../stock/views';
|
|
15
|
+
import $LUT from './types';
|
|
16
|
+
export * from './types';
|
|
17
|
+
export default $LUT;
|
|
18
|
+
/**!SECTION */
|
|
19
|
+
/**
|
|
20
|
+
* type `CatalogView`
|
|
21
|
+
*/
|
|
22
|
+
export interface CatalogView extends View, Partial<CatalogModel> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* type `CatalogBody`
|
|
26
|
+
*/
|
|
27
|
+
export interface CatalogBody extends Body, Partial<Omit<CatalogView, 'parentName'>> {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* type `BrandView`
|
|
31
|
+
*/
|
|
32
|
+
export interface BrandView extends View, Omit<Partial<BrandModel>, 'hidden'> {
|
|
33
|
+
/**
|
|
34
|
+
* hidden(숨김) flag
|
|
35
|
+
*/
|
|
36
|
+
hidden?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* type `BrandBody`
|
|
40
|
+
*/
|
|
41
|
+
export interface BrandBody extends Body, Partial<Omit<BrandView, 'parentName'>> {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* type: `ProductView`
|
|
45
|
+
*/
|
|
46
|
+
export interface ProductView extends View, Partial<Omit<ProductModel, 'isHidden' | 'isDisplay' | 'usePriceRange' | 'notices' | 'deliveries' | 'policies' | 'guides' | 'sales$' | 'agreed$' | 'cancel$' | 'display$' | 'catalog$' | 'category$' | 'brand$' | 'notice$' | 'delivery$' | 'policy$' | 'guide$' | 'stock$' | 'originPrice' | 'savingPrice' | 'salesPrice'>> {
|
|
47
|
+
/**
|
|
48
|
+
* unique id of this type
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
/**
|
|
52
|
+
* 쇼핑숨김 설정여부 (외부에는 삭제등으로 보임)
|
|
53
|
+
*/
|
|
54
|
+
isHidden?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 쇼핑목록 보기여부 (검색에서 외부 노출여부)
|
|
57
|
+
*/
|
|
58
|
+
isDisplay?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 기본판매가(`price`) ‘~’ 기능 사용여부
|
|
61
|
+
*/
|
|
62
|
+
usePriceRange?: boolean;
|
|
63
|
+
/** 원 상품 가격 (ex: `$1.1` ) */
|
|
64
|
+
originPrice?: string;
|
|
65
|
+
/** 할인된 금액 */
|
|
66
|
+
savingPrice?: string;
|
|
67
|
+
/** 최종 구매가 */
|
|
68
|
+
salesPrice?: string;
|
|
69
|
+
/**
|
|
70
|
+
* option layout (default is `grouped`)
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* 선택 옵션들
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* 추가 선택 옵션들
|
|
77
|
+
*/
|
|
78
|
+
/** 상품고시 항목들 */
|
|
79
|
+
notices?: InputElementView[];
|
|
80
|
+
/** 배공 정책 항목들 */
|
|
81
|
+
deliveries?: InputElementView[];
|
|
82
|
+
/** 교환 정책 항목들 */
|
|
83
|
+
policies?: InputElementView[];
|
|
84
|
+
/** 이용 안내 항목들 */
|
|
85
|
+
guides?: InputElementView[];
|
|
86
|
+
/** (internal) the linked catalog-model */
|
|
87
|
+
readonly catalog$?: CatalogView;
|
|
88
|
+
/** (internal) the linked category-model */
|
|
89
|
+
readonly category$?: CategoryView[];
|
|
90
|
+
/** (internal) the linked brand-model */
|
|
91
|
+
readonly brand$?: BrandView;
|
|
92
|
+
/** (internal) the linked sales-model */
|
|
93
|
+
readonly sales$?: SalesView;
|
|
94
|
+
/** (internal) the linked agreed-model */
|
|
95
|
+
readonly agreed$?: AgreedView[];
|
|
96
|
+
/** (internal) the linked cancel-model */
|
|
97
|
+
readonly cancel$?: CancelView;
|
|
98
|
+
/** (internal) the linked display-model */
|
|
99
|
+
readonly display$?: DisplayView;
|
|
100
|
+
/** (internal) the linked notice-model */
|
|
101
|
+
readonly notice$?: NoticeView;
|
|
102
|
+
/** (internal) the linked delivery-model */
|
|
103
|
+
readonly delivery$?: DeliveryView;
|
|
104
|
+
/** (internal) the linked policy-model */
|
|
105
|
+
readonly policy$?: PolicyView;
|
|
106
|
+
/** (internal) the linked guide-model */
|
|
107
|
+
readonly guide$?: UsageGuideView;
|
|
108
|
+
/** (internal) the linked stock-model */
|
|
109
|
+
readonly stock$?: StockView;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Type `ProductBody`
|
|
113
|
+
*/
|
|
114
|
+
export interface ProductBody extends Body, Partial<Omit<ProductView, ''>> {
|
|
115
|
+
}
|
|
116
|
+
/** type: `NoticeView` */
|
|
117
|
+
export interface NoticeView extends View, Partial<Omit<NoticeModel, 'required' | 'notices'>> {
|
|
118
|
+
/** 상품고시 항목들 */
|
|
119
|
+
notices?: InputElementView[];
|
|
120
|
+
}
|
|
121
|
+
/** type `NoticeBody` */
|
|
122
|
+
export interface NoticeBody extends Body, Partial<NoticeView> {
|
|
123
|
+
}
|
|
124
|
+
/** type: `DeliveryView` */
|
|
125
|
+
export interface DeliveryView extends View, Partial<Omit<DeliveryModel, 'required' | 'isFree'>> {
|
|
126
|
+
/** 무료배송여부 flag */
|
|
127
|
+
isFree?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/** type `DeliveryBody` */
|
|
130
|
+
export interface DeliveryBody extends Body, Partial<DeliveryView> {
|
|
131
|
+
}
|
|
132
|
+
/** type: `PolicyView` */
|
|
133
|
+
export interface PolicyView extends View, Partial<Omit<PolicyModel, 'required' | 'isFree' | 'hasFreeCondition'>> {
|
|
134
|
+
/**
|
|
135
|
+
* 무료 배송 여부
|
|
136
|
+
*/
|
|
137
|
+
isFree?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* 조건부 무료/유료
|
|
140
|
+
*/
|
|
141
|
+
hasFreeCondition?: boolean;
|
|
142
|
+
}
|
|
143
|
+
/** type `PolicyBody` */
|
|
144
|
+
export interface PolicyBody extends Body, Partial<PolicyView> {
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* type: `SalesView`
|
|
148
|
+
*/
|
|
149
|
+
export interface SalesView extends View, Omit<Partial<SalesModel>, 'usePeriod' | 'useCancelPeriod'> {
|
|
150
|
+
/** use period setting */
|
|
151
|
+
usePeriod?: boolean;
|
|
152
|
+
/** use cancel-period setting */
|
|
153
|
+
useCancelPeriod?: boolean;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* type: `SalesBody`
|
|
157
|
+
*/
|
|
158
|
+
export interface SalesBody extends Body, Partial<SalesView> {
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* type: `AgreedView`
|
|
162
|
+
*/
|
|
163
|
+
export interface AgreedView extends View, Omit<Partial<AgreedModel>, 'required'> {
|
|
164
|
+
/** use image */
|
|
165
|
+
required?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* type: `AgreedBody`
|
|
169
|
+
*/
|
|
170
|
+
export interface AgreedBody extends Body, Partial<AgreedView> {
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* type: `CancelView`
|
|
174
|
+
*/
|
|
175
|
+
export interface CancelView extends View, Omit<Partial<CancelModel>, 'hasCondition' | 'useCancel'> {
|
|
176
|
+
/** flag to allow cancellation */
|
|
177
|
+
useCancel?: boolean;
|
|
178
|
+
/** use cancel condition */
|
|
179
|
+
hasCondition?: boolean;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* type: `CancelBody`
|
|
183
|
+
*/
|
|
184
|
+
export interface CancelBody extends Body, Partial<CancelView> {
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* type: `DisplayView`
|
|
188
|
+
*/
|
|
189
|
+
export interface DisplayView extends View, Omit<Partial<DisplayModel>, 'isDisplay'> {
|
|
190
|
+
/** flag to display in front */
|
|
191
|
+
isDisplay?: boolean;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* type: `DisplayBody`
|
|
195
|
+
*/
|
|
196
|
+
export interface DisplayBody extends Body, Partial<DisplayView> {
|
|
197
|
+
}
|
|
198
|
+
/** type: `UsageGuideView` */
|
|
199
|
+
export interface UsageGuideView extends View, Partial<Omit<UsageGuideModel, 'required' | 'guides'>> {
|
|
200
|
+
/** 이용안내 항목들 */
|
|
201
|
+
guides?: InputElementView[];
|
|
202
|
+
}
|
|
203
|
+
/** type `UsageGuideBody` */
|
|
204
|
+
export interface UsageGuideBody extends Body, Partial<UsageGuideView> {
|
|
205
|
+
}
|
|
206
|
+
/** custom input-element */
|
|
207
|
+
export interface InputElementView extends Partial<Omit<InputElement, 'required'>> {
|
|
208
|
+
/** 필수 입력 항목 */
|
|
209
|
+
required?: boolean;
|
|
210
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mock/model.ts`
|
|
3
|
+
* - model definitions per account data
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-08-29 initial version.
|
|
7
|
+
*
|
|
8
|
+
* Copyright (C) 2020 LemonCloud Co Ltd. - All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
import { CoreModel, NextIdentityAccess } from 'lemon-model';
|
|
11
|
+
import { ModelType, SimpleSet } from '../../service/backend-types';
|
|
12
|
+
export { ModelType };
|
|
13
|
+
/**
|
|
14
|
+
* type: `Model`: common model
|
|
15
|
+
*/
|
|
16
|
+
export declare type Model = CoreModel<ModelType>;
|
|
17
|
+
/**
|
|
18
|
+
* type: `MockHead`
|
|
19
|
+
* - common head of mock-model.
|
|
20
|
+
*/
|
|
21
|
+
export interface MockHead {
|
|
22
|
+
/** id of mock */
|
|
23
|
+
id?: string;
|
|
24
|
+
/** name of mock */
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* `mock`: internal mock model.
|
|
29
|
+
* - provice mocks data
|
|
30
|
+
*/
|
|
31
|
+
export interface MockModel<T = string> extends MockHead, Model {
|
|
32
|
+
/** name of this model */
|
|
33
|
+
name?: string;
|
|
34
|
+
/** alias-id when stereo='#alias' */
|
|
35
|
+
aliasId?: string;
|
|
36
|
+
/** json encoding all data */
|
|
37
|
+
meta?: T;
|
|
38
|
+
}
|
|
39
|
+
export interface MockModelExt<T = string> extends MockModel<T> {
|
|
40
|
+
/** extended data with any type */
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* type: `TestHead`
|
|
45
|
+
* - common head of test-model.
|
|
46
|
+
*/
|
|
47
|
+
export interface TestHead {
|
|
48
|
+
/** internal reference */
|
|
49
|
+
_idx?: number;
|
|
50
|
+
/** internal date(YYYY-MM-DD) */
|
|
51
|
+
_date?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* `test`: internal test model.
|
|
55
|
+
*/
|
|
56
|
+
export interface TestModel extends Model, TestHead {
|
|
57
|
+
/** name of model */
|
|
58
|
+
name?: string;
|
|
59
|
+
/** test count */
|
|
60
|
+
count?: number;
|
|
61
|
+
/** (optional) extra */
|
|
62
|
+
extra?: SimpleSet;
|
|
63
|
+
/**
|
|
64
|
+
* inner Object.
|
|
65
|
+
*/
|
|
66
|
+
readonly Model?: Model;
|
|
67
|
+
/**
|
|
68
|
+
* (view) Access Infor.
|
|
69
|
+
*/
|
|
70
|
+
readonly $identity?: NextIdentityAccess;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* extract field names from models
|
|
74
|
+
* - only fields start with lowercase, or all upper.
|
|
75
|
+
*/
|
|
76
|
+
export declare const filterFields: (fields: string[], base?: string[]) => string[];
|
|
77
|
+
/** field names from head */
|
|
78
|
+
export declare const $HEAD: {
|
|
79
|
+
mock: string[];
|
|
80
|
+
test: string[];
|
|
81
|
+
};
|
|
82
|
+
export declare const $FIELD: {
|
|
83
|
+
mock: string[];
|
|
84
|
+
test: string[];
|
|
85
|
+
};
|
|
86
|
+
/** must export default as below */
|
|
87
|
+
declare const _default: {
|
|
88
|
+
$HEAD: {
|
|
89
|
+
mock: string[];
|
|
90
|
+
test: string[];
|
|
91
|
+
};
|
|
92
|
+
$FIELD: {
|
|
93
|
+
mock: string[];
|
|
94
|
+
test: string[];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mock/types.ts`
|
|
3
|
+
* - types used in `backed-proxy`
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-08-29 initial version.
|
|
7
|
+
*
|
|
8
|
+
* Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
import { SimpleSet } from 'lemon-model';
|
|
11
|
+
export { SimpleSet };
|
|
12
|
+
/**
|
|
13
|
+
* Lookup Table
|
|
14
|
+
*
|
|
15
|
+
* WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
|
|
16
|
+
*/
|
|
17
|
+
declare const $LUT: {
|
|
18
|
+
/**
|
|
19
|
+
* Possible type of model.
|
|
20
|
+
*/
|
|
21
|
+
ModelType: {
|
|
22
|
+
/** mock model */
|
|
23
|
+
mock: string;
|
|
24
|
+
/** test model */
|
|
25
|
+
test: string;
|
|
26
|
+
};
|
|
27
|
+
/** type: MockStereo */
|
|
28
|
+
MockStereo: {
|
|
29
|
+
'': string;
|
|
30
|
+
'#': string;
|
|
31
|
+
'#alias': string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* type: `MockStereo`
|
|
36
|
+
*/
|
|
37
|
+
export declare type MockStereo = keyof typeof $LUT.MockStereo;
|
|
38
|
+
/** must export $LUT as default */
|
|
39
|
+
export default $LUT;
|