@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,133 @@
|
|
|
1
|
+
# barista liberica client-contacts get
|
|
2
|
+
|
|
3
|
+
获取单个客户联系人详情。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica client-contacts get <contact-id>` |
|
|
10
|
+
| 功能描述 | 获取单个客户联系人详情 |
|
|
11
|
+
| HTTP方法 | GET |
|
|
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/sales/
|
|
22
|
+
└── EnterpriseClientContactController.java
|
|
23
|
+
└── detail(@GetResource(path = "/detail"))
|
|
24
|
+
└── public ResponseData<MasterClientContactResponse> detail(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
MasterClientContactRequest masterClientContactRequest
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Request DTO位置
|
|
31
|
+
```
|
|
32
|
+
coffee-liberica-end/
|
|
33
|
+
└── business/liberica-business-sales/sales-api/
|
|
34
|
+
└── src/main/java/com/newpeak/liberica/sales/api/pojo/request/
|
|
35
|
+
└── MasterClientContactRequest.java
|
|
36
|
+
└── clientContactId: Long (@NotNull on detail)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Response DTO位置
|
|
40
|
+
```
|
|
41
|
+
coffee-liberica-end/
|
|
42
|
+
└── business/liberica-business-sales/sales-api/
|
|
43
|
+
└── src/main/java/com/newpeak/liberica/sales/api/pojo/response/
|
|
44
|
+
└── MasterClientContactResponse.java
|
|
45
|
+
├── clientContactId: Long
|
|
46
|
+
├── clientId: Long
|
|
47
|
+
├── clientContactName: String
|
|
48
|
+
├── clientContactPhone: String
|
|
49
|
+
├── clientContactTelephone: String
|
|
50
|
+
├── clientContactEmail: String
|
|
51
|
+
├── clientContactSex: String
|
|
52
|
+
├── clientContactBirthday: Date
|
|
53
|
+
├── clientContactQq: String
|
|
54
|
+
├── clientContactWechat: String
|
|
55
|
+
├── clientContactAddress: String
|
|
56
|
+
├── defaultFlag: String (Y/N)
|
|
57
|
+
├── remark: String
|
|
58
|
+
├── createTime: String
|
|
59
|
+
└── updateTime: String
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 2.3 CLI参数设计
|
|
63
|
+
|
|
64
|
+
### 命令结构
|
|
65
|
+
```
|
|
66
|
+
barista liberica client-contacts get <contact-id> [options]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 位置参数
|
|
70
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
71
|
+
|------|------|------|------|
|
|
72
|
+
| contact-id | string | ✅ | 客户联系人ID (clientContactId) |
|
|
73
|
+
|
|
74
|
+
### 全局选项
|
|
75
|
+
| 选项 | 类型 | 说明 |
|
|
76
|
+
|------|------|------|
|
|
77
|
+
| `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
|
|
78
|
+
| `--tenant` | string | 租户代码 |
|
|
79
|
+
| `--json` | boolean | JSON输出 |
|
|
80
|
+
|
|
81
|
+
### 命令选项
|
|
82
|
+
| 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 |
|
|
83
|
+
|------|--------|------|------|--------|------|
|
|
84
|
+
| — | — | — | — | — | 此命令无额外选项,ID 通过位置参数传入 |
|
|
85
|
+
|
|
86
|
+
## 2.4 字段映射表
|
|
87
|
+
|
|
88
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
89
|
+
|---------|---------|----------|----------|
|
|
90
|
+
| <contact-id> (位置参数) | clientContactId | string→Long | @NotNull, 必须为正整数 |
|
|
91
|
+
|
|
92
|
+
## 2.5 错误码引用
|
|
93
|
+
|
|
94
|
+
### ExceptionEnum位置
|
|
95
|
+
```
|
|
96
|
+
coffee-liberica-end/
|
|
97
|
+
└── business/liberica-business-sales/sales-api/
|
|
98
|
+
└── src/main/java/com/newpeak/liberica/sales/api/pojo/response/
|
|
99
|
+
└── MasterClientContactResponse.java
|
|
100
|
+
└── MASTER_CLIENT_CONTACT_NOT_EXIST("01001207001", "租户客户联系人不存在")
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 已知错误码
|
|
104
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
105
|
+
|--------|----------|----------|
|
|
106
|
+
| 01001207001 | 租户客户联系人不存在 | contact-id 不存在或不属于当前租户 |
|
|
107
|
+
|
|
108
|
+
## 2.6 权限检查
|
|
109
|
+
|
|
110
|
+
| 检查项 | 位置 | 说明 |
|
|
111
|
+
|--------|------|------|
|
|
112
|
+
| 注解 | `@GetResource(path = "/detail")` | 无 requiredPermission |
|
|
113
|
+
|
|
114
|
+
## 2.7 实现要点
|
|
115
|
+
|
|
116
|
+
1. **位置参数**:`get` 命令使用 `<contact-id>` 位置参数指定联系人ID
|
|
117
|
+
2. **错误处理**:联系人不存在时抛出 `MASTER_CLIENT_CONTACT_NOT_EXIST`,CLI 显示友好错误信息
|
|
118
|
+
3. **tenantId来源**:来自 X-TENANT-ID header,后端自动按租户隔离数据
|
|
119
|
+
4. **输出格式**:表格形式展示联系人详情,或 JSON 格式
|
|
120
|
+
|
|
121
|
+
## 2.8 示例用法
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# 获取联系人详情
|
|
125
|
+
barista liberica client-contacts get 12345
|
|
126
|
+
|
|
127
|
+
# JSON 输出
|
|
128
|
+
barista liberica client-contacts get 12345 --json
|
|
129
|
+
|
|
130
|
+
# 联系人不存在
|
|
131
|
+
barista liberica client-contacts get 99999
|
|
132
|
+
# 输出: Error: 租户客户联系人不存在 (01001207001)
|
|
133
|
+
```
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# barista liberica client-contacts list
|
|
2
|
+
|
|
3
|
+
查询客户联系人列表。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica client-contacts list` |
|
|
10
|
+
| 功能描述 | 查询指定客户的联系人列表 |
|
|
11
|
+
| HTTP方法 | GET |
|
|
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/sales/
|
|
22
|
+
└── EnterpriseClientContactController.java
|
|
23
|
+
└── list(@GetResource(path = "/list"))
|
|
24
|
+
└── public ResponseData<List<MasterClientContactResponse>> list(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
MasterClientContactRequest masterClientContactRequest
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Request DTO位置
|
|
31
|
+
```
|
|
32
|
+
coffee-liberica-end/
|
|
33
|
+
└── business/liberica-business-sales/sales-api/
|
|
34
|
+
└── src/main/java/com/newpeak/liberica/sales/api/pojo/request/
|
|
35
|
+
└── MasterClientContactRequest.java
|
|
36
|
+
├── clientId: Long (@NotNull)
|
|
37
|
+
├── clientContactName: String (搜索关键词)
|
|
38
|
+
├── pageNo: Long (分页页码)
|
|
39
|
+
└── pageSize: Long (分页大小)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Response DTO位置
|
|
43
|
+
```
|
|
44
|
+
coffee-liberica-end/
|
|
45
|
+
└── business/liberica-business-sales/sales-api/
|
|
46
|
+
└── src/main/java/com/newpeak/liberica/sales/api/pojo/response/
|
|
47
|
+
└── MasterClientContactResponse.java
|
|
48
|
+
├── clientContactId: Long
|
|
49
|
+
├── clientId: Long
|
|
50
|
+
├── clientContactName: String
|
|
51
|
+
├── clientContactPhone: String
|
|
52
|
+
├── clientContactTelephone: String
|
|
53
|
+
├── clientContactEmail: String
|
|
54
|
+
├── clientContactSex: String
|
|
55
|
+
├── clientContactBirthday: Date
|
|
56
|
+
├── clientContactQq: String
|
|
57
|
+
├── clientContactWechat: String
|
|
58
|
+
├── clientContactAddress: String
|
|
59
|
+
├── defaultFlag: String (Y/N)
|
|
60
|
+
├── remark: String
|
|
61
|
+
├── createTime: String
|
|
62
|
+
└── updateTime: String
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 2.3 CLI参数设计
|
|
66
|
+
|
|
67
|
+
### 命令结构
|
|
68
|
+
```
|
|
69
|
+
barista liberica client-contacts list [options]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 全局选项
|
|
73
|
+
| 选项 | 类型 | 说明 |
|
|
74
|
+
|------|------|------|
|
|
75
|
+
| `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
|
|
76
|
+
| `--tenant` | string | 租户代码 |
|
|
77
|
+
| `--json` | boolean | JSON输出 |
|
|
78
|
+
|
|
79
|
+
### 命令选项
|
|
80
|
+
| 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 | 对应DTO字段 |
|
|
81
|
+
|------|--------|------|------|--------|------|-------------|
|
|
82
|
+
| --client-id | -c | string | ✅ | - | 客户ID | clientId |
|
|
83
|
+
| --page | -p | number | ⬜ | 1 | 页码 | pageNo |
|
|
84
|
+
| --size | -s | number | ⬜ | 20 | 每页条数 | pageSize |
|
|
85
|
+
| --search | -S | string | ⬜ | - | 搜索关键词(姓名) | clientContactName |
|
|
86
|
+
|
|
87
|
+
## 2.4 字段映射表
|
|
88
|
+
|
|
89
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
90
|
+
|---------|---------|----------|----------|
|
|
91
|
+
| --client-id / -c | clientId | string→Long | @NotNull |
|
|
92
|
+
| --page / -p | pageNo | number→Long | >= 1 |
|
|
93
|
+
| --size / -s | pageSize | number→Long | 1-100 |
|
|
94
|
+
| --search / -S | clientContactName | 直接传递 | 模糊查询 |
|
|
95
|
+
|
|
96
|
+
## 2.5 错误码引用
|
|
97
|
+
|
|
98
|
+
### ExceptionEnum位置
|
|
99
|
+
```
|
|
100
|
+
coffee-liberica-end/
|
|
101
|
+
└── business/liberica-business-sales/sales-api/
|
|
102
|
+
└── src/main/java/com/newpeak/liberica/sales/api/exception/enums/
|
|
103
|
+
└── MasterClientContactExceptionEnum.java
|
|
104
|
+
└── MASTER_CLIENT_CONTACT_NOT_EXIST("01001207001", "租户客户联系人不存在")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 已知错误码
|
|
108
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
109
|
+
|--------|----------|----------|
|
|
110
|
+
| 01001207001 | 租户客户联系人不存在 | 客户ID不存在时 |
|
|
111
|
+
|
|
112
|
+
## 2.6 权限检查
|
|
113
|
+
|
|
114
|
+
| 检查项 | 位置 | 说明 |
|
|
115
|
+
|--------|------|------|
|
|
116
|
+
| 注解 | `@GetResource(path = "/list")` | 无 requiredPermission(无需权限码) |
|
|
117
|
+
|
|
118
|
+
**注意**:list 接口在 Controller 层无需权限校验,数据范围通过 tenantId 隔离。
|
|
119
|
+
|
|
120
|
+
## 2.7 实现要点
|
|
121
|
+
|
|
122
|
+
1. **必填参数**:--client-id 必须指定
|
|
123
|
+
2. **分页默认值**:page=1, size=20
|
|
124
|
+
3. **搜索行为**:clientContactName 支持模糊查询
|
|
125
|
+
4. **无结果处理**:返回空列表,不抛出异常
|
|
126
|
+
5. **tenantId来源**:来自 X-TENANT-ID header
|
|
127
|
+
6. **输出格式**:表格形式展示联系人列表
|
|
128
|
+
|
|
129
|
+
## 2.8 示例用法
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# 列出客户的所有联系人
|
|
133
|
+
barista liberica client-contacts list --client-id 12345
|
|
134
|
+
|
|
135
|
+
# 指定页码和每页条数
|
|
136
|
+
barista liberica client-contacts list --client-id 12345 --page 2 --size 50
|
|
137
|
+
|
|
138
|
+
# 搜索联系人
|
|
139
|
+
barista liberica client-contacts list --client-id 12345 --search "张"
|
|
140
|
+
|
|
141
|
+
# JSON 输出(便于脚本处理)
|
|
142
|
+
barista liberica client-contacts list --client-id 12345 --json
|
|
143
|
+
```
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# barista liberica client-contacts update
|
|
2
|
+
|
|
3
|
+
更新客户联系人信息。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica client-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/sales/
|
|
22
|
+
└── EnterpriseClientContactController.java
|
|
23
|
+
└── edit(@PostResource(path = "/edit", requiredPermission = true, requirePermissionCode = "EDIT_MASTER_CLIENT_CONTACT"))
|
|
24
|
+
└── public ResponseData<?> edit(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@RequestBody @Validated(BaseRequest.edit.class) MasterClientContactRequest masterClientContactRequest
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Request DTO位置
|
|
31
|
+
```
|
|
32
|
+
coffee-liberica-end/
|
|
33
|
+
└── business/liberica-business-sales/sales-api/
|
|
34
|
+
└── src/main/java/com/newpeak/liberica/sales/api/pojo/request/
|
|
35
|
+
└── MasterClientContactRequest.java
|
|
36
|
+
├── clientContactId: Long (@NotNull on edit)
|
|
37
|
+
├── clientContactName: String (@NotBlank, max=255)
|
|
38
|
+
├── clientContactPhone: String (max=256)
|
|
39
|
+
├── clientContactTelephone: String (max=256)
|
|
40
|
+
├── clientContactEmail: String (max=512)
|
|
41
|
+
├── clientContactSex: String (max=255)
|
|
42
|
+
├── clientContactBirthday: Date
|
|
43
|
+
├── clientContactQq: String (max=512)
|
|
44
|
+
├── clientContactWechat: String (max=512)
|
|
45
|
+
├── clientContactAddress: 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-sales/sales-api/
|
|
54
|
+
└── src/main/java/com/newpeak/liberica/sales/api/pojo/response/
|
|
55
|
+
└── MasterClientContactResponse.java
|
|
56
|
+
└── (同 get 接口)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 2.3 CLI参数设计
|
|
60
|
+
|
|
61
|
+
### 命令结构
|
|
62
|
+
```
|
|
63
|
+
barista liberica client-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 | ⬜ | - | 姓名 | clientContactName |
|
|
83
|
+
| --phone | -p | string | ⬜ | - | 手机号 | clientContactPhone |
|
|
84
|
+
| --telephone | -t | string | ⬜ | - | 座机号 | clientContactTelephone |
|
|
85
|
+
| --email | -e | string | ⬜ | - | 电子邮箱 | clientContactEmail |
|
|
86
|
+
| --sex | -s | string | ⬜ | - | 性别 | clientContactSex |
|
|
87
|
+
| --birthday | -b | string | ⬜ | - | 生日(YYYY-MM-DD) | clientContactBirthday |
|
|
88
|
+
| --qq | -q | string | ⬜ | - | QQ号 | clientContactQq |
|
|
89
|
+
| --wechat | -w | string | ⬜ | - | 微信号 | clientContactWechat |
|
|
90
|
+
| --address | -a | string | ⬜ | - | 详细地址 | clientContactAddress |
|
|
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> | clientContactId | string→Long | @NotNull |
|
|
101
|
+
| --name / -n | clientContactName | 直接传递 | max=255 |
|
|
102
|
+
| --phone / -p | clientContactPhone | 直接传递 | max=256 |
|
|
103
|
+
| --telephone / -t | clientContactTelephone | 直接传递 | max=256 |
|
|
104
|
+
| --email / -e | clientContactEmail | 直接传递 | max=512 |
|
|
105
|
+
| --sex / -s | clientContactSex | 直接传递 | max=255 |
|
|
106
|
+
| --birthday / -b | clientContactBirthday | string→Date | yyyy-MM-dd |
|
|
107
|
+
| --qq / -q | clientContactQq | 直接传递 | max=512 |
|
|
108
|
+
| --wechat / -w | clientContactWechat | 直接传递 | max=512 |
|
|
109
|
+
| --address / -a | clientContactAddress | 直接传递 | 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-sales/sales-api/
|
|
119
|
+
└── src/main/java/com/newpeak/liberica/sales/api/exception/enums/
|
|
120
|
+
└── MasterClientContactExceptionEnum.java
|
|
121
|
+
└── MASTER_CLIENT_CONTACT_NOT_EXIST("01001207001", "租户客户联系人不存在")
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 已知错误码
|
|
125
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
126
|
+
|--------|----------|----------|
|
|
127
|
+
| 01001207001 | 租户客户联系人不存在 | contact-id 不存在或不属于当前租户 |
|
|
128
|
+
|
|
129
|
+
## 2.6 权限检查
|
|
130
|
+
|
|
131
|
+
| 检查项 | 位置 | 说明 |
|
|
132
|
+
|--------|------|------|
|
|
133
|
+
| PermissionConstants | `EDIT_MASTER_CLIENT_CONTACT` | 编辑客户联系人需要此权限 |
|
|
134
|
+
| 注解 | `@PostResource(requirePermissionCode = "EDIT_MASTER_CLIENT_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 client-contacts update 12345 --name "新姓名" --dry-run
|
|
149
|
+
|
|
150
|
+
# 实际更新
|
|
151
|
+
barista liberica client-contacts update 12345 --name "新姓名" --phone "13900139000"
|
|
152
|
+
|
|
153
|
+
# 更新多个字段
|
|
154
|
+
barista liberica client-contacts update 12345 --email "new@example.com" --address "新地址"
|
|
155
|
+
|
|
156
|
+
# JSON 输出
|
|
157
|
+
barista liberica client-contacts update 12345 --name "新姓名" --json
|
|
158
|
+
```
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# barista liberica locations create
|
|
2
|
+
|
|
3
|
+
Create a new warehouse location.
|
|
4
|
+
|
|
5
|
+
## 2.1 Command Metadata
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| Full Command | `barista liberica locations create` |
|
|
10
|
+
| Description | Create a new warehouse location |
|
|
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
|
+
└── EnterpriseWarehouseLocationController.java
|
|
23
|
+
└── add(@PostResource(path = "/add", requiredPermission = true, requirePermissionCode = MasterWarehouseLocationPermissionConstants.ADD_MASTER_WAREHOUSE_LOCATION))
|
|
24
|
+
└── public ResponseData<MasterWarehouseLocationResponse> add(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@RequestBody @Validated(BaseRequest.add.class) MasterWarehouseLocationRequest masterWarehouseLocationRequest
|
|
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
|
+
└── MasterWarehouseLocationRequest.java
|
|
36
|
+
├── warehouseId: Long (@NotNull on add)
|
|
37
|
+
├── warehouseLocationCode: String (@NotBlank on add, max=255)
|
|
38
|
+
├── warehouseLocationName: String (max=255)
|
|
39
|
+
├── statusFlag: Integer
|
|
40
|
+
└── remark: String (max=255)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Response DTO Location
|
|
44
|
+
```
|
|
45
|
+
coffee-liberica-end/
|
|
46
|
+
└── business/liberica-business-master/master-api/
|
|
47
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
48
|
+
└── MasterWarehouseLocationResponse.java
|
|
49
|
+
├── warehouseLocationId: Long
|
|
50
|
+
├── warehouseId: Long
|
|
51
|
+
├── warehouseLocationCode: String
|
|
52
|
+
├── warehouseLocationName: String
|
|
53
|
+
├── statusFlag: Integer (1=enable, 2=disable)
|
|
54
|
+
└── remark: String
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 2.3 CLI Parameter Design
|
|
58
|
+
|
|
59
|
+
### Command Structure
|
|
60
|
+
```
|
|
61
|
+
barista liberica locations create [options]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Global Options
|
|
65
|
+
| Option | Type | Description |
|
|
66
|
+
|------|------|------|
|
|
67
|
+
| `--env` | string | Target environment (dev\|test\|prod-cn\|prod-jp) |
|
|
68
|
+
| `--tenant` | string | Tenant code |
|
|
69
|
+
| `--dry-run` | boolean | Preview mode (no actual API call) |
|
|
70
|
+
| `--json` | boolean | JSON output |
|
|
71
|
+
|
|
72
|
+
### Command Options
|
|
73
|
+
| Option | Short | Type | Required | Default | Description | Maps to DTO Field |
|
|
74
|
+
|------|--------|------|------|--------|------|-------------|
|
|
75
|
+
| --warehouse-id | -w | string | Yes | - | Parent warehouse ID | warehouseId |
|
|
76
|
+
| --code | -c | string | Yes | - | Location code | warehouseLocationCode |
|
|
77
|
+
| --name | -n | string | Yes | - | Location name | warehouseLocationName |
|
|
78
|
+
| --status | -s | number | No | 1 | Status (1=enable, 2=disable) | statusFlag |
|
|
79
|
+
| --remark | -r | string | No | - | Remarks | remark |
|
|
80
|
+
|
|
81
|
+
## 2.4 Field Mapping Table
|
|
82
|
+
|
|
83
|
+
| CLI Parameter | DTO Field | Type Conversion | Validation Rule |
|
|
84
|
+
|---------|---------|----------|----------|
|
|
85
|
+
| --warehouse-id / -w | warehouseId | string | @NotNull, max=255 |
|
|
86
|
+
| --code / -c | warehouseLocationCode | Direct | @NotBlank, max=255, unique per warehouse |
|
|
87
|
+
| --name / -n | warehouseLocationName | Direct | max=255 |
|
|
88
|
+
| --status / -s | statusFlag | number | 1 or 2 |
|
|
89
|
+
| --remark / -r | remark | Direct | max=255 |
|
|
90
|
+
|
|
91
|
+
**Auto-Generated Fields:**
|
|
92
|
+
| Field | Value |
|
|
93
|
+
|------|-----|
|
|
94
|
+
| tenantId | From JWT token (do NOT pass X-TENANT-ID header) |
|
|
95
|
+
| statusFlag | Default 1 (enabled) when not provided |
|
|
96
|
+
|
|
97
|
+
## 2.5 Error Code Reference
|
|
98
|
+
|
|
99
|
+
### ExceptionEnum Location
|
|
100
|
+
```
|
|
101
|
+
coffee-liberica-end/
|
|
102
|
+
└── business/liberica-business-master/master-api/
|
|
103
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
104
|
+
└── MasterWarehouseLocationExceptionEnum.java
|
|
105
|
+
├── MASTER_WAREHOUSE_LOCATION_NOT_EXIST("01001380001", "租户仓位不存在")
|
|
106
|
+
├── MASTER_WAREHOUSE_LOCATION_CODE_FORMAT_CANNOT_EMPTY("01001380002", "仓位编码规则不能为空")
|
|
107
|
+
└── MASTER_WAREHOUSE_LOCATION_CODE_FORMAT_NOT_CORRECT("01001380003", "仓位编码规则格式不正确")
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Known Error Codes
|
|
111
|
+
| Error Code | Error Message | Trigger Condition |
|
|
112
|
+
|--------|----------|----------|
|
|
113
|
+
| 01001380001 | Location does not exist | Edit/detail with non-existent ID |
|
|
114
|
+
| 01001380002 | Location code format cannot be empty | Auto-generation rule not configured |
|
|
115
|
+
| 01001380003 | Location code format incorrect | Invalid code format pattern |
|
|
116
|
+
|
|
117
|
+
## 2.6 Permission Check
|
|
118
|
+
|
|
119
|
+
| Check Item | Location | Description |
|
|
120
|
+
|--------|------|------|
|
|
121
|
+
| PermissionConstants | `MasterWarehouseLocationPermissionConstants.ADD_MASTER_WAREHOUSE_LOCATION` | Controller layer `@PostResource(requirePermissionCode = "ADD_MASTER_WAREHOUSE_LOCATION")` |
|
|
122
|
+
|
|
123
|
+
## 2.7 Implementation Notes
|
|
124
|
+
|
|
125
|
+
1. **Required Fields**: `--warehouse-id`, `--code`, and `--name` must be provided.
|
|
126
|
+
2. **Manual Code**: `warehouseLocationCode` is NOT auto-generated. Must be unique within the warehouse.
|
|
127
|
+
3. **Dry-Run Support**: Use `--dry-run` to preview request without calling API.
|
|
128
|
+
4. **Status Default**: `--status` defaults to 1 (enabled).
|
|
129
|
+
5. **No Batch Create**: This command does NOT support batch creation (one location per call). Use `barista liberica locations batch-create` for bulk operations if implemented separately.
|
|
130
|
+
6. **BigInteger IDs**: `warehouseLocationId` and `warehouseId` in response must be parsed as `string` in TypeScript to avoid precision loss.
|
|
131
|
+
|
|
132
|
+
## 2.8 Example Usage
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Create with minimal required fields
|
|
136
|
+
barista liberica locations create \
|
|
137
|
+
--warehouse-id "1234567890123456789" \
|
|
138
|
+
--code "A-01-01" \
|
|
139
|
+
--name "Shelf A-01-01"
|
|
140
|
+
|
|
141
|
+
# Create with all options
|
|
142
|
+
barista liberica locations create \
|
|
143
|
+
--warehouse-id "1234567890123456789" \
|
|
144
|
+
--code "B-02-03" \
|
|
145
|
+
--name "Bin B-02-03" \
|
|
146
|
+
--status 1 \
|
|
147
|
+
--remark "High-priority picking zone"
|
|
148
|
+
|
|
149
|
+
# Create disabled location
|
|
150
|
+
barista liberica locations create \
|
|
151
|
+
--warehouse-id "1234567890123456789" \
|
|
152
|
+
--code "C-99-99" \
|
|
153
|
+
--name "Reserved" \
|
|
154
|
+
--status 2
|
|
155
|
+
|
|
156
|
+
# Dry-run to preview
|
|
157
|
+
barista liberica locations create \
|
|
158
|
+
--warehouse-id "1234567890123456789" \
|
|
159
|
+
--code "TEST-01" \
|
|
160
|
+
--name "Test Location" \
|
|
161
|
+
--dry-run
|
|
162
|
+
|
|
163
|
+
# JSON output
|
|
164
|
+
barista liberica locations create \
|
|
165
|
+
--warehouse-id "1234567890123456789" \
|
|
166
|
+
--code "D-04-01" \
|
|
167
|
+
--name "Dock D-04-01" \
|
|
168
|
+
--json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## 2.9 Request Body Structure
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"warehouseId": "1234567890123456789",
|
|
176
|
+
"warehouseLocationCode": "A-01-01",
|
|
177
|
+
"warehouseLocationName": "Shelf A-01-01",
|
|
178
|
+
"statusFlag": 1,
|
|
179
|
+
"remark": "High-priority picking zone"
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## 2.10 API Path
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
POST /api/enterprise/purchases/warehouse/location/add
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Headers:**
|
|
190
|
+
```
|
|
191
|
+
Authorization: <token> (No "Bearer " prefix)
|
|
192
|
+
Content-Type: application/json
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Note**: Do NOT include `X-TENANT-ID` header. Tenant is extracted from JWT token.
|