@newpeak/barista-cli 0.1.7 → 0.1.8

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 (260) hide show
  1. package/dist/commands/liberica/calendar/index.d.ts +3 -0
  2. package/dist/commands/liberica/calendar/index.d.ts.map +1 -0
  3. package/dist/commands/liberica/calendar/index.js +11 -0
  4. package/dist/commands/liberica/calendar/index.js.map +1 -0
  5. package/dist/commands/liberica/calendar/list.d.ts +3 -0
  6. package/dist/commands/liberica/calendar/list.d.ts.map +1 -0
  7. package/dist/commands/liberica/calendar/list.js +181 -0
  8. package/dist/commands/liberica/calendar/list.js.map +1 -0
  9. package/dist/commands/liberica/calendar/set.d.ts +3 -0
  10. package/dist/commands/liberica/calendar/set.d.ts.map +1 -0
  11. package/dist/commands/liberica/calendar/set.js +120 -0
  12. package/dist/commands/liberica/calendar/set.js.map +1 -0
  13. package/dist/commands/liberica/client-contacts/create.d.ts +3 -0
  14. package/dist/commands/liberica/client-contacts/create.d.ts.map +1 -0
  15. package/dist/commands/liberica/client-contacts/create.js +132 -0
  16. package/dist/commands/liberica/client-contacts/create.js.map +1 -0
  17. package/dist/commands/liberica/client-contacts/delete.d.ts +3 -0
  18. package/dist/commands/liberica/client-contacts/delete.d.ts.map +1 -0
  19. package/dist/commands/liberica/client-contacts/delete.js +139 -0
  20. package/dist/commands/liberica/client-contacts/delete.js.map +1 -0
  21. package/dist/commands/liberica/client-contacts/get.d.ts +3 -0
  22. package/dist/commands/liberica/client-contacts/get.d.ts.map +1 -0
  23. package/dist/commands/liberica/client-contacts/get.js +92 -0
  24. package/dist/commands/liberica/client-contacts/get.js.map +1 -0
  25. package/dist/commands/liberica/client-contacts/index.d.ts +3 -0
  26. package/dist/commands/liberica/client-contacts/index.d.ts.map +1 -0
  27. package/dist/commands/liberica/client-contacts/index.js +17 -0
  28. package/dist/commands/liberica/client-contacts/index.js.map +1 -0
  29. package/dist/commands/liberica/client-contacts/list.d.ts +3 -0
  30. package/dist/commands/liberica/client-contacts/list.d.ts.map +1 -0
  31. package/dist/commands/liberica/client-contacts/list.js +92 -0
  32. package/dist/commands/liberica/client-contacts/list.js.map +1 -0
  33. package/dist/commands/liberica/client-contacts/update.d.ts +3 -0
  34. package/dist/commands/liberica/client-contacts/update.d.ts.map +1 -0
  35. package/dist/commands/liberica/client-contacts/update.js +156 -0
  36. package/dist/commands/liberica/client-contacts/update.js.map +1 -0
  37. package/dist/commands/liberica/dict-types/get.d.ts +3 -0
  38. package/dist/commands/liberica/dict-types/get.d.ts.map +1 -0
  39. package/dist/commands/liberica/dict-types/get.js +62 -0
  40. package/dist/commands/liberica/dict-types/get.js.map +1 -0
  41. package/dist/commands/liberica/dict-types/index.d.ts +3 -0
  42. package/dist/commands/liberica/dict-types/index.d.ts.map +1 -0
  43. package/dist/commands/liberica/dict-types/index.js +13 -0
  44. package/dist/commands/liberica/dict-types/index.js.map +1 -0
  45. package/dist/commands/liberica/dict-types/list.d.ts +3 -0
  46. package/dist/commands/liberica/dict-types/list.d.ts.map +1 -0
  47. package/dist/commands/liberica/dict-types/list.js +91 -0
  48. package/dist/commands/liberica/dict-types/list.js.map +1 -0
  49. package/dist/commands/liberica/dict-types/update.d.ts +3 -0
  50. package/dist/commands/liberica/dict-types/update.d.ts.map +1 -0
  51. package/dist/commands/liberica/dict-types/update.js +127 -0
  52. package/dist/commands/liberica/dict-types/update.js.map +1 -0
  53. package/dist/commands/liberica/dicts/create.d.ts +3 -0
  54. package/dist/commands/liberica/dicts/create.d.ts.map +1 -0
  55. package/dist/commands/liberica/dicts/create.js +157 -0
  56. package/dist/commands/liberica/dicts/create.js.map +1 -0
  57. package/dist/commands/liberica/dicts/delete.d.ts +3 -0
  58. package/dist/commands/liberica/dicts/delete.d.ts.map +1 -0
  59. package/dist/commands/liberica/dicts/delete.js +106 -0
  60. package/dist/commands/liberica/dicts/delete.js.map +1 -0
  61. package/dist/commands/liberica/dicts/get.d.ts +3 -0
  62. package/dist/commands/liberica/dicts/get.d.ts.map +1 -0
  63. package/dist/commands/liberica/dicts/get.js +69 -0
  64. package/dist/commands/liberica/dicts/get.js.map +1 -0
  65. package/dist/commands/liberica/dicts/index.d.ts +3 -0
  66. package/dist/commands/liberica/dicts/index.d.ts.map +1 -0
  67. package/dist/commands/liberica/dicts/index.js +17 -0
  68. package/dist/commands/liberica/dicts/index.js.map +1 -0
  69. package/dist/commands/liberica/dicts/list.d.ts +3 -0
  70. package/dist/commands/liberica/dicts/list.d.ts.map +1 -0
  71. package/dist/commands/liberica/dicts/list.js +88 -0
  72. package/dist/commands/liberica/dicts/list.js.map +1 -0
  73. package/dist/commands/liberica/dicts/update.d.ts +3 -0
  74. package/dist/commands/liberica/dicts/update.d.ts.map +1 -0
  75. package/dist/commands/liberica/dicts/update.js +112 -0
  76. package/dist/commands/liberica/dicts/update.js.map +1 -0
  77. package/dist/commands/liberica/index.d.ts.map +1 -1
  78. package/dist/commands/liberica/index.js +18 -0
  79. package/dist/commands/liberica/index.js.map +1 -1
  80. package/dist/commands/liberica/operations/active.d.ts +3 -0
  81. package/dist/commands/liberica/operations/active.d.ts.map +1 -0
  82. package/dist/commands/liberica/operations/active.js +152 -0
  83. package/dist/commands/liberica/operations/active.js.map +1 -0
  84. package/dist/commands/liberica/operations/batch-delete.d.ts +3 -0
  85. package/dist/commands/liberica/operations/batch-delete.d.ts.map +1 -0
  86. package/dist/commands/liberica/operations/batch-delete.js +130 -0
  87. package/dist/commands/liberica/operations/batch-delete.js.map +1 -0
  88. package/dist/commands/liberica/operations/copy.d.ts +3 -0
  89. package/dist/commands/liberica/operations/copy.d.ts.map +1 -0
  90. package/dist/commands/liberica/operations/copy.js +137 -0
  91. package/dist/commands/liberica/operations/copy.js.map +1 -0
  92. package/dist/commands/liberica/operations/create.d.ts +3 -0
  93. package/dist/commands/liberica/operations/create.d.ts.map +1 -0
  94. package/dist/commands/liberica/operations/create.js +212 -0
  95. package/dist/commands/liberica/operations/create.js.map +1 -0
  96. package/dist/commands/liberica/operations/deactive.d.ts +3 -0
  97. package/dist/commands/liberica/operations/deactive.d.ts.map +1 -0
  98. package/dist/commands/liberica/operations/deactive.js +152 -0
  99. package/dist/commands/liberica/operations/deactive.js.map +1 -0
  100. package/dist/commands/liberica/operations/delete.d.ts +3 -0
  101. package/dist/commands/liberica/operations/delete.d.ts.map +1 -0
  102. package/dist/commands/liberica/operations/delete.js +128 -0
  103. package/dist/commands/liberica/operations/delete.js.map +1 -0
  104. package/dist/commands/liberica/operations/get.d.ts +3 -0
  105. package/dist/commands/liberica/operations/get.d.ts.map +1 -0
  106. package/dist/commands/liberica/operations/get.js +93 -0
  107. package/dist/commands/liberica/operations/get.js.map +1 -0
  108. package/dist/commands/liberica/operations/index.d.ts +3 -0
  109. package/dist/commands/liberica/operations/index.d.ts.map +1 -0
  110. package/dist/commands/liberica/operations/index.js +25 -0
  111. package/dist/commands/liberica/operations/index.js.map +1 -0
  112. package/dist/commands/liberica/operations/list.d.ts +3 -0
  113. package/dist/commands/liberica/operations/list.d.ts.map +1 -0
  114. package/dist/commands/liberica/operations/list.js +141 -0
  115. package/dist/commands/liberica/operations/list.js.map +1 -0
  116. package/dist/commands/liberica/operations/update.d.ts +3 -0
  117. package/dist/commands/liberica/operations/update.d.ts.map +1 -0
  118. package/dist/commands/liberica/operations/update.js +208 -0
  119. package/dist/commands/liberica/operations/update.js.map +1 -0
  120. package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts +2 -0
  121. package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts.map +1 -0
  122. package/dist/commands/liberica/stock/__tests__/ledger.test.js +41 -0
  123. package/dist/commands/liberica/stock/__tests__/ledger.test.js.map +1 -0
  124. package/dist/commands/liberica/stock/__tests__/list.test.d.ts +2 -0
  125. package/dist/commands/liberica/stock/__tests__/list.test.d.ts.map +1 -0
  126. package/dist/commands/liberica/stock/__tests__/list.test.js +39 -0
  127. package/dist/commands/liberica/stock/__tests__/list.test.js.map +1 -0
  128. package/dist/commands/liberica/stock/index.d.ts +3 -0
  129. package/dist/commands/liberica/stock/index.d.ts.map +1 -0
  130. package/dist/commands/liberica/stock/index.js +11 -0
  131. package/dist/commands/liberica/stock/index.js.map +1 -0
  132. package/dist/commands/liberica/stock/ledger.d.ts +3 -0
  133. package/dist/commands/liberica/stock/ledger.d.ts.map +1 -0
  134. package/dist/commands/liberica/stock/ledger.js +154 -0
  135. package/dist/commands/liberica/stock/ledger.js.map +1 -0
  136. package/dist/commands/liberica/stock/list.d.ts +3 -0
  137. package/dist/commands/liberica/stock/list.d.ts.map +1 -0
  138. package/dist/commands/liberica/stock/list.js +127 -0
  139. package/dist/commands/liberica/stock/list.js.map +1 -0
  140. package/dist/commands/liberica/supplier-contacts/create.d.ts +3 -0
  141. package/dist/commands/liberica/supplier-contacts/create.d.ts.map +1 -0
  142. package/dist/commands/liberica/supplier-contacts/create.js +129 -0
  143. package/dist/commands/liberica/supplier-contacts/create.js.map +1 -0
  144. package/dist/commands/liberica/supplier-contacts/delete.d.ts +3 -0
  145. package/dist/commands/liberica/supplier-contacts/delete.d.ts.map +1 -0
  146. package/dist/commands/liberica/supplier-contacts/delete.js +88 -0
  147. package/dist/commands/liberica/supplier-contacts/delete.js.map +1 -0
  148. package/dist/commands/liberica/supplier-contacts/get.d.ts +3 -0
  149. package/dist/commands/liberica/supplier-contacts/get.d.ts.map +1 -0
  150. package/dist/commands/liberica/supplier-contacts/get.js +84 -0
  151. package/dist/commands/liberica/supplier-contacts/get.js.map +1 -0
  152. package/dist/commands/liberica/supplier-contacts/index.d.ts +3 -0
  153. package/dist/commands/liberica/supplier-contacts/index.d.ts.map +1 -0
  154. package/dist/commands/liberica/supplier-contacts/index.js +17 -0
  155. package/dist/commands/liberica/supplier-contacts/index.js.map +1 -0
  156. package/dist/commands/liberica/supplier-contacts/list.d.ts +3 -0
  157. package/dist/commands/liberica/supplier-contacts/list.d.ts.map +1 -0
  158. package/dist/commands/liberica/supplier-contacts/list.js +98 -0
  159. package/dist/commands/liberica/supplier-contacts/list.js.map +1 -0
  160. package/dist/commands/liberica/supplier-contacts/update.d.ts +3 -0
  161. package/dist/commands/liberica/supplier-contacts/update.d.ts.map +1 -0
  162. package/dist/commands/liberica/supplier-contacts/update.js +136 -0
  163. package/dist/commands/liberica/supplier-contacts/update.js.map +1 -0
  164. package/dist/core/api/client.d.ts +46 -0
  165. package/dist/core/api/client.d.ts.map +1 -1
  166. package/dist/core/api/client.js +865 -52
  167. package/dist/core/api/client.js.map +1 -1
  168. package/dist/index.js +1 -1
  169. package/dist/types/calendar.d.ts +28 -0
  170. package/dist/types/calendar.d.ts.map +1 -0
  171. package/dist/types/calendar.js +2 -0
  172. package/dist/types/calendar.js.map +1 -0
  173. package/dist/types/client-contact.d.ts +65 -0
  174. package/dist/types/client-contact.d.ts.map +1 -0
  175. package/dist/types/client-contact.js +4 -0
  176. package/dist/types/client-contact.js.map +1 -0
  177. package/dist/types/dict.d.ts +97 -0
  178. package/dist/types/dict.d.ts.map +1 -0
  179. package/dist/types/dict.js +2 -0
  180. package/dist/types/dict.js.map +1 -0
  181. package/dist/types/index.d.ts +5 -0
  182. package/dist/types/index.d.ts.map +1 -1
  183. package/dist/types/index.js +1 -0
  184. package/dist/types/index.js.map +1 -1
  185. package/dist/types/operation.d.ts +66 -0
  186. package/dist/types/operation.d.ts.map +1 -0
  187. package/dist/types/operation.js +2 -0
  188. package/dist/types/operation.js.map +1 -0
  189. package/dist/types/stock.d.ts +133 -0
  190. package/dist/types/stock.d.ts.map +1 -0
  191. package/dist/types/stock.js +3 -0
  192. package/dist/types/stock.js.map +1 -0
  193. package/dist/types/supplier-contact.d.ts +65 -0
  194. package/dist/types/supplier-contact.d.ts.map +1 -0
  195. package/dist/types/supplier-contact.js +4 -0
  196. package/dist/types/supplier-contact.js.map +1 -0
  197. package/docs/commands/REFERENCE.md +24 -4
  198. package/docs/commands/liberica/calendar/DESIGN.md +333 -0
  199. package/docs/commands/liberica/client-contacts/create.md +152 -0
  200. package/docs/commands/liberica/client-contacts/delete.md +123 -0
  201. package/docs/commands/liberica/client-contacts/get.md +133 -0
  202. package/docs/commands/liberica/client-contacts/list.md +143 -0
  203. package/docs/commands/liberica/client-contacts/update.md +158 -0
  204. package/docs/commands/liberica/stock/ledger.md +209 -0
  205. package/docs/commands/liberica/stock/list.md +165 -0
  206. package/docs/commands/liberica/supplier-contacts/create.md +152 -0
  207. package/docs/commands/liberica/supplier-contacts/delete.md +123 -0
  208. package/docs/commands/liberica/supplier-contacts/get.md +133 -0
  209. package/docs/commands/liberica/supplier-contacts/list.md +143 -0
  210. package/docs/commands/liberica/supplier-contacts/update.md +158 -0
  211. package/package.json +1 -1
  212. package/src/commands/liberica/calendar/index.ts +13 -0
  213. package/src/commands/liberica/calendar/list.ts +214 -0
  214. package/src/commands/liberica/calendar/set.ts +130 -0
  215. package/src/commands/liberica/client-contacts/create.ts +115 -0
  216. package/src/commands/liberica/client-contacts/delete.ts +140 -0
  217. package/src/commands/liberica/client-contacts/get.ts +103 -0
  218. package/src/commands/liberica/client-contacts/index.ts +19 -0
  219. package/src/commands/liberica/client-contacts/list.ts +118 -0
  220. package/src/commands/liberica/client-contacts/update.ts +137 -0
  221. package/src/commands/liberica/dict-types/get.ts +74 -0
  222. package/src/commands/liberica/dict-types/index.ts +15 -0
  223. package/src/commands/liberica/dict-types/list.ts +118 -0
  224. package/src/commands/liberica/dict-types/update.ts +134 -0
  225. package/src/commands/liberica/dicts/create.ts +175 -0
  226. package/src/commands/liberica/dicts/delete.ts +107 -0
  227. package/src/commands/liberica/dicts/get.ts +80 -0
  228. package/src/commands/liberica/dicts/index.ts +19 -0
  229. package/src/commands/liberica/dicts/list.ts +114 -0
  230. package/src/commands/liberica/dicts/update.ts +116 -0
  231. package/src/commands/liberica/index.ts +18 -0
  232. package/src/commands/liberica/operations/active.ts +153 -0
  233. package/src/commands/liberica/operations/batch-delete.ts +131 -0
  234. package/src/commands/liberica/operations/copy.ts +138 -0
  235. package/src/commands/liberica/operations/create.ts +223 -0
  236. package/src/commands/liberica/operations/deactive.ts +152 -0
  237. package/src/commands/liberica/operations/delete.ts +128 -0
  238. package/src/commands/liberica/operations/design.md +587 -0
  239. package/src/commands/liberica/operations/get.ts +112 -0
  240. package/src/commands/liberica/operations/index.ts +27 -0
  241. package/src/commands/liberica/operations/list.ts +180 -0
  242. package/src/commands/liberica/operations/update.ts +218 -0
  243. package/src/commands/liberica/stock/index.ts +13 -0
  244. package/src/commands/liberica/stock/ledger.ts +159 -0
  245. package/src/commands/liberica/stock/list.ts +128 -0
  246. package/src/commands/liberica/supplier-contacts/create.ts +120 -0
  247. package/src/commands/liberica/supplier-contacts/delete.ts +88 -0
  248. package/src/commands/liberica/supplier-contacts/get.ts +94 -0
  249. package/src/commands/liberica/supplier-contacts/index.ts +19 -0
  250. package/src/commands/liberica/supplier-contacts/list.ts +130 -0
  251. package/src/commands/liberica/supplier-contacts/update.ts +127 -0
  252. package/src/core/api/client.ts +1093 -74
  253. package/src/index.ts +1 -1
  254. package/src/types/calendar.ts +36 -0
  255. package/src/types/client-contact.ts +78 -0
  256. package/src/types/dict.ts +121 -0
  257. package/src/types/index.ts +5 -0
  258. package/src/types/operation.ts +72 -0
  259. package/src/types/stock.ts +161 -0
  260. package/src/types/supplier-contact.ts +78 -0
