@newpeak/barista-cli 0.1.6 → 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.
- package/README.en.md +714 -0
- package/README.ja.md +708 -0
- package/README.md +68 -0
- package/README.vi.md +714 -0
- package/dist/commands/liberica/calendar/index.d.ts +3 -0
- package/dist/commands/liberica/calendar/index.d.ts.map +1 -0
- package/dist/commands/liberica/calendar/index.js +11 -0
- package/dist/commands/liberica/calendar/index.js.map +1 -0
- package/dist/commands/liberica/calendar/list.d.ts +3 -0
- package/dist/commands/liberica/calendar/list.d.ts.map +1 -0
- package/dist/commands/liberica/calendar/list.js +181 -0
- package/dist/commands/liberica/calendar/list.js.map +1 -0
- package/dist/commands/liberica/calendar/set.d.ts +3 -0
- package/dist/commands/liberica/calendar/set.d.ts.map +1 -0
- package/dist/commands/liberica/calendar/set.js +120 -0
- package/dist/commands/liberica/calendar/set.js.map +1 -0
- package/dist/commands/liberica/client-contacts/create.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/create.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/create.js +132 -0
- package/dist/commands/liberica/client-contacts/create.js.map +1 -0
- package/dist/commands/liberica/client-contacts/delete.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/delete.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/delete.js +139 -0
- package/dist/commands/liberica/client-contacts/delete.js.map +1 -0
- package/dist/commands/liberica/client-contacts/get.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/get.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/get.js +92 -0
- package/dist/commands/liberica/client-contacts/get.js.map +1 -0
- package/dist/commands/liberica/client-contacts/index.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/index.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/index.js +17 -0
- package/dist/commands/liberica/client-contacts/index.js.map +1 -0
- package/dist/commands/liberica/client-contacts/list.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/list.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/list.js +92 -0
- package/dist/commands/liberica/client-contacts/list.js.map +1 -0
- package/dist/commands/liberica/client-contacts/update.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/update.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/update.js +156 -0
- package/dist/commands/liberica/client-contacts/update.js.map +1 -0
- package/dist/commands/liberica/dict-types/get.d.ts +3 -0
- package/dist/commands/liberica/dict-types/get.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/get.js +62 -0
- package/dist/commands/liberica/dict-types/get.js.map +1 -0
- package/dist/commands/liberica/dict-types/index.d.ts +3 -0
- package/dist/commands/liberica/dict-types/index.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/index.js +13 -0
- package/dist/commands/liberica/dict-types/index.js.map +1 -0
- package/dist/commands/liberica/dict-types/list.d.ts +3 -0
- package/dist/commands/liberica/dict-types/list.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/list.js +91 -0
- package/dist/commands/liberica/dict-types/list.js.map +1 -0
- package/dist/commands/liberica/dict-types/update.d.ts +3 -0
- package/dist/commands/liberica/dict-types/update.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/update.js +127 -0
- package/dist/commands/liberica/dict-types/update.js.map +1 -0
- package/dist/commands/liberica/dicts/create.d.ts +3 -0
- package/dist/commands/liberica/dicts/create.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/create.js +157 -0
- package/dist/commands/liberica/dicts/create.js.map +1 -0
- package/dist/commands/liberica/dicts/delete.d.ts +3 -0
- package/dist/commands/liberica/dicts/delete.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/delete.js +106 -0
- package/dist/commands/liberica/dicts/delete.js.map +1 -0
- package/dist/commands/liberica/dicts/get.d.ts +3 -0
- package/dist/commands/liberica/dicts/get.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/get.js +69 -0
- package/dist/commands/liberica/dicts/get.js.map +1 -0
- package/dist/commands/liberica/dicts/index.d.ts +3 -0
- package/dist/commands/liberica/dicts/index.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/index.js +17 -0
- package/dist/commands/liberica/dicts/index.js.map +1 -0
- package/dist/commands/liberica/dicts/list.d.ts +3 -0
- package/dist/commands/liberica/dicts/list.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/list.js +88 -0
- package/dist/commands/liberica/dicts/list.js.map +1 -0
- package/dist/commands/liberica/dicts/update.d.ts +3 -0
- package/dist/commands/liberica/dicts/update.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/update.js +112 -0
- package/dist/commands/liberica/dicts/update.js.map +1 -0
- package/dist/commands/liberica/index.d.ts.map +1 -1
- package/dist/commands/liberica/index.js +22 -0
- package/dist/commands/liberica/index.js.map +1 -1
- package/dist/commands/liberica/materials/create.d.ts.map +1 -1
- package/dist/commands/liberica/materials/create.js +35 -9
- package/dist/commands/liberica/materials/create.js.map +1 -1
- package/dist/commands/liberica/operations/active.d.ts +3 -0
- package/dist/commands/liberica/operations/active.d.ts.map +1 -0
- package/dist/commands/liberica/operations/active.js +152 -0
- package/dist/commands/liberica/operations/active.js.map +1 -0
- package/dist/commands/liberica/operations/batch-delete.d.ts +3 -0
- package/dist/commands/liberica/operations/batch-delete.d.ts.map +1 -0
- package/dist/commands/liberica/operations/batch-delete.js +130 -0
- package/dist/commands/liberica/operations/batch-delete.js.map +1 -0
- package/dist/commands/liberica/operations/copy.d.ts +3 -0
- package/dist/commands/liberica/operations/copy.d.ts.map +1 -0
- package/dist/commands/liberica/operations/copy.js +137 -0
- package/dist/commands/liberica/operations/copy.js.map +1 -0
- package/dist/commands/liberica/operations/create.d.ts +3 -0
- package/dist/commands/liberica/operations/create.d.ts.map +1 -0
- package/dist/commands/liberica/operations/create.js +212 -0
- package/dist/commands/liberica/operations/create.js.map +1 -0
- package/dist/commands/liberica/operations/deactive.d.ts +3 -0
- package/dist/commands/liberica/operations/deactive.d.ts.map +1 -0
- package/dist/commands/liberica/operations/deactive.js +152 -0
- package/dist/commands/liberica/operations/deactive.js.map +1 -0
- package/dist/commands/liberica/operations/delete.d.ts +3 -0
- package/dist/commands/liberica/operations/delete.d.ts.map +1 -0
- package/dist/commands/liberica/operations/delete.js +128 -0
- package/dist/commands/liberica/operations/delete.js.map +1 -0
- package/dist/commands/liberica/operations/get.d.ts +3 -0
- package/dist/commands/liberica/operations/get.d.ts.map +1 -0
- package/dist/commands/liberica/operations/get.js +93 -0
- package/dist/commands/liberica/operations/get.js.map +1 -0
- package/dist/commands/liberica/operations/index.d.ts +3 -0
- package/dist/commands/liberica/operations/index.d.ts.map +1 -0
- package/dist/commands/liberica/operations/index.js +25 -0
- package/dist/commands/liberica/operations/index.js.map +1 -0
- package/dist/commands/liberica/operations/list.d.ts +3 -0
- package/dist/commands/liberica/operations/list.d.ts.map +1 -0
- package/dist/commands/liberica/operations/list.js +141 -0
- package/dist/commands/liberica/operations/list.js.map +1 -0
- package/dist/commands/liberica/operations/update.d.ts +3 -0
- package/dist/commands/liberica/operations/update.d.ts.map +1 -0
- package/dist/commands/liberica/operations/update.js +208 -0
- package/dist/commands/liberica/operations/update.js.map +1 -0
- package/dist/commands/liberica/orgs/index.d.ts.map +1 -1
- package/dist/commands/liberica/orgs/index.js.map +1 -1
- package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts +2 -0
- package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts.map +1 -0
- package/dist/commands/liberica/stock/__tests__/ledger.test.js +41 -0
- package/dist/commands/liberica/stock/__tests__/ledger.test.js.map +1 -0
- package/dist/commands/liberica/stock/__tests__/list.test.d.ts +2 -0
- package/dist/commands/liberica/stock/__tests__/list.test.d.ts.map +1 -0
- package/dist/commands/liberica/stock/__tests__/list.test.js +39 -0
- package/dist/commands/liberica/stock/__tests__/list.test.js.map +1 -0
- package/dist/commands/liberica/stock/index.d.ts +3 -0
- package/dist/commands/liberica/stock/index.d.ts.map +1 -0
- package/dist/commands/liberica/stock/index.js +11 -0
- package/dist/commands/liberica/stock/index.js.map +1 -0
- package/dist/commands/liberica/stock/ledger.d.ts +3 -0
- package/dist/commands/liberica/stock/ledger.d.ts.map +1 -0
- package/dist/commands/liberica/stock/ledger.js +154 -0
- package/dist/commands/liberica/stock/ledger.js.map +1 -0
- package/dist/commands/liberica/stock/list.d.ts +3 -0
- package/dist/commands/liberica/stock/list.d.ts.map +1 -0
- package/dist/commands/liberica/stock/list.js +127 -0
- package/dist/commands/liberica/stock/list.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/create.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/create.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/create.js +129 -0
- package/dist/commands/liberica/supplier-contacts/create.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/delete.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/delete.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/delete.js +88 -0
- package/dist/commands/liberica/supplier-contacts/delete.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/get.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/get.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/get.js +84 -0
- package/dist/commands/liberica/supplier-contacts/get.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/index.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/index.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/index.js +17 -0
- package/dist/commands/liberica/supplier-contacts/index.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/list.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/list.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/list.js +98 -0
- package/dist/commands/liberica/supplier-contacts/list.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/update.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/update.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/update.js +136 -0
- package/dist/commands/liberica/supplier-contacts/update.js.map +1 -0
- package/dist/commands/liberica/users/create.d.ts.map +1 -1
- package/dist/commands/liberica/users/create.js +1 -0
- package/dist/commands/liberica/users/create.js.map +1 -1
- package/dist/commands/liberica/warehouses/create.d.ts +3 -0
- package/dist/commands/liberica/warehouses/create.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/create.js +196 -0
- package/dist/commands/liberica/warehouses/create.js.map +1 -0
- package/dist/commands/liberica/warehouses/delete.d.ts +3 -0
- package/dist/commands/liberica/warehouses/delete.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/delete.js +111 -0
- package/dist/commands/liberica/warehouses/delete.js.map +1 -0
- package/dist/commands/liberica/warehouses/disable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/disable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/disable.js +173 -0
- package/dist/commands/liberica/warehouses/disable.js.map +1 -0
- package/dist/commands/liberica/warehouses/enable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/enable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/enable.js +173 -0
- package/dist/commands/liberica/warehouses/enable.js.map +1 -0
- package/dist/commands/liberica/warehouses/get.d.ts +3 -0
- package/dist/commands/liberica/warehouses/get.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/get.js +90 -0
- package/dist/commands/liberica/warehouses/get.js.map +1 -0
- package/dist/commands/liberica/warehouses/index.d.ts +3 -0
- package/dist/commands/liberica/warehouses/index.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/index.js +23 -0
- package/dist/commands/liberica/warehouses/index.js.map +1 -0
- package/dist/commands/liberica/warehouses/list.d.ts +3 -0
- package/dist/commands/liberica/warehouses/list.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/list.js +101 -0
- package/dist/commands/liberica/warehouses/list.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/create.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/create.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/create.js +199 -0
- package/dist/commands/liberica/warehouses/locations/create.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/delete.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/delete.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/delete.js +115 -0
- package/dist/commands/liberica/warehouses/locations/delete.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/disable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/disable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/disable.js +173 -0
- package/dist/commands/liberica/warehouses/locations/disable.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/enable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/enable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/enable.js +173 -0
- package/dist/commands/liberica/warehouses/locations/enable.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/get.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/get.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/get.js +73 -0
- package/dist/commands/liberica/warehouses/locations/get.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/index.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/index.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/index.js +21 -0
- package/dist/commands/liberica/warehouses/locations/index.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/list.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/list.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/list.js +104 -0
- package/dist/commands/liberica/warehouses/locations/list.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/update.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/update.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/update.js +128 -0
- package/dist/commands/liberica/warehouses/locations/update.js.map +1 -0
- package/dist/commands/liberica/warehouses/update.d.ts +3 -0
- package/dist/commands/liberica/warehouses/update.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/update.js +143 -0
- package/dist/commands/liberica/warehouses/update.js.map +1 -0
- package/dist/core/api/client.d.ts +62 -0
- package/dist/core/api/client.d.ts.map +1 -1
- package/dist/core/api/client.js +1203 -104
- package/dist/core/api/client.js.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/types/calendar.d.ts +28 -0
- package/dist/types/calendar.d.ts.map +1 -0
- package/dist/types/calendar.js +2 -0
- package/dist/types/calendar.js.map +1 -0
- package/dist/types/client-contact.d.ts +65 -0
- package/dist/types/client-contact.d.ts.map +1 -0
- package/dist/types/client-contact.js +4 -0
- package/dist/types/client-contact.js.map +1 -0
- package/dist/types/dict.d.ts +97 -0
- package/dist/types/dict.d.ts.map +1 -0
- package/dist/types/dict.js +2 -0
- package/dist/types/dict.js.map +1 -0
- package/dist/types/index.d.ts +9 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/location.d.ts +53 -0
- package/dist/types/location.d.ts.map +1 -0
- package/dist/types/location.js +2 -0
- package/dist/types/location.js.map +1 -0
- package/dist/types/operation.d.ts +66 -0
- package/dist/types/operation.d.ts.map +1 -0
- package/dist/types/operation.js +2 -0
- package/dist/types/operation.js.map +1 -0
- package/dist/types/stock.d.ts +133 -0
- package/dist/types/stock.d.ts.map +1 -0
- package/dist/types/stock.js +3 -0
- package/dist/types/stock.js.map +1 -0
- package/dist/types/supplier-contact.d.ts +65 -0
- package/dist/types/supplier-contact.d.ts.map +1 -0
- package/dist/types/supplier-contact.js +4 -0
- package/dist/types/supplier-contact.js.map +1 -0
- package/dist/types/warehouse.d.ts +68 -0
- package/dist/types/warehouse.d.ts.map +1 -0
- package/dist/types/warehouse.js +2 -0
- package/dist/types/warehouse.js.map +1 -0
- package/docs/commands/REFERENCE.md +24 -4
- package/docs/commands/liberica/calendar/DESIGN.md +333 -0
- package/docs/commands/liberica/client-contacts/create.md +152 -0
- package/docs/commands/liberica/client-contacts/delete.md +123 -0
- package/docs/commands/liberica/client-contacts/get.md +133 -0
- package/docs/commands/liberica/client-contacts/list.md +143 -0
- package/docs/commands/liberica/client-contacts/update.md +158 -0
- package/docs/commands/liberica/locations/create.md +195 -0
- package/docs/commands/liberica/locations/list.md +171 -0
- package/docs/commands/liberica/stock/ledger.md +209 -0
- package/docs/commands/liberica/stock/list.md +165 -0
- package/docs/commands/liberica/supplier-contacts/create.md +152 -0
- package/docs/commands/liberica/supplier-contacts/delete.md +123 -0
- package/docs/commands/liberica/supplier-contacts/get.md +133 -0
- package/docs/commands/liberica/supplier-contacts/list.md +143 -0
- package/docs/commands/liberica/supplier-contacts/update.md +158 -0
- package/docs/commands/liberica/warehouses/create.md +222 -0
- package/docs/commands/liberica/warehouses/list.md +184 -0
- package/package.json +1 -1
- package/src/commands/liberica/calendar/index.ts +13 -0
- package/src/commands/liberica/calendar/list.ts +214 -0
- package/src/commands/liberica/calendar/set.ts +130 -0
- package/src/commands/liberica/client-contacts/create.ts +115 -0
- package/src/commands/liberica/client-contacts/delete.ts +140 -0
- package/src/commands/liberica/client-contacts/get.ts +103 -0
- package/src/commands/liberica/client-contacts/index.ts +19 -0
- package/src/commands/liberica/client-contacts/list.ts +118 -0
- package/src/commands/liberica/client-contacts/update.ts +137 -0
- package/src/commands/liberica/dict-types/get.ts +74 -0
- package/src/commands/liberica/dict-types/index.ts +15 -0
- package/src/commands/liberica/dict-types/list.ts +118 -0
- package/src/commands/liberica/dict-types/update.ts +134 -0
- package/src/commands/liberica/dicts/create.ts +175 -0
- package/src/commands/liberica/dicts/delete.ts +107 -0
- package/src/commands/liberica/dicts/get.ts +80 -0
- package/src/commands/liberica/dicts/index.ts +19 -0
- package/src/commands/liberica/dicts/list.ts +114 -0
- package/src/commands/liberica/dicts/update.ts +116 -0
- package/src/commands/liberica/index.ts +22 -0
- package/src/commands/liberica/materials/create.ts +32 -9
- package/src/commands/liberica/operations/active.ts +153 -0
- package/src/commands/liberica/operations/batch-delete.ts +131 -0
- package/src/commands/liberica/operations/copy.ts +138 -0
- package/src/commands/liberica/operations/create.ts +223 -0
- package/src/commands/liberica/operations/deactive.ts +152 -0
- package/src/commands/liberica/operations/delete.ts +128 -0
- package/src/commands/liberica/operations/design.md +587 -0
- package/src/commands/liberica/operations/get.ts +112 -0
- package/src/commands/liberica/operations/index.ts +27 -0
- package/src/commands/liberica/operations/list.ts +180 -0
- package/src/commands/liberica/operations/update.ts +218 -0
- package/src/commands/liberica/orgs/index.ts +0 -1
- package/src/commands/liberica/stock/index.ts +13 -0
- package/src/commands/liberica/stock/ledger.ts +159 -0
- package/src/commands/liberica/stock/list.ts +128 -0
- package/src/commands/liberica/supplier-contacts/create.ts +120 -0
- package/src/commands/liberica/supplier-contacts/delete.ts +88 -0
- package/src/commands/liberica/supplier-contacts/get.ts +94 -0
- package/src/commands/liberica/supplier-contacts/index.ts +19 -0
- package/src/commands/liberica/supplier-contacts/list.ts +130 -0
- package/src/commands/liberica/supplier-contacts/update.ts +127 -0
- package/src/commands/liberica/users/create.ts +1 -0
- package/src/commands/liberica/warehouses/create.ts +204 -0
- package/src/commands/liberica/warehouses/delete.ts +112 -0
- package/src/commands/liberica/warehouses/disable.ts +174 -0
- package/src/commands/liberica/warehouses/enable.ts +174 -0
- package/src/commands/liberica/warehouses/get.ts +101 -0
- package/src/commands/liberica/warehouses/index.ts +25 -0
- package/src/commands/liberica/warehouses/list.ts +136 -0
- package/src/commands/liberica/warehouses/locations/create.ts +209 -0
- package/src/commands/liberica/warehouses/locations/delete.ts +116 -0
- package/src/commands/liberica/warehouses/locations/disable.ts +174 -0
- package/src/commands/liberica/warehouses/locations/enable.ts +174 -0
- package/src/commands/liberica/warehouses/locations/get.ts +84 -0
- package/src/commands/liberica/warehouses/locations/index.ts +23 -0
- package/src/commands/liberica/warehouses/locations/list.ts +140 -0
- package/src/commands/liberica/warehouses/locations/update.ts +135 -0
- package/src/commands/liberica/warehouses/update.ts +142 -0
- package/src/core/api/client.ts +1493 -78
- package/src/index.ts +1 -3
- package/src/types/calendar.ts +36 -0
- package/src/types/client-contact.ts +78 -0
- package/src/types/dict.ts +121 -0
- package/src/types/index.ts +9 -4
- package/src/types/location.ts +66 -0
- package/src/types/operation.ts +72 -0
- package/src/types/stock.ts +161 -0
- package/src/types/supplier-contact.ts +78 -0
- package/src/types/warehouse.ts +82 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# barista liberica supplier-contacts update
|
|
2
|
+
|
|
3
|
+
更新供应商联系人信息。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica supplier-contacts update <contact-id>` |
|
|
10
|
+
| 功能描述 | 修改供应商联系人信息 |
|
|
11
|
+
| HTTP方法 | POST |
|
|
12
|
+
| 是否需要认证 | ✅ 是 |
|
|
13
|
+
| 是否支持dry-run | ✅ 是 |
|
|
14
|
+
|
|
15
|
+
## 2.2 后端接口引用
|
|
16
|
+
|
|
17
|
+
### Controller位置
|
|
18
|
+
```
|
|
19
|
+
coffee-liberica-end/
|
|
20
|
+
└── facade/liberica-facade-enterprise/
|
|
21
|
+
└── src/main/java/com/newpeak/liberica/facade/enterprise/controller/purchases/
|
|
22
|
+
└── EnterpriseSupplierContactController.java
|
|
23
|
+
└── edit(@PostResource(path = "/edit", requiredPermission = true, requirePermissionCode = "EDIT_MASTER_SUPPLIER_CONTACT"))
|
|
24
|
+
└── public ResponseData<?> edit(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@RequestBody @Validated(BaseRequest.edit.class) MasterSupplierContactRequest masterSupplierContactRequest
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Request DTO位置
|
|
31
|
+
```
|
|
32
|
+
coffee-liberica-end/
|
|
33
|
+
└── business/liberica-business-master/master-api/
|
|
34
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/request/
|
|
35
|
+
└── MasterSupplierContactRequest.java
|
|
36
|
+
├── supplierContactId: Long (@NotNull on edit)
|
|
37
|
+
├── supplierContactName: String (@NotBlank, max=255)
|
|
38
|
+
├── supplierContactPhone: String (max=256)
|
|
39
|
+
├── supplierContactTelephone: String (max=256)
|
|
40
|
+
├── supplierContactEmail: String (max=512)
|
|
41
|
+
├── supplierContactSex: String (max=255)
|
|
42
|
+
├── supplierContactBirthday: Date
|
|
43
|
+
├── supplierContactQq: String (max=512)
|
|
44
|
+
├── supplierContactWechat: String (max=512)
|
|
45
|
+
├── supplierContactAddress: String (max=512)
|
|
46
|
+
├── defaultFlag: String (max=1)
|
|
47
|
+
└── remark: String (max=255)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Response DTO位置
|
|
51
|
+
```
|
|
52
|
+
coffee-liberica-end/
|
|
53
|
+
└── business/liberica-business-master/master-api/
|
|
54
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
55
|
+
└── MasterSupplierContactResponse.java
|
|
56
|
+
└── (同 get 接口)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 2.3 CLI参数设计
|
|
60
|
+
|
|
61
|
+
### 命令结构
|
|
62
|
+
```
|
|
63
|
+
barista liberica supplier-contacts update <contact-id> [options]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 位置参数
|
|
67
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
68
|
+
|------|------|------|------|
|
|
69
|
+
| contact-id | string | ✅ | 供应商联系人ID |
|
|
70
|
+
|
|
71
|
+
### 全局选项
|
|
72
|
+
| 选项 | 类型 | 说明 |
|
|
73
|
+
|------|------|------|
|
|
74
|
+
| `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
|
|
75
|
+
| `--tenant` | string | 租户代码 |
|
|
76
|
+
| `--dry-run` | boolean | 预览模式 |
|
|
77
|
+
| `--json` | boolean | JSON输出 |
|
|
78
|
+
|
|
79
|
+
### 命令选项
|
|
80
|
+
| 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 | 对应DTO字段 |
|
|
81
|
+
|------|--------|------|------|--------|------|-------------|
|
|
82
|
+
| --name | -n | string | ⬜ | - | 姓名 | supplierContactName |
|
|
83
|
+
| --phone | -p | string | ⬜ | - | 手机号 | supplierContactPhone |
|
|
84
|
+
| --telephone | -t | string | ⬜ | - | 座机号 | supplierContactTelephone |
|
|
85
|
+
| --email | -e | string | ⬜ | - | 电子邮箱 | supplierContactEmail |
|
|
86
|
+
| --sex | -x | string | ⬜ | - | 性别 | supplierContactSex |
|
|
87
|
+
| --birthday | -b | string | ⬜ | - | 生日(YYYY-MM-DD) | supplierContactBirthday |
|
|
88
|
+
| --qq | -q | string | ⬜ | - | QQ号 | supplierContactQq |
|
|
89
|
+
| --wechat | -w | string | ⬜ | - | 微信号 | supplierContactWechat |
|
|
90
|
+
| --address | -a | string | ⬜ | - | 详细地址 | supplierContactAddress |
|
|
91
|
+
| --default | -d | boolean | ⬜ | - | 是否默认联系人 | defaultFlag |
|
|
92
|
+
| --remark | -r | string | ⬜ | - | 备注 | remark |
|
|
93
|
+
|
|
94
|
+
**注意**:所有字段在 update 时都是可选的,至少需要提供一个要更新的字段。
|
|
95
|
+
|
|
96
|
+
## 2.4 字段映射表
|
|
97
|
+
|
|
98
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
99
|
+
|---------|---------|----------|----------|
|
|
100
|
+
| <contact-id> | supplierContactId | string→Long | @NotNull |
|
|
101
|
+
| --name / -n | supplierContactName | 直接传递 | max=255 |
|
|
102
|
+
| --phone / -p | supplierContactPhone | 直接传递 | max=256 |
|
|
103
|
+
| --telephone / -t | supplierContactTelephone | 直接传递 | max=256 |
|
|
104
|
+
| --email / -e | supplierContactEmail | 直接传递 | max=512 |
|
|
105
|
+
| --sex / -x | supplierContactSex | 直接传递 | max=255 |
|
|
106
|
+
| --birthday / -b | supplierContactBirthday | string→Date | yyyy-MM-dd |
|
|
107
|
+
| --qq / -q | supplierContactQq | 直接传递 | max=512 |
|
|
108
|
+
| --wechat / -w | supplierContactWechat | 直接传递 | max=512 |
|
|
109
|
+
| --address / -a | supplierContactAddress | 直接传递 | max=512 |
|
|
110
|
+
| --default / -d | defaultFlag | boolean→Y/N | max=1 |
|
|
111
|
+
| --remark / -r | remark | 直接传递 | max=255 |
|
|
112
|
+
|
|
113
|
+
## 2.5 错误码引用
|
|
114
|
+
|
|
115
|
+
### ExceptionEnum位置
|
|
116
|
+
```
|
|
117
|
+
coffee-liberica-end/
|
|
118
|
+
└── business/liberica-business-master/master-api/
|
|
119
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
120
|
+
└── MasterSupplierContactExceptionEnum.java
|
|
121
|
+
└── MASTER_SUPPLIER_CONTACT_NOT_EXIST("01001XXX001", "租户供应商联系人不存在")
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 已知错误码
|
|
125
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
126
|
+
|--------|----------|----------|
|
|
127
|
+
| 01001XXX001 | 租户供应商联系人不存在 | contact-id 不存在或不属于当前租户 |
|
|
128
|
+
|
|
129
|
+
## 2.6 权限检查
|
|
130
|
+
|
|
131
|
+
| 检查项 | 位置 | 说明 |
|
|
132
|
+
|--------|------|------|
|
|
133
|
+
| PermissionConstants | `EDIT_MASTER_SUPPLIER_CONTACT` | 编辑供应商联系人需要此权限 |
|
|
134
|
+
| 注解 | `@PostResource(requirePermissionCode = "EDIT_MASTER_SUPPLIER_CONTACT")` | Controller方法上 |
|
|
135
|
+
|
|
136
|
+
## 2.7 实现要点
|
|
137
|
+
|
|
138
|
+
1. **位置参数**:contact-id 必须指定
|
|
139
|
+
2. **可选字段**:所有业务字段都是可选的,至少提供一个
|
|
140
|
+
3. **dry-run 模式**:预览模式下只显示将要更新的数据,不实际调用 API
|
|
141
|
+
4. **输出格式**:成功后显示更新后的联系人信息
|
|
142
|
+
5. **错误处理**:联系人不存在时显示友好错误信息
|
|
143
|
+
|
|
144
|
+
## 2.8 示例用法
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# 更新联系人姓名(dry-run 预览)
|
|
148
|
+
barista liberica supplier-contacts update 12345 --name "新姓名" --dry-run
|
|
149
|
+
|
|
150
|
+
# 实际更新
|
|
151
|
+
barista liberica supplier-contacts update 12345 --name "新姓名" --phone "13900139000"
|
|
152
|
+
|
|
153
|
+
# 更新多个字段
|
|
154
|
+
barista liberica supplier-contacts update 12345 --email "new@example.com" --address "新地址"
|
|
155
|
+
|
|
156
|
+
# JSON 输出
|
|
157
|
+
barista liberica supplier-contacts update 12345 --name "新姓名" --json
|
|
158
|
+
```
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# barista liberica warehouses create
|
|
2
|
+
|
|
3
|
+
Create a new warehouse.
|
|
4
|
+
|
|
5
|
+
## 2.1 Command Metadata
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| Full Command | `barista liberica warehouses create` |
|
|
10
|
+
| Description | Create a new warehouse |
|
|
11
|
+
| HTTP Method | POST |
|
|
12
|
+
| Requires Authentication | Yes |
|
|
13
|
+
| Supports Dry-Run | Yes |
|
|
14
|
+
|
|
15
|
+
## 2.2 Backend API Reference
|
|
16
|
+
|
|
17
|
+
### Controller Location
|
|
18
|
+
```
|
|
19
|
+
coffee-liberica-end/
|
|
20
|
+
└── facade/liberica-facade-enterprise/
|
|
21
|
+
└── src/main/java/com/newpeak/liberica/facade/enterprise/controller/stock/
|
|
22
|
+
└── EnterpriseWarehouseController.java
|
|
23
|
+
└── add(@PostResource(path = "/add", requiredPermission = true, requirePermissionCode = MasterWarehousePermissionConstants.ADD_MASTER_WAREHOUSE))
|
|
24
|
+
└── public ResponseData<MasterWarehouseResponse> add(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@RequestBody @Validated(BaseRequest.add.class) MasterWarehouseRequest masterWarehouseRequest
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Request DTO Location
|
|
31
|
+
```
|
|
32
|
+
coffee-liberica-end/
|
|
33
|
+
└── business/liberica-business-master/master-api/
|
|
34
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/request/
|
|
35
|
+
└── MasterWarehouseRequest.java
|
|
36
|
+
├── warehouseCode: String (@NotBlank on add, max=255)
|
|
37
|
+
├── warehouseName: String (max=255)
|
|
38
|
+
├── warehouseClasses: String (max=255)
|
|
39
|
+
├── manager: String (max=255)
|
|
40
|
+
├── warehouseTelephone: String (max=256)
|
|
41
|
+
├── warehouseFax: String (max=256)
|
|
42
|
+
├── warehouseAddress: String (max=512)
|
|
43
|
+
├── enableLocation: String (@NotBlank on add, max=1, Y/N)
|
|
44
|
+
├── enableNegativeInventory: String (max=1, Y/N)
|
|
45
|
+
├── statusFlag: Integer
|
|
46
|
+
└── remark: String (max=255)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Response DTO Location
|
|
50
|
+
```
|
|
51
|
+
coffee-liberica-end/
|
|
52
|
+
└── business/liberica-business-master/master-api/
|
|
53
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
54
|
+
└── MasterWarehouseResponse.java
|
|
55
|
+
├── warehouseId: Long
|
|
56
|
+
├── warehouseCode: String
|
|
57
|
+
├── warehouseName: String
|
|
58
|
+
├── warehouseClasses: String
|
|
59
|
+
├── manager: String
|
|
60
|
+
├── warehouseTelephone: String
|
|
61
|
+
├── warehouseFax: String
|
|
62
|
+
├── warehouseAddress: String
|
|
63
|
+
├── enableLocation: String (Y/N)
|
|
64
|
+
├── enableNegativeInventory: String (Y/N)
|
|
65
|
+
├── statusFlag: Integer (1=enable, 2=disable)
|
|
66
|
+
├── remark: String
|
|
67
|
+
└── locations: List<MasterWarehouseLocationResponse>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 2.3 CLI Parameter Design
|
|
71
|
+
|
|
72
|
+
### Command Structure
|
|
73
|
+
```
|
|
74
|
+
barista liberica warehouses create [options]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Global Options
|
|
78
|
+
| Option | Type | Description |
|
|
79
|
+
|------|------|------|
|
|
80
|
+
| `--env` | string | Target environment (dev\|test\|prod-cn\|prod-jp) |
|
|
81
|
+
| `--tenant` | string | Tenant code |
|
|
82
|
+
| `--dry-run` | boolean | Preview mode (no actual API call) |
|
|
83
|
+
| `--json` | boolean | JSON output |
|
|
84
|
+
|
|
85
|
+
### Command Options
|
|
86
|
+
| Option | Short | Type | Required | Default | Description | Maps to DTO Field |
|
|
87
|
+
|------|--------|------|------|--------|------|-------------|
|
|
88
|
+
| --code | -c | string | Yes | - | Warehouse code | warehouseCode |
|
|
89
|
+
| --name | -n | string | Yes | - | Warehouse name | warehouseName |
|
|
90
|
+
| --classes | — | string | No | - | Warehouse class/category | warehouseClasses |
|
|
91
|
+
| --manager | -m | string | No | - | Warehouse manager | manager |
|
|
92
|
+
| --phone | — | string | No | - | Warehouse telephone | warehouseTelephone |
|
|
93
|
+
| --fax | — | string | No | - | Warehouse fax | warehouseFax |
|
|
94
|
+
| --address | -a | string | No | - | Warehouse address | warehouseAddress |
|
|
95
|
+
| --enable-location | — | boolean | Yes | true | Enable location management | enableLocation |
|
|
96
|
+
| --enable-negative-inventory | — | boolean | No | false | Allow negative inventory | enableNegativeInventory |
|
|
97
|
+
| --remark | -r | string | No | - | Remarks | remark |
|
|
98
|
+
|
|
99
|
+
## 2.4 Field Mapping Table
|
|
100
|
+
|
|
101
|
+
| CLI Parameter | DTO Field | Type Conversion | Validation Rule |
|
|
102
|
+
|---------|---------|----------|----------|
|
|
103
|
+
| --code / -c | warehouseCode | Direct | @NotBlank, max=255, unique per tenant |
|
|
104
|
+
| --name / -n | warehouseName | Direct | max=255 |
|
|
105
|
+
| --classes | warehouseClasses | Direct | max=255 |
|
|
106
|
+
| --manager / -m | manager | Direct | max=255 |
|
|
107
|
+
| --phone | warehouseTelephone | Direct | max=256 |
|
|
108
|
+
| --fax | warehouseFax | Direct | max=256 |
|
|
109
|
+
| --address / -a | warehouseAddress | Direct | max=512 |
|
|
110
|
+
| --enable-location | enableLocation | boolean->String (Y/N) | @NotBlank, max=1 |
|
|
111
|
+
| --enable-negative-inventory | enableNegativeInventory | boolean->String (Y/N) | max=1 |
|
|
112
|
+
| --remark / -r | remark | Direct | max=255 |
|
|
113
|
+
|
|
114
|
+
**Auto-Generated Fields:**
|
|
115
|
+
| Field | Value |
|
|
116
|
+
|------|-----|
|
|
117
|
+
| tenantId | From JWT token (do NOT pass X-TENANT-ID header) |
|
|
118
|
+
| statusFlag | Default 1 (enabled) |
|
|
119
|
+
|
|
120
|
+
## 2.5 Error Code Reference
|
|
121
|
+
|
|
122
|
+
### ExceptionEnum Location
|
|
123
|
+
```
|
|
124
|
+
coffee-liberica-end/
|
|
125
|
+
└── business/liberica-business-master/master-api/
|
|
126
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
127
|
+
└── MasterWarehouseExceptionEnum.java
|
|
128
|
+
├── MASTER_WAREHOUSE_NOT_EXIST("01001370001", "租户仓库不存在")
|
|
129
|
+
├── MASTER_WAREHOUSE_CODE_FORMAT_CANNOT_EMPTY("01001370002", "仓库编码规则不能为空")
|
|
130
|
+
└── MASTER_WAREHOUSE_CODE_FORMAT_NOT_CORRECT("01001370003", "仓库编码规则格式不正确")
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Known Error Codes
|
|
134
|
+
| Error Code | Error Message | Trigger Condition |
|
|
135
|
+
|--------|----------|----------|
|
|
136
|
+
| 01001370001 | Warehouse does not exist | Edit/detail with non-existent ID |
|
|
137
|
+
| 01001370002 | Warehouse code format cannot be empty | Auto-generation rule not configured |
|
|
138
|
+
| 01001370003 | Warehouse code format incorrect | Invalid code format pattern |
|
|
139
|
+
|
|
140
|
+
## 2.6 Permission Check
|
|
141
|
+
|
|
142
|
+
| Check Item | Location | Description |
|
|
143
|
+
|--------|------|------|
|
|
144
|
+
| PermissionConstants | `MasterWarehousePermissionConstants.ADD_MASTER_WAREHOUSE` | Controller layer `@PostResource(requirePermissionCode = "ADD_MASTER_WAREHOUSE")` |
|
|
145
|
+
|
|
146
|
+
## 2.7 Implementation Notes
|
|
147
|
+
|
|
148
|
+
1. **Required Fields**: `--code` and `--name` must be provided. `--enable-location` defaults to true.
|
|
149
|
+
2. **Manual Code**: `warehouseCode` is NOT auto-generated. User must provide a unique code.
|
|
150
|
+
3. **Dry-Run Support**: Use `--dry-run` to preview request without calling API.
|
|
151
|
+
4. **Boolean Flags**: `--enable-location` defaults to `true` (Y), `--enable-negative-inventory` defaults to `false` (N).
|
|
152
|
+
5. **No Batch Create**: This command does NOT support batch creation (one warehouse per call).
|
|
153
|
+
6. **BigInteger ID**: `warehouseId` in response must be parsed as `string` in TypeScript to avoid precision loss.
|
|
154
|
+
|
|
155
|
+
## 2.8 Example Usage
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Create with minimal required fields
|
|
159
|
+
barista liberica warehouses create --code "WH-001" --name "Main Warehouse"
|
|
160
|
+
|
|
161
|
+
# Create with all common options
|
|
162
|
+
barista liberica warehouses create \
|
|
163
|
+
--code "WH-002" \
|
|
164
|
+
--name "East Storage" \
|
|
165
|
+
--classes "FINISHED_GOOD" \
|
|
166
|
+
--manager "John Doe" \
|
|
167
|
+
--phone "021-12345678" \
|
|
168
|
+
--address "123 Industrial Road" \
|
|
169
|
+
--enable-location \
|
|
170
|
+
--enable-negative-inventory \
|
|
171
|
+
--remark "Primary finished goods storage"
|
|
172
|
+
|
|
173
|
+
# Disable location management
|
|
174
|
+
barista liberica warehouses create \
|
|
175
|
+
--code "WH-003" \
|
|
176
|
+
--name "Bulk Storage" \
|
|
177
|
+
--no-enable-location
|
|
178
|
+
|
|
179
|
+
# Dry-run to preview
|
|
180
|
+
barista liberica warehouses create \
|
|
181
|
+
--code "WH-004" \
|
|
182
|
+
--name "Test Warehouse" \
|
|
183
|
+
--dry-run
|
|
184
|
+
|
|
185
|
+
# JSON output
|
|
186
|
+
barista liberica warehouses create \
|
|
187
|
+
--code "WH-005" \
|
|
188
|
+
--name "New Warehouse" \
|
|
189
|
+
--json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## 2.9 Request Body Structure
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"warehouseCode": "WH-001",
|
|
197
|
+
"warehouseName": "Main Warehouse",
|
|
198
|
+
"warehouseClasses": "FINISHED_GOOD",
|
|
199
|
+
"manager": "John Doe",
|
|
200
|
+
"warehouseTelephone": "021-12345678",
|
|
201
|
+
"warehouseFax": "021-87654321",
|
|
202
|
+
"warehouseAddress": "123 Industrial Road",
|
|
203
|
+
"enableLocation": "Y",
|
|
204
|
+
"enableNegativeInventory": "N",
|
|
205
|
+
"statusFlag": 1,
|
|
206
|
+
"remark": "Primary storage"
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## 2.10 API Path
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
POST /api/enterprise/purchases/warehouse/add
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Headers:**
|
|
217
|
+
```
|
|
218
|
+
Authorization: <token> (No "Bearer " prefix)
|
|
219
|
+
Content-Type: application/json
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Note**: Do NOT include `X-TENANT-ID` header. Tenant is extracted from JWT token.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# barista liberica warehouses list
|
|
2
|
+
|
|
3
|
+
List warehouses with pagination.
|
|
4
|
+
|
|
5
|
+
## 2.1 Command Metadata
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| Full Command | `barista liberica warehouses list` |
|
|
10
|
+
| Description | List warehouses with pagination |
|
|
11
|
+
| HTTP Method | GET |
|
|
12
|
+
| Requires Authentication | Yes |
|
|
13
|
+
| Supports Dry-Run | No |
|
|
14
|
+
|
|
15
|
+
## 2.2 Backend API Reference
|
|
16
|
+
|
|
17
|
+
### Controller Location
|
|
18
|
+
```
|
|
19
|
+
coffee-liberica-end/
|
|
20
|
+
└── facade/liberica-facade-enterprise/
|
|
21
|
+
└── src/main/java/com/newpeak/liberica/facade/enterprise/controller/stock/
|
|
22
|
+
└── EnterpriseWarehouseController.java
|
|
23
|
+
└── page(@GetResource(path = "/page"))
|
|
24
|
+
└── public ResponseData<PageResult<MasterWarehouseResponse>> page(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@ParameterObject MasterWarehouseRequest masterWarehouseRequest
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Request DTO Location
|
|
31
|
+
```
|
|
32
|
+
coffee-liberica-end/
|
|
33
|
+
└── business/liberica-business-master/master-api/
|
|
34
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/request/
|
|
35
|
+
└── MasterWarehouseRequest.java
|
|
36
|
+
├── warehouseCode: String
|
|
37
|
+
├── warehouseName: String
|
|
38
|
+
├── warehouseClasses: String
|
|
39
|
+
├── manager: String
|
|
40
|
+
├── warehouseTelephone: String
|
|
41
|
+
├── warehouseFax: String
|
|
42
|
+
├── warehouseAddress: String
|
|
43
|
+
├── enableLocation: String (Y/N)
|
|
44
|
+
├── enableNegativeInventory: String (Y/N)
|
|
45
|
+
├── statusFlag: Integer
|
|
46
|
+
└── remark: String
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Response DTO Location
|
|
50
|
+
```
|
|
51
|
+
coffee-liberica-end/
|
|
52
|
+
└── business/liberica-business-master/master-api/
|
|
53
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
54
|
+
└── MasterWarehouseResponse.java
|
|
55
|
+
├── warehouseId: Long
|
|
56
|
+
├── warehouseCode: String
|
|
57
|
+
├── warehouseName: String
|
|
58
|
+
├── warehouseClasses: String
|
|
59
|
+
├── manager: String
|
|
60
|
+
├── warehouseTelephone: String
|
|
61
|
+
├── warehouseFax: String
|
|
62
|
+
├── warehouseAddress: String
|
|
63
|
+
├── enableLocation: String (Y/N)
|
|
64
|
+
├── enableNegativeInventory: String (Y/N)
|
|
65
|
+
├── statusFlag: Integer (1=enable, 2=disable)
|
|
66
|
+
├── remark: String
|
|
67
|
+
└── locations: List<MasterWarehouseLocationResponse>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 2.3 CLI Parameter Design
|
|
71
|
+
|
|
72
|
+
### Command Structure
|
|
73
|
+
```
|
|
74
|
+
barista liberica warehouses list [options]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Global Options
|
|
78
|
+
| Option | Type | Description |
|
|
79
|
+
|------|------|------|
|
|
80
|
+
| `--env` | string | Target environment (dev\|test\|prod-cn\|prod-jp) |
|
|
81
|
+
| `--tenant` | string | Tenant code |
|
|
82
|
+
| `--json` | boolean | JSON output |
|
|
83
|
+
|
|
84
|
+
### Command Options
|
|
85
|
+
| Option | Short | Type | Required | Default | Description | Maps to Query Param |
|
|
86
|
+
|------|--------|------|------|--------|------|-------------|
|
|
87
|
+
| --page | -p | number | No | 1 | Page number (CLI 1-based) | pageNo (0-based) |
|
|
88
|
+
| --size | -s | number | No | 20 | Page size | pageSize |
|
|
89
|
+
| --status | — | number | No | - | Status filter (1=enable, 2=disable) | statusFlag |
|
|
90
|
+
| --keyword | -k | string | No | - | Keyword search (warehouseName and warehouseCode) | warehouseName / warehouseCode |
|
|
91
|
+
| --classes | — | string | No | - | Warehouse class filter | warehouseClasses |
|
|
92
|
+
| --enable-location | — | boolean | No | - | Filter by location management enabled | enableLocation |
|
|
93
|
+
|
|
94
|
+
## 2.4 Field Mapping Table
|
|
95
|
+
|
|
96
|
+
| CLI Parameter | Query Param / DTO Field | Type Conversion | Validation Rule |
|
|
97
|
+
|---------|---------|----------|----------|
|
|
98
|
+
| --page / -p | pageNo | number, CLI page - 1 | >= 0 |
|
|
99
|
+
| --size / -s | pageSize | number | > 0 |
|
|
100
|
+
| --status | statusFlag | number | 1 or 2 |
|
|
101
|
+
| --keyword / -k | warehouseName / warehouseCode | Direct | max=255 |
|
|
102
|
+
| --classes | warehouseClasses | Direct | max=255 |
|
|
103
|
+
| --enable-location | enableLocation | boolean->String (Y/N) | max=1 |
|
|
104
|
+
|
|
105
|
+
## 2.5 Error Code Reference
|
|
106
|
+
|
|
107
|
+
### ExceptionEnum Location
|
|
108
|
+
```
|
|
109
|
+
coffee-liberica-end/
|
|
110
|
+
└── business/liberica-business-master/master-api/
|
|
111
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
112
|
+
└── MasterWarehouseExceptionEnum.java
|
|
113
|
+
├── MASTER_WAREHOUSE_NOT_EXIST("01001370001", "租户仓库不存在")
|
|
114
|
+
├── MASTER_WAREHOUSE_CODE_FORMAT_CANNOT_EMPTY("01001370002", "仓库编码规则不能为空")
|
|
115
|
+
└── MASTER_WAREHOUSE_CODE_FORMAT_NOT_CORRECT("01001370003", "仓库编码规则格式不正确")
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Known Error Codes
|
|
119
|
+
| Error Code | Error Message | Trigger Condition |
|
|
120
|
+
|--------|----------|----------|
|
|
121
|
+
| 01001370001 | Warehouse does not exist | Detail query with non-existent ID |
|
|
122
|
+
|
|
123
|
+
## 2.6 Permission Check
|
|
124
|
+
|
|
125
|
+
| Check Item | Location | Description |
|
|
126
|
+
|--------|------|------|
|
|
127
|
+
| Page Query | No specific permission code on `@GetResource(path = "/page")` | Available to authenticated users |
|
|
128
|
+
|
|
129
|
+
## 2.7 Implementation Notes
|
|
130
|
+
|
|
131
|
+
1. **Pagination**: CLI uses 1-based page numbers. API uses 0-based. Convert: `pageNo = options.page - 1`.
|
|
132
|
+
2. **Response Fields**: Backend returns `rows`, `pageNo`, `pageSize`, `totalRows`. Do NOT use `records` or `total`.
|
|
133
|
+
3. **Keyword Search**: When `--keyword` is provided, send it as both `warehouseName` and `warehouseCode` query params.
|
|
134
|
+
4. **BigInteger ID**: `warehouseId` in response rows must be kept as `string` in TypeScript.
|
|
135
|
+
5. **Table Output**: Default columns: ID, Code, Name, Classes, Location, Status.
|
|
136
|
+
6. **JSON Output**: When `--json` is used, wrap response with standardized pagination object.
|
|
137
|
+
|
|
138
|
+
## 2.8 Example Usage
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# List all warehouses (first page, 20 per page)
|
|
142
|
+
barista liberica warehouses list
|
|
143
|
+
|
|
144
|
+
# List with pagination
|
|
145
|
+
barista liberica warehouses list --page 2 --size 50
|
|
146
|
+
|
|
147
|
+
# Filter by status
|
|
148
|
+
barista liberica warehouses list --status 1
|
|
149
|
+
|
|
150
|
+
# Keyword search
|
|
151
|
+
barista liberica warehouses list --keyword "Main"
|
|
152
|
+
|
|
153
|
+
# Filter by class
|
|
154
|
+
barista liberica warehouses list --classes "FINISHED_GOOD"
|
|
155
|
+
|
|
156
|
+
# JSON output
|
|
157
|
+
barista liberica warehouses list --json
|
|
158
|
+
|
|
159
|
+
# Combine filters
|
|
160
|
+
barista liberica warehouses list \
|
|
161
|
+
--page 1 \
|
|
162
|
+
--size 10 \
|
|
163
|
+
--status 1 \
|
|
164
|
+
--keyword "WH-001" \
|
|
165
|
+
--json
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## 2.9 API Path
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
GET /api/enterprise/purchases/warehouse/page
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Query Parameters:**
|
|
175
|
+
```
|
|
176
|
+
?pageNo=0&pageSize=20&statusFlag=1&warehouseCode=Main&warehouseName=Main
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Headers:**
|
|
180
|
+
```
|
|
181
|
+
Authorization: <token> (No "Bearer " prefix)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Note**: Do NOT include `X-TENANT-ID` header. Tenant is extracted from JWT token.
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { createCalendarSetCommand } from './set.js';
|
|
3
|
+
import { createCalendarListCommand } from './list.js';
|
|
4
|
+
|
|
5
|
+
export function createCalendarCommand(): Command {
|
|
6
|
+
const calendarCommand = new Command('calendar');
|
|
7
|
+
calendarCommand.description('Manage calendar (workdays, holidays)');
|
|
8
|
+
|
|
9
|
+
calendarCommand.addCommand(createCalendarSetCommand());
|
|
10
|
+
calendarCommand.addCommand(createCalendarListCommand());
|
|
11
|
+
|
|
12
|
+
return calendarCommand;
|
|
13
|
+
}
|