@lemoncloud/clipbiz-goods-api 0.25.1205 → 0.25.1210

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.
@@ -41,6 +41,11 @@ export interface RecommendCommonParam {
41
41
  * ex) id=123 type=recommend -> `RCM123`
42
42
  */
43
43
  type?: string;
44
+ /**
45
+ * (optional) flag of save (default: false)
46
+ * - if true, search from prod and item models automatically.
47
+ */
48
+ auto?: boolean | string;
44
49
  }
45
50
  /**
46
51
  * type `RecommendItemsParam`
@@ -101,6 +101,8 @@ export interface DealModel extends DealHead, Model {
101
101
  stateNo?: number;
102
102
  /** 상태 세트 (inner object) */
103
103
  status$?: DealStatusSet;
104
+ /** (internal) message-id */
105
+ mid?: string;
104
106
  /** 요청 정보 */
105
107
  requestQuantity?: number;
106
108
  requestPrice?: number;
@@ -145,6 +145,7 @@ export interface DealStatusSet extends DealWorkflowSet {
145
145
  approvedAt?: number;
146
146
  approvedBy?: string;
147
147
  approvalMemo?: string;
148
+ approvalSendId?: string;
148
149
  /**
149
150
  * 진행 정보
150
151
  * @deprecated don't use it anymore.
@@ -12,6 +12,7 @@ import { DealModel } from './model';
12
12
  import { ProdView } from '../goods/views';
13
13
  import { ItemView } from '../goods/views';
14
14
  import { SiteView } from '../sites/views';
15
+ import { SiteHead } from '../sites/model';
15
16
  import $LUT, { DealDeptInfo, DealStatus, DealStatusSet } from './types';
16
17
  export * from './types';
17
18
  export default $LUT;
@@ -39,6 +40,16 @@ export interface DealView extends View, Omit<Partial<DealModel>, 'prod$' | 'item
39
40
  * - 표준 사업장
40
41
  */
41
42
  readonly sellerSite$?: SiteView;
43
+ /**
44
+ * (readonly) 신청 기업 상세정보
45
+ * @see clipbiz-backend-api/MySiteView
46
+ */
47
+ readonly $buyer?: SiteHead;
48
+ /**
49
+ * (readonly) 공급 기업 상세정보
50
+ * @see clipbiz-backend-api/MySiteView
51
+ */
52
+ readonly $seller?: SiteHead;
42
53
  /**
43
54
  * (readonly) 상태 세트
44
55
  */
@@ -10,13 +10,13 @@
10
10
  * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
11
11
  */
12
12
  import { CoreModel, Cores } from 'lemon-model';
13
- import $LUT, { ItemStereo, ItemUnitType, ProdStereo } from './types';
13
+ import $LUT, { CartStereo, ItemStereo, ItemUnitType, ProdStereo } from './types';
14
+ import { CategoryHead } from '../categories/model';
15
+ import { SiteHead, UserHead } from '../sites/model';
14
16
  /**
15
17
  * type: boolean style number.
16
18
  */
17
- declare type BoolFlag = 0 | 1;
18
- import { CategoryHead } from '../categories/model';
19
- import { SiteHead } from '../sites/model';
19
+ export declare type BoolFlag = 0 | 1;
20
20
  /**
21
21
  * type: `ModelType`
22
22
  */
@@ -191,6 +191,56 @@ export interface UnitModel extends UnitHead, Model {
191
191
  /** 설명 */
192
192
  desc?: string;
193
193
  }
194
+ /**
195
+ * type: `CartHead`
196
+ * - common head of cart-model.
197
+ */
198
+ export interface CartHead {
199
+ /** id of cart */
200
+ id?: string;
201
+ /** name of cart */
202
+ name?: string;
203
+ }
204
+ /**
205
+ * type: `CartItem`
206
+ * - 장바구니(cart) 아이템 정보
207
+ */
208
+ export interface CartItem extends CoreModel<'item' | 'site'> {
209
+ /** id of item */
210
+ id?: string;
211
+ /** type of item */
212
+ type?: 'item' | 'site';
213
+ /** (optional) stereo */
214
+ stereo?: string;
215
+ /** (optional) count of item */
216
+ count?: number;
217
+ }
218
+ /**
219
+ * type: `CartModel`
220
+ * - 장바구니(cart) 정보를 저장함
221
+ */
222
+ export interface CartModel extends CartHead, Model {
223
+ /** cart name */
224
+ name?: string;
225
+ /** stereo */
226
+ stereo?: CartStereo;
227
+ /** owner user-id */
228
+ ownerId?: string;
229
+ owner$?: UserHead;
230
+ /** owner site-id (해당 기업) */
231
+ siteId?: string;
232
+ site$?: SiteHead;
233
+ /**
234
+ * cart items
235
+ * - `type`에 따라서 'item' 또는 'site' 으로 캐스팅해서 쓰기
236
+ *
237
+ * 추가
238
+ * - `POST /cart/:id/items` API에서 `item` 배열로 아이템들을 추가할 수 있도록 함.
239
+ * 삭제
240
+ * - `DELETE /cart/:id/items` API에서 `itemId` 배열로 아이템들을 삭제할 수 있도록 함.
241
+ */
242
+ item$$?: CartItem[];
243
+ }
194
244
  /**
195
245
  * extract field names from models
196
246
  * - only fields start with lowercase, or all upper.
@@ -201,11 +251,13 @@ export declare const $HEAD: {
201
251
  item: string[];
202
252
  prod: string[];
203
253
  unit: string[];
254
+ cart: string[];
204
255
  };
205
256
  export declare const $FIELD: {
206
257
  item: string[];
207
258
  prod: string[];
208
259
  unit: string[];
260
+ cart: string[];
209
261
  };
210
262
  /** must export default as below */
211
263
  declare const _default: {
@@ -213,11 +265,13 @@ declare const _default: {
213
265
  item: string[];
214
266
  prod: string[];
215
267
  unit: string[];
268
+ cart: string[];
216
269
  };
217
270
  $FIELD: {
218
271
  item: string[];
219
272
  prod: string[];
220
273
  unit: string[];
274
+ cart: string[];
221
275
  };
222
276
  };
223
277
  export default _default;
@@ -30,6 +30,8 @@ declare const $LUT: {
30
30
  prod: string;
31
31
  /** unit */
32
32
  unit: string;
33
+ /** cart */
34
+ cart: string;
33
35
  };
34
36
  /**
35
37
  * `ItemStereo`
@@ -49,6 +51,12 @@ declare const $LUT: {
49
51
  UnitStereo: {
50
52
  '': string;
51
53
  };
54
+ /**
55
+ * `CartStereo`
56
+ */
57
+ CartStereo: {
58
+ '': string;
59
+ };
52
60
  /**
53
61
  * `ItemUnitType`
54
62
  */
@@ -76,6 +84,10 @@ export declare type ProdStereo = keyof typeof $LUT.ProdStereo;
76
84
  * type: `UnitStereo`
77
85
  */
78
86
  export declare type UnitStereo = keyof typeof $LUT.UnitStereo;
87
+ /**
88
+ * type: `CartStereo`
89
+ */
90
+ export declare type CartStereo = keyof typeof $LUT.CartStereo;
79
91
  /**
80
92
  * type: `ItemUnitType`
81
93
  */
@@ -10,7 +10,7 @@
10
10
  * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
11
11
  */
12
12
  import { View, Body } from 'lemon-model';
13
- import { ItemModel, ProdModel, UnitModel } from './model';
13
+ import { CartModel, ItemModel, ProdModel, UnitModel } from './model';
14
14
  import { CategoryView } from '../categories/views';
15
15
  import { SiteView } from '../sites/views';
16
16
  import $LUT from './types';
@@ -72,3 +72,14 @@ export interface UnitView extends View, Partial<UnitModel> {
72
72
  */
73
73
  export interface UnitBody extends Body, Partial<UnitView> {
74
74
  }
75
+ /**
76
+ * type: `CartView`
77
+ * - usually same as post's body.
78
+ */
79
+ export interface CartView extends View, Partial<CartModel> {
80
+ }
81
+ /**
82
+ * Type `CartBody`
83
+ */
84
+ export interface CartBody extends Body, Partial<CartView> {
85
+ }
@@ -37,6 +37,7 @@ declare const $LUT: {
37
37
  item: string;
38
38
  prod: string;
39
39
  unit: string;
40
+ cart: string;
40
41
  recommend: string;
41
42
  };
42
43
  /**