package/src/index.ts CHANGED
@@ -15,7 +15,7 @@ async function main(): Promise<void> {
15
15
  program
16
16
  .name('barista')
17
17
  .description('Barista CLI - Bridge between AI agents and Liberica/Arabica')
18
- .version('0.1.7')
18
+ .version('0.1.8')
19
19
  .option('-e, --env <environment>', 'Target environment (dev|test|prod-cn|prod-jp)')
20
20
  .option('-t, --tenant <tenant>', 'Target tenant (for Liberica)')
21
21
  .option('--debug', 'Enable debug mode');
@@ -0,0 +1,36 @@
1
+ // DateType literal type
2
+ export type DateType = 'WORKDAY' | 'WEEKEND' | 'HOLIDAY';
3
+
4
+ // Calendar item (corresponds to WorkDayCalendar entity)
5
+ export interface CalendarItem {
6
+ calendarDate: string; // format: yyyy-MM-dd
7
+ dateType: DateType;
8
+ remark?: string;
9
+ isWorkDay?: boolean;
10
+ }
11
+
12
+ // Query params for calendar list
13
+ export interface CalendarQueryParams {
14
+ year: number;
15
+ month: number;
16
+ months?: number; // default 12, number of months to query
17
+ }
18
+
19
+ // Request for setting calendar date
20
+ export interface CalendarSetRequest {
21
+ calendarDate: string; // format: yyyy-MM-dd
22
+ dateType: DateType;
23
+ remark?: string;
24
+ }
25
+
26
+ // API response (backend returns Map<string, CalendarItem[]>)
27
+ export interface CalendarApiResponse {
28
+ success: boolean;
29
+ data?: {
30
+ [yearMonth: string]: CalendarItem[];
31
+ };
32
+ error?: {
33
+ code: string;
34
+ message: string;
35
+ };
36
+ }
@@ -0,0 +1,78 @@
1
+ // Client Contact entity (from MasterClientContact)
2
+ // All ID fields use string due to BigInteger backend
3
+
4
+ export interface ClientContact {
5
+ clientContactId: string;
6
+ clientId: string;
7
+ clientContactName: string;
8
+ clientContactPhone?: string;
9
+ clientContactTelephone?: string;
10
+ clientContactEmail?: string;
11
+ clientContactSex?: string;
12
+ clientContactBirthday?: string;
13
+ clientContactQq?: string;
14
+ clientContactWechat?: string;
15
+ clientContactAddress?: string;
16
+ defaultFlag?: string; // Y/N
17
+ remark?: string;
18
+ }
19
+
20
+ // Request for creating client contact (add endpoint)
21
+ export interface CreateClientContactRequest {
22
+ clientId: string;
23
+ clientContactName: string;
24
+ clientContactPhone?: string;
25
+ clientContactTelephone?: string;
26
+ clientContactEmail?: string;
27
+ clientContactSex?: string;
28
+ clientContactBirthday?: string;
29
+ clientContactQq?: string;
30
+ clientContactWechat?: string;
31
+ clientContactAddress?: string;
32
+ defaultFlag?: string;
33
+ remark?: string;
34
+ }
35
+
36
+ // Request for updating client contact (edit endpoint)
37
+ export interface UpdateClientContactRequest {
38
+ clientContactId: string;
39
+ clientContactName?: string;
40
+ clientContactPhone?: string;
41
+ clientContactTelephone?: string;
42
+ clientContactEmail?: string;
43
+ clientContactSex?: string;
44
+ clientContactBirthday?: string;
45
+ clientContactQq?: string;
46
+ clientContactWechat?: string;
47
+ clientContactAddress?: string;
48
+ defaultFlag?: string;
49
+ remark?: string;
50
+ }
51
+
52
+ // Query params for list/pagination
53
+ export interface ClientContactQueryParams {
54
+ clientId: string;
55
+ pageNo?: number;
56
+ pageSize?: number;
57
+ }
58
+
59
+ // Paginated response wrapper (PageResult from Roses framework)
60
+ export interface PageResult<T> {
61
+ totalRows: number;
62
+ pageSize: number;
63
+ pageNo: number;
64
+ rows: T[];
65
+ }
66
+
67
+ // List response type
68
+ export interface ClientContactListResponse extends PageResult<ClientContact> {}
69
+
70
+ // API response wrapper
71
+ export interface ClientContactApiResponse {
72
+ success: boolean;
73
+ data?: ClientContact | ClientContactListResponse;
74
+ error?: {
75
+ code: string;
76
+ message: string;
77
+ };
78
+ }
@@ -0,0 +1,121 @@
1
+ // Status flag literal type: 1 = enabled, 2 = disabled
2
+ export type DictStatusFlag = 1 | 2;
3
+
4
+ // Dict Type entity (dictionary type/category)
5
+ export interface DictType {
6
+ dictTypeId: string;
7
+ dictTypeCode: string;
8
+ dictTypeName: string;
9
+ statusFlag: DictStatusFlag;
10
+ sortOrder?: number;
11
+ remark?: string;
12
+ }
13
+
14
+ // Dict Item entity (individual dictionary entry)
15
+ export interface DictItem {
16
+ dictId: string;
17
+ dictTypeId: string;
18
+ dictCode: string;
19
+ dictName: string;
20
+ dictValue: string;
21
+ sortOrder: number;
22
+ statusFlag: DictStatusFlag;
23
+ remark?: string;
24
+ }
25
+
26
+ // Request for creating dict type
27
+ export interface CreateDictTypeRequest {
28
+ dictTypeCode: string;
29
+ dictTypeName: string;
30
+ statusFlag?: DictStatusFlag;
31
+ remark?: string;
32
+ }
33
+
34
+ // Request for updating dict type
35
+ export interface UpdateDictTypeRequest {
36
+ dictTypeId: string;
37
+ dictTypeCode?: string;
38
+ dictTypeName?: string;
39
+ statusFlag?: DictStatusFlag;
40
+ sortOrder?: number;
41
+ remark?: string;
42
+ }
43
+
44
+ // Request for creating dict item
45
+ export interface CreateDictItemRequest {
46
+ dictTypeId?: string; // Required by API (dict type's id cannot be empty)
47
+ dictTypeCode?: string; // Alternative to dictTypeId
48
+ dictCode: string;
49
+ dictName: string;
50
+ dictValue: string;
51
+ sortOrder?: number;
52
+ statusFlag?: DictStatusFlag;
53
+ remark?: string;
54
+ dictParentId?: string;
55
+ predefinedFlag?: string;
56
+ }
57
+
58
+ // Request for updating dict item
59
+ export interface UpdateDictItemRequest {
60
+ dictId: string;
61
+ dictTypeId?: string;
62
+ dictCode?: string;
63
+ dictName?: string;
64
+ dictValue?: string;
65
+ sortOrder?: number;
66
+ statusFlag?: DictStatusFlag;
67
+ remark?: string;
68
+ }
69
+
70
+ // Query params for dict type list
71
+ export interface DictTypeQueryParams {
72
+ pageNo?: number;
73
+ pageSize?: number;
74
+ status?: DictStatusFlag;
75
+ dictTypeCode?: string;
76
+ dictTypeName?: string;
77
+ }
78
+
79
+ // Query params for dict item list
80
+ export interface DictItemQueryParams {
81
+ pageNo?: number;
82
+ pageSize?: number;
83
+ status?: DictStatusFlag;
84
+ dictTypeCode: string;
85
+ dictCode?: string;
86
+ dictName?: string;
87
+ }
88
+
89
+ // Paginated response wrapper (PageResult from Roses framework)
90
+ export interface PageResult<T> {
91
+ totalRows: number;
92
+ pageSize: number;
93
+ pageNo: number;
94
+ rows: T[];
95
+ }
96
+
97
+ // List response type for dict types
98
+ export interface DictTypeListResponse extends PageResult<DictType> {}
99
+
100
+ // List response type for dict items
101
+ export interface DictItemListResponse extends PageResult<DictItem> {}
102
+
103
+ // API response wrapper for dict type operations
104
+ export interface DictTypeApiResponse {
105
+ success: boolean;
106
+ data?: DictType | DictTypeListResponse;
107
+ error?: {
108
+ code: string;
109
+ message: string;
110
+ };
111
+ }
112
+
113
+ // API response wrapper for dict item operations
114
+ export interface DictApiResponse {
115
+ success: boolean;
116
+ data?: DictItem | DictItemListResponse;
117
+ error?: {
118
+ code: string;
119
+ message: string;
120
+ };
121
+ }
@@ -73,9 +73,14 @@ export interface TokenContext {
73
73
  export * from './employee.js';
74
74
  export * from './org.js';
75
75
  export * from './position.js';
76
+ export * from './calendar.js';
76
77
  export type { Uom, CreateUomRequest, UpdateUomRequest, UomQueryParams, UomListResponse, UomApiResponse, UomStatusFlag } from './uom.js';
77
78
  export type { Supplier, SupplierListResponse, SupplierQueryParams, SupplierApiResponse, CreateSupplierRequest, UpdateSupplierRequest } from './supplier.js';
78
79
  export type { ClientListResponse, MasterClientCompactResponse, ClientQueryParams, ClientApiResponse, MasterClientResponse, CreateClientRequest, UpdateClientRequest } from './client.js';
79
80
  export type { ApiResponse, Material, MaterialRequest, MaterialQueryParams, MaterialListResponse, MaterialApiResponse, MaterialStatusFlag } from './material.js';
80
81
  export type { Warehouse, WarehouseListResponse, WarehouseQueryParams, WarehouseApiResponse, CreateWarehouseRequest, UpdateWarehouseRequest } from './warehouse.js';
81
82
  export type { WarehouseLocation, LocationListResponse, LocationQueryParams, LocationApiResponse, CreateLocationRequest, UpdateLocationRequest } from './location.js';
83
+ export type { DictType, DictItem, DictTypeListResponse, DictItemListResponse, DictTypeQueryParams, DictItemQueryParams, DictTypeApiResponse, DictApiResponse, CreateDictTypeRequest, UpdateDictTypeRequest, CreateDictItemRequest, UpdateDictItemRequest, DictStatusFlag } from './dict.js';
84
+ export type { MasterStockQueryParams, MasterWarehouseStockItem, MasterStockPageResult, MasterStockApiResponse, StockFlag, StockJourneyQueryParams, StockJourneyItem, StockJourneyApiResponse, StockJourneySummary, StockJourneySummaryApiResponse } from './stock.js';
85
+ export type { ClientContact, CreateClientContactRequest, UpdateClientContactRequest, ClientContactQueryParams, ClientContactListResponse, ClientContactApiResponse } from './client-contact.js';
86
+ export type { SupplierContact, CreateSupplierContactRequest, UpdateSupplierContactRequest, SupplierContactQueryParams, SupplierContactListResponse, SupplierContactApiResponse } from './supplier-contact.js';
@@ -0,0 +1,72 @@
1
+ export type OperationType = 'EQUIPMENT' | 'HUMAN' | 'PACKAGE' | 'QUALITY_TESTING' | 'OTHER';
2
+
3
+ export type StatusFlag = 1 | 2;
4
+
5
+ export interface Operation {
6
+ operationId: string;
7
+ operationCode: string;
8
+ operationName: string;
9
+ operationType: OperationType;
10
+ workCenterCode?: string;
11
+ mouldCode?: string;
12
+ mouldType?: string;
13
+ equipmentType?: string;
14
+ leadTime?: number;
15
+ remark?: string;
16
+ statusFlag: StatusFlag;
17
+ }
18
+
19
+ export interface OperationCreateRequest {
20
+ operationCode: string;
21
+ operationName: string;
22
+ operationType: OperationType;
23
+ workCenterCode?: string;
24
+ mouldCode?: string;
25
+ mouldType?: string;
26
+ equipmentType?: string;
27
+ leadTime?: number;
28
+ remark?: string;
29
+ statusFlag?: StatusFlag;
30
+ }
31
+
32
+ export interface OperationUpdateRequest {
33
+ operationId: string;
34
+ operationCode?: string;
35
+ operationName?: string;
36
+ operationType?: OperationType;
37
+ workCenterCode?: string;
38
+ mouldCode?: string;
39
+ mouldType?: string;
40
+ equipmentType?: string;
41
+ leadTime?: number;
42
+ remark?: string;
43
+ statusFlag?: StatusFlag;
44
+ }
45
+
46
+ export interface OperationQueryParams {
47
+ pageNo?: number;
48
+ pageSize?: number;
49
+ status?: StatusFlag;
50
+ operationCode?: string;
51
+ operationName?: string;
52
+ operationType?: OperationType;
53
+ workCenterCode?: string;
54
+ }
55
+
56
+ export interface PageResult<T> {
57
+ totalRows: number;
58
+ pageSize: number;
59
+ pageNo: number;
60
+ rows: T[];
61
+ }
62
+
63
+ export interface OperationListResponse extends PageResult<Operation> {}
64
+
65
+ export interface OperationApiResponse {
66
+ success: boolean;
67
+ data?: Operation | OperationListResponse;
68
+ error?: {
69
+ code: string;
70
+ message: string;
71
+ };
72
+ }
@@ -0,0 +1,161 @@
1
+ // Stock query types for Liberica production management
2
+
3
+ // ============================================
4
+ // Master Stock (Warehouse Stock) Query Types
5
+ // ============================================
6
+
7
+ // Params for GET /enterprise/master/stock/page/withWarehouse
8
+ export interface MasterStockQueryParams {
9
+ warehouseCode?: string;
10
+ materialCode?: string;
11
+ materialNo?: string;
12
+ materialName?: string;
13
+ materialType?: string;
14
+ lotNo?: string;
15
+ color?: string;
16
+ longX?: number;
17
+ wideY?: number;
18
+ highZ?: number;
19
+ sourceType?: string;
20
+ sourceCode?: string;
21
+ stockId?: string; // BigInteger → string
22
+ excludeZeroStock?: boolean;
23
+ startDate?: string; // YYYY-MM-DD
24
+ endDate?: string; // YYYY-MM-DD
25
+ pageNo: number; // 0-based (API convention)
26
+ pageSize: number;
27
+ sortField?: string;
28
+ sortOrder?: 'asc' | 'desc';
29
+ }
30
+
31
+ // Response item from GET /enterprise/master/stock/page/withWarehouse
32
+ export interface MasterWarehouseStockItem {
33
+ tenantId: string;
34
+ warehouseStockId: string;
35
+ warehouseCode: string;
36
+ materialCode: string;
37
+ materialNo: string;
38
+ materialName: string;
39
+ materialType: string;
40
+ color: string;
41
+ longX: number;
42
+ wideY: number;
43
+ highZ: number;
44
+ stockCount: number;
45
+ materialUomCode: string;
46
+ unitPrice: number;
47
+ localCurrency: string;
48
+ stockAmount: number;
49
+ lastStockFlag: string;
50
+ lastStockDate: string;
51
+ remark: string;
52
+ }
53
+
54
+ // Paginated response wrapper
55
+ export interface MasterStockPageResult<T> {
56
+ totalRows: number;
57
+ pageSize: number;
58
+ pageNo: number;
59
+ rows: T[];
60
+ }
61
+
62
+ // API Response wrapper for master stock
63
+ export interface MasterStockApiResponse {
64
+ success: boolean;
65
+ data?: MasterStockPageResult<MasterWarehouseStockItem>;
66
+ error?: {
67
+ code: string;
68
+ message: string;
69
+ };
70
+ }
71
+
72
+ // ============================================
73
+ // Stock Journey (Stock Ledger) Query Types
74
+ // ============================================
75
+
76
+ // Stock flag literal type
77
+ export type StockFlag = 'INBOUND' | 'OUTBOUND';
78
+
79
+ // Params for GET /enterprise/master/stock/journey/page
80
+ export interface StockJourneyQueryParams {
81
+ stockId?: string;
82
+ stockFormCode?: string;
83
+ stockType?: string;
84
+ stockFlag?: StockFlag;
85
+ warehouseCode?: string;
86
+ materialCode?: string;
87
+ materialNo?: string;
88
+ materialName?: string;
89
+ materialType?: string;
90
+ color?: string;
91
+ lotNo?: string;
92
+ lotCode?: string;
93
+ sourceType?: string;
94
+ sourceCode?: string;
95
+ startDate?: string; // YYYY-MM-DD
96
+ endDate?: string; // YYYY-MM-DD
97
+ postingMonth?: string; // YYYY-MM
98
+ pageNo: number;
99
+ pageSize: number;
100
+ sortField?: string;
101
+ sortOrder?: 'asc' | 'desc';
102
+ }
103
+
104
+ // Response item from GET /enterprise/master/stock/journey/page
105
+ export interface StockJourneyItem {
106
+ tenantId: string;
107
+ stockId: string;
108
+ stockFormCode: string;
109
+ stockType: string;
110
+ stockFlag: string;
111
+ warehouseCode: string;
112
+ materialCode: string;
113
+ materialNo: string;
114
+ materialName: string;
115
+ materialType: string;
116
+ color: string;
117
+ lotNo: string;
118
+ lotCode: string;
119
+ sourceCode: string;
120
+ sourceType: string;
121
+ inboundCount: number;
122
+ outboundCount: number;
123
+ materialUomCode: string;
124
+ unitPrice: number;
125
+ localCurrency: string;
126
+ inboundAmount: number;
127
+ outboundAmount: number;
128
+ inboundDate: string;
129
+ outboundDate: string;
130
+ stockDate: string;
131
+ postingMonth: string;
132
+ remark: string;
133
+ }
134
+
135
+ // API Response wrapper for stock journey
136
+ export interface StockJourneyApiResponse {
137
+ success: boolean;
138
+ data?: MasterStockPageResult<StockJourneyItem>;
139
+ error?: {
140
+ code: string;
141
+ message: string;
142
+ };
143
+ }
144
+
145
+ // Summary response for GET /enterprise/master/stock/journey/page/summary
146
+ export interface StockJourneySummary {
147
+ totalInboundCount: number;
148
+ totalOutboundCount: number;
149
+ totalInboundAmount: number;
150
+ totalOutboundAmount: number;
151
+ }
152
+
153
+ // API Response wrapper for stock journey summary
154
+ export interface StockJourneySummaryApiResponse {
155
+ success: boolean;
156
+ data?: StockJourneySummary;
157
+ error?: {
158
+ code: string;
159
+ message: string;
160
+ };
161
+ }
@@ -0,0 +1,78 @@
1
+ // Supplier Contact entity (from MasterSupplierContact)
2
+ // All ID fields use string due to BigInteger backend
3
+
4
+ export interface SupplierContact {
5
+ supplierContactId: string;
6
+ supplierId: string;
7
+ supplierContactName: string;
8
+ supplierContactPhone?: string;
9
+ supplierContactTelephone?: string;
10
+ supplierContactEmail?: string;
11
+ supplierContactSex?: string;
12
+ supplierContactBirthday?: string;
13
+ supplierContactQq?: string;
14
+ supplierContactWechat?: string;
15
+ supplierContactAddress?: string;
16
+ defaultFlag?: string; // Y/N
17
+ remark?: string;
18
+ }
19
+
20
+ // Request for creating supplier contact (add endpoint)
21
+ export interface CreateSupplierContactRequest {
22
+ supplierId: string;
23
+ supplierContactName: string;
24
+ supplierContactPhone?: string;
25
+ supplierContactTelephone?: string;
26
+ supplierContactEmail?: string;
27
+ supplierContactSex?: string;
28
+ supplierContactBirthday?: string;
29
+ supplierContactQq?: string;
30
+ supplierContactWechat?: string;
31
+ supplierContactAddress?: string;
32
+ defaultFlag?: string;
33
+ remark?: string;
34
+ }
35
+
36
+ // Request for updating supplier contact (edit endpoint)
37
+ export interface UpdateSupplierContactRequest {
38
+ supplierContactId: string;
39
+ supplierContactName?: string;
40
+ supplierContactPhone?: string;
41
+ supplierContactTelephone?: string;
42
+ supplierContactEmail?: string;
43
+ supplierContactSex?: string;
44
+ supplierContactBirthday?: string;
45
+ supplierContactQq?: string;
46
+ supplierContactWechat?: string;
47
+ supplierContactAddress?: string;
48
+ defaultFlag?: string;
49
+ remark?: string;
50
+ }
51
+
52
+ // Query params for list/pagination
53
+ export interface SupplierContactQueryParams {
54
+ supplierId: string;
55
+ pageNo?: number;
56
+ pageSize?: number;
57
+ }
58
+
59
+ // Paginated response wrapper (PageResult from Roses framework)
60
+ export interface PageResult<T> {
61
+ totalRows: number;
62
+ pageSize: number;
63
+ pageNo: number;
64
+ rows: T[];
65
+ }
66
+
67
+ // List response type
68
+ export interface SupplierContactListResponse extends PageResult<SupplierContact> {}
69
+
70
+ // API response wrapper
71
+ export interface SupplierContactApiResponse {
72
+ success: boolean;
73
+ data?: SupplierContact | SupplierContactListResponse;
74
+ error?: {
75
+ code: string;
76
+ message: string;
77
+ };
78
+ }