@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,152 @@
|
|
|
1
|
+
# barista liberica supplier-contacts create
|
|
2
|
+
|
|
3
|
+
创建供应商联系人。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica supplier-contacts create` |
|
|
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
|
+
└── add(@PostResource(path = "/add", requiredPermission = true, requirePermissionCode = "ADD_MASTER_SUPPLIER_CONTACT"))
|
|
24
|
+
└── public ResponseData<MasterSupplierContactResponse> add(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@RequestBody @Validated(BaseRequest.add.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
|
+
├── supplierId: Long (@NotNull)
|
|
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 (@NotBlank, 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 create [options]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 全局选项
|
|
67
|
+
| 选项 | 类型 | 说明 |
|
|
68
|
+
|------|------|------|
|
|
69
|
+
| `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
|
|
70
|
+
| `--tenant` | string | 租户代码 |
|
|
71
|
+
| `--dry-run` | boolean | 预览模式 |
|
|
72
|
+
| `--json` | boolean | JSON输出 |
|
|
73
|
+
|
|
74
|
+
### 命令选项
|
|
75
|
+
| 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 | 对应DTO字段 |
|
|
76
|
+
|------|--------|------|------|--------|------|-------------|
|
|
77
|
+
| --supplier-id | -s | string | ✅ | - | 供应商ID | supplierId |
|
|
78
|
+
| --name | -n | string | ✅ | - | 姓名 | supplierContactName |
|
|
79
|
+
| --phone | -p | string | ⬜ | - | 手机号 | supplierContactPhone |
|
|
80
|
+
| --telephone | -t | string | ⬜ | - | 座机号 | supplierContactTelephone |
|
|
81
|
+
| --email | -e | string | ⬜ | - | 电子邮箱 | supplierContactEmail |
|
|
82
|
+
| --sex | -x | string | ⬜ | - | 性别 | supplierContactSex |
|
|
83
|
+
| --birthday | -b | string | ⬜ | - | 生日(YYYY-MM-DD) | supplierContactBirthday |
|
|
84
|
+
| --qq | -q | string | ⬜ | - | QQ号 | supplierContactQq |
|
|
85
|
+
| --wechat | -w | string | ⬜ | - | 微信号 | supplierContactWechat |
|
|
86
|
+
| --address | -a | string | ⬜ | - | 详细地址 | supplierContactAddress |
|
|
87
|
+
| --default | -d | boolean | ⬜ | N | 是否默认联系人 | defaultFlag |
|
|
88
|
+
| --remark | -r | string | ⬜ | - | 备注 | remark |
|
|
89
|
+
|
|
90
|
+
## 2.4 字段映射表
|
|
91
|
+
|
|
92
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
93
|
+
|---------|---------|----------|----------|
|
|
94
|
+
| --supplier-id / -s | supplierId | string→Long | @NotNull |
|
|
95
|
+
| --name / -n | supplierContactName | 直接传递 | @NotBlank, max=255 |
|
|
96
|
+
| --phone / -p | supplierContactPhone | 直接传递 | max=256 |
|
|
97
|
+
| --telephone / -t | supplierContactTelephone | 直接传递 | max=256 |
|
|
98
|
+
| --email / -e | supplierContactEmail | 直接传递 | max=512 |
|
|
99
|
+
| --sex / -x | supplierContactSex | 直接传递 | max=255 |
|
|
100
|
+
| --birthday / -b | supplierContactBirthday | string→Date | yyyy-MM-dd |
|
|
101
|
+
| --qq / -q | supplierContactQq | 直接传递 | max=512 |
|
|
102
|
+
| --wechat / -w | supplierContactWechat | 直接传递 | max=512 |
|
|
103
|
+
| --address / -a | supplierContactAddress | 直接传递 | max=512 |
|
|
104
|
+
| --default / -d | defaultFlag | boolean→Y/N | @NotBlank, max=1 |
|
|
105
|
+
| --remark / -r | remark | 直接传递 | max=255 |
|
|
106
|
+
|
|
107
|
+
## 2.5 错误码引用
|
|
108
|
+
|
|
109
|
+
### ExceptionEnum位置
|
|
110
|
+
```
|
|
111
|
+
coffee-liberica-end/
|
|
112
|
+
└── business/liberica-business-master/master-api/
|
|
113
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
114
|
+
└── MasterSupplierContactExceptionEnum.java
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 已知错误码
|
|
118
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
119
|
+
|--------|----------|----------|
|
|
120
|
+
| 01001XXX001 | 租户供应商联系人不存在 | 供应商ID不存在 |
|
|
121
|
+
| 01001XXX... | 相关验证错误 | 字段验证失败 |
|
|
122
|
+
|
|
123
|
+
## 2.6 权限检查
|
|
124
|
+
|
|
125
|
+
| 检查项 | 位置 | 说明 |
|
|
126
|
+
|--------|------|------|
|
|
127
|
+
| PermissionConstants | `ADD_MASTER_SUPPLIER_CONTACT` | 添加供应商联系人需要此权限 |
|
|
128
|
+
| 注解 | `@PostResource(requirePermissionCode = "ADD_MASTER_SUPPLIER_CONTACT")` | Controller方法上 |
|
|
129
|
+
|
|
130
|
+
## 2.7 实现要点
|
|
131
|
+
|
|
132
|
+
1. **必填参数**:--supplier-id 和 --name 必须指定
|
|
133
|
+
2. **defaultFlag**:--default 不指定时默认为 "N",指定时为 "Y"
|
|
134
|
+
3. **dry-run 模式**:预览模式下只显示将要发送的数据,不实际调用 API
|
|
135
|
+
4. **输出格式**:成功后显示创建的联系人信息
|
|
136
|
+
5. **错误处理**:字段验证错误显示友好提示
|
|
137
|
+
|
|
138
|
+
## 2.8 示例用法
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# 创建供应商联系人(dry-run 预览)
|
|
142
|
+
barista liberica supplier-contacts create --supplier-id 123 --name "张三" --phone "13800138000" --dry-run
|
|
143
|
+
|
|
144
|
+
# 实际创建
|
|
145
|
+
barista liberica supplier-contacts create --supplier-id 123 --name "张三" --phone "13800138000" --email "zhang@example.com"
|
|
146
|
+
|
|
147
|
+
# 创建默认联系人
|
|
148
|
+
barista liberica supplier-contacts create --supplier-id 123 --name "李四" --default --address "北京市朝阳区xxx"
|
|
149
|
+
|
|
150
|
+
# JSON 输出
|
|
151
|
+
barista liberica supplier-contacts create --supplier-id 123 --name "张三" --json
|
|
152
|
+
```
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# barista liberica supplier-contacts delete
|
|
2
|
+
|
|
3
|
+
删除供应商联系人。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica supplier-contacts delete <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
|
+
└── delete(@PostResource(path = "/delete", requiredPermission = true, requirePermissionCode = "DEL_MASTER_SUPPLIER_CONTACT"))
|
|
24
|
+
└── public ResponseData<?> delete(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@RequestBody @Validated(BaseRequest.delete.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 delete)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Response DTO位置
|
|
40
|
+
```
|
|
41
|
+
coffee-liberica-end/
|
|
42
|
+
└── business/liberica-business-master/master-api/
|
|
43
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
44
|
+
└── SuccessResponseData<?>
|
|
45
|
+
└── 无具体数据
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 2.3 CLI参数设计
|
|
49
|
+
|
|
50
|
+
### 命令结构
|
|
51
|
+
```
|
|
52
|
+
barista liberica supplier-contacts delete <contact-id> [options]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 位置参数
|
|
56
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
57
|
+
|------|------|------|------|
|
|
58
|
+
| contact-id | string | ✅ | 供应商联系人ID |
|
|
59
|
+
|
|
60
|
+
### 全局选项
|
|
61
|
+
| 选项 | 类型 | 说明 |
|
|
62
|
+
|------|------|------|
|
|
63
|
+
| `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
|
|
64
|
+
| `--tenant` | string | 租户代码 |
|
|
65
|
+
| `--dry-run` | boolean | 预览模式(默认开启) |
|
|
66
|
+
| `--force` | boolean | 跳过确认,直接执行删除 |
|
|
67
|
+
| `--json` | boolean | JSON输出 |
|
|
68
|
+
|
|
69
|
+
## 2.4 字段映射表
|
|
70
|
+
|
|
71
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
72
|
+
|---------|---------|----------|----------|
|
|
73
|
+
| <contact-id> | supplierContactId | string→Long | @NotNull |
|
|
74
|
+
|
|
75
|
+
## 2.5 错误码引用
|
|
76
|
+
|
|
77
|
+
### ExceptionEnum位置
|
|
78
|
+
```
|
|
79
|
+
coffee-liberica-end/
|
|
80
|
+
└── business/liberica-business-master/master-api/
|
|
81
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
82
|
+
└── MasterSupplierContactExceptionEnum.java
|
|
83
|
+
└── MASTER_SUPPLIER_CONTACT_NOT_EXIST("01001XXX001", "租户供应商联系人不存在")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 已知错误码
|
|
87
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
88
|
+
|--------|----------|----------|
|
|
89
|
+
| 01001XXX001 | 租户供应商联系人不存在 | contact-id 不存在或不属于当前租户 |
|
|
90
|
+
|
|
91
|
+
## 2.6 权限检查
|
|
92
|
+
|
|
93
|
+
| 检查项 | 位置 | 说明 |
|
|
94
|
+
|--------|------|------|
|
|
95
|
+
| PermissionConstants | `DEL_MASTER_SUPPLIER_CONTACT` | 删除供应商联系人需要此权限 |
|
|
96
|
+
| 注解 | `@PostResource(requirePermissionCode = "DEL_MASTER_SUPPLIER_CONTACT")` | Controller方法上 |
|
|
97
|
+
|
|
98
|
+
## 2.7 实现要点
|
|
99
|
+
|
|
100
|
+
1. **位置参数**:contact-id 必须指定
|
|
101
|
+
2. **默认 dry-run**:不带 --force 时默认是 dry-run 模式,只预览不执行
|
|
102
|
+
3. **--force 确认**:实际删除前必须显式指定 --force
|
|
103
|
+
4. **输出格式**:预览模式显示将要删除的联系人信息,确认后显示删除结果
|
|
104
|
+
5. **错误处理**:联系人不存在时显示友好错误信息
|
|
105
|
+
|
|
106
|
+
## 2.8 示例用法
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# 预览删除(默认 dry-run)
|
|
110
|
+
barista liberica supplier-contacts delete 12345
|
|
111
|
+
# 输出: 🔍 Dry-Run 模式:不会实际删除
|
|
112
|
+
# 将删除联系人: 张三 (ID: 12345)
|
|
113
|
+
# 添加 --force 选项以确认删除
|
|
114
|
+
|
|
115
|
+
# 确认删除
|
|
116
|
+
barista liberica supplier-contacts delete 12345 --force
|
|
117
|
+
|
|
118
|
+
# JSON 预览
|
|
119
|
+
barista liberica supplier-contacts delete 12345 --json
|
|
120
|
+
|
|
121
|
+
# JSON 确认删除
|
|
122
|
+
barista liberica supplier-contacts delete 12345 --force --json
|
|
123
|
+
```
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# barista liberica supplier-contacts get
|
|
2
|
+
|
|
3
|
+
获取单个供应商联系人详情。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica supplier-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/purchases/
|
|
22
|
+
└── EnterpriseSupplierContactController.java
|
|
23
|
+
└── detail(@GetResource(path = "/detail"))
|
|
24
|
+
└── public ResponseData<MasterSupplierContactResponse> detail(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
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 detail)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Response DTO位置
|
|
40
|
+
```
|
|
41
|
+
coffee-liberica-end/
|
|
42
|
+
└── business/liberica-business-master/master-api/
|
|
43
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
44
|
+
└── MasterSupplierContactResponse.java
|
|
45
|
+
├── supplierContactId: Long
|
|
46
|
+
├── supplierId: Long
|
|
47
|
+
├── supplierContactName: String
|
|
48
|
+
├── supplierContactPhone: String
|
|
49
|
+
├── supplierContactTelephone: String
|
|
50
|
+
├── supplierContactEmail: String
|
|
51
|
+
├── supplierContactSex: String
|
|
52
|
+
├── supplierContactBirthday: Date
|
|
53
|
+
├── supplierContactQq: String
|
|
54
|
+
├── supplierContactWechat: String
|
|
55
|
+
├── supplierContactAddress: 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 supplier-contacts get <contact-id> [options]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 位置参数
|
|
70
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
71
|
+
|------|------|------|------|
|
|
72
|
+
| contact-id | string | ✅ | 供应商联系人ID (supplierContactId) |
|
|
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> (位置参数) | supplierContactId | string→Long | @NotNull, 必须为正整数 |
|
|
91
|
+
|
|
92
|
+
## 2.5 错误码引用
|
|
93
|
+
|
|
94
|
+
### ExceptionEnum位置
|
|
95
|
+
```
|
|
96
|
+
coffee-liberica-end/
|
|
97
|
+
└── business/liberica-business-master/master-api/
|
|
98
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
99
|
+
└── MasterSupplierContactExceptionEnum.java
|
|
100
|
+
└── MASTER_SUPPLIER_CONTACT_NOT_EXIST("01001XXX001", "租户供应商联系人不存在")
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 已知错误码
|
|
104
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
105
|
+
|--------|----------|----------|
|
|
106
|
+
| 01001XXX001 | 租户供应商联系人不存在 | 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_SUPPLIER_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 supplier-contacts get 12345
|
|
126
|
+
|
|
127
|
+
# JSON 输出
|
|
128
|
+
barista liberica supplier-contacts get 12345 --json
|
|
129
|
+
|
|
130
|
+
# 联系人不存在
|
|
131
|
+
barista liberica supplier-contacts get 99999
|
|
132
|
+
# 输出: Error: 租户供应商联系人不存在 (01001XXX001)
|
|
133
|
+
```
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# barista liberica supplier-contacts list
|
|
2
|
+
|
|
3
|
+
查询供应商联系人列表。
|
|
4
|
+
|
|
5
|
+
## 2.1 命令元数据
|
|
6
|
+
|
|
7
|
+
| 字段 | 值 |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| 完整命令 | `barista liberica supplier-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/purchases/
|
|
22
|
+
└── EnterpriseSupplierContactController.java
|
|
23
|
+
└── list(@GetResource(path = "/list"))
|
|
24
|
+
└── public ResponseData<List<MasterSupplierContactResponse>> list(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
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
|
+
├── supplierId: Long (@NotNull)
|
|
37
|
+
├── supplierContactName: String (搜索关键词)
|
|
38
|
+
├── pageNo: Long (分页页码)
|
|
39
|
+
└── pageSize: Long (分页大小)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Response DTO位置
|
|
43
|
+
```
|
|
44
|
+
coffee-liberica-end/
|
|
45
|
+
└── business/liberica-business-master/master-api/
|
|
46
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
47
|
+
└── MasterSupplierContactResponse.java
|
|
48
|
+
├── supplierContactId: Long
|
|
49
|
+
├── supplierId: Long
|
|
50
|
+
├── supplierContactName: String
|
|
51
|
+
├── supplierContactPhone: String
|
|
52
|
+
├── supplierContactTelephone: String
|
|
53
|
+
├── supplierContactEmail: String
|
|
54
|
+
├── supplierContactSex: String
|
|
55
|
+
├── supplierContactBirthday: Date
|
|
56
|
+
├── supplierContactQq: String
|
|
57
|
+
├── supplierContactWechat: String
|
|
58
|
+
├── supplierContactAddress: 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 supplier-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
|
+
| --supplier-id | -s | string | ✅ | - | 供应商ID | supplierId |
|
|
83
|
+
| --page | -p | number | ⬜ | 1 | 页码 | pageNo |
|
|
84
|
+
| --size | -z | number | ⬜ | 20 | 每页条数 | pageSize |
|
|
85
|
+
| --search | -S | string | ⬜ | - | 搜索关键词(姓名) | supplierContactName |
|
|
86
|
+
|
|
87
|
+
## 2.4 字段映射表
|
|
88
|
+
|
|
89
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
90
|
+
|---------|---------|----------|----------|
|
|
91
|
+
| --supplier-id / -s | supplierId | string→Long | @NotNull |
|
|
92
|
+
| --page / -p | pageNo | number→Long | >= 1 |
|
|
93
|
+
| --size / -z | pageSize | number→Long | 1-100 |
|
|
94
|
+
| --search / -S | supplierContactName | 直接传递 | 模糊查询 |
|
|
95
|
+
|
|
96
|
+
## 2.5 错误码引用
|
|
97
|
+
|
|
98
|
+
### ExceptionEnum位置
|
|
99
|
+
```
|
|
100
|
+
coffee-liberica-end/
|
|
101
|
+
└── business/liberica-business-master/master-api/
|
|
102
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
103
|
+
└── MasterSupplierContactExceptionEnum.java
|
|
104
|
+
└── MASTER_SUPPLIER_CONTACT_NOT_EXIST("01001XXX001", "租户供应商联系人不存在")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 已知错误码
|
|
108
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
109
|
+
|--------|----------|----------|
|
|
110
|
+
| 01001XXX001 | 租户供应商联系人不存在 | 供应商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. **必填参数**:--supplier-id 必须指定
|
|
123
|
+
2. **分页默认值**:page=1, size=20
|
|
124
|
+
3. **搜索行为**:supplierContactName 支持模糊查询
|
|
125
|
+
4. **无结果处理**:返回空列表,不抛出异常
|
|
126
|
+
5. **tenantId来源**:来自 X-TENANT-ID header
|
|
127
|
+
6. **输出格式**:表格形式展示联系人列表
|
|
128
|
+
|
|
129
|
+
## 2.8 示例用法
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# 列出供应商的所有联系人
|
|
133
|
+
barista liberica supplier-contacts list --supplier-id 12345
|
|
134
|
+
|
|
135
|
+
# 指定页码和每页条数
|
|
136
|
+
barista liberica supplier-contacts list --supplier-id 12345 --page 2 --size 50
|
|
137
|
+
|
|
138
|
+
# 搜索联系人
|
|
139
|
+
barista liberica supplier-contacts list --supplier-id 12345 --search "张"
|
|
140
|
+
|
|
141
|
+
# JSON 输出(便于脚本处理)
|
|
142
|
+
barista liberica supplier-contacts list --supplier-id 12345 --json
|
|
143
|
+
```
|