@lemoncloud/clipbiz-goods-api 0.25.1215 → 0.25.1227
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/modules/contracts/model.d.ts +3 -0
- package/dist/modules/events/model.d.ts +53 -0
- package/dist/modules/events/types.d.ts +37 -0
- package/dist/modules/events/views.d.ts +60 -0
- package/dist/modules/goods/model.d.ts +2 -10
- package/dist/service/backend-types.d.ts +29 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { CoreModel } from 'lemon-model';
|
|
13
13
|
import $LUT, { ContractStereo, ContractState, DeliveryStereo, DeliveryState, ContractStateSet, DeliveryStateSet, Agreement } from './types';
|
|
14
|
+
import { FileRef } from '../../service/backend-types';
|
|
14
15
|
import { DealHead, DealModel } from '../deals/model';
|
|
15
16
|
import { Cores } from 'lemon-core';
|
|
16
17
|
/**
|
|
@@ -91,6 +92,8 @@ export interface ContractModel extends ContractHead, Model {
|
|
|
91
92
|
sellerAgreed$?: Agreement;
|
|
92
93
|
/** 판매업체(표준사업장) 약관 기록 */
|
|
93
94
|
buyerAgreed$?: Agreement;
|
|
95
|
+
/** 첨부파일 목록 (backend-api 관리) */
|
|
96
|
+
files$$?: FileRef[];
|
|
94
97
|
/**
|
|
95
98
|
* (internal) detail info of deal
|
|
96
99
|
*/
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `model.ts`
|
|
3
|
+
* - model definitions
|
|
4
|
+
*
|
|
5
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
6
|
+
* @date 2025-12-28 initial version.
|
|
7
|
+
*
|
|
8
|
+
* @copyright (C) 2025 LemonCloud Co Ltd. - All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
import { CoreModel } from 'lemon-model';
|
|
11
|
+
import $LUT, { EventStereo } from './types';
|
|
12
|
+
/**
|
|
13
|
+
* type: `ModelType`
|
|
14
|
+
*/
|
|
15
|
+
export declare type ModelType = keyof typeof $LUT.ModelType;
|
|
16
|
+
/**
|
|
17
|
+
* type: `Model`: common model
|
|
18
|
+
*/
|
|
19
|
+
export declare type Model = CoreModel<ModelType>;
|
|
20
|
+
/**
|
|
21
|
+
* type: `EventModel` (이벤트)
|
|
22
|
+
* - 사용자 이벤트 로그 (검색, 클릭 등)
|
|
23
|
+
*/
|
|
24
|
+
export interface EventModel extends Model {
|
|
25
|
+
/** name of model */
|
|
26
|
+
name?: string;
|
|
27
|
+
/** stereo of model */
|
|
28
|
+
stereo?: EventStereo;
|
|
29
|
+
/** user-agent from header */
|
|
30
|
+
userAgent?: string;
|
|
31
|
+
/** client-ip when request */
|
|
32
|
+
clientIp?: string;
|
|
33
|
+
/** (optional) identity-id */
|
|
34
|
+
identityId?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* extract field names from models
|
|
38
|
+
* - only fields start with lowercase, or all upper.
|
|
39
|
+
*/
|
|
40
|
+
export declare const filterFields: (fields: string[], base?: string[]) => string[];
|
|
41
|
+
/** field names from head */
|
|
42
|
+
export declare const $HEAD: {};
|
|
43
|
+
export declare const $FIELD: {
|
|
44
|
+
event: string[];
|
|
45
|
+
};
|
|
46
|
+
/** must export default as below */
|
|
47
|
+
declare const _default: {
|
|
48
|
+
$HEAD: {};
|
|
49
|
+
$FIELD: {
|
|
50
|
+
event: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `types.ts`
|
|
3
|
+
* - basic types used in `proxy`
|
|
4
|
+
*
|
|
5
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
6
|
+
* @date 2025-12-28 initial version.
|
|
7
|
+
*
|
|
8
|
+
* @copyright (C) 2025 LemonCloud Co Ltd. - All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Lookup Table
|
|
12
|
+
*
|
|
13
|
+
* WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
|
|
14
|
+
*/
|
|
15
|
+
declare const $LUT: {
|
|
16
|
+
/**
|
|
17
|
+
* Possible type of model.
|
|
18
|
+
*/
|
|
19
|
+
ModelType: {
|
|
20
|
+
/** event model */
|
|
21
|
+
event: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 이벤트의 종류
|
|
25
|
+
*/
|
|
26
|
+
EventStereo: {
|
|
27
|
+
'': string;
|
|
28
|
+
/** 검색 키워드 */
|
|
29
|
+
keyword: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* type: `EventStereo`
|
|
34
|
+
*/
|
|
35
|
+
export declare type EventStereo = keyof typeof $LUT.EventStereo;
|
|
36
|
+
/** must export $LUT as default */
|
|
37
|
+
export default $LUT;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `views.ts`
|
|
3
|
+
* - type of views used in `transformer`
|
|
4
|
+
*
|
|
5
|
+
* @author Aiden <aiden@lemoncloud.io>
|
|
6
|
+
* @date 2025-12-28 initial version.
|
|
7
|
+
*
|
|
8
|
+
* @copyright (C) 2025 LemonCloud Co Ltd. - All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
import { View, Body } from 'lemon-model';
|
|
11
|
+
import { EventModel } from './model';
|
|
12
|
+
import $LUT from './types';
|
|
13
|
+
export * from './types';
|
|
14
|
+
export default $LUT;
|
|
15
|
+
/**
|
|
16
|
+
* type `EventView`
|
|
17
|
+
*/
|
|
18
|
+
export interface EventView extends View, Partial<EventModel> {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* type `EventBody`
|
|
22
|
+
*/
|
|
23
|
+
export interface EventBody extends Body, Partial<EventView> {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* type: `WordCount`
|
|
27
|
+
* - 키워드별 검색 횟수 집계 결과
|
|
28
|
+
*/
|
|
29
|
+
export interface WordCount {
|
|
30
|
+
/** 검색 키워드 */
|
|
31
|
+
word: string;
|
|
32
|
+
/** 검색 횟수 */
|
|
33
|
+
count: number;
|
|
34
|
+
/** 마지막 검색 시각 (timestamp) */
|
|
35
|
+
last: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* type: `KeywordAggrBody`
|
|
39
|
+
* - 키워드 집계 API 요청 파라미터
|
|
40
|
+
*/
|
|
41
|
+
export interface KeywordAggrParam {
|
|
42
|
+
/** 검색할 키워드 수 (default: 10) */
|
|
43
|
+
limit?: number;
|
|
44
|
+
/** 검색할 기간 (default: 30일) */
|
|
45
|
+
days?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* type: `KeywordAggrResult`
|
|
49
|
+
* - 키워드 집계 API 응답 타입
|
|
50
|
+
*/
|
|
51
|
+
export interface KeywordAggrResult {
|
|
52
|
+
/** 전체 이벤트 수 */
|
|
53
|
+
total: number;
|
|
54
|
+
/** 이벤트 목록 (빈 배열) */
|
|
55
|
+
list: EventView[];
|
|
56
|
+
/** 키워드별 집계 결과 */
|
|
57
|
+
$aggr?: WordCount[];
|
|
58
|
+
/** 요청 파라미터 */
|
|
59
|
+
$param?: KeywordAggrParam;
|
|
60
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import { CoreModel
|
|
12
|
+
import { CoreModel } from 'lemon-model';
|
|
13
13
|
import $LUT, { CartStereo, ItemStereo, ItemUnitType, ProdStereo } from './types';
|
|
14
14
|
import { CategoryHead } from '../categories/model';
|
|
15
15
|
import { SiteHead, UserHead } from '../sites/model';
|
|
@@ -24,16 +24,8 @@ export declare type ModelType = keyof typeof $LUT.ModelType;
|
|
|
24
24
|
/**
|
|
25
25
|
* type: `Model`: common model interface
|
|
26
26
|
* - modifier 정보 저장을 위해 확장됨 @251124
|
|
27
|
-
*
|
|
28
|
-
* TODO [Steve] 아래의 `$` 부분은 추후 `lemon-model` 쪽으로 이전 검토 필요. @251124
|
|
29
27
|
*/
|
|
30
|
-
export
|
|
31
|
-
/**
|
|
32
|
-
* the modifier information
|
|
33
|
-
* - can't update manually.
|
|
34
|
-
*/
|
|
35
|
-
readonly $?: Cores;
|
|
36
|
-
}
|
|
28
|
+
export declare type Model = CoreModel<ModelType>;
|
|
37
29
|
/**
|
|
38
30
|
* interface: `ItemHead`
|
|
39
31
|
* - common head of item-model.
|
|
@@ -19,16 +19,12 @@ declare const $LUT: {
|
|
|
19
19
|
* Possible type of model.
|
|
20
20
|
*/
|
|
21
21
|
ModelType: {
|
|
22
|
+
event: string;
|
|
22
23
|
mock: string;
|
|
23
24
|
test: string;
|
|
24
25
|
callback: string;
|
|
25
26
|
category: string;
|
|
26
27
|
site: string;
|
|
27
|
-
/**
|
|
28
|
-
* Lookup Table
|
|
29
|
-
*
|
|
30
|
-
* WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
|
|
31
|
-
*/
|
|
32
28
|
user: string;
|
|
33
29
|
exam: string;
|
|
34
30
|
contract: string;
|
|
@@ -62,6 +58,34 @@ export declare type ModelType = keyof typeof $LUT.ModelType;
|
|
|
62
58
|
* type: `LanguageType`
|
|
63
59
|
*/
|
|
64
60
|
export declare type LanguageType = keyof typeof $LUT.Languages;
|
|
61
|
+
/**
|
|
62
|
+
* interface: `RefItem<T>`
|
|
63
|
+
* - 외부 참조 아이템의 베이스 타입
|
|
64
|
+
* @template T - 아이템 타입 (기본: string)
|
|
65
|
+
*/
|
|
66
|
+
export interface RefItem<T extends string = string> {
|
|
67
|
+
/** item-id */
|
|
68
|
+
id: string;
|
|
69
|
+
/** item-name */
|
|
70
|
+
name?: string;
|
|
71
|
+
/** item-type */
|
|
72
|
+
type?: T;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* interface: `FileRef<T>`
|
|
76
|
+
* - 파일 참조 아이템
|
|
77
|
+
* @template T - 파일 타입 (기본: 'file')
|
|
78
|
+
*/
|
|
79
|
+
export interface FileRef extends RefItem<'file'> {
|
|
80
|
+
/** (optional) file URL */
|
|
81
|
+
url?: string;
|
|
82
|
+
/** (optional) thumbnail URL */
|
|
83
|
+
thumbnail?: string;
|
|
84
|
+
/** (optional) content size (MIME) */
|
|
85
|
+
contentType?: string;
|
|
86
|
+
/** (optional) content size (bytes) */
|
|
87
|
+
contentSize?: number;
|
|
88
|
+
}
|
|
65
89
|
/**
|
|
66
90
|
* type: `StateActor`
|
|
67
91
|
* - 모델의 상태(State)를 변경한 행위자 (Actor) 정보
|