@things-factory/product-base 8.0.0-beta.9 → 8.0.2

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.
Files changed (63) hide show
  1. package/dist-server/service/product/product-mutation.js +1 -1
  2. package/dist-server/service/product/product-mutation.js.map +1 -1
  3. package/dist-server/service/product/product-query.d.ts +1 -1
  4. package/dist-server/service/product/product-query.js +5 -5
  5. package/dist-server/service/product/product-query.js.map +1 -1
  6. package/dist-server/service/product/product-types.d.ts +4 -2
  7. package/dist-server/service/product/product-types.js +10 -2
  8. package/dist-server/service/product/product-types.js.map +1 -1
  9. package/dist-server/service/product/product.d.ts +2 -1
  10. package/dist-server/service/product/product.js +6 -1
  11. package/dist-server/service/product/product.js.map +1 -1
  12. package/dist-server/tsconfig.tsbuildinfo +1 -1
  13. package/package.json +5 -5
  14. package/server/constants/index.ts +1 -0
  15. package/server/constants/product.ts +24 -0
  16. package/server/controllers/index.ts +0 -0
  17. package/server/index.ts +2 -0
  18. package/server/middlewares/index.ts +0 -0
  19. package/server/migrations/index.ts +9 -0
  20. package/server/service/index.ts +61 -0
  21. package/server/service/product/index.ts +6 -0
  22. package/server/service/product/product-mutation.ts +407 -0
  23. package/server/service/product/product-query.ts +336 -0
  24. package/server/service/product/product-types.ts +458 -0
  25. package/server/service/product/product.ts +548 -0
  26. package/server/service/product/validate-product.ts +42 -0
  27. package/server/service/product-bundle/index.ts +6 -0
  28. package/server/service/product-bundle/product-bundle-mutation.ts +140 -0
  29. package/server/service/product-bundle/product-bundle-query.ts +104 -0
  30. package/server/service/product-bundle/product-bundle-types.ts +51 -0
  31. package/server/service/product-bundle/product-bundle.ts +102 -0
  32. package/server/service/product-bundle-setting/index.ts +6 -0
  33. package/server/service/product-bundle-setting/product-bundle-setting-mutation.ts +168 -0
  34. package/server/service/product-bundle-setting/product-bundle-setting-query.ts +139 -0
  35. package/server/service/product-bundle-setting/product-bundle-setting-types.ts +41 -0
  36. package/server/service/product-bundle-setting/product-bundle-setting.ts +45 -0
  37. package/server/service/product-combination/index.ts +6 -0
  38. package/server/service/product-combination/product-combination-mutation.ts +148 -0
  39. package/server/service/product-combination/product-combination-query.ts +48 -0
  40. package/server/service/product-combination/product-combination-type.ts +50 -0
  41. package/server/service/product-combination/product-combination.ts +116 -0
  42. package/server/service/product-combination-setting/index.ts +6 -0
  43. package/server/service/product-combination-setting/product-combination-setting-mutation.ts +248 -0
  44. package/server/service/product-combination-setting/product-combination-setting-query.ts +176 -0
  45. package/server/service/product-combination-setting/product-combination-setting-type.ts +44 -0
  46. package/server/service/product-combination-setting/product-combination-setting.ts +77 -0
  47. package/server/service/product-detail/index.ts +6 -0
  48. package/server/service/product-detail/product-detail-mutation.ts +238 -0
  49. package/server/service/product-detail/product-detail-query.ts +213 -0
  50. package/server/service/product-detail/product-detail-types.ts +280 -0
  51. package/server/service/product-detail/product-detail.ts +388 -0
  52. package/server/service/product-detail-bizplace-setting/index.ts +6 -0
  53. package/server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.ts +118 -0
  54. package/server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.ts +90 -0
  55. package/server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.ts +62 -0
  56. package/server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.ts +104 -0
  57. package/server/service/product-set/index.ts +6 -0
  58. package/server/service/product-set/product-set-mutation.ts +149 -0
  59. package/server/service/product-set/product-set-query.ts +114 -0
  60. package/server/service/product-set/product-set-types.ts +45 -0
  61. package/server/service/product-set/product-set.ts +95 -0
  62. package/server/utils/index.ts +1 -0
  63. package/server/utils/product-util.ts +11 -0
