@lemoncloud/clipbiz-goods-api 0.25.1209 → 0.25.1211

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.
@@ -22,6 +22,8 @@ export interface IdentityTokenSite {
22
22
  name?: string;
23
23
  /** stereo of site (ex: enterprise) */
24
24
  stereo?: string;
25
+ /** type of company (ex: private) */
26
+ companyType?: string;
25
27
  }
26
28
  /** type: `IdentityTokenUser` */
27
29
  export interface IdentityTokenUser {
@@ -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`
@@ -94,6 +94,8 @@ declare const $LUT: {
94
94
  * DealStatusOrder
95
95
  */
96
96
  DealStatusOrder: {
97
+ /** [0] 생성 대기중 (내부용) */
98
+ pending: number;
97
99
  /** [step1] 우수사업장 선정 */
98
100
  select: number;
99
101
  /** [step2] 품목 매핑 */
@@ -82,4 +82,6 @@ export interface DealRequestBody {
82
82
  subjectDept$?: DealDeptInfo;
83
83
  /** 발주(계약) 부서 정보 */
84
84
  orderDept$?: DealDeptInfo;
85
+ /** (optional) next status */
86
+ status?: DealStatus;
85
87
  }
@@ -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,13 @@ declare const $LUT: {
49
51
  UnitStereo: {
50
52
  '': string;
51
53
  };
54
+ /**
55
+ * `CartStereo`
56
+ */
57
+ CartStereo: {
58
+ '': string;
59
+ user: string;
60
+ };
52
61
  /**
53
62
  * `ItemUnitType`
54
63
  */
@@ -76,6 +85,10 @@ export declare type ProdStereo = keyof typeof $LUT.ProdStereo;
76
85
  * type: `UnitStereo`
77
86
  */
78
87
  export declare type UnitStereo = keyof typeof $LUT.UnitStereo;
88
+ /**
89
+ * type: `CartStereo`
90
+ */
91
+ export declare type CartStereo = keyof typeof $LUT.CartStereo;
79
92
  /**
80
93
  * type: `ItemUnitType`
81
94
  */
@@ -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
+ }
@@ -10,7 +10,7 @@
10
10
  * @Copyright (C) 2024 LemonCloud Co Ltd. - All Rights Reserved.
11
11
  */
12
12
  import { CoreModel } from 'lemon-model';
13
- import $LUT, { SiteStereo, UserStereo } from './types';
13
+ import $LUT, { CompanyType, SiteStereo, UserStereo } from './types';
14
14
  import { ExamHead } from '../exams/model';
15
15
  /**
16
16
  * type: `ModelType`
@@ -30,6 +30,8 @@ export interface SiteHead {
30
30
  name?: string;
31
31
  /** stereo */
32
32
  stereo?: SiteStereo;
33
+ /** company type */
34
+ companyType?: CompanyType;
33
35
  }
34
36
  /**
35
37
  * `SiteModel`
@@ -49,11 +49,32 @@ declare const $LUT: {
49
49
  /** user */
50
50
  user: string;
51
51
  };
52
+ /**
53
+ * `CompanyType`: 기업형태
54
+ */
55
+ CompanyType: {
56
+ /** no selection */
57
+ '': string;
58
+ /** 민간기업 */
59
+ private: string;
60
+ /** 공기업 */
61
+ public: string;
62
+ /** 공공기관 */
63
+ government: string;
64
+ /** 학교/학원 */
65
+ school: string;
66
+ /** 장애인표준사업장 */
67
+ disabled: string;
68
+ };
52
69
  };
53
70
  /**
54
71
  * type: `SiteStereo`
55
72
  */
56
73
  export declare type SiteStereo = keyof typeof $LUT.SiteStereo;
74
+ /**
75
+ * type: `CompanyType`
76
+ */
77
+ export declare type CompanyType = keyof typeof $LUT.CompanyType;
57
78
  /**
58
79
  * type: `UserStereo`
59
80
  */
@@ -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
  /**