@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
package/README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `types.ts`
|
|
3
|
+
* - common types used in `/cores`
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-06-21 optimized w/ `abstract-services`
|
|
7
|
+
* @date 2022-06-28 added `Codable` interface for general types.
|
|
8
|
+
* @date 2023-01-18 optimized with `lemon-core@3.2.4`
|
|
9
|
+
* @date 2023-02-15 optimized with `lemon-core@3.2.5`
|
|
10
|
+
*
|
|
11
|
+
* @copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
12
|
+
*/
|
|
13
|
+
import { CoreModel, View, Body } from 'lemon-model';
|
|
14
|
+
export { CoreModel, View, Body };
|
|
15
|
+
/**
|
|
16
|
+
* type `ListResult`
|
|
17
|
+
*/
|
|
18
|
+
export interface ListResult<T, R = any> {
|
|
19
|
+
/**
|
|
20
|
+
* total searched count
|
|
21
|
+
*/
|
|
22
|
+
total?: number;
|
|
23
|
+
/**
|
|
24
|
+
* max items count in the page
|
|
25
|
+
*/
|
|
26
|
+
limit?: number;
|
|
27
|
+
/**
|
|
28
|
+
* current page number.
|
|
29
|
+
*/
|
|
30
|
+
page?: number;
|
|
31
|
+
/**
|
|
32
|
+
* (optional) time took in sec
|
|
33
|
+
*/
|
|
34
|
+
took?: number;
|
|
35
|
+
/**
|
|
36
|
+
* items searched
|
|
37
|
+
*/
|
|
38
|
+
list: T[];
|
|
39
|
+
/**
|
|
40
|
+
* (optional) aggr list
|
|
41
|
+
*/
|
|
42
|
+
aggr?: R[];
|
|
43
|
+
}
|
|
44
|
+
export interface AggrKeyCount {
|
|
45
|
+
/** name of key(or bucket name) */
|
|
46
|
+
key: string;
|
|
47
|
+
/** number of count */
|
|
48
|
+
val: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* type `PaginatedListResult`
|
|
52
|
+
*/
|
|
53
|
+
export interface PaginatedListResult<T, R = string> extends ListResult<T, R> {
|
|
54
|
+
/**
|
|
55
|
+
* current page
|
|
56
|
+
*/
|
|
57
|
+
page: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* type `ListParam`
|
|
61
|
+
*/
|
|
62
|
+
export interface ListParam {
|
|
63
|
+
/**
|
|
64
|
+
* max items count to be fetched
|
|
65
|
+
*/
|
|
66
|
+
limit?: number;
|
|
67
|
+
/**
|
|
68
|
+
* (optional) sorting order
|
|
69
|
+
* - 'asc': older first
|
|
70
|
+
* - 'desc': newer first
|
|
71
|
+
* - string: extended sorting features
|
|
72
|
+
*/
|
|
73
|
+
sort?: 'asc' | 'desc' | string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* type `PaginateParam`
|
|
77
|
+
*/
|
|
78
|
+
export interface PaginateParam extends ListParam {
|
|
79
|
+
/**
|
|
80
|
+
* page # to fetch (0-indexed)
|
|
81
|
+
*/
|
|
82
|
+
page?: number;
|
|
83
|
+
/**
|
|
84
|
+
* (optional) offset # from start.
|
|
85
|
+
*/
|
|
86
|
+
offset?: number;
|
|
87
|
+
/**
|
|
88
|
+
* (optional) flag to filter by uid
|
|
89
|
+
*/
|
|
90
|
+
uid?: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* type `BulkUpdateBody`
|
|
94
|
+
*/
|
|
95
|
+
export interface BulkUpdateBody<T> extends BulkBody<T> {
|
|
96
|
+
/**
|
|
97
|
+
* list bulk update model with id
|
|
98
|
+
*/
|
|
99
|
+
list: T[];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* body data for bulk
|
|
103
|
+
*/
|
|
104
|
+
export interface BulkBody<T> {
|
|
105
|
+
list: T[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* list of the selected model-id
|
|
109
|
+
*/
|
|
110
|
+
export interface BodyList<T extends {
|
|
111
|
+
id: string;
|
|
112
|
+
} = {
|
|
113
|
+
id: string;
|
|
114
|
+
}> {
|
|
115
|
+
list: T[];
|
|
116
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `lib/types.ts`
|
|
3
|
+
* - contains only the hyper types.
|
|
4
|
+
* - `publish types` 할때, lemon-core 포함을 최소화하기 위한 조치!
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* @author Steve <steve@lemoncloud.io>
|
|
8
|
+
* @date 2022-10-18 initial version
|
|
9
|
+
*
|
|
10
|
+
* @copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
export * from '../modules/option/options-types';
|
|
13
|
+
/**
|
|
14
|
+
* a node represent.
|
|
15
|
+
*/
|
|
16
|
+
export interface GenericNode {
|
|
17
|
+
/** id of this node */
|
|
18
|
+
id?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* type: `ProxyAdaptor`
|
|
22
|
+
* - storage adaptor to support fetching the model from storage.
|
|
23
|
+
* - used to adapt w/ `backend-proxy`.
|
|
24
|
+
*/
|
|
25
|
+
export interface ProxyAdaptor<T extends GenericNode> {
|
|
26
|
+
/** say hello of this adaptor */
|
|
27
|
+
hello?(): string;
|
|
28
|
+
/** get the model (or load from stocks) */
|
|
29
|
+
get(id: string): Promise<T>;
|
|
30
|
+
/** set the model (or save into stocks) */
|
|
31
|
+
set?(id: string, model: T): Promise<T>;
|
|
32
|
+
/** increment fields in the model */
|
|
33
|
+
inc?(id: string, model: T): Promise<T>;
|
|
34
|
+
/** create new instance with initial data */
|
|
35
|
+
new?(model?: T): Promise<T>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cart/model.ts`
|
|
3
|
+
* - model definitions per account data
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-08-29 initial version.
|
|
7
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
8
|
+
* @date 2024-08-08 refactoring for carts service.
|
|
9
|
+
*
|
|
10
|
+
* Copyright (C) 2020 LemonCloud Co Ltd. - All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { CoreModel } from 'lemon-model';
|
|
13
|
+
import { ModelType } from '../../service/backend-types';
|
|
14
|
+
import { DeliveryHead, ProductHead } from '../goods/model';
|
|
15
|
+
import { CategoryHead } from '../category/model';
|
|
16
|
+
import { StockHead } from '../stock/model';
|
|
17
|
+
import { PriceInfo } from '../goods/types';
|
|
18
|
+
export { ModelType };
|
|
19
|
+
/**
|
|
20
|
+
* type: `Model`: common model
|
|
21
|
+
*/
|
|
22
|
+
export declare type Model = CoreModel<ModelType>;
|
|
23
|
+
/**
|
|
24
|
+
* Author information.
|
|
25
|
+
*/
|
|
26
|
+
export interface CartOwner {
|
|
27
|
+
/**
|
|
28
|
+
* id(= account-id or user-id) of `owner`
|
|
29
|
+
*/
|
|
30
|
+
id?: string;
|
|
31
|
+
/**
|
|
32
|
+
* iid(= identity-id) of `owner`
|
|
33
|
+
*/
|
|
34
|
+
iid?: string;
|
|
35
|
+
/**
|
|
36
|
+
* name of `owner`
|
|
37
|
+
*/
|
|
38
|
+
name?: string;
|
|
39
|
+
/**
|
|
40
|
+
* image of `owner`
|
|
41
|
+
*/
|
|
42
|
+
image?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* type: `CartHead`
|
|
46
|
+
* - common head of cart-model.
|
|
47
|
+
*/
|
|
48
|
+
export interface CartHead {
|
|
49
|
+
/** id of model */
|
|
50
|
+
id?: string;
|
|
51
|
+
/** name of model */
|
|
52
|
+
name?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* type: `CartModel`
|
|
56
|
+
* - 사용자별(owner) 장바구니에 담긴 상품정보
|
|
57
|
+
* - 선택상품 1개당, 1개의 장바구니가 만들어짐
|
|
58
|
+
*/
|
|
59
|
+
export interface CartModel extends CartHead, Model {
|
|
60
|
+
/** id of cart (auto-seq) */
|
|
61
|
+
id?: string;
|
|
62
|
+
/** version of goods-api (inited when creation) */
|
|
63
|
+
version?: string;
|
|
64
|
+
/**
|
|
65
|
+
* owner of this cart.
|
|
66
|
+
*/
|
|
67
|
+
owner$?: CartOwner;
|
|
68
|
+
/** name of model */
|
|
69
|
+
name?: string;
|
|
70
|
+
/** single-line option-text */
|
|
71
|
+
option?: string;
|
|
72
|
+
/** thumb image (in small-size) */
|
|
73
|
+
thumb?: string;
|
|
74
|
+
/** count of product */
|
|
75
|
+
count?: number;
|
|
76
|
+
/** unit-price (single) of this cart */
|
|
77
|
+
unitPrice$?: PriceInfo;
|
|
78
|
+
/** price of this cart (= unitPrice * count) */
|
|
79
|
+
price$?: PriceInfo;
|
|
80
|
+
/** (optional) 상품 할인금액 (* 자동계산) */
|
|
81
|
+
discountPrice$?: PriceInfo;
|
|
82
|
+
deliveryPrice$?: PriceInfo;
|
|
83
|
+
/** hidden flag (= delete cart) */
|
|
84
|
+
isHidden?: number;
|
|
85
|
+
/** checked flag (= user has checked) */
|
|
86
|
+
isChecked?: number;
|
|
87
|
+
/** id of category-model */
|
|
88
|
+
categoryId?: string;
|
|
89
|
+
/** head of category-model */
|
|
90
|
+
category$?: CategoryHead;
|
|
91
|
+
/** id of prod-model */
|
|
92
|
+
prodId?: string;
|
|
93
|
+
/** head of prod-model */
|
|
94
|
+
prod$?: ProductHead;
|
|
95
|
+
/** id of stock-model */
|
|
96
|
+
stockId?: string;
|
|
97
|
+
/** head of stock-model */
|
|
98
|
+
stock$?: StockHead;
|
|
99
|
+
/** id of delivery */
|
|
100
|
+
deliveryId?: string;
|
|
101
|
+
/** head of delivery */
|
|
102
|
+
delivery$?: DeliveryHead;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* extract field names from models
|
|
106
|
+
* - only fields start with lowercase, or all upper.
|
|
107
|
+
*/
|
|
108
|
+
export declare const filterFields: (fields: string[], base?: string[]) => string[];
|
|
109
|
+
/** field names from head */
|
|
110
|
+
export declare const $HEAD: {
|
|
111
|
+
cart: string[];
|
|
112
|
+
};
|
|
113
|
+
export declare const $FIELD: {
|
|
114
|
+
cart: string[];
|
|
115
|
+
};
|
|
116
|
+
/** must export default as below */
|
|
117
|
+
declare const _default: {
|
|
118
|
+
$HEAD: {
|
|
119
|
+
cart: string[];
|
|
120
|
+
};
|
|
121
|
+
$FIELD: {
|
|
122
|
+
cart: string[];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cart/types.ts`
|
|
3
|
+
* - types used in `backed-proxy`
|
|
4
|
+
*
|
|
5
|
+
* @author Steve <steve@lemoncloud.io>
|
|
6
|
+
* @date 2022-08-29 initial version.
|
|
7
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
8
|
+
* @date 2024-08-08 refactoring for carts service.
|
|
9
|
+
* Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Lookup Table
|
|
13
|
+
*
|
|
14
|
+
* WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
|
|
15
|
+
*/
|
|
16
|
+
declare const $LUT: {
|
|
17
|
+
/**
|
|
18
|
+
* Possible type of model.
|
|
19
|
+
*/
|
|
20
|
+
ModelType: {
|
|
21
|
+
/** cart model */
|
|
22
|
+
cart: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* query param of `POST /carts/0/order`
|
|
27
|
+
*/
|
|
28
|
+
export interface CartOrderParam {
|
|
29
|
+
/**
|
|
30
|
+
* flag to start order by fetching `/start-order` of orders-api.
|
|
31
|
+
*/
|
|
32
|
+
start?: boolean | string;
|
|
33
|
+
}
|
|
34
|
+
/** must export $LUT as default */
|
|
35
|
+
export default $LUT;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cart/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 cart service.
|
|
9
|
+
* @Copyright (C) 2025 LemonCloud Co Ltd. - All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { View, Body } from 'lemon-model';
|
|
12
|
+
import { BodyList } from '../../cores/types';
|
|
13
|
+
import { CartModel } from './model';
|
|
14
|
+
import { DeliveryView } from '../goods/views';
|
|
15
|
+
import { CategoryView } from '../category/views';
|
|
16
|
+
import $LUT from './types';
|
|
17
|
+
export * from './types';
|
|
18
|
+
export default $LUT;
|
|
19
|
+
/**!SECTION */
|
|
20
|
+
/**
|
|
21
|
+
* body of `POST /carts/0/order`
|
|
22
|
+
* - BodyList<>: selected cart-id list to start order.
|
|
23
|
+
* - CartBody[]: selected product-list to start order.
|
|
24
|
+
*/
|
|
25
|
+
export declare type CartOrderBody = BodyList | CartBody[];
|
|
26
|
+
/**
|
|
27
|
+
* type: `CartView`
|
|
28
|
+
* - usually same as post's body.
|
|
29
|
+
*/
|
|
30
|
+
export interface CartView extends View, Omit<Partial<CartModel>, 'isHidden' | 'isChecked' | 'category$' | 'delivery$'> {
|
|
31
|
+
/** 카트 숨길처리 (삭제효과) */
|
|
32
|
+
isHidden?: boolean;
|
|
33
|
+
/** 선택박스 체크하기 */
|
|
34
|
+
isChecked?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 해당 상품의 단일 가격 정보 (string)
|
|
37
|
+
* - ex) `$0.99`, `₩1,000`
|
|
38
|
+
*/
|
|
39
|
+
unitPriceInfo?: string;
|
|
40
|
+
/** 해당 카트(금액) 정보 */
|
|
41
|
+
priceInfo?: string;
|
|
42
|
+
/** 할인금액 정보 */
|
|
43
|
+
discountInfo?: string;
|
|
44
|
+
/** 배송비 정보 */
|
|
45
|
+
deliveryInfo?: string;
|
|
46
|
+
/** (internal) the linked category-model */
|
|
47
|
+
readonly category$?: CategoryView;
|
|
48
|
+
/** (internal) the linked delivery-model */
|
|
49
|
+
readonly delivery$?: DeliveryView;
|
|
50
|
+
}
|
|
51
|
+
/** type `CartBody` */
|
|
52
|
+
export interface CartBody extends Body, Partial<CartView> {
|
|
53
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `lib/categories-types.ts`
|
|
3
|
+
* - types for category support
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @author Steve <steve@lemoncloud.io>
|
|
7
|
+
* @date 2022-10-18 initial version
|
|
8
|
+
*
|
|
9
|
+
* @copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { GenericNode } from '../../lib/types';
|
|
12
|
+
/**
|
|
13
|
+
* type: `CategoryNode`
|
|
14
|
+
* - represent a single node of category tree.
|
|
15
|
+
* - node should have single parent's node.
|
|
16
|
+
*/
|
|
17
|
+
export interface CategoryNode extends GenericNode {
|
|
18
|
+
/** category-id */
|
|
19
|
+
id?: string;
|
|
20
|
+
/** this name */
|
|
21
|
+
name?: string;
|
|
22
|
+
/** id of parent node */
|
|
23
|
+
parent?: string;
|
|
24
|
+
/** name of parent node */
|
|
25
|
+
parentName?: string;
|
|
26
|
+
/** current depth (= parent.depth + 1) */
|
|
27
|
+
depth?: number;
|
|
28
|
+
/**
|
|
29
|
+
* the node path from root to node
|
|
30
|
+
* - list of [[id, name].join(':'),...]
|
|
31
|
+
*/
|
|
32
|
+
paths?: string[];
|
|
33
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 } from 'lemon-model';
|
|
11
|
+
import { ModelType } from '../../service/backend-types';
|
|
12
|
+
import { CategoryStereo } from './types';
|
|
13
|
+
import { CategoryNode } from './categories-types';
|
|
14
|
+
export { ModelType };
|
|
15
|
+
/**
|
|
16
|
+
* type: `Model`: common model
|
|
17
|
+
*/
|
|
18
|
+
export declare type Model = CoreModel<ModelType>;
|
|
19
|
+
/**
|
|
20
|
+
* type: boolean style number.
|
|
21
|
+
*/
|
|
22
|
+
export declare type BoolFlag = 0 | 1;
|
|
23
|
+
/**
|
|
24
|
+
* Type: `CategoryHead`
|
|
25
|
+
*/
|
|
26
|
+
export interface CategoryHead {
|
|
27
|
+
/** auto sequence */
|
|
28
|
+
id?: string;
|
|
29
|
+
/** stereo */
|
|
30
|
+
stereo?: CategoryStereo;
|
|
31
|
+
/** 분류 이름 */
|
|
32
|
+
name?: string;
|
|
33
|
+
/** status of activate */
|
|
34
|
+
optional?: BoolFlag;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* type: `CategoryModel` (카테고리)
|
|
38
|
+
* - 카테고리(분류) 모델
|
|
39
|
+
*/
|
|
40
|
+
export interface CategoryModel extends Model, CategoryNode, CategoryHead {
|
|
41
|
+
/** stereo */
|
|
42
|
+
stereo?: CategoryStereo;
|
|
43
|
+
/** 상위 부모의 ID */
|
|
44
|
+
parent?: string;
|
|
45
|
+
/** 상위 부모의 Name */
|
|
46
|
+
parentName?: string;
|
|
47
|
+
/** 카테고리 (항목) 이름 */
|
|
48
|
+
name?: string;
|
|
49
|
+
/** 카테고리 아이콘 */
|
|
50
|
+
icon?: string;
|
|
51
|
+
/** 카테고리 텍스트 */
|
|
52
|
+
text?: string;
|
|
53
|
+
/** 카테고리 보여주기 순서 */
|
|
54
|
+
order?: number;
|
|
55
|
+
/** 탭메뉴 */
|
|
56
|
+
tapMenu?: string[];
|
|
57
|
+
/** 컨텐츠(html/text) 내용 */
|
|
58
|
+
content?: string;
|
|
59
|
+
/**
|
|
60
|
+
* hidden(숨김) flag
|
|
61
|
+
*/
|
|
62
|
+
hidden?: BoolFlag;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* extract field names from models
|
|
66
|
+
* - only fields start with lowercase, or all upper.
|
|
67
|
+
*/
|
|
68
|
+
export declare const filterFields: (fields: string[], base?: string[]) => string[];
|
|
69
|
+
/** field names from head */
|
|
70
|
+
export declare const $HEAD: {
|
|
71
|
+
category: string[];
|
|
72
|
+
};
|
|
73
|
+
export declare const $FIELD: {
|
|
74
|
+
category: string[];
|
|
75
|
+
};
|
|
76
|
+
/** must export default as below */
|
|
77
|
+
declare const _default: {
|
|
78
|
+
$HEAD: {
|
|
79
|
+
category: string[];
|
|
80
|
+
};
|
|
81
|
+
$FIELD: {
|
|
82
|
+
category: string[];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `category/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
|
+
/** category model */
|
|
23
|
+
category: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 카테고리의 종류
|
|
27
|
+
*/
|
|
28
|
+
CategoryStereo: {
|
|
29
|
+
'': string;
|
|
30
|
+
/** 배송형 */
|
|
31
|
+
delivery: string;
|
|
32
|
+
/** 방문형 */
|
|
33
|
+
visit: string;
|
|
34
|
+
/** 약관설정 */
|
|
35
|
+
agreed: string;
|
|
36
|
+
/** 상품고시 */
|
|
37
|
+
notice: string;
|
|
38
|
+
/** 매장형 */
|
|
39
|
+
store: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* type: `CategoryStereo`
|
|
44
|
+
*/
|
|
45
|
+
export declare type CategoryStereo = keyof typeof $LUT.CategoryStereo;
|
|
46
|
+
/** must export $LUT as default */
|
|
47
|
+
export default $LUT;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `category/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 category service.
|
|
9
|
+
* @Copyright (C) 2025 LemonCloud Co Ltd. - All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { View, Body } from 'lemon-model';
|
|
12
|
+
import { CategoryModel } from './model';
|
|
13
|
+
import $LUT from './types';
|
|
14
|
+
export * from './types';
|
|
15
|
+
export default $LUT;
|
|
16
|
+
/**!SECTION */
|
|
17
|
+
/**
|
|
18
|
+
* type `CategoryView`
|
|
19
|
+
*/
|
|
20
|
+
export interface CategoryView extends View, Omit<Partial<CategoryModel>, 'optional' | 'hidden'> {
|
|
21
|
+
/** 사용 활성화 여부 */
|
|
22
|
+
optional?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* hidden(숨김) flag
|
|
25
|
+
*/
|
|
26
|
+
hidden?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* type `CategoryBody`
|
|
30
|
+
*/
|
|
31
|
+
export interface CategoryBody extends Body, Partial<Omit<CategoryView, 'parentName'>> {
|
|
32
|
+
}
|