@@ -0,0 +1,458 @@
1
+ import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
2
+ import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
3
+ import { Field, Float, ID, InputType, Int, ObjectType } from 'type-graphql'
4
+
5
+ import { BizplacePatch } from '@things-factory/biz-base'
6
+ import { ObjectRef } from '@things-factory/shell'
7
+
8
+ import { ProductDetailPatch } from '../product-detail/product-detail-types'
9
+ import { Product } from './product'
10
+
11
+ @InputType()
12
+ export class NewProduct {
13
+ @Field(type => ID, { nullable: true })
14
+ id?: string
15
+
16
+ @Field({ nullable: true })
17
+ sku?: string
18
+
19
+ @Field({ nullable: true })
20
+ name?: string
21
+
22
+ @Field({ nullable: true })
23
+ bizplace?: BizplacePatch
24
+
25
+ @Field({ nullable: true })
26
+ description?: string
27
+
28
+ @Field(type => ObjectRef, { nullable: true })
29
+ productRef?: ObjectRef
30
+
31
+ @Field({ nullable: true })
32
+ parentProductRef?: ObjectRef
33
+
34
+ @Field(type => [ObjectRef], { nullable: true })
35
+ childProducts?: ObjectRef[]
36
+
37
+ @Field(type => [ProductDetailPatch], { nullable: true })
38
+ productDetails?: ProductDetailPatch[]
39
+
40
+ @Field(type => Float, { nullable: true })
41
+ bundleQty?: number
42
+
43
+ @Field({ nullable: true })
44
+ type?: string
45
+
46
+ @Field(type => Int, { nullable: true })
47
+ expirationPeriod?: number
48
+
49
+ @Field({ nullable: true })
50
+ movement?: string
51
+
52
+ @Field({ nullable: true })
53
+ weightUnit?: string
54
+
55
+ @Field(type => Float, { nullable: true })
56
+ nettWeight?: number
57
+
58
+ @Field(type => Float, { nullable: true })
59
+ density?: number
60
+
61
+ @Field({ nullable: true })
62
+ packingType?: string
63
+
64
+ @Field({ nullable: true })
65
+ lengthUnit?: string
66
+
67
+ @Field(type => Float, { nullable: true })
68
+ costPrice?: number
69
+
70
+ @Field(type => Float, { nullable: true })
71
+ afterTaxCostPrice?: number
72
+
73
+ @Field(type => Float, { nullable: true })
74
+ sellPrice?: number
75
+
76
+ @Field(type => Float, { nullable: true })
77
+ afterTaxSalesPrice?: number
78
+
79
+ @Field(type => Float, { nullable: true })
80
+ mrpPrice?: number
81
+
82
+ @Field(type => Float, { nullable: true })
83
+ bufferQty?: number
84
+
85
+ @Field(type => Float, { nullable: true })
86
+ minQty?: number
87
+
88
+ @Field(type => Float, { nullable: true })
89
+ maxQty?: number
90
+
91
+ @Field(type => Float, { nullable: true })
92
+ width?: number
93
+
94
+ @Field(type => Float, { nullable: true })
95
+ depth?: number
96
+
97
+ @Field(type => Float, { nullable: true })
98
+ height?: number
99
+
100
+ @Field({ nullable: true })
101
+ primaryUnit?: string
102
+
103
+ @Field(type => Float, { nullable: true })
104
+ primaryValue?: number
105
+
106
+ @Field({ nullable: true })
107
+ uom?: string
108
+
109
+ @Field(type => Float, { nullable: true })
110
+ uomValue?: number
111
+
112
+ @Field({ nullable: true })
113
+ inventoryAccountCode?: string
114
+
115
+ @Field({ nullable: true })
116
+ cogsAccountCode?: string
117
+
118
+ @Field({ nullable: true })
119
+ auxUnit1?: string
120
+
121
+ @Field({ nullable: true })
122
+ auxValue1?: string
123
+
124
+ @Field({ nullable: true })
125
+ auxUnit2?: string
126
+
127
+ @Field({ nullable: true })
128
+ auxValue2?: string
129
+
130
+ @Field({ nullable: true })
131
+ auxUnit3?: string
132
+
133
+ @Field({ nullable: true })
134
+ auxValue3?: string
135
+
136
+ @Field({ nullable: true })
137
+ auxUnit4?: string
138
+
139
+ @Field({ nullable: true })
140
+ auxValue4?: string
141
+
142
+ @Field({ nullable: true })
143
+ auxUnit5?: string
144
+
145
+ @Field({ nullable: true })
146
+ auxValue5?: string
147
+
148
+ @Field({ nullable: true })
149
+ groupType?: string
150
+
151
+ @Field({ nullable: true })
152
+ brandSku?: string
153
+
154
+ @Field({ nullable: true })
155
+ brand?: string
156
+
157
+ @Field({ nullable: true })
158
+ subBrand?: string
159
+
160
+ @Field({ nullable: true })
161
+ isRequiredCheckExpiry?: boolean
162
+
163
+ @Field({ nullable: true })
164
+ isRequireSerialNumberScanning?: boolean
165
+
166
+ @Field({ nullable: true })
167
+ isRequireSerialNumberScanningInbound?: boolean
168
+
169
+ @Field({ nullable: true })
170
+ isRequireSerialNumberScanningOutbound?: boolean
171
+
172
+ @Field({ nullable: true })
173
+ gtin?: string
174
+
175
+ @Field(type => Float, { nullable: true })
176
+ grossWeight?: number
177
+
178
+ @Field(type => Float, { nullable: true })
179
+ volume?: number
180
+
181
+ @Field(type => Float, { nullable: true })
182
+ volumeSize?: number
183
+
184
+ @Field(type => ObjectRef, { nullable: true })
185
+ routing?: ObjectRef
186
+
187
+ @Field({ nullable: true })
188
+ warehouseId?: string
189
+
190
+ @Field(type => GraphQLUpload, { nullable: true })
191
+ thumbnail?: FileUpload
192
+
193
+ @Field({ nullable: true })
194
+ pickingStrategy?: string
195
+
196
+ // 입고 단위
197
+ @Field({ nullable: true })
198
+ inboundUnit?: string
199
+
200
+ // 변환 kg
201
+ @Field({ nullable: true })
202
+ convertWeight?: number
203
+
204
+ // 박스입수
205
+ @Field({ nullable: true })
206
+ boxInQty?: number
207
+
208
+ // 제품군
209
+ @Field({ nullable: true })
210
+ category?: string
211
+
212
+ // 경매입고
213
+ @Field(type => Boolean, { nullable: true })
214
+ isAuction?: boolean
215
+
216
+ // 출고유형
217
+ @Field({ nullable: true })
218
+ releaseType?: string
219
+
220
+ // 바코드
221
+ @Field({ nullable: true })
222
+ barcode?: string
223
+ }
224
+
225
+ @ObjectType()
226
+ export class ProductList {
227
+ @Field(type => [Product], { nullable: true })
228
+ items?: Product[]
229
+
230
+ @Field(type => Int, { nullable: true })
231
+ total?: number
232
+ }
233
+
234
+ @InputType()
235
+ export class ProductPatch {
236
+ @Field({ nullable: true })
237
+ id?: string
238
+
239
+ @Field({ nullable: true })
240
+ sku?: string
241
+
242
+ @Field({ nullable: true })
243
+ name?: string
244
+
245
+ @Field({ nullable: true })
246
+ description?: string
247
+
248
+ @Field(type => ObjectRef, { nullable: true })
249
+ bizplace?: ObjectRef
250
+
251
+ @Field(type => ObjectRef, { nullable: true })
252
+ productRef?: ObjectRef
253
+
254
+ @Field(type => ObjectRef, { nullable: true })
255
+ parentProductRef?: ObjectRef
256
+
257
+ @Field(type => [ObjectRef], { nullable: true })
258
+ childProducts?: ObjectRef[]
259
+
260
+ @Field(type => Float, { nullable: true })
261
+ bundleQty?: number
262
+
263
+ @Field({ nullable: true })
264
+ refCode?: string
265
+
266
+ @Field({ nullable: true })
267
+ packingType?: string
268
+
269
+ @Field(type => Float, { nullable: true })
270
+ packingSize?: number
271
+
272
+ @Field({ nullable: true })
273
+ type?: string
274
+
275
+ @Field(type => Int, { nullable: true })
276
+ expirationPeriod?: number
277
+
278
+ @Field({ nullable: true })
279
+ movement?: string
280
+
281
+ @Field({ nullable: true })
282
+ weightUnit?: string
283
+
284
+ @Field(type => Float, { nullable: true })
285
+ nettWeight?: number
286
+
287
+ @Field(type => Float, { nullable: true })
288
+ density?: number
289
+
290
+ @Field({ nullable: true })
291
+ lengthUnit?: string
292
+
293
+ @Field(type => Float, { nullable: true })
294
+ costPrice?: number
295
+
296
+ @Field(type => Float, { nullable: true })
297
+ afterTaxCostPrice: number
298
+
299
+ @Field(type => Float, { nullable: true })
300
+ sellPrice?: number
301
+
302
+ @Field(type => Float, { nullable: true })
303
+ afterTaxSalesPrice?: number
304
+
305
+ @Field(type => Float, { nullable: true })
306
+ mrpPrice?: number
307
+
308
+ @Field(type => Float, { nullable: true })
309
+ bufferQty?: number
310
+
311
+ @Field(type => Float, { nullable: true })
312
+ minQty?: number
313
+
314
+ @Field(type => Float, { nullable: true })
315
+ maxQty?: number
316
+
317
+ @Field(type => Float, { nullable: true })
318
+ width?: number
319
+
320
+ @Field(type => Float, { nullable: true })
321
+ depth?: number
322
+
323
+ @Field(type => Float, { nullable: true })
324
+ height?: number
325
+
326
+ @Field({ nullable: true })
327
+ inventoryAccountCode?: string
328
+
329
+ @Field({ nullable: true })
330
+ cogsAccountCode?: string
331
+
332
+ @Field(type => Boolean, { nullable: true })
333
+ isTrackedAsInventory: boolean
334
+
335
+ @Field(type => Boolean, { nullable: true })
336
+ isRequiredCheckExpiry?: boolean
337
+
338
+ @Field(type => Boolean, { nullable: true })
339
+ isRequireSerialNumberScanning?: boolean
340
+
341
+ @Field(type => Boolean, { nullable: true })
342
+ isRequireSerialNumberScanningInbound?: boolean
343
+
344
+ @Field(type => Boolean, { nullable: true })
345
+ isRequireSerialNumberScanningOutbound?: boolean
346
+
347
+ @Field({ nullable: true })
348
+ primaryUnit?: string
349
+
350
+ @Field(type => Float, { nullable: true })
351
+ primaryValue?: number
352
+
353
+ @Field({ nullable: true })
354
+ uom?: string
355
+
356
+ @Field(type => Float, { nullable: true })
357
+ uomValue?: number
358
+
359
+ @Field({ nullable: true })
360
+ auxUnit1?: string
361
+
362
+ @Field({ nullable: true })
363
+ auxValue1?: string
364
+
365
+ @Field({ nullable: true })
366
+ auxUnit2?: string
367
+
368
+ @Field({ nullable: true })
369
+ auxValue2?: string
370
+
371
+ @Field({ nullable: true })
372
+ auxUnit3?: string
373
+
374
+ @Field({ nullable: true })
375
+ auxValue3?: string
376
+
377
+ @Field({ nullable: true })
378
+ auxUnit4?: string
379
+
380
+ @Field({ nullable: true })
381
+ auxValue4?: string
382
+
383
+ @Field({ nullable: true })
384
+ auxUnit5?: string
385
+
386
+ @Field({ nullable: true })
387
+ auxValue5?: string
388
+
389
+ @Field({ nullable: true })
390
+ brandSku?: string
391
+
392
+ @Field({ nullable: true })
393
+ brand?: string
394
+
395
+ @Field({ nullable: true })
396
+ subBrand?: string
397
+
398
+ @Field({ nullable: true })
399
+ gtin?: string
400
+
401
+ @Field(type => Float, { nullable: true })
402
+ grossWeight?: number
403
+
404
+ @Field(type => Float, { nullable: true })
405
+ volume?: number
406
+
407
+ @Field(type => Float, { nullable: true })
408
+ volumeSize?: number
409
+
410
+ @Field({ nullable: true })
411
+ childGtin?: string
412
+
413
+ @Field(type => Float, { nullable: true })
414
+ childQty?: number
415
+
416
+ @Field(type => ObjectRef, { nullable: true })
417
+ routing?: ObjectRef
418
+
419
+ @Field({ nullable: true })
420
+ warehouseId?: string
421
+
422
+ @Field(type => GraphQLUpload, { nullable: true })
423
+ thumbnail?: FileUpload
424
+
425
+ @Field({ nullable: true })
426
+ pickingStrategy?: string
427
+
428
+ // 입고 단위
429
+ @Field({ nullable: true })
430
+ inboundUnit?: string
431
+
432
+ // 변환 kg
433
+ @Field({ nullable: true })
434
+ convertWeight?: number
435
+
436
+ // 박스입수
437
+ @Field({ nullable: true })
438
+ boxInQty?: number
439
+
440
+ // 제품군
441
+ @Field({ nullable: true })
442
+ category?: string
443
+
444
+ // 경매입고
445
+ @Field(type => Boolean, { nullable: true })
446
+ isAuction?: boolean
447
+
448
+ // 출고유형
449
+ @Field({ nullable: true })
450
+ releaseType?: string
451
+
452
+ // 바코드
453
+ @Field({ nullable: true })
454
+ barcode?: string
455
+
456
+ @Field({ nullable: true })
457
+ cuFlag?: string
458
+